lrf402788946 4 years ago
parent
commit
efdef9c907
1 changed files with 3 additions and 0 deletions
  1. 3 0
      app/controller/weixin.js

+ 3 - 0
app/controller/weixin.js

@@ -77,10 +77,13 @@ class WeixinController extends Controller {
       const { redirect_uri, type, uid, qrcode, msgid, objid } = JSON.parse(val);
       const user = await this.ctx.service.user.findByOpenid(openid);
       if (type === '0') {
+        console.log('function in type=0');
         // 通过openid取得用户信息
         if (user) {
+          console.log('function in if user');
           const token = await this.ctx.service.login.createJwt(user);
           if (user.type === '4') {
+            console.log('function in user.type=4');
             // 学生
             // 检查学生是否已退出,学生表的isComming是不是2,如果是2 就跳到别的地方提示您已退出
             let stu;