liuyu 4 lat temu
rodzic
commit
4dbc97d474
1 zmienionych plików z 1 dodań i 1 usunięć
  1. 1 1
      app/controller/weixin.js

+ 1 - 1
app/controller/weixin.js

@@ -83,7 +83,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.fetch(user.uid);
+            const student = await this.ctx.service.student.fetch(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_}`);