|
@@ -26,7 +26,7 @@ class LoginService extends CrudService {
|
|
|
if (!user) {
|
|
|
// 添加code作为登录的方式
|
|
|
user = await this.model.findOne({ code: phone, role });
|
|
|
- if (!user) { throw new BusinessError(ErrorCode.USER_NOT_EXIST); } else is_code = false;
|
|
|
+ if (!user) { throw new BusinessError(ErrorCode.USER_NOT_EXIST); } else is_code = true;
|
|
|
}
|
|
|
const pdata = {};
|
|
|
if (is_code) pdata.code = phone;
|