|
@@ -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 = true;
|
|
|
+ if (!user && user.isdel === '1') { throw new BusinessError(ErrorCode.USER_NOT_EXIST); } else is_code = true;
|
|
|
}
|
|
|
const pdata = {};
|
|
|
if (is_code) pdata.code = phone;
|
|
@@ -97,7 +97,7 @@ class LoginService extends CrudService {
|
|
|
let logFlag = false;
|
|
|
let dockList = [];
|
|
|
// "4568"如果是456的需要去dock里面查有没有这个人(是否在apply),2,8必存
|
|
|
- if (_user.role === '4' ||_user.role === '5' ||_user.role === '6' ||_user.role === '8') {
|
|
|
+ if (_user.role === '4' || _user.role === '5' || _user.role === '6' || _user.role === '8') {
|
|
|
const applydata = { user_id: user.id };
|
|
|
const url = 'http://127.0.0.1:9008/api/live/getapply';
|
|
|
const applyflag = await this.ctx.curl(url, {
|
|
@@ -112,7 +112,7 @@ class LoginService extends CrudService {
|
|
|
if (applyflag.data.res.length > 0) {
|
|
|
logFlag = true;
|
|
|
dockList = applyflag.data.res;
|
|
|
- }else {
|
|
|
+ } else {
|
|
|
logFlag = true;
|
|
|
}
|
|
|
} else if (_user.role === '2') {
|