liuyu hace 4 años
padre
commit
3897db1b79
Se han modificado 1 ficheros con 1 adiciones y 2 borrados
  1. 1 2
      app/controller/weixin.js

+ 1 - 2
app/controller/weixin.js

@@ -80,14 +80,13 @@ class WeixinController extends Controller {
       const { redirect_uri, type, uid, qrcode } = JSON.parse(val);
       console.log('redirect_uri-->' + redirect_uri);
       const user = await this.ctx.service.user.findByOpenid(openid);
-      console.log('type--->' + type);
-      console.log(user);
       if (type === '0') {
         // 通过openid取得用户信息
         if (user) {
           const token = await this.ctx.service.login.createJwt(user);
           if (user.type === '4') {
             const student = await this.ctx.service.student.fetch(user.uid);
+            console.log('stu--->' + student);
             const newdata = { planid: student.planid, ...JSON.parse(JSON.stringify(user)) };
             const token_ = await this.ctx.service.login.createJwt(newdata);
             const to_uri = urljoin(redirect_uri, `?token=${token_}`);