wzq 5 vuotta sitten
vanhempi
commit
75a79c742b
1 muutettua tiedostoa jossa 2 lisäystä ja 2 poistoa
  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();