|
@@ -28,8 +28,8 @@ class LoginService extends CrudService {
|
|
|
throw new BusinessError(ErrorCode.USER_NOT_EXIST);
|
|
|
}
|
|
|
// 验证密码
|
|
|
- console.log('sjk-->' + res.passwd.secret);
|
|
|
- console.log('sr-->' + passwd);
|
|
|
+ // console.log('sjk-->' + res.passwd.secret);
|
|
|
+ // console.log('sr-->' + passwd);
|
|
|
if (res.passwd.secret !== passwd) {
|
|
|
throw new BusinessError(ErrorCode.BAD_PASSWORD);
|
|
|
}
|
|
@@ -60,11 +60,11 @@ class LoginService extends CrudService {
|
|
|
res = { userid: _userid, schid: result.schid, schname: result.schname, name, subid: result.subid, type, id: _id, status };
|
|
|
} else if (type === '4') {
|
|
|
_userid = uid;
|
|
|
- console.log('进入查询--' + _userid);
|
|
|
+ // console.log('进入查询--' + _userid);
|
|
|
const result = await this.stuModel.findById(_userid);
|
|
|
- console.log(result);
|
|
|
+ // console.log(result);
|
|
|
res = { userid: _userid, schid: result.schid, schname: result.school_name, termid: result.termid, batchid: result.batchid, classid: result.classid, bedroomid: result.bedroomid, bedroom: result.bedroom, job: result.job, name, type, id: _id, status, planid: result.planid };
|
|
|
- console.warn(res);
|
|
|
+ // console.warn(res);
|
|
|
}
|
|
|
const token = await jwt.sign(res, secret, { expiresIn, issuer, subject });
|
|
|
return token;
|