xiaogang il y a 4 ans
Parent
commit
28f6a2f6d9

+ 7 - 0
app/Http/Controllers/Api/AuthorizationsController.php

xqd xqd
@@ -7,6 +7,7 @@ use App\Models\AdminRole;
 use App\Models\User;
 use App\Models\UserInfoModel;
 use App\Models\UserInviteLog;
+use App\Models\UserVipLimit;
 use App\Services\JPushService;
 use App\Services\SmsService;
 use App\Services\TencentImAccountService;
@@ -142,6 +143,12 @@ class AuthorizationsController extends Controller
             ]);
         }
 
+        if(!UserVipLimit::query()->where('user_id',$user->id)->first()){
+            UserVipLimit::query()->firstOrCreate([
+                'user_id'=>$user->id,
+            ]);
+        }
+
         if (!$user->tencent_im_user_id) {
             $user->tencent_im_user_id = $this->tencentImAccountService->accountImport($user);
         }

+ 6 - 1
app/Services/HomeService.php

xqd
@@ -65,8 +65,13 @@ class HomeService
         //判断逛一逛用户和非会员用户
         if(!$user){
             throw new AuthException("请先登录");
-        }
+        }else{
+            //判断会员特权和普通用户
+            if($user->is_vip==0){
+
 
+            }
+        }
 
 
         $is_like = 0;