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;