|
@@ -83,19 +83,20 @@ class WeixinController extends Controller {
|
|
if (user.type === '4') {
|
|
if (user.type === '4') {
|
|
// 学生
|
|
// 学生
|
|
// 检查学生是否已退出,学生表的isComming是不是2,如果是2 就跳到别的地方提示您已退出
|
|
// 检查学生是否已退出,学生表的isComming是不是2,如果是2 就跳到别的地方提示您已退出
|
|
- console.log(`uid=>${user.uid}`);
|
|
|
|
const stu = await this.ctx.service.student.fetch({ id: user.uid });
|
|
const stu = await this.ctx.service.student.fetch({ id: user.uid });
|
|
- console.log(`student:=->${stu}`);
|
|
|
|
if (stu) {
|
|
if (stu) {
|
|
const { isComming } = stu;
|
|
const { isComming } = stu;
|
|
if (isComming && isComming === '2') {
|
|
if (isComming && isComming === '2') {
|
|
const refuse = `${this.app.config.baseUrl}/msgconfirm/isleave`;
|
|
const refuse = `${this.app.config.baseUrl}/msgconfirm/isleave`;
|
|
|
|
+ console.log(`refuse=>${refuse}`);
|
|
this.ctx.redirect(refuse);
|
|
this.ctx.redirect(refuse);
|
|
|
|
+ } else {
|
|
|
|
+ const to_uri = urljoin(redirect_uri, `?token=${token}`);
|
|
|
|
+ // TODO: 重定性页面
|
|
|
|
+ console.log(`to_uri=>${to_uri}`);
|
|
|
|
+ this.ctx.redirect(to_uri);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- const to_uri = urljoin(redirect_uri, `?token=${token}`);
|
|
|
|
- // TODO: 重定性页面
|
|
|
|
- this.ctx.redirect(to_uri);
|
|
|
|
|
|
|
|
|
|
|
|
} else if (user.type === '1') {
|
|
} else if (user.type === '1') {
|