Kaynağa Gözat

修改c端接口:乡村网、获取首页新闻、获取新闻列表、获取新闻头条的接口

15313670163 5 ay önce
ebeveyn
işleme
a4a5836846
1 değiştirilmiş dosya ile 5 ekleme ve 5 silme
  1. 5 5
      app/JsonRpc/NewsService.php

+ 5 - 5
app/JsonRpc/NewsService.php

@@ -913,7 +913,7 @@ class NewsService implements NewsServiceInterface
     }
     $diff_pid_categoryIds = array_values($categorys['diff_pid_categoryIds']);
     // return Result::success($diff_pid_categoryIds);
-    if (in_array(2, $website_column) && !empty($diff_pid_categoryIds)) {
+    if (in_array(3, $website_column) && !empty($diff_pid_categoryIds)) {
         return Result::error("此为核心站,有父级导航" . implode(',', $diff_pid_categoryIds) . "未选择而选择了此子级!", 0);
     }
 
@@ -1118,7 +1118,7 @@ class NewsService implements NewsServiceInterface
     $catiall = $categorys['catiall'];
     $diff_pid_categoryIds = array_values($categorys['diff_pid_categoryIds']);
     // return Result::success($diff_pid_categoryIds);
-    if (in_array(2, $website_column) && !empty($diff_pid_categoryIds)) {
+    if (in_array(3, $website_column) && !empty($diff_pid_categoryIds)) {
         return Result::error("此为核心站,有父级导航" . implode(',', $diff_pid_categoryIds) . "未选择而选择了此子级!", 0);
     }
     if (isset($data['catid']) && !empty($data['catid'])) {
@@ -1558,7 +1558,7 @@ class NewsService implements NewsServiceInterface
     $diff_pid_categoryIds = array_values($categorys['diff_pid_categoryIds']);
         
     // return Result::success($diff_pid_categoryIds);
-    if (in_array(2, $website_column) && !empty($diff_pid_categoryIds)) {
+    if (in_array(3, $website_column) && !empty($diff_pid_categoryIds)) {
         return Result::error("此为核心站,有父级导航" . implode(',', $diff_pid_categoryIds) . "未选择而选择了此子级!", 0);
     }
     // return Result::success(reset($diff_pid_categoryIds) == 0);
@@ -1743,7 +1743,7 @@ class NewsService implements NewsServiceInterface
     
     // return Result::success($catiall);
     $diff_pid_categoryIds = $categorys['diff_pid_categoryIds'];
-    if (in_array(2, $website_column) && !empty($diff_pid_categoryIds)) {
+    if (in_array(3, $website_column) && !empty($diff_pid_categoryIds)) {
         return Result::error("此为核心站,有父级导航" . implode(',', $diff_pid_categoryIds) . "未选择而选择了此子级!", 0);
     }
     $websiteInfoIndexed = $categorys['websiteInfoIndexed'];
@@ -1995,7 +1995,7 @@ class NewsService implements NewsServiceInterface
     if(!empty($parent_category) && is_array($parent_category)) {
         $categorys = $this->processArticlePro($website_id);
         $diff_pid_categoryIds = $categorys['diff_pid_categoryIds'];
-        if (in_array(2, $website_column) && !empty($diff_pid_categoryIds)) {
+        if (in_array(3, $website_column) && !empty($diff_pid_categoryIds)) {
             return Result::error("此为核心站,有父级导航" . implode(',', $diff_pid_categoryIds) . "未选择而选择了此子级!", 0);
         }
       $catiall = $categorys['catiall'];