|
@@ -25,7 +25,9 @@ class LoginService extends CrudService {
|
|
|
// 如果用户不存在抛出异常
|
|
|
if (!user) {
|
|
|
// 添加code作为登录的方式
|
|
|
- user = await this.model.findOne({ code: phone, role });
|
|
|
+ if (role === '5') {
|
|
|
+ user = await this.model.findOne({ institution_code: phone, role });
|
|
|
+ } else { user = await this.model.findOne({ code: phone, role }); }
|
|
|
if (!user) { throw new BusinessError(ErrorCode.USER_NOT_EXIST); } else is_code = true;
|
|
|
}
|
|
|
const pdata = {};
|