浏览代码

话题数

wzq 5 年之前
父节点
当前提交
75a79c742b
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      app/Repositories/PostRepositories.php

+ 2 - 2
app/Repositories/PostRepositories.php

@@ -100,8 +100,8 @@ class PostRepositories
 
         $topicIds = json_decode($request['topic_ids'], true);
         $topicCount = count($topicIds);
-        if ($topicCount == 0 || $topicCount > 5) {
-            return jsonError('所选话题必须1-5个');
+        if ($topicCount == 0 || $topicCount > 2) {
+            return jsonError('所选话题必须1-2个');
         }
         //验证话题
         $hasTopicCount = $this->topic->whereIn('id', $topicIds)->count();