|
@@ -83,7 +83,10 @@ class WeixinController extends Controller {
|
|
|
if (user) {
|
|
|
const token = await this.ctx.service.login.createJwt(user);
|
|
|
if (user.type === '4') {
|
|
|
- const to_uri = urljoin(redirect_uri, `?token=${token}`);
|
|
|
+ const student = await this.ctx.service.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_}`);
|
|
|
// TODO: 重定性页面
|
|
|
console.log('to_uri000-->' + to_uri);
|
|
|
this.ctx.redirect(to_uri);
|