liuyu 4 년 전
부모
커밋
436a419e28
1개의 변경된 파일1개의 추가작업 그리고 2개의 파일을 삭제
  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_}`);