guhongwei 4 年之前
父節點
當前提交
a450b1aca4
共有 1 個文件被更改,包括 1 次插入4 次删除
  1. 1 4
      app/service/login.js

+ 1 - 4
app/service/login.js

@@ -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) { throw new BusinessError(ErrorCode.USER_NOT_EXIST); } else is_code = false;
     }
     const pdata = {};
     if (is_code) pdata.code = phone;
@@ -50,9 +50,6 @@ class LoginService extends CrudService {
       if (marketuser.data.data.status !== '1') {
         throw new BusinessError(ErrorCode.ACCESS_DENIED);
       }
-      if (marketuser.data.data.isdel !== '0') {
-        throw new BusinessError(ErrorCode.ACCESS_DENIED);
-      }
     } else if (_user.role === '6') {
       const url = 'http://127.0.0.1:9004/api/market/expertsuser/' + _user.uid;
       const expertsuser = await this.ctx.curl(url, {