소스 검색

修复注册

541469799@qq.com 1 년 전
부모
커밋
8c37d0cfd6
1개의 변경된 파일5개의 추가작업 그리고 1개의 파일을 삭제
  1. 5 1
      app/index/service/passport/Login.php

+ 5 - 1
app/index/service/passport/Login.php

@@ -78,7 +78,11 @@ class Login extends BaseService
         }
 
         // 数据验证
-        $this->validate($data);
+        //$this->validate($data);
+        if (empty($data['mobile']) || empty($data['password'])){
+            throwError('Valid account or the password.', 500, []);
+        }
+
         // 自动登录注册
         $userInfo = UserModel::detail(['mobile' => $data['mobile']]);
         if ($userInfo) {