|
@@ -83,7 +83,15 @@ class WeixinController extends Controller {
|
|
|
if (user.type === '4') {
|
|
|
// 学生
|
|
|
// 检查学生是否已退出,学生表的isComming是不是2,如果是2 就跳到别的地方提示您已退出
|
|
|
- const stu = await this.ctx.service.student.fetch({ id: user.uid });
|
|
|
+ let stu;
|
|
|
+ try {
|
|
|
+ stu = await this.ctx.service.student.fetch({ id: user.uid });
|
|
|
+ } catch (error) {
|
|
|
+ console.log(`错误信息:${error}`);
|
|
|
+ const to_uri = urljoin(redirect_uri, `?token=${token}`);
|
|
|
+ // TODO: 重定性页面
|
|
|
+ this.ctx.redirect(to_uri);
|
|
|
+ }
|
|
|
if (stu) {
|
|
|
const { isComming } = stu;
|
|
|
if (isComming && isComming === '2') {
|