|
@@ -77,13 +77,10 @@ class WeixinController extends Controller {
|
|
|
const { redirect_uri, type, uid, qrcode, msgid, objid } = JSON.parse(val);
|
|
|
const user = await this.ctx.service.user.findByOpenid(openid);
|
|
|
if (type === '0') {
|
|
|
- console.log('function in type=0');
|
|
|
// 通过openid取得用户信息
|
|
|
if (user) {
|
|
|
- console.log('function in if user');
|
|
|
const getToken = async user => await this.ctx.service.login.createJwt(user);
|
|
|
if (user.type === '4') {
|
|
|
- console.log('function in user.type=4');
|
|
|
// 学生
|
|
|
// 检查学生是否已退出,学生表的isComming是不是2,如果是2 就跳到别的地方提示您已退出
|
|
|
const stu = await this.ctx.service.student.fetch({ id: user.uid });
|