q-koa 12.6.2 → 12.6.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/core/app.js CHANGED
@@ -145,7 +145,7 @@ class APP {
145
145
 
146
146
  if (
147
147
  ctx.request.header['user-agent'] &&
148
- ctx.request.header['user-agent'].startsWith('Tencent Security')
148
+ ctx.request.header['user-agent'].includes('Tencent Security')
149
149
  ) {
150
150
  return ctx.ERROR('error')
151
151
  }
@@ -291,7 +291,11 @@ exports.mp_login = async (ctx) => {
291
291
  const { openid, unionid } = res
292
292
  if (!openid) {
293
293
  const msg = `找不到openid, errcode:${res.errcode} app_id:${app_id} app_secrect:${app_secrect}`
294
-
294
+ app.service.log.push({
295
+ app,
296
+ appName: `微信登录失败`,
297
+ message: msg,
298
+ })
295
299
  throw new Error('微信登录失败')
296
300
  }
297
301
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "q-koa",
3
- "version": "12.6.2",
3
+ "version": "12.6.4",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {