Prechádzať zdrojové kódy

修改b端自助建站-流程管理:获取网站列表(去除核心站)、验证网站编辑(添加验证搭建网站的规则)

15313670163 1 deň pred
rodič
commit
4c5bb38055
1 zmenil súbory, kde vykonal 9 pridanie a 3 odobranie
  1. 9 3
      app/JsonRpc/WebsiteService.php

+ 9 - 3
app/JsonRpc/WebsiteService.php

@@ -1629,6 +1629,7 @@ class WebsiteService implements WebsiteServiceInterface
                 $join->on('website_column.pid', '=', 'parent_column.id')
                     ->where('website_column.pid', 2);
             })
+            ->whereRaw('JSON_CONTAINS(website_column_arr_id,?)', [2])
             ->select(
                 "website_template_info.id",
                 "template_class.name",
@@ -1694,13 +1695,13 @@ class WebsiteService implements WebsiteServiceInterface
         // 获取此网站的底部导航  类型   type:  0:内容型底部导航(只有一条详情内容);1:列表型底部导航(可以有多条详情内容)
         $foot_type = FooterCategory::where('website_id', $data['website_id'])->pluck('type')->toArray();
         if (empty($foot_type)) {
-            return Result::error("请先关联底部导航池!", 0);
+            return Result::error("请先关联单页!", 0);
         }
         // if (!in_array(1, $foot_type) ) {
         //     $missingTypes[] = "列表型底部导航";
         // }
         if (!in_array(0, $foot_type) ) {
-            $missingTypes[] = "内容型底部导航";
+            $missingTypes[] = "单页(详情)";
         } 
         if (!empty($missingTypes)) {
             $errorMessage = "请先添加" . $missingTypes . "!";
@@ -1742,6 +1743,11 @@ class WebsiteService implements WebsiteServiceInterface
         if(!empty($order)){
             return Result::error("此网站的广告位正在使用中,暂不可编辑!", 0);
         }
+        $check = $this->checkWebsiteBuild($data);
+        if($check['code'] != 200){
+            return Result::error($check['message'], 0);
+        }
+        // return Result::success($check);
         if ($result['page_type']) {
             $result['page_type'] = json_decode($result['page_type'], true);
             return Result::success('网站编辑验证通过!');
@@ -1787,7 +1793,7 @@ class WebsiteService implements WebsiteServiceInterface
                     return Result::error("修改失败!", 0);
                 }
             } else {
-                return Result::error("请先选择首页和底部导航详情页!", 0);
+                return Result::error("请先选择首页和单页(详情)!", 0);
             }
         }
         if (empty($result)) {