Commit ae709e6b authored by 李尚科's avatar 李尚科

fix gjj wechat login

parent 81fc205d
Pipeline #17563 passed with stage
in 52 seconds
...@@ -45,11 +45,11 @@ class WechatController extends Controller { ...@@ -45,11 +45,11 @@ class WechatController extends Controller {
// { code: '-2', msg: '需要重新授权' } // { code: '-2', msg: '需要重新授权' }
// { code: '-3', msg: '需要先手机登录' } // { code: '-3', msg: '需要先手机登录' }
// { code: '-4', msg: '绑定失败,此QQ已绑定其他手机了'} // { code: '-4', msg: '绑定失败,此QQ已绑定其他手机了'}
if (ret.code && ret.code === -3) { // 如果用户未绑定手机,先去做登录绑定手机号 if (ret.code && ret.code === '-3') { // 如果用户未绑定手机,先去做登录绑定手机号
ctx.redirect(no_login_url); ctx.redirect(no_login_url);
return; return;
} }
if (!ret || ret.code !== 1 || !ret.data || !ret.data.openid) { if (!ret || ret.code !== '1' || !ret.data || !ret.data.openid) {
const error_msg = ret.msg || '获取openid失败'; const error_msg = ret.msg || '获取openid失败';
ctx.failed(error_msg); ctx.failed(error_msg);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment