liuyu 4 rokov pred
rodič
commit
436a419e28
1 zmenil súbory, kde vykonal 1 pridanie a 2 odobranie
  1. 1 2
      app/controller/weixin.js

+ 1 - 2
app/controller/weixin.js

@@ -85,8 +85,7 @@ class WeixinController extends Controller {
         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 student = await this.ctx.service.student.fetch({ id: user.uid });
             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_}`);