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