gq 7 年之前
父节点
当前提交
54e2eaaf03
共有 1 个文件被更改,包括 9 次插入9 次删除
  1. 9 9
      server/app/Http/Controllers/Api/V1/AuthController.php

+ 9 - 9
server/app/Http/Controllers/Api/V1/AuthController.php

xqd
@@ -113,15 +113,15 @@ class AuthController extends Controller
         }else{
             $phone_user = UserInfoModel::where('phone',$phone)->first();
             if(!empty($phone_user)){
-//                return $this->error(ErrorCode::USER_DOES_EXIST);
-                if (Auth::attempt(['phone'=>$phone,'password'=>$password])) {
-                    $user = Auth::user();
-                    \Log::info($user);
-                    $token = $user->createToken($user->phone)->accessToken;
-                    return $this->api(compact( 'user', 'code','token'));
-                }else{
-                    return $this->error(ErrorCode::INCORRECT_USER_OR_PASS);
-                }
+                return $this->error(ErrorCode::USER_DOES_EXIST);
+//                if (Auth::attempt(['phone'=>$phone,'password'=>$password])) {
+//                    $user = Auth::user();
+//                    \Log::info($user);
+//                    $token = $user->createToken($user->phone)->accessToken;
+//                    return $this->api(compact( 'user', 'code','token'));
+//                }else{
+//                    return $this->error(ErrorCode::INCORRECT_USER_OR_PASS);
+//                }
             }
         }
         if (empty($user)) {