wzq %!s(int64=5) %!d(string=hai) anos
pai
achega
a6969c9751
Modificáronse 1 ficheiros con 7 adicións e 0 borrados
  1. 7 0
      app/Repositories/PostRepositories.php

+ 7 - 0
app/Repositories/PostRepositories.php

@@ -66,6 +66,9 @@ class PostRepositories
         if (empty($userInfo)) {
             return jsonError('获取用户信息失败');
         }
+        if(!$userInfo['sns_status']){
+            return jsonError('您已被禁言');
+        }
         $isValid = 0;
         if($userInfo['strength']){
             $isValid = 1;
@@ -208,6 +211,10 @@ class PostRepositories
             return jsonError('获取用户信息失败');
         }
 
+        if(!$userInfo['sns_status']){
+            return jsonError('您已被禁言');
+        }
+
         $oneHourTime = Carbon::now()->addHours(-1)->toDateTimeString();
         $oneHourCommentCount = $this->postComment->where('uid', $userInfo['uid'])->where('created_at', '>', $oneHourTime)->count();
         if($oneHourCommentCount > 59){