guhongwei 4 年之前
父節點
當前提交
d91a3baa8a
共有 1 個文件被更改,包括 1 次插入1 次删除
  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;