Browse Source

exit_out change to out

Mike 4 years ago
parent
commit
fd15b91ad0
1 changed files with 6 additions and 6 deletions
  1. 6 6
      app/Models/User.php

+ 6 - 6
app/Models/User.php

xqd xqd xqd
@@ -42,7 +42,7 @@ class User extends BaseModel
             if (!$is_exit) {
                 return [];
             }
-            exit_out(null, 401, '验证失效,请重新登录');
+            out(null, 401, '验证失效,请重新登录');
         }
 
         $arr = aes_decrypt($auth);
@@ -55,12 +55,12 @@ class User extends BaseModel
         if (isset($arr['doctor_id'])){
             // 说明是医生登陆!
             if (empty($arr['doctor_id'])) {
-                exit_out(null, 401, '医生验证失效,请重新登录');
+                out(null, 401, '医生验证失效,请重新登录');
             }
 
             $user = Docter::where('id', $arr['doctor_id'])->first();
             if (empty($user)){
-                exit_out(null, 601, '该账号已被删除');
+                out(null, 601, '该账号已被删除');
             }
             $user = $user->toArray();
 //            if ($user['status'] == 0){
@@ -71,17 +71,17 @@ class User extends BaseModel
 
         }else{
             if (empty($arr['id'])) {
-                exit_out(null, 401, '账号验证失效,请重新登录');
+                out(null, 401, '账号验证失效,请重新登录');
             }
 
             $user = User::where('id', $arr['id'])->first();
             if (empty($user)){
-                exit_out(null, 601, '该账号已被删除');
+                out(null, 601, '该账号已被删除');
             }
             $user = $user->toArray();
 
             if ($user['status'] == 0){
-                exit_out(null, 602, '该账号已被冻结');
+                out(null, 602, '该账号已被冻结');
             }
 
             return $user;