Browse Source

微信绑定bug修复

laiguoran 5 years ago
parent
commit
2d3d8ffebd
1 changed files with 1 additions and 1 deletions
  1. 1 1
      app/controller/wechat_controller.js

+ 1 - 1
app/controller/wechat_controller.js

@@ -101,7 +101,7 @@ module.exports = app => {
                 if (accountData.wx_openid || ctx.session.wechatToken.openid === accountData.wx_openid) {
                     throw '该账号已经绑定过微信';
                 }
-                const wxAccountData = await ctx.service.projectAccount.getDataByCondition({ wx_openid: ctx.session.wechatToken.openid });
+                const wxAccountData = await ctx.service.projectAccount.getDataByCondition({ project_id: accountData.project_id, wx_openid: ctx.session.wechatToken.openid });
                 if (wxAccountData) {
                     throw '该微信号已绑定过本项目账号';
                 }