浏览代码

init yunqi

zz 6 年之前
父节点
当前提交
405a2fa619
共有 2 个文件被更改,包括 440 次插入271 次删除
  1. 434 262
      app/Http/Middleware/ReadOauth.php
  2. 6 9
      app/Modules/YunQi/Services/BookUserService.php

文件差异内容过多而无法显示
+ 434 - 262
app/Http/Middleware/ReadOauth.php


+ 6 - 9
app/Modules/YunQi/Services/BookUserService.php

@@ -23,7 +23,9 @@ class BookUserService
 
 
     public static function popUser($uid){
-        Redis::srem('xx',$uid);
+        try{
+            Redis::srem('xx',$uid);
+        }catch (\Exception $e){}
     }
 
     public static function isUserInRedis($uid){
@@ -31,20 +33,15 @@ class BookUserService
     }
 
     /**
-     * 判断用户的区域是否已经获取
+     * 判断用户是否存在
      * @param $uid
      * @return bool
      */
     public static function selectUser($uid){
         if(!self::isUserInRedis($uid)){
-            return false;
+            return null;
         }
-
         $user = self::getByUid($uid);
-        if(!$user)
-            return false;
-        if($user->area)
-            return false;
-        return true;
+        return $user;
     }
 }