guhongwei 4 years ago
parent
commit
d91a3baa8a
1 changed files with 1 additions and 1 deletions
  1. 1 1
      app/service/login.js

+ 1 - 1
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 = false;
+      if (!user) { throw new BusinessError(ErrorCode.USER_NOT_EXIST); } else is_code = true;
     }
     const pdata = {};
     if (is_code) pdata.code = phone;