Sfoglia il codice sorgente

调整数据接收方式

调整数据接收方式
dangyunlong 1 giorno fa
parent
commit
cb6cea928a
38 ha cambiato i file con 1244 aggiunte e 1203 eliminazioni
  1. 1 1
      .env
  2. 3 3
      components/template/component/list/1200x480/1.vue
  3. 3 3
      components/template/component/list/1200x480/2.vue
  4. 2 2
      components/template/component/list/270x450/1.vue
  5. 2 2
      components/template/component/list/270x450/2.vue
  6. 4 4
      components/template/component/list/270x580/1.vue
  7. 4 4
      components/template/component/list/270x580/2.vue
  8. 2 2
      components/template/component/list/450x440/1.vue
  9. 2 2
      components/template/component/list/450x440/2.vue
  10. 2 2
      components/template/component/list/450x440/3.vue
  11. 2 2
      components/template/component/list/450x440/4.vue
  12. 1 1
      components/template/component/list/450x950/1.vue
  13. 3 3
      components/template/component/list/720x300/1.vue
  14. 4 4
      components/template/component/list/720x300/2.vue
  15. 3 8
      components/template/component/list/720x440/1.vue
  16. 3 3
      components/template/component/list/720x440/2.vue
  17. 2 2
      components/template/component/list/720x440/3.vue
  18. 2 2
      components/template/component/list/720x440/4.vue
  19. 2 2
      components/template/component/list/720x620/1.vue
  20. 2 2
      components/template/component/list/720x620/2.vue
  21. 4 3
      components/template/component/list/900x1050/1.vue
  22. 3 3
      components/template/component/list/900x1050/2.vue
  23. 85 0
      components/template/component/main/1200x1120/1.vue
  24. 184 0
      components/template/sector/body/about/1200x1150/1.vue
  25. 0 10
      components/template/sector/body/about/1200x1290/1.vue
  26. 0 1
      components/template/sector/body/index/link/1200x230/1.vue
  27. 21 27
      components/template/sector/body/index/list/1200x470/1.vue
  28. 19 26
      components/template/sector/body/index/list/1200x470/2.vue
  29. 9 13
      components/template/sector/body/index/list/1200x480/1.vue
  30. 27 39
      components/template/sector/body/index/list/1200x980/1.vue
  31. 14 38
      components/template/sector/body/list/list/1200x1220/1.vue
  32. 14 101
      pages/[dir]/[dir]/list-[id].vue
  33. 15 8
      pages/[dir]/list-[id].vue
  34. 87 189
      pages/about/[dir]/[dir]/[id].vue
  35. 85 184
      pages/about/[dir]/index.html.vue
  36. 1 1
      pages/about/[dir]/list-[id].vue
  37. 546 506
      pages/index.vue
  38. 81 0
      utils/dataInterface.ts

+ 1 - 1
.env

@@ -1,2 +1,2 @@
-PORT=3002
+PORT=3010
 

+ 3 - 3
components/template/component/list/1200x480/1.vue

@@ -101,11 +101,11 @@ const props = defineProps({
 });
 //样式1与样式2共用 start ---------------------------------------->
 const component_style1_News1Array = ref({});
-component_style1_News1Array.value = props.templateData.img.slice(0,2);
+component_style1_News1Array.value = props.templateData.imgnum.slice(0,2);
 const component_style1_News1Array_2 = ref({});
-component_style1_News1Array_2.value = props.templateData.img.slice(2,3);
+component_style1_News1Array_2.value = props.templateData.imgnum.slice(2,3);
 const component_style1_News3 = ref({});
-component_style1_News3.value = props.templateData.text.slice(0,4);
+component_style1_News3.value = props.templateData.textnum.slice(0,4);
 //样式1与样式2共用 end ---------------------------------------->
 </script>
 

+ 3 - 3
components/template/component/list/1200x480/2.vue

@@ -101,11 +101,11 @@ const props = defineProps({
 });
 //样式1与样式2共用 start ---------------------------------------->
 const component_style1_News1Array = ref({});
-component_style1_News1Array.value = props.templateData.img.slice(0,2);
+component_style1_News1Array.value = props.templateData.imgnum.slice(0,2);
 const component_style1_News1Array_2 = ref({});
-component_style1_News1Array_2.value = props.templateData.img.slice(2,3);
+component_style1_News1Array_2.value = props.templateData.imgnum.slice(2,3);
 const component_style1_News3 = ref({});
-component_style1_News3.value = props.templateData.text.slice(0,4);
+component_style1_News3.value = props.templateData.textnum.slice(0,4);
 //样式1与样式2共用 end ---------------------------------------->
 </script>
 

+ 2 - 2
components/template/component/list/270x450/1.vue

@@ -50,7 +50,7 @@ component_style1_News2Array.value = props.templateData.text.slice(0,4);
         font-size:22px;
         font-weight:bold;
         height: 40px;
-        line-height: 40px;
+        line-height: 25px;
         border-bottom: 2px solid #004564;
         color:#004564;
         margin-bottom: 20px;
@@ -60,7 +60,7 @@ component_style1_News2Array.value = props.templateData.text.slice(0,4);
         font-size:22px;
         font-weight:bold;
         height: 40px;
-        line-height: 40px;
+        line-height: 25px;
         border-bottom: 2px solid #A91B33;
         color:#A91B33;
         margin-bottom: 20px;

+ 2 - 2
components/template/component/list/270x450/2.vue

@@ -51,7 +51,7 @@ component_style1_News2Array.value = props.templateData.text.slice(0,4);
         font-size:22px;
         font-weight:bold;
         height: 40px;
-        line-height: 40px;
+        line-height: 25px;
         border-bottom: 2px solid #004564;
         color:#004564;
         margin-bottom: 20px;
@@ -61,7 +61,7 @@ component_style1_News2Array.value = props.templateData.text.slice(0,4);
         font-size:22px;
         font-weight:bold;
         height: 40px;
-        line-height: 40px;
+        line-height: 25px;
         border-bottom: 2px solid #A91B33;
         color:#A91B33;
         margin-bottom: 20px;

+ 4 - 4
components/template/component/list/270x580/1.vue

@@ -1,10 +1,10 @@
 <template>
     <div class="hotNewsBox">
         <div class="listNewsTitle" v-if="skinId==1">
-            <b>最新资讯</b>
+            <b>热点精选</b>
         </div>
         <div class="listNewsTitle_skin2" v-if="skinId==2">
-            <span><b>最新资讯</b></span>
+            <span><b>热点精选</b></span>
         </div>
         <div class="hotNewsContent" v-if="skinId==1">
             <div v-for="(item,index) in component_style1_News1Array">
@@ -51,7 +51,7 @@ component_style1_News1Array.value = props.templateData.text.slice(0,8);
         font-size:22px;
         font-weight:bold;
         height: 40px;
-        line-height: 40px;
+        line-height: 25px;
         border-bottom: 2px solid #004564;
         color:#004564;
         margin-bottom: 20px;
@@ -67,7 +67,7 @@ component_style1_News1Array.value = props.templateData.text.slice(0,8);
         font-size:22px;
         font-weight:bold;
         height: 40px;
-        line-height: 40px;
+        line-height: 25px;
         border-bottom: 2px solid #A91B33;
         color:#A91B33;
         margin-bottom: 20px;

+ 4 - 4
components/template/component/list/270x580/2.vue

@@ -1,10 +1,10 @@
 <template>
     <div class="hotNewsBox">
         <div class="listNewsTitle" v-if="skinId==1">
-            <b>最新资讯</b>
+            <b>热点精选</b>
         </div>
         <div class="listNewsTitle_skin2" v-if="skinId==2">
-            <span><b>最新资讯</b></span>
+            <span><b>热点精选</b></span>
         </div>
         <div class="hotNewsContent" v-if="skinId==1">
             <div v-for="(item,index) in component_style1_News1Array">
@@ -51,7 +51,7 @@ component_style1_News1Array.value = props.templateData.text.slice(0,8);
         font-size:22px;
         font-weight:bold;
         height: 40px;
-        line-height: 40px;
+        line-height: 25px;
         border-bottom: 2px solid #004564;
         color:#004564;
         margin-bottom: 20px;
@@ -67,7 +67,7 @@ component_style1_News1Array.value = props.templateData.text.slice(0,8);
         font-size:22px;
         font-weight:bold;
         height: 40px;
-        line-height: 40px;
+        line-height: 25px;
         border-bottom: 2px solid #A91B33;
         color:#A91B33;
         margin-bottom: 20px;

+ 2 - 2
components/template/component/list/450x440/1.vue

@@ -59,8 +59,8 @@ const props = defineProps({
 });
 const component_style1_News1Array = ref([]);
 const component_style1_News2Array = ref([]);
-component_style1_News1Array.value = props.templateData.img.slice(0,3);
-component_style1_News2Array.value = props.templateData.text.slice(0,6);
+component_style1_News1Array.value = props.templateData.imgnum.slice(0,3);
+component_style1_News2Array.value = props.templateData.textnum.slice(0,6);
 </script>
 
 <style lang="less" scoped>

+ 2 - 2
components/template/component/list/450x440/2.vue

@@ -59,8 +59,8 @@ const props = defineProps({
 });
 const component_style1_News1Array = ref([]);
 const component_style1_News2Array = ref([]);
-component_style1_News1Array.value = props.templateData.img.slice(0,3);
-component_style1_News2Array.value = props.templateData.text.slice(0,6);
+component_style1_News1Array.value = props.templateData.imgnum.slice(0,3);
+component_style1_News2Array.value = props.templateData.textnum.slice(0,6);
 </script>
 
 <style lang="less" scoped>

+ 2 - 2
components/template/component/list/450x440/3.vue

@@ -58,8 +58,8 @@ const props = defineProps({
 });
 const component_style1_News1Array = ref([]);
 const component_style1_News2Array = ref([]);
-component_style1_News1Array.value = props.templateData.img.slice(0,1);
-component_style1_News2Array.value = props.templateData.text.slice(0,3);
+component_style1_News1Array.value = props.templateData.imgnum.slice(0,1);
+component_style1_News2Array.value = props.templateData.textnum.slice(0,3);
 </script>
 
 <style lang="less" scoped>

+ 2 - 2
components/template/component/list/450x440/4.vue

@@ -58,8 +58,8 @@ const props = defineProps({
 });
 const component_style1_News1Array = ref([]);
 const component_style1_News2Array = ref([]);
-component_style1_News1Array.value = props.templateData.img.slice(0,1);
-component_style1_News2Array.value = props.templateData.text.slice(0,3);
+component_style1_News1Array.value = props.templateData.imgnum.slice(0,1);
+component_style1_News2Array.value = props.templateData.textnum.slice(0,3);
 </script>
 
 <style lang="less" scoped>

+ 1 - 1
components/template/component/list/450x950/1.vue

@@ -53,7 +53,7 @@ const props = defineProps({
 });
 //样式1与样式2共用 start ---------------------------------------->
 const component_style1_News1Array = ref({});
-component_style1_News1Array.value = props.templateData.img.slice(0,7);
+component_style1_News1Array.value = props.templateData.imgnum.slice(0,7);
 //样式1与样式2共用 end ---------------------------------------->
 </script>
 

+ 3 - 3
components/template/component/list/720x300/1.vue

@@ -74,9 +74,9 @@ const props = defineProps({
 const component_style1_News1Array = ref({});
 const component_style1_News2Array = ref([]);
 const component_style1_News2Array_2 = ref([]);
-component_style1_News1Array.value = props.templateData.img.slice(0,2);
-component_style1_News2Array.value = props.templateData.text.slice(0,3);
-component_style1_News2Array_2.value = props.templateData.text.slice(3,6);
+component_style1_News1Array.value = props.templateData.imgnum.slice(0,2);
+component_style1_News2Array.value = props.templateData.textnum.slice(0,3);
+component_style1_News2Array_2.value = props.templateData.textnum.slice(3,6);
 //样式1与样式2共用 end ---------------------------------------->
 </script>
 

+ 4 - 4
components/template/component/list/720x300/2.vue

@@ -85,10 +85,10 @@ const component_style1_News1Array = ref({});
 const component_style1_News1Array_2 = ref({});
 const component_style1_News2Array = ref([]);
 const component_style1_News2Array_2 = ref([]);
-component_style1_News1Array.value = props.templateData.img.slice(0,1);
-component_style1_News1Array_2.value = props.templateData.img.slice(1,2);
-component_style1_News2Array.value = props.templateData.text.slice(0,3);
-component_style1_News2Array_2.value = props.templateData.text.slice(3,6);
+component_style1_News1Array.value = props.templateData.imgnum.slice(0,1);
+component_style1_News1Array_2.value = props.templateData.imgnum.slice(1,2);
+component_style1_News2Array.value = props.templateData.textnum.slice(0,3);
+component_style1_News2Array_2.value = props.templateData.textnum.slice(3,6);
 //样式1与样式2共用 end ---------------------------------------->
 </script>
 

+ 3 - 8
components/template/component/list/720x440/1.vue

@@ -75,15 +75,10 @@ const props = defineProps({
 const component_style1_News1Array = ref({});
 const component_style1_News1Array_2 = ref({});
 const component_style1_News2Array = ref([]);
-
 //真实数据
-// component_style1_News1Array.value = props.templateData.imgnum.slice(0,1);
-// component_style1_News1Array_2.value = props.templateData.imgnum.slice(1,3);
-// component_style1_News2Array.value = props.templateData.textnum;
-component_style1_News1Array.value = props.templateData.img.slice(0,1);
-component_style1_News1Array_2.value = props.templateData.img.slice(1,3);
-component_style1_News2Array.value = props.templateData.text;
-
+component_style1_News1Array.value = props.templateData.imgnum.slice(0,1);
+component_style1_News1Array_2.value = props.templateData.imgnum.slice(1,3);
+component_style1_News2Array.value = props.templateData.textnum;
 //样式1与样式2共用 end ---------------------------------------->
 </script>
 

+ 3 - 3
components/template/component/list/720x440/2.vue

@@ -76,9 +76,9 @@ const component_style1_News1Array = ref({});
 const component_style1_News1Array_2 = ref({});
 const component_style1_News2Array = ref([]);
 
-component_style1_News1Array.value = props.templateData.img.slice(0,1);
-component_style1_News1Array_2.value = props.templateData.img.slice(1,3);
-component_style1_News2Array.value = props.templateData.text;
+component_style1_News1Array.value = props.templateData.imgnum.slice(0,1);
+component_style1_News1Array_2.value = props.templateData.imgnum.slice(1,3);
+component_style1_News2Array.value = props.templateData.textnum;
 //样式1与样式2共用 end ---------------------------------------->
 </script>
 

+ 2 - 2
components/template/component/list/720x440/3.vue

@@ -61,8 +61,8 @@ const props = defineProps({
 //样式1与样式2共用 start ---------------------------------------->
 const component_style1_News1Array = ref({});
 const component_style1_News2Array = ref([]);
-component_style1_News1Array.value = props.templateData.img.slice(0,2);
-component_style1_News2Array.value = props.templateData.text;
+component_style1_News1Array.value = props.templateData.imgnum.slice(0,2);
+component_style1_News2Array.value = props.templateData.textnum;
 //样式1与样式2共用 end ---------------------------------------->
 </script>
 

+ 2 - 2
components/template/component/list/720x440/4.vue

@@ -63,8 +63,8 @@ const props = defineProps({
 //样式1与样式2共用 start ---------------------------------------->
 const component_style1_News1Array = ref({});
 const component_style1_News2Array = ref([]);
-component_style1_News1Array.value = props.templateData.img.slice(0,2);
-component_style1_News2Array.value = props.templateData.text;
+component_style1_News1Array.value = props.templateData.imgnum.slice(0,2);
+component_style1_News2Array.value = props.templateData.textnum;
 //样式1与样式2共用 end ---------------------------------------->
 </script>
 

+ 2 - 2
components/template/component/list/720x620/1.vue

@@ -60,8 +60,8 @@ const props = defineProps({
 //样式1与样式2共用 start ---------------------------------------->
 const component_style1_News1Array = ref([]);
 const component_style1_News2Array = ref([]);
-component_style1_News1Array.value = props.templateData.img.slice(0,2);
-component_style1_News2Array.value = props.templateData.text;
+component_style1_News1Array.value = props.templateData.imgnum.slice(0,2);
+component_style1_News2Array.value = props.templateData.textnum;
 //样式1与样式2共用 end ---------------------------------------->
 </script>
 

+ 2 - 2
components/template/component/list/720x620/2.vue

@@ -62,8 +62,8 @@ const props = defineProps({
 //样式1与样式2共用 start ---------------------------------------->
 const component_style1_News1Array = ref({});
 const component_style1_News2Array = ref([]);
-component_style1_News1Array.value = props.templateData.img.slice(0,2);
-component_style1_News2Array.value = props.templateData.text;
+component_style1_News1Array.value = props.templateData.imgnum.slice(0,2);
+component_style1_News2Array.value = props.templateData.textnum;
 //样式1与样式2共用 end ---------------------------------------->
 </script>
 

+ 4 - 3
components/template/component/list/900x1050/1.vue

@@ -33,9 +33,6 @@ const props = defineProps({
         a {
             color:#333333;
         }
-        &:first-child {
-            font-weight: bold;
-        }
         &:nth-child(5n) {
             height: 54px;
             //padding-bottom:30px;
@@ -45,6 +42,10 @@ const props = defineProps({
             font-weight: bold;
             margin-top: 30px;
         }
+        &:first-child {
+            font-weight: bold;
+            margin-top: 0;
+        }
         span {
             float: right;
         }

+ 3 - 3
components/template/component/list/900x1050/2.vue

@@ -33,9 +33,6 @@ const props = defineProps({
         a {
             color:#333333;
         }
-        &:first-child {
-            //font-weight: bold;
-        }
         &:nth-child(5n) {
             height: 54px;
             //padding-bottom:30px;
@@ -45,6 +42,9 @@ const props = defineProps({
             //font-weight: bold;
             margin-top: 30px;
         }
+        &:first-child {
+            margin-top: 0;
+        }
         span {
             float: right;
         }

+ 85 - 0
components/template/component/main/1200x1120/1.vue

@@ -0,0 +1,85 @@
+<template>
+    <div>
+        <div :class="'mainTopBg' + skinId"></div>
+        <div :class="'mainBox' + skinId">
+            <div class="mainTitle">{{newsDetail.con_title}}</div>
+            <div v-html=" newsDetail.content"></div>
+        </div>
+        <div :class="'mainBottomBg' + skinId"></div>
+    </div>
+</template>
+
+<script setup>
+const props = defineProps({
+    newsDetail: Object,//新闻详情
+    skinId: Number,//皮肤id
+});
+</script>
+
+<style lang="less" scoped>
+//样式1
+.mainBox1 {
+    box-sizing: border-box;
+    padding:27px 80px;
+    .mainTitle {
+        font-size: 26px;
+        color:#333;
+        height: 65px;
+        font-weight: bold;
+        text-align: center;
+        border-bottom: 1px solid #D9D9D9;
+        margin-bottom: 40px;
+    }
+    div {
+        text-indent: 2em;
+        font-size: 20px;
+        line-height: 36px;
+        color:#333;
+    }
+    background:url('http://img.bjzxtw.org.cn/pre/image/png/20250624/1750754885628516.png') repeat-y;
+}
+.mainTopBg1 {
+    width: 1200px;
+    height: 7px;
+    background: url('http://img.bjzxtw.org.cn/pre/image/png/20250624/1750754872561241.png') no-repeat;
+    margin-top: 28px;
+}
+.mainBottomBg1 {
+    width: 1200px;
+    height: 7px;
+    background: url('http://img.bjzxtw.org.cn/pre/image/png/20250624/1750754893326585.png') no-repeat center center;
+}
+
+//样式2
+.mainBox2 {
+    box-sizing: border-box;
+    padding:27px 80px;
+    .mainTitle {
+        font-size: 26px;
+        color:#333;
+        height: 65px;
+        font-weight: bold;
+        text-align: center;
+        border-bottom: 1px solid #D9D9D9;
+        margin-bottom: 40px;
+    }
+    div {
+        text-indent: 2em;
+        font-size: 20px;
+        line-height: 36px;
+        color:#333;
+    }
+    background:url('http://img.bjzxtw.org.cn/pre/image/png/20250723/1753239637376332.png') repeat-y;
+}
+.mainTopBg2 {
+    width: 1200px;
+    height: 7px;
+    background: url('http://img.bjzxtw.org.cn/pre/image/png/20250723/1753239184498080.png') no-repeat;
+    margin-top: 28px;
+}
+.mainBottomBg2 {
+    width: 1200px;
+    height: 7px;
+    background: url('http://img.bjzxtw.org.cn/pre/image/png/20250723/1753239195441541.png') no-repeat center center;
+}
+</style>

+ 184 - 0
components/template/sector/body/about/1200x1150/1.vue

@@ -0,0 +1,184 @@
+<template>
+    <!-- 面包屑导航 -->
+    <div class="breadcrumb">
+        <div class="inner">
+            <span class="location">当前位置:</span>
+            <el-breadcrumb :separator-icon="ArrowRight">
+                <el-breadcrumb-item>
+                    <NuxtLink to="/">首页</NuxtLink>
+                </el-breadcrumb-item>
+                <el-breadcrumb-item to="/about/benwangzhaopin/list-1.html" v-if="routeLevel == 1">
+                    本网招聘
+                </el-breadcrumb-item>
+                <el-breadcrumb-item>
+                    {{ newsDetail.con_title }}
+                </el-breadcrumb-item>
+            </el-breadcrumb>
+        </div>
+    </div>
+    <!-- 资讯列表 -->
+    <div class="newsDetail">
+        <div class="inner">
+            <div class="innerDetail">
+                <div class="headImg"></div>
+                <div class="innerDetail1">
+                    <mainStyle :skinId="skinId" :newsDetail="newsDetail" />
+                </div>
+                <div class="footImg"></div>
+            </div>
+            <div v-if="templateData.componentList[1].component_style == 1">
+                <menu1Style :skinId="skinId" :bottomMenu="bottomMenu" :pageId="pageId" />
+            </div>
+            <div v-if="templateData.componentList[1].component_style == 2">
+                <menu2Style :skinId="skinId" :bottomMenu="bottomMenu" :pageId="pageId" />
+            </div>
+            <div style="clear: both;"></div>
+        </div>
+    </div>
+</template>
+
+<script setup lang="ts">
+//0.页面依赖 start ---------------------------------------->
+import { ElBreadcrumb, ElBreadcrumbItem } from 'element-plus'
+import { ArrowRight } from '@element-plus/icons-vue'
+//菜单
+import menu1Style from '@/components/template/component/menu/144x365/1.vue'
+import menu2Style from '@/components/template/component/menu/144x365/2.vue'
+//详情样式 详情只需要传入skinId
+import mainStyle from '@/components/template/component/main/1200x1120/1.vue'
+
+interface Props {
+    templateData:any,//模板数据
+    skinId: number,//皮肤id
+}
+
+const props = defineProps<Props>();
+//0.页面依赖 end ---------------------------------------->
+
+//1.页面数据 start ---------------------------------------->
+//获得跳转过来的id
+const route = useRoute();
+//获得当前的完整路径
+const fullPath = route.path;
+//拆分,取出来中间这一段,然后提取数字部分
+const segments = fullPath.split('/'); 
+const targetSegment = segments[2]; 
+//判断处于什么位置
+const routeLevel = ref(0);
+if(route.name == 'about-dir-dir-id'){
+    routeLevel.value = 1;
+}
+
+let articleId:number;
+let pageId:number;
+//通过导航路径反向查询导航id
+const getRouteId = await requestDataPromise('/web/getWebsiteRoute', {
+    method: 'GET',
+    query: {
+        'foot_pinyin': targetSegment,
+    },
+});
+if(getRouteId.code == 200){
+    articleId = getRouteId.data.id;
+    pageId = getRouteId.data.id;
+}
+const newsDetail = ref<any>({})
+const bottomMenu = ref([]);
+async function getPageData() {
+    const mkdata =  await requestDataPromise('/web/getWebsiteFooterCategoryInfo', {
+        method: 'GET',
+        query: {
+            'fcat_id': articleId,
+            'type': '0'
+        },
+    });
+    newsDetail.value = mkdata.data;
+}
+getPageData();
+async function getPageMenu() {
+    const mkdata =  await requestDataPromise('/web/getWebsiteFooterCategory', {
+        method: 'GET',
+        query: {},
+    });
+    bottomMenu.value = mkdata.data;
+}
+getPageMenu();
+//1.页面数据 end---------------------------------------->
+</script>
+
+<style lang="less" scoped>
+//导航条
+.breadcrumb {
+    width: 1200px;
+    margin: 0 auto;
+    height: 22px;
+    padding-bottom: 30px;
+    margin-top: 30px;
+    margin-bottom: 30px;
+    border-bottom: 1px solid #d9d9d9;
+    font-family: Microsoft YaHei, Microsoft YaHei;
+    font-weight: 400;
+    font-size: 20px;
+    color: #666666;
+    line-height: 23px;
+    text-align: left;
+    font-style: normal;
+    text-transform: none;
+    .el-breadcrumb::v-deep {
+        display: inline-block;
+        vertical-align: -4px;
+    }
+    /deep/.el-breadcrumb__inner a,
+    /deep/.el-breadcrumb__inner.is-link {
+        color: #666666;
+        font-weight: 400;
+        text-decoration: none;
+        transition: var(--el-transition-color);
+    }
+    span {
+        font-family: Microsoft YaHei, Microsoft YaHei;
+        font-weight: 400;
+        font-size: 20px;
+        color: #666666;
+        line-height: 23px;
+        text-align: left;
+        font-style: normal;
+        text-transform: none;
+    }
+    span:hover {
+        color: #666666;
+    }
+    .location {
+        margin-right: 20px;
+        width: 100px;
+        height: 22px;
+        font-family: Microsoft YaHei, Microsoft YaHei;
+        font-weight: 400;
+        font-size: 20px;
+        color: #666666;
+        line-height: 23px;
+        text-align: left;
+        font-style: normal;
+        text-transform: none;
+    }
+}
+//列表容器
+.newsDetail {
+    width: 100%;
+    .inner {
+        width: 1200px;
+        font-size: 16px;
+        position: relative;
+        .innerDetail {
+            margin: 0 auto;
+            margin-bottom: 30px;
+            min-height: 1370px;
+            .innerDetail1 {
+                min-height: 1370px;
+                margin: 0 auto;
+                box-sizing: border-box;
+            }
+        }
+    }
+}
+</style>

+ 0 - 10
components/template/sector/body/about/1200x1290/1.vue

@@ -169,14 +169,4 @@ newslists();
         }
     }
 }
-//标题样式2
-.innerTitleStyle2 {
-    font-size: 24px;
-    color: #004564;
-    border-bottom: 1px solid #004564;
-    height: 40px;
-    font-size: 22px;
-    font-weight: bold;
-    margin-bottom: 30px;
-}
 </style>

+ 0 - 1
components/template/sector/body/index/link/1200x230/1.vue

@@ -88,7 +88,6 @@
 <script setup>
 const props = defineProps({
     skinId: Number,//皮肤id
-    templateData:Object,//新闻数据
 });
 </script>
 

+ 21 - 27
components/template/sector/body/index/list/1200x470/1.vue

@@ -2,44 +2,35 @@
     <div class="manyPictureSectorBox">
         <div class="manyPictureSector">
             <div class="manyPictureSectorLeft">
-                <!-- {{ testData.componentList[0].componentData.data}} -->
-                <div v-if="templateData.componentList[0].component_style.toString()=='1'">
+                <div v-if="templateData[0].component_style.toString()=='2'">
                     <left1Style 
-                        v-if="templateData.componentList[0].data.text.length > 0" 
                         :titleLink="componentTitle1" 
-                        :templateData="templateData.componentList[0].data"
+                        :templateData="templateData[0].componentData.data"
                         :skinId="skinId"
                     />
-                    <nodata v-else :dataStyle="2" :dataWidth="720" :dataHeight="440" />
                 </div>
-                <div v-if="templateData.componentList[0].component_style.toString()=='2'">
+                <div v-if="templateData[0].component_style.toString()=='1'">
                     <left2Style 
-                        v-if="templateData.componentList[0].data.text.length > 0" 
                         :titleLink="componentTitle1" 
-                        :templateData="templateData.componentList[0].data" 
+                        :templateData="templateData[0].componentData.data" 
                         :skinId="skinId"
                     />
-                    <nodata v-else :dataStyle="2" :dataWidth="720" :dataHeight="440" />
                 </div>
             </div>
             <div class="manyPictureSectorRight">
-               <div v-if="templateData.componentList[1].component_style.toString()=='1'">
+               <div v-if="templateData[1].component_style.toString()=='1'">
                     <right1Style 
-                        v-if="templateData.componentList[1].data.text.length > 0" 
                         :titleLink="componentTitle2" 
-                        :templateData="templateData.componentList[1].data" 
+                        :templateData="templateData[1].componentData.data" 
                         :skinId="skinId"
                     />
-                    <nodata v-else :dataStyle="2" :dataWidth="450" :dataHeight="440" />
                 </div>
-                <div v-if="templateData.componentList[1].component_style.toString()=='2'">
+                <div v-if="templateData[1].component_style.toString()=='2'">
                     <right2Style 
-                        v-if="templateData.componentList[1].data.text.length > 0" 
                         :titleLink="componentTitle2" 
-                        :templateData="templateData.componentList[1].data" 
+                        :templateData="templateData[1].componentData.data" 
                         :skinId="skinId"
                     />
-                    <nodata v-else :dataStyle="2" :dataWidth="450" :dataHeight="440" />
                 </div>
             </div>
         </div>
@@ -66,19 +57,22 @@ const props = defineProps({
 
 //该栏目下有两个组件 此时需要提供children_count来判断是否跳转到频道页
 const componentTitle1 = {
-    alias:props.templateData.componentList[0].data.alias,
-    aLIas_pinyin:props.templateData.componentList[0].data.pinyin,
-    is_url: props.templateData.componentList[0].data.is_url,
-    children_count: props.templateData.componentList[0].data.children_count,
-    cid:props.templateData.componentList[0].data.category_id
+    alias:props.templateData[0].componentData.data.alias,
+    aLIas_pinyin:props.templateData[0].componentData.data.pinyin,
+    is_url: props.templateData[0].componentData.data.is_url ?? 0,//如果is_url为空 则默认为0
+    children_count: props.templateData[0].componentData.data.children_count ?? 0,//如果children_count为空 则默认为0
+    cid:props.templateData[0].componentData.data.category_id
 }
 const componentTitle2 = {
-    alias:props.templateData.componentList[1].data.alias,
-    aLIas_pinyin:props.templateData.componentList[1].data.pinyin,
-    is_url: props.templateData.componentList[1].data.is_url,
-    children_count: props.templateData.componentList[1].data.children_count,
-    cid:props.templateData.componentList[1].data.category_id
+    alias:props.templateData[1].componentData.data.alias,
+    aLIas_pinyin:props.templateData[1].componentData.data.pinyin,
+    is_url: props.templateData[1].componentData.data.is_url ?? 0,//如果is_url为空 则默认为0
+    children_count: props.templateData[1].componentData.data.children_count ?? 0,//如果children_count为空 则默认为0
+    cid:props.templateData[1].componentData.data.category_id
 }
+//console.log(props.templateData)
+//console.log(componentTitle1)
+//console.log(props.templateData[0].componentData.data.textnum)
 </script>
 
 <style lang="less" scoped>

+ 19 - 26
components/template/sector/body/index/list/1200x470/2.vue

@@ -5,43 +5,35 @@
          -->
         <div class="manyPictureSector">
             <div class="manyPictureSectorLeft">
-                <div v-if="templateData.componentList[0].component_style.toString()=='1'">
+                <div v-if="templateData[0].component_style.toString()=='1'">
                     <left1Style 
-                        v-if="templateData.componentList[0].data.text.length > 0" 
                         :titleLink="componentTitle1" 
-                        :templateData="templateData.componentList[0].data"
+                        :templateData="templateData[0].componentData.data"
                         :skinId="skinId"
                     />
-                    <nodata v-else :dataStyle="2" :dataWidth="720" :dataHeight="440" />
                 </div>
-                <div v-if="templateData.componentList[0].component_style.toString()=='2'">
+                <div v-if="templateData[0].component_style.toString()=='2'">
                     <left2Style 
-                        v-if="templateData.componentList[0].data.text.length > 0" 
                         :titleLink="componentTitle1" 
-                        :templateData="templateData.componentList[0].data" 
+                        :templateData="templateData[0].componentData.data" 
                         :skinId="skinId"
                     />
-                    <nodata v-else :dataStyle="2" :dataWidth="720" :dataHeight="440" />
                 </div>
             </div>
             <div class="manyPictureSectorRight">
-                <div v-if="templateData.componentList[1].component_style.toString()=='1'">
+                <div v-if="templateData[1].component_style.toString()=='1'">
                     <right1Style 
-                        v-if="templateData.componentList[1].data.text.length > 0" 
                         :titleLink="componentTitle2" 
-                        :templateData="templateData.componentList[1].data" 
+                        :templateData="templateData[1].componentData.data" 
                         :skinId="skinId"
                     />
-                    <nodata v-else :dataStyle="2" :dataWidth="450" :dataHeight="440" />
                 </div>
-                <div v-if="templateData.componentList[1].component_style.toString()=='2'">
+                <div v-if="templateData[1].component_style.toString()=='2'">
                     <right2Style 
-                        v-if="templateData.componentList[1].data.text.length > 0" 
                         :titleLink="componentTitle2" 
-                        :templateData="templateData.componentList[1].data" 
+                        :templateData="templateData[1].componentData.data" 
                         :skinId="skinId"
                     />
-                    <nodata v-else :dataStyle="2" :dataWidth="450" :dataHeight="440" />
                 </div>
             </div>
         </div>
@@ -67,19 +59,20 @@ const props = defineProps({
 
 //该栏目下有两个组件 此时需要提供children_count来判断是否跳转到频道页
 const componentTitle1 = {
-    alias:props.templateData.componentList[0].data.alias,
-    aLIas_pinyin:props.templateData.componentList[0].data.pinyin,
-    is_url: props.templateData.componentList[0].data.is_url,
-    children_count: props.templateData.componentList[0].data.children_count,
-    cid:props.templateData.componentList[0].data.category_id
+    alias:props.templateData[0].componentData.data.alias,
+    aLIas_pinyin:props.templateData[0].componentData.data.pinyin,
+    is_url: props.templateData[0].componentData.data.is_url ?? 0,//如果is_url为空 则默认为0
+    children_count: props.templateData[0].componentData.data.children_count ?? 0,//如果children_count为空 则默认为0
+    cid:props.templateData[0].componentData.data.category_id
 }
 const componentTitle2 = {
-    alias:props.templateData.componentList[1].data.alias,
-    aLIas_pinyin:props.templateData.componentList[1].data.pinyin,
-    is_url: props.templateData.componentList[1].data.is_url,
-    children_count: props.templateData.componentList[1].data.children_count,
-    cid:props.templateData.componentList[1].data.category_id
+    alias:props.templateData[1].componentData.data.alias,
+    aLIas_pinyin:props.templateData[1].componentData.data.pinyin,
+    is_url: props.templateData[1].componentData.data.is_url ?? 0,//如果is_url为空 则默认为0
+    children_count: props.templateData[1].componentData.data.children_count ?? 0,//如果children_count为空 则默认为0
+    cid:props.templateData[1].componentData.data.category_id
 }
+
 </script>
 
 <style lang="less" scoped>

+ 9 - 13
components/template/sector/body/index/list/1200x480/1.vue

@@ -1,25 +1,21 @@
 <template>
     <div class="onlyImgSectorBox">
         <div class="onlyImgSector">
-            <div v-if="templateData.componentList[0].component_style.toString()=='1'">
+            <div v-if="templateData[0].component_style.toString()=='1'">
                 <main1Style 
-                    v-if="templateData.componentList[0].data.text.length > 0" 
                     :titleLink="componentTitle1" 
-                    :templateData="templateData.componentList[0].data"
+                    :templateData="templateData[0].componentData.data"
                     :skinId="skinId" 
                     :templateAdData="templateAdData"
                 />
-                <nodata v-else :dataStyle="2" :dataWidth="1200" :dataHeight="480" />
             </div>
-            <div v-if="templateData.componentList[0].component_style.toString()=='2'">
+            <div v-if="templateData[0].component_style.toString()=='2'">
                 <main2Style 
-                    v-if="templateData.componentList[0].data.text.length > 0" 
                     :titleLink="componentTitle1" 
-                    :templateData="templateData.componentList[0].data"
+                    :templateData="templateData[0].componentData.data"
                     :skinId="skinId" 
                     :templateAdData="templateAdData"
                 />
-                <nodata v-else :dataStyle="2" :dataWidth="1200" :dataHeight="480" />
             </div>
         </div>
     </div>
@@ -39,11 +35,11 @@ const props = defineProps({
 });
 //该通栏下只有1个组件
 const componentTitle1 = {
-    alias:props.templateData.componentList[0].data.alias,
-    aLIas_pinyin:props.templateData.componentList[0].data.pinyin,
-    is_url: props.templateData.componentList[0].data.is_url,
-    children_count: props.templateData.componentList[0].data.children_count,
-    cid:props.templateData.componentList[0].data.category_id
+    alias:props.templateData[0].componentData.data.alias,
+    aLIas_pinyin:props.templateData[0].componentData.data.pinyin,
+    is_url: props.templateData[0].componentData.data.is_url ?? 0,//如果is_url为空 则默认为0
+    children_count: props.templateData[0].componentData.data.children_count ?? 0,//如果children_count为空 则默认为0
+    cid:props.templateData[0].componentData.data.category_id
 }
 //该通栏含有1个广告
 const templateAdData = requestAd(props.adData,props.adTag)

+ 27 - 39
components/template/sector/body/index/list/1200x980/1.vue

@@ -6,64 +6,52 @@
         <div class="commentSector">
             <div class="commentSectorLeft">
                 <div class="commentSectorLeftTop">
-                    <div v-if="templateData.componentList[0].component_style.toString()=='1'">
+                    <div v-if="templateData[0].component_style.toString()=='1'">
                         <leftTop1Style 
-                            v-if="templateData.componentList[0].data.text.length > 0" 
                             :titleLink="componentTitle1" 
-                            :templateData="templateData.componentList[0].data"
+                            :templateData="templateData[0].componentData.data"
                             :skinId="skinId"
                         />
-                        <nodata v-else :dataStyle="2" :dataWidth="720" :dataHeight="300" />
                     </div>
-                    <div v-if="templateData.componentList[0].component_style.toString()=='2'">
+                    <div v-if="templateData[0].component_style.toString()=='2'">
                         <leftTop2Style 
-                            v-if="templateData.componentList[0].data.text.length > 0" 
                             :titleLink="componentTitle1" 
-                            :templateData="templateData.componentList[0].data"
+                            :templateData="templateData[0].componentData.data"
                             :skinId="skinId"
                         />
-                        <nodata v-else :dataStyle="2" :dataWidth="720" :dataHeight="300" />
                     </div>
                 </div>
                 <div class="commentSectorLeftBottom">
-                    <div v-if="templateData.componentList[1].component_style.toString()=='1'">
+                    <div v-if="templateData[1].component_style.toString()=='1'">
                         <leftBottom1Style 
-                            v-if="templateData.componentList[1].data.text.length > 0" 
                             :titleLink="componentTitle2" 
-                            :templateData="templateData.componentList[1].data"
+                            :templateData="templateData[1].componentData.data"
                             :skinId="skinId"
                         />
-                        <nodata v-else :dataStyle="2" :dataWidth="720" :dataHeight="620" />
                     </div>
-                    <div v-if="templateData.componentList[1].component_style.toString()=='2'">
+                    <div v-if="templateData[1].component_style.toString()=='2'">
                         <leftBottom2Style 
-                            v-if="templateData.componentList[1].data.text.length > 0" 
                             :titleLink="componentTitle2" 
-                            :templateData="templateData.componentList[1].data"
+                            :templateData="templateData[1].componentData.data"
                             :skinId="skinId"
                         />
-                        <nodata v-else :dataStyle="2" :dataWidth="720" :dataHeight="620" />
                     </div>
                 </div>
             </div>
             <div class="commentSectorRight">
-                <div v-if="templateData.componentList[2].component_style.toString()=='1'">
+                <div v-if="templateData[2].component_style.toString()=='1'">
                     <right1Style 
-                        v-if="templateData.componentList[2].data.text.length > 0" 
                         :titleLink="componentTitle3" 
-                        :templateData="templateData.componentList[2].data"
+                        :templateData="templateData[2].componentData.data"
                         :skinId="skinId"
                     />
-                    <nodata v-else :dataStyle="2" :dataWidth="450" :dataHeight="950" />
                 </div>
-                <div v-if="templateData.componentList[2].component_style.toString()=='2'">
+                <div v-if="templateData[2].component_style.toString()=='2'">
                     <right2Style 
-                        v-if="templateData.componentList[2].data.text.length > 0" 
                         :titleLink="componentTitle3" 
-                        :templateData="templateData.componentList[2].data"
+                        :templateData="templateData[2].componentData.data"
                         :skinId="skinId"
                     />
-                    <nodata v-else :dataStyle="2" :dataWidth="450" :dataHeight="950" />
                 </div>
             </div>
         </div>
@@ -93,25 +81,25 @@ const props = defineProps({
 
 //该栏目下有三个组件 此时需要提供children_count来判断是否跳转到频道页
 const componentTitle1 = {
-    alias:props.templateData.componentList[0].data.alias,
-    aLIas_pinyin:props.templateData.componentList[0].data.pinyin,
-    is_url: props.templateData.componentList[0].data.is_url,
-    children_count: props.templateData.componentList[0].data.children_count,
-    cid:props.templateData.componentList[0].data.category_id
+    alias:props.templateData[0].componentData.data.alias,
+    aLIas_pinyin:props.templateData[0].componentData.data.pinyin,
+    is_url: props.templateData[0].componentData.data.is_url ?? 0,//如果is_url为空 则默认为0
+    children_count: props.templateData[0].componentData.data.children_count ?? 0,//如果children_count为空 则默认为0
+    cid:props.templateData[0].componentData.data.category_id
 }
 const componentTitle2 = {
-    alias:props.templateData.componentList[1].data.alias,
-    aLIas_pinyin:props.templateData.componentList[1].data.pinyin,
-    is_url: props.templateData.componentList[1].data.is_url,
-    children_count: props.templateData.componentList[1].data.children_count,
-    cid:props.templateData.componentList[1].data.category_id
+    alias:props.templateData[1].componentData.data.alias,
+    aLIas_pinyin:props.templateData[1].componentData.data.pinyin,
+    is_url: props.templateData[1].componentData.data.is_url ?? 0,//如果is_url为空 则默认为0
+    children_count: props.templateData[1].componentData.data.children_count ?? 0,//如果children_count为空 则默认为0
+    cid:props.templateData[1].componentData.data.category_id
 }
 const componentTitle3 = {
-    alias:props.templateData.componentList[2].data.alias,
-    aLIas_pinyin:props.templateData.componentList[2].data.pinyin,
-    is_url: props.templateData.componentList[2].data.is_url,
-    children_count: props.templateData.componentList[2].data.children_count,
-    cid:props.templateData.componentList[2].data.category_id
+    alias:props.templateData[2].componentData.data.alias,
+    aLIas_pinyin:props.templateData[2].componentData.data.pinyin,
+    is_url: props.templateData[2].componentData.data.is_url ?? 0,//如果is_url为空 则默认为0
+    children_count: props.templateData[2].componentData.data.children_count ?? 0,//如果children_count为空 则默认为0
+    cid:props.templateData[2].componentData.data.category_id
 }
 </script>
 

+ 14 - 38
components/template/sector/body/list/list/1200x1220/1.vue

@@ -6,10 +6,10 @@
             </div>
             <div class="listContentBox">
                 <div class="listContentBoxLeft">
-                    <div v-if="templateData.componentList[0].component_style == 2">
+                    <div v-if="templateData.componentList[0].component_style == 1">
                         <list1Style :listData="listData" :skinId="skinId"/>
                     </div>
-                    <div v-if="templateData.componentList[0].component_style == 1">
+                    <div v-if="templateData.componentList[0].component_style == 2">
                         <list2Style :listData="listData" :skinId="skinId"/>
                     </div>
                 </div>
@@ -38,9 +38,9 @@
                         size="small" 
                         background 
                         layout="prev, pager, next" 
-                        :total="100" 
-                        :page-size="pageSize" 
-                        :current-page="pageNum" 
+                        :total="pageData.total" 
+                        :page-size="pageData.pageSize" 
+                        :current-page="pageData.pageNum" 
                         prev-text="上一页" 
                         next-text="下一页"
                         @current-change="changePage"
@@ -71,8 +71,16 @@ const props = defineProps({
     skinId: Number,//皮肤id
     templateData:Object,//新闻数据
     routeId: Number,//导航池id
+    pageData:Object,//分页数据
 });
 
+//分页事件
+let changePage = (value) => {
+    props.pageData.pageNum = value;
+    console.log("当前页码", value);
+    //navigateTo(`/${targetSegment}/list-${value}.html`)
+}
+
 const listData = {
     "code": 200,
     "message": "success",
@@ -142,39 +150,7 @@ const listData = {
     }
 }
 
-//页面数据 ---------------------------------------->
-// let pageNum = ref(2); //当前页码
-// pageNum.value = parseInt(route.params.id);//路由中传递的分页页码
-// let total = ref(1); //总条数
-// let pageSize = ref(20); //每页条数
-
-// //新闻列表
-// const newsList = ref([]);
-// let newslists = async () => {
-//     const listData = await requestDataPromise('/web/getWebsiteArticleList', {
-//         method: 'GET',
-//         query: {
-//             'page': pageNum.value,
-//             'pageSize': pageSize.value,
-//             'catid': articleId
-//         },
-//     });
-//     if (listData.code == 200) {
-//         newsList.value = listData.data.rows;
-//         total.value = listData.data.count;
-
-//     } else {
-//         console.log("错误位置:获取新闻列表")
-//     }
-// }
-// //获得列表
-// newslists();
 
-// //分页事件
-// let changePage = (value) => {
-//     console.log("当前页码", value);
-//     navigateTo(`/${targetSegment}/list-${value}.html`)
-// }
 //页面数据---------------------------------------->
 </script>
 
@@ -194,7 +170,7 @@ const listData = {
         .listContentBox {
             display: flex;
             justify-content: space-between;
-            align-items: center;
+            align-items: flex-start;
             margin-top: 17px;
             .listContentBoxLeft {
                 width: 900px;

+ 14 - 101
pages/[dir]/[dir]/list-[id].vue

@@ -10,7 +10,7 @@
         <!--频道菜单-->
         <templateChannelMenu :skinId="skinId" :navigateData="navigateData.data" :templateData="testTemplateData2" :routeId="parentRouteId"></templateChannelMenu>
         <!--列表组件-->
-        <templateList :skinId="skinId" :templateData="testTemplateData" :routeId="routeId"></templateList>
+        <templateList :skinId="skinId" :templateData="testTemplateData" :routeId="routeId" :pageData="pageData"></templateList>
     </div>
     <!-- 底部 -->
     <templateFoot></templateFoot>
@@ -117,106 +117,6 @@ useSeoMeta({
 });
 //1.获得基本信息单元 end---------------------------------------->
 
-//2.获得页面数据 start---------------------------------------->
-const route = useRoute();
-let pageNum = ref(1); //列表页当前页码
-pageNum.value = parseInt(route.params.id);//路由中传递的分页页码
-let total = ref(1); //总条数
-let pageSize = ref(20); //每页条数
-
-//2.1新闻数据
-// const newsList = ref([]);
-// let newslists = async () => {
-//     const listData = await requestDataPromise('/web/getWebsiteArticleList', {
-//         method: 'GET',
-//         query: {
-//             'page': pageNum.value,
-//             'pageSize': pageSize.value,
-//             'catid': articleId
-//         },
-//     });
-//     if (listData.code == 200) {
-//         newsList.value = listData.data.rows;
-//         total.value = listData.data.count;
-
-//     } else {
-//         console.log("错误位置:获取新闻列表")
-//     }
-// }
-// newslists();
-
-// //2.2分页
-// let changePage = (value) => {
-//     console.log("当前页码", value);
-//     navigateTo(`/${targetSegment}/list-${value}.html`)
-// }
-//2.获得页面数据 end---------------------------------------->
-
-
-
-//4.面包屑 start ---------------------------------------->
-// const name = ref('')
-// //4.1 当前频道名称
-// let getPageName = async () => {
-//     const pageName = await requestDataPromise('/web/getOneWebsiteCategory', {
-//         method: 'GET',
-//         query: {
-//             'catid': articleId
-//         },
-//     });
-//     if (pageName.code == 200) {
-//         name.value = pageName.data.alias
-//     } else {
-//         console.log("错误位置:获取当前频道名称", pageName.message)
-//     }
-// }
-// getPageName();
-
-// //4.2 查询是否含有父级导航
-// const parent_name = ref([]);
-// const parent_id = ref([]);
-// const parent_pinyin = ref("");
-// let getParentNav = async () => {
-//     const listData = await requestDataPromise('/web/getOneWebsiteCategory', {
-//         method: 'GET',
-//         query: {
-//             'catid': articleId
-//         },
-//     });
-//     if (listData.code == 200) {
-//         parent_name.value = listData.data.parent_name;
-//         parent_id.value = listData.data.parent_id;
-//         parent_pinyin.value = listData.data.parent_pinyin;
-//     } else {
-//         console.log("错误位置:查询父级导航信息")
-//     }
-//     getSecondNav();
-// }
-// getParentNav();
-
-// //4.3 获取二级栏目列表
-// const secondNav = ref([]);
-// let getSecondNav = async () => {
-//     const listData = await requestDataPromise('/web/getWebsiteModelCategory', {
-//         method: 'GET',
-//         query: {
-//             'placeid': 1,
-//             'pid': parent_id.value,
-//             'num': 8,
-//         },
-//     });
-//     console.log('listData', listData);
-
-//     if (listData.code == 200) {
-//         secondNav.value = listData.data
-//     } else {
-//         console.log("错误位置:获得二级栏目列表")
-//     }
-// }
-//4.面包屑 end ---------------------------------------->
-
-
-
 //2.页面数据 start---------------------------------------->
 //2.0 测试数据 后期移除
 const testTemplateData = {
@@ -697,6 +597,19 @@ const testTemplateData2 = {
     ],
     "sort": 4
 }
+
+//分页数据
+const route = useRoute();
+let pageNum = ref(1); //当前页码
+pageNum.value = parseInt(route.params.id);//路由中传递的分页页码
+let total = ref(100); //总条数
+let pageSize = ref(20); //每页条数
+
+let pageData = ref({
+    "pageNum": pageNum.value,
+    "pageSize": pageSize.value,
+    "total": total.value
+});
 //2.页面数据 end---------------------------------------->
 </script>
 

+ 15 - 8
pages/[dir]/list-[id].vue

@@ -8,7 +8,7 @@
         <!--广告组件-->
         <templateAd :adTag="'bbzxw_list_2'" :skinId="skinId" :adData="adData"></templateAd>
         <!--列表组件-->
-        <templateList :skinId="skinId" :templateData="testTemplateData" :routeId="routeId"></templateList>
+        <templateList :skinId="skinId" :templateData="testTemplateData" :routeId="routeId" :pageData="pageData"></templateList>
     </div>
     <!-- 底部 -->
     <templateFoot></templateFoot>
@@ -102,13 +102,6 @@ useSeoMeta({
 });
 //1.获得基本信息单元 end---------------------------------------->
 
-//2.获得页面数据 start---------------------------------------->
-// const route = useRoute();
-// let pageNum = ref(1); //列表页当前页码
-// pageNum.value = parseInt(route.params.id);//路由中传递的分页页码
-// let total = ref(1); //总条数
-// let pageSize = ref(20); //每页条数
-
 //2.页面数据 start---------------------------------------->
 //2.0 测试数据 后期移除
 const testTemplateData = {
@@ -589,6 +582,20 @@ const testTemplateData2 = {
     ],
     "sort": 4
 }
+
+//分页数据
+const route = useRoute();
+let pageNum = ref(1); //当前页码
+pageNum.value = parseInt(route.params.id);//路由中传递的分页页码
+let total = ref(100); //总条数
+let pageSize = ref(20); //每页条数
+
+let pageData = ref({
+    "pageNum": pageNum.value,
+    "pageSize": pageSize.value,
+    "total": total.value
+});
+
 //2.页面数据 end---------------------------------------->
 </script>
 

+ 87 - 189
pages/about/[dir]/[dir]/[id].vue

@@ -1,210 +1,108 @@
 <template>
-    <!-- 页面头部 -->
-    <HomePageHead></HomePageHead>
-    <!-- 导航栏 -->
-    <HomePageNavigation1></HomePageNavigation1>
-    <!-- 列表页广告一 -->
-    <HomeTopTen :imgurl="adImg1" v-if="adImg1"></HomeTopTen>
-    <!-- 面包屑导航 -->
-    <div class="breadcrumb">
-        <div class="inner">
-            <span class="location">当前位置:</span>
-            <el-breadcrumb :separator-icon="ArrowRight">
-                <el-breadcrumb-item>
-                    <NuxtLink to="/">首页</NuxtLink>
-                </el-breadcrumb-item>
-                <el-breadcrumb-item>
-                    {{ newsDetail.con_title }}
-                </el-breadcrumb-item>
-            </el-breadcrumb>
-        </div>
+    <!-- 头部 -->
+    <templateHead></templateHead>
+    <!-- 菜单 -->
+    <templateMenu></templateMenu>
+    <div>
+        <!-- 广告组件 -->
+        <templateAd :adTag="'nmw_page_0001'" :skinId="skinId" :adData="adData"></templateAd>
+        <!-- 底部详情-详情 -->
+        <templateAboutDetail :skinId="skinId" :templateData="testTemplateData2"></templateAboutDetail>
+        <!-- 广告组件 -->
+        <templateAd :adTag="'nmw_page_0001'" :skinId="skinId" :adData="adData"></templateAd>
     </div>
-    <!-- 资讯列表 -->
-    <div class="newsDetail">
-        <div class="inner">
-            <div class="innerDetail">
-                <div class="headImg"></div>
-                <div class="innerDetail1">
-                    <div class="leftBottom" v-html="newsDetail.content"></div>
-                </div>
-                <div class="footImg"></div>
-            </div>
-            <div class="innerLeft">
-                <ul>
-                    <li>
-                        导航列表
-                    </li>
-                    <li v-for="(item, index) in bottomMenu" :key="index">
-                        <NuxtLink :to="`/about/${item.name_pinyin}/index.html`" :title="item.name"
-                            v-if="item.id == pageId && item.id != 7">
-                            {{ item.name }}
-                        </NuxtLink>
-                        <NuxtLink :to="`/about/${item.name_pinyin}/index.html`" :title="item.name"
-                            v-else-if="item.id != pageId && item.id != 7">
-                            {{ item.name }}
-                        </NuxtLink>
-                        <NuxtLink :to="`/about/${item.name_pinyin}/list-1.html`" :title="item.name"
-                            v-if="item.id == 7 && pageId == 7 && routeHref == '/specialList/7'">
-                            {{ item.name }}
-                        </NuxtLink>
-                        <NuxtLink :to="`/about/${item.name_pinyin}/list-1.html`" class="active" :title="item.name"
-                            v-else-if="item.id == 7">
-                            {{ item.name }}
-                        </NuxtLink>
-                    </li>
-                </ul>
-            </div>
-            <div style="clear: both;"></div>
-        </div>
-    </div>
-    <!-- 广告二 -->
-    <HomeTopTen :imgurl="adImg2" v-if="adImg2"></HomeTopTen>
-    <!-- 页面底部 -->
-    <HomeFoot></HomeFoot>
+    <!-- 底部 -->
+    <templateFoot></templateFoot>
 </template>
 
 <script setup>
-//1.页面依赖 start ---------------------------------------->
-import { ElBreadcrumb, ElBreadcrumbItem } from 'element-plus'
-import { ArrowRight } from '@element-plus/icons-vue'
+//0.加载全局模板组件 start---------------------------------------->
+//0.1 全局通栏
+import templateHead from '@/components/template/sector/head/1200x200/1.vue'
+import templateMenu from '@/components/template/sector/menu/1200x130/1.vue'
+import templateFoot from '@/components/template/sector/foot/1200x580/1.vue'
+//0.2 局部通栏
+//0.2.1 广告组件
+import templateAd from '@/components/template/sector/body/ad/1200x90/1.vue'
+//0.2.2 底部详情-详情
+import templateAboutDetail from '@/components/template/sector/body/about/1200x1150/1.vue'
+//0.加载全局模板组件 end---------------------------------------->
+
+//1.获得基本信息单元 start---------------------------------------->
+//1.1获得页面依赖
 import { ref, onMounted } from 'vue';
 
-//获得跳转过来的id
-const route = useRoute();
-//获得当前的完整路径
-const fullPath = route.path;
-//拆分,取出来中间这一段,然后提取数字部分
-const segments = fullPath.split('/');
-const targetSegment = segments[2];
-//const numberPart = targetSegment.match(/\d+$/)?.[0]; 
-
-let articleId;
-let pageId;
-//通过导航路径反向查询导航id
-const getRouteId = await requestDataPromise('/web/getWebsiteRoute', {
+//1.2获得pinia源
+import { useTemplateBaseStore } from '@/stores/templateBase'
+const templateBaseStore = useTemplateBaseStore()
+//1.3获得该页的皮肤id - 在每个组件中也是同样的获得方法
+const skinId = ref("")
+const websiteId = ref("")
+//1.4获得站点基本信息
+const responseStatus = await requestDataPromise('/web/getWebsiteAllinfo', {
     method: 'GET',
     query: {
-        'foot_pinyin': targetSegment,
+        'link_textnum':24,
+        'link_imgnum':18,
+        'link_footnum':4
     },
 });
-if (getRouteId.code == 200) {
-    articleId = getRouteId.data.id;
-    pageId = getRouteId.data.id;
-} else {
-    console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
-    console.log("错误位置:通过url路径查询导航池id")
-    console.log("后端错误反馈:", getRouteId.message)
-    console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
-}
-
-//1.页面依赖 end ---------------------------------------->
-
-//2.页面数据 start ---------------------------------------->
-//广告列表
-const adList = ref([]);
-let adImg1 = ref([]);
-let adImg2 = ref([]);
-async function getAdData() {
-    const adData = await requestDataPromise('/web/getWebsiteAdvertisement', { method: 'GET', query: { 'ad_tag': 'PAGE' } });
-    adList.value = adData.data;
-    if (adData.code == 200) {
-        for (let item of adData.data) {
-            if (item.ad_tag == 'PAGE_0001') {
-                adImg1.value = item;
-            }
-            if (item.ad_tag == 'PAGE_0002') {
-                adImg2.value = item;
-            }
-        }
-    } else {
-        console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
-        console.log("错误位置:获取详情页广告列表")
-        console.log("后端错误反馈:", adData.message)
-        console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
-    }
-}
-getAdData();
-
-const newsDetail = ref({})
-const bottomMenu = ref([]);
-
-async function getPageData() {
-    const mkdata = await requestDataPromise('/web/getWebsiteFooterCategoryInfo', {
-        method: 'GET',
-        query: {
-            'fcat_id': articleId,
-            'type': '0',
-        },
-    });
-    console.log('newsDetail.value', mkdata.data);
-
-    newsDetail.value = mkdata.data;
-    console.log('newsDetail.value', newsDetail.value);
-}
-getPageData();
-
-async function getPageMenu() {
-    const mkdata = await requestDataPromise('/web/getWebsiteFooterCategory', {
-        method: 'GET',
-        query: {},
+if (responseStatus.code == 200) {
+    //0.3.1设置站点基本信息
+    templateBaseStore.setWebSiteInfo(responseStatus.data)
+    websiteId.value = responseStatus.data.website_head.id;//获得网站id
+    //0.3.2设置皮肤id
+    skinId.value = templateBaseStore.webSiteInfo.website_foot.foot_info.template_id;
+    console.log("当前的网站id:"+responseStatus.data.website_head.id)
+    //0.3.3设置seo信息
+    let seoTitle = templateBaseStore.webSiteInfo.website_head.title;
+    let seoDescription = templateBaseStore.webSiteInfo.website_head.description;
+    let seoKeywords = templateBaseStore.webSiteInfo.website_head.keywords;
+    let seoSuffix = templateBaseStore.webSiteInfo.website_head.suffix;
+    let seoName = templateBaseStore.webSiteInfo.website_head.website_name;
+    useSeoMeta({
+        title: seoTitle + "_" + seoSuffix,
+        meta: [
+            { name: 'keywords', content: seoKeywords + "_" + seoName + "_" + seoSuffix, tagPriority: 10 },
+            { name: 'description', content: seoDescription + "_" + seoName + "_" + seoSuffix, tagPriority: 10 }
+        ]
     });
-    bottomMenu.value = mkdata.data;
 }
-getPageMenu();
-//2.页面数据 end ---------------------------------------->
-
-
-//4.设置seo信息 start---------------------------------------->
-//4.1 设置seo信息
-const setData = await requestDataPromise('/web/getWebsiteFootInfo', {
+//1.5获得广告池
+const adData = ref([]);
+const adResponseStatus = await requestDataPromise('/web/getWebsiteAdvertisement', {
     method: 'GET',
     query: {},
 });
-
-let seoTitle = setData.data.website_head.title;
-let seoDescription = setData.data.website_head.description;
-let seoKeywords = setData.data.website_head.keywords;
-let seoSuffix = setData.data.website_head.suffix;
-let seoName = setData.data.website_head.website_name;
-
-useSeoMeta({
-    title: seoTitle + "_" + seoSuffix,
-    meta: [
-        { name: 'description', content: seoDescription + "_" + seoName + "_" + seoSuffix, tagPriority: 10 },
-        { name: 'keywords', content: seoKeywords + "_" + seoName + "_" + seoSuffix, tagPriority: 10 }
-    ]
-});
-//4.设置seo信息 end---------------------------------------->
-
-onMounted(async () => {
-    //从客户端获取行政职能部门 加快打开速度
-    const { $webUrl, $CwebUrl } = useNuxtApp();
-    //广告1
-    let url = `${$webUrl}/web/getWebsiteAdvertisement?ad_tag=nmw_page_0001`
-    const responseAd1 = await fetch(url, {
-        headers: {
-            'Content-Type': 'application/json',
-            'Userurl': $CwebUrl,
-            'Origin': $CwebUrl
-        }
-    });
-    const resultAd1 = await responseAd1.json();
-    adImg1.value = resultAd1.data[0];
-
-    //广告2
-    let url2 = `${$webUrl}/web/getWebsiteAdvertisement?ad_tag=nmw_page_0002`
-    const responseAd2 = await fetch(url2, {
-        headers: {
-            'Content-Type': 'application/json',
-            'Userurl': $CwebUrl,
-            'Origin': $CwebUrl
+if (adResponseStatus.code == 200) {
+    adData.value = adResponseStatus.data;
+    templateBaseStore.setAdList(adResponseStatus.data)
+}
+//1.获得基本信息单元 end---------------------------------------->
+
+//2.测试数据 start ---------------------------------------->
+//静态链接测试数据
+const testTemplateData2 = {
+    "sectorName": "linkSector",
+    "componentList": [
+        {
+            "component_type": 3,
+            "component_style": 1,
+            "sort": 1,
+            "componentData": {}
+        },
+        {
+            "component_type": 3,
+            "component_style": 1,
+            "sort": 1,
+            "componentData": {}
         }
-    });
-    const resultAd2 = await responseAd2.json();
-    adImg2.value = resultAd2.data[0];
-})
+    ],
+    "sort": 4
+}
+//2.测试数据 end ---------------------------------------->
 </script>
 
 <style lang="less" scoped>
-@import '@/assets/css/about.less';
+    @import '@/assets/css/about.less';
 </style>

+ 85 - 184
pages/about/[dir]/index.html.vue

@@ -1,205 +1,106 @@
 <template>
-    <!-- 页面头部 -->
-    <HomePageHead></HomePageHead>
-    <!-- 导航栏 -->
-    <HomePageNavigation1></HomePageNavigation1>
-    <!-- 列表页广告一 -->
-    <HomeTopTen :imgurl="adImg1" v-if="adImg1"></HomeTopTen>
-    <!-- 面包屑导航 -->
-    <div class="breadcrumb">
-        <div class="inner">
-            <span class="location">当前位置:</span>
-            <el-breadcrumb :separator-icon="ArrowRight">
-                <el-breadcrumb-item>
-                    <NuxtLink to="/">首页</NuxtLink>
-                </el-breadcrumb-item>
-                <el-breadcrumb-item>
-                    {{ newsDetail.con_title }}
-                </el-breadcrumb-item>
-            </el-breadcrumb>
-        </div>
+    <!-- 头部 -->
+    <templateHead></templateHead>
+    <!-- 菜单 -->
+    <templateMenu></templateMenu>
+    <div>
+        <!-- 广告组件 -->
+        <templateAd :adTag="'nmw_page_0001'" :skinId="skinId" :adData="adData"></templateAd>
+        <!-- 底部详情-详情 -->
+        <templateAboutDetail :skinId="skinId" :templateData="testTemplateData2"></templateAboutDetail>
+        <!-- 广告组件 -->
+        <templateAd :adTag="'nmw_page_0001'" :skinId="skinId" :adData="adData"></templateAd>
     </div>
-    
-    <!-- 资讯列表 -->
-    <div class="newsDetail">
-        <div class="inner">
-            <div class="innerDetail">
-                <div class="headImg"></div>
-                <div class="innerDetail1">
-                    <div class="leftBottom" v-html="newsDetail.content"></div>
-                </div>
-                <div class="footImg"></div>
-            </div>
-            <div class="innerLeft">
-                <ul>
-                    <li>
-                        导航列表
-                    </li>
-                    <li v-for="(item, index) in bottomMenu" :key="index">
-                        <NuxtLink :to="`/about/${item.name_pinyin}/index.html`" :title="item.name"
-                            v-if="item.id == pageId && item.id != 7" class="active">
-                            {{ item.name }}
-                        </NuxtLink>
-                        <NuxtLink :to="`/about/${item.name_pinyin}/index.html`" :title="item.name"
-                            v-else-if="item.id != pageId && item.id != 7">
-                            {{ item.name }}
-                        </NuxtLink>
-                        <NuxtLink :to="`/about/${item.name_pinyin}/list-1.html`" :title="item.name"
-                            v-if="item.id == 7 && pageId == 7 && routeHref == '/specialList/7'" class="active">
-                            {{item.name }}
-                        </NuxtLink>
-                        <NuxtLink :to="`/about/${item.name_pinyin}/list-1.html`" :title="item.name" v-else-if="item.id == 7">
-                            {{ item.name}}
-                        </NuxtLink>
-                    </li>
-                </ul>
-            </div>
-            <div style="clear: both;"></div>
-        </div>
-    </div>
-    <!-- 广告二 -->
-    <HomeTopTen :imgurl="adImg2" v-if="adImg2"></HomeTopTen>
-    <!-- 页面底部 -->
-    <HomeFoot></HomeFoot>
+    <!-- 底部 -->
+    <templateFoot></templateFoot>
 </template>
 
 <script setup>
-//1.页面依赖 start ---------------------------------------->
-import { ElBreadcrumb, ElBreadcrumbItem } from 'element-plus'
-import { ArrowRight } from '@element-plus/icons-vue'
-import { ref, onMounted } from 'vue';
+//0.加载全局模板组件 start---------------------------------------->
+//0.1 全局通栏
+import templateHead from '@/components/template/sector/head/1200x200/1.vue'
+import templateMenu from '@/components/template/sector/menu/1200x130/1.vue'
+import templateFoot from '@/components/template/sector/foot/1200x580/1.vue'
+//0.2 局部通栏
+//0.2.1 广告组件
+import templateAd from '@/components/template/sector/body/ad/1200x90/1.vue'
+//0.2.2 底部详情-详情
+import templateAboutDetail from '@/components/template/sector/body/about/1200x1150/1.vue'
+//0.加载全局模板组件 end---------------------------------------->
 
-//获得跳转过来的id
-const route = useRoute();
-//获得当前的完整路径
-const fullPath = route.path;
-//拆分,取出来中间这一段,然后提取数字部分
-const segments = fullPath.split('/'); 
-const targetSegment = segments[2]; 
-//const numberPart = targetSegment.match(/\d+$/)?.[0]; 
+//1.获得基本信息单元 start---------------------------------------->
+//1.1获得页面依赖
+import { ref, onMounted } from 'vue';
 
-let articleId;
-let pageId;
-//通过导航路径反向查询导航id
-const getRouteId = await requestDataPromise('/web/getWebsiteRoute', {
+//1.2获得pinia源
+import { useTemplateBaseStore } from '@/stores/templateBase'
+const templateBaseStore = useTemplateBaseStore()
+//1.3获得该页的皮肤id - 在每个组件中也是同样的获得方法
+const skinId = ref("")
+const websiteId = ref("")
+//1.4获得站点基本信息
+const responseStatus = await requestDataPromise('/web/getWebsiteAllinfo', {
     method: 'GET',
     query: {
-        'foot_pinyin': targetSegment,
+        'link_textnum':24,
+        'link_imgnum':18,
+        'link_footnum':4
     },
 });
-if(getRouteId.code == 200){
-    articleId = getRouteId.data.id;
-    pageId = getRouteId.data.id;
-}else{
-    console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
-    console.log("错误位置:通过url路径查询导航池id")
-    console.log("后端错误反馈:",getRouteId.message)
-    console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
-}
-
-//1.页面依赖 end ---------------------------------------->
-
-//2.页面数据 start ---------------------------------------->
-//广告列表
-const adList = ref([]);
-let adImg1 = ref([]);
-let adImg2 = ref([]);
-async function getAdData(){
-    const adData = await requestDataPromise('/web/getWebsiteAdvertisement',{method:'GET',query:{'ad_tag':'PAGE'}});
-    adList.value = adData.data;
-    if(adData.code==200){
-        for(let item of adData.data){
-            if(item.ad_tag == 'PAGE_0001'){
-                adImg1.value = item;
-            }
-            if(item.ad_tag == 'PAGE_0002'){
-                adImg2.value = item;
-            }
-        }
-    }else{
-        console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
-        console.log("错误位置:获取详情页广告列表")
-        console.log("后端错误反馈:",adData.message)
-        console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
-    }
-}
-getAdData();
-
-const newsDetail = ref({})
-const bottomMenu = ref([]);
-
-async function getPageData() {
-    const mkdata =  await requestDataPromise('/web/getWebsiteFooterCategoryInfo', {
-        method: 'GET',
-        query: {
-            'fcat_id': articleId,
-            'type': '0'
-        },
+if (responseStatus.code == 200) {
+    //0.3.1设置站点基本信息
+    templateBaseStore.setWebSiteInfo(responseStatus.data)
+    websiteId.value = responseStatus.data.website_head.id;//获得网站id
+    //0.3.2设置皮肤id
+    skinId.value = templateBaseStore.webSiteInfo.website_foot.foot_info.template_id;
+    console.log("当前的网站id:"+responseStatus.data.website_head.id)
+    //0.3.3设置seo信息
+    let seoTitle = templateBaseStore.webSiteInfo.website_head.title;
+    let seoDescription = templateBaseStore.webSiteInfo.website_head.description;
+    let seoKeywords = templateBaseStore.webSiteInfo.website_head.keywords;
+    let seoSuffix = templateBaseStore.webSiteInfo.website_head.suffix;
+    let seoName = templateBaseStore.webSiteInfo.website_head.website_name;
+    useSeoMeta({
+        title: seoTitle + "_" + seoSuffix,
+        meta: [
+            { name: 'keywords', content: seoKeywords + "_" + seoName + "_" + seoSuffix, tagPriority: 10 },
+            { name: 'description', content: seoDescription + "_" + seoName + "_" + seoSuffix, tagPriority: 10 }
+        ]
     });
-    newsDetail.value = mkdata.data;
 }
-getPageData();
-
-async function getPageMenu() {
-    const mkdata =  await requestDataPromise('/web/getWebsiteFooterCategory', {
-        method: 'GET',
-        query: {},
-    });
-    bottomMenu.value = mkdata.data;
-}
-getPageMenu();
-//2.页面数据 end ---------------------------------------->
-
-
-//4.设置seo信息 start---------------------------------------->
-//4.1 设置seo信息
-const setData =  await requestDataPromise('/web/getWebsiteFootInfo', {
+//1.5获得广告池
+const adData = ref([]);
+const adResponseStatus = await requestDataPromise('/web/getWebsiteAdvertisement', {
     method: 'GET',
     query: {},
 });
+if (adResponseStatus.code == 200) {
+    adData.value = adResponseStatus.data;
+    templateBaseStore.setAdList(adResponseStatus.data)
+}
+//1.获得基本信息单元 end---------------------------------------->
 
-let seoTitle = setData.data.website_head.title;
-let seoDescription = setData.data.website_head.description;
-let seoKeywords = setData.data.website_head.keywords;
-let seoSuffix = setData.data.website_head.suffix;
-let seoName = setData.data.website_head.website_name;
-
-useSeoMeta({
-    title: seoTitle + "_" + seoSuffix,
-    meta: [
-        { name: 'description', content: seoDescription + "_" + seoName + "_" + seoSuffix, tagPriority: 10  },
-        { name: 'keywords', content: seoKeywords + "_" + seoName + "_" + seoSuffix , tagPriority: 10 }
-    ]
-});
-//4.设置seo信息 end---------------------------------------->
-
-onMounted(async ()  => {
-    //从客户端获取行政职能部门 加快打开速度
-    const { $webUrl, $CwebUrl } = useNuxtApp();
-    //广告1
-    let url = `${$webUrl}/web/getWebsiteAdvertisement?ad_tag=nmw_page_0001`
-    const responseAd1 = await fetch(url, {
-        headers: {
-            'Content-Type': 'application/json',
-            'Userurl': $CwebUrl,
-            'Origin': $CwebUrl
-        }
-    });
-    const resultAd1 = await responseAd1.json();
-    adImg1.value = resultAd1.data[0];
-    
-    //广告2
-    let url2 = `${$webUrl}/web/getWebsiteAdvertisement?ad_tag=nmw_page_0002`
-    const responseAd2 = await fetch(url2, {
-        headers: {
-            'Content-Type': 'application/json',
-            'Userurl': $CwebUrl,
-            'Origin': $CwebUrl
+//2.测试数据 start ---------------------------------------->
+//静态链接测试数据
+const testTemplateData2 = {
+    "sectorName": "linkSector",
+    "componentList": [
+        {
+            "component_type": 3,
+            "component_style": 1,
+            "sort": 1,
+            "componentData": {}
+        },
+        {
+            "component_type": 3,
+            "component_style": 1,
+            "sort": 1,
+            "componentData": {}
         }
-    });
-    const resultAd2 = await responseAd2.json();
-    adImg2.value = resultAd2.data[0];
-})
+    ],
+    "sort": 4
+}
+//2.测试数据 end ---------------------------------------->
 </script>
 
 <style lang="less" scoped>

+ 1 - 1
pages/about/[dir]/list-[id].vue

@@ -3,7 +3,7 @@
     <templateHead></templateHead>
     <!-- 菜单 -->
     <templateMenu></templateMenu>
-    <div id="newsList">
+    <div>
         <!-- 广告组件 -->
         <templateAd :adTag="'nmw_page_0001'" :skinId="skinId" :adData="adData"></templateAd>
         <!-- 底部详情-列表 -->

+ 546 - 506
pages/index.vue

@@ -4,28 +4,49 @@
     <!-- 菜单 -->
     <templateMenu></templateMenu>
     <!-- 内容 -->
-    <div>
-        <!--头条-->
+    <!-- <div>
         <templateHeadline :skinId="skinId" :templateData="testTemplateData"></templateHeadline>
-        <!--轮播图-->
         <templateBanner :skinId="skinId" :templateData="testTemplateData"></templateBanner>
-        <!--广告组件 丙丙网-->
-        <!-- <templateAd :adTag="'bbzxw_index_1'" :skinId="skinId" :adData="adData"></templateAd> -->
-        <!--广告组件 农民网-->
-        <templateAd :adTag="'nmw_index_0001'" :skinId="skinId" :adData="adData"></templateAd>
-        <!--静态外链通栏-->
+        <templateAd :adTag="'bbzxw_index_1'" :skinId="skinId" :adData="adData"></templateAd>
         <templateStaticLink :skinId="skinId" :templateData="testTemplateData2"></templateStaticLink>
-        <!--图文组合1-->
-        <!-- <templateNewSector1 :skinId="skinId" :templateData="testTemplateData" :testData="testTemplateData3"></templateNewSector1> -->
         <templateNewSector1 :skinId="skinId" :templateData="testTemplateData"></templateNewSector1>
-        <!--图文组合2-->
         <templateNewSector2 :skinId="skinId" :templateData="testTemplateData"></templateNewSector2>
-        <!--图文组合3-->
         <templateNewSector3 :skinId="skinId" :templateData="testTemplateData"></templateNewSector3>
-        <!--图文与广告组合 丙丙网-->
-        <!-- <templateNewAndAd :skinId="skinId" :templateData="testTemplateData" :adData="adData" :adTag="'bbzxw_index_9'"></templateNewAndAd> -->
-        <!--图文与广告组合 农民网-->
-        <templateNewAndAd :skinId="skinId" :templateData="testTemplateData" :adData="adData" :adTag="'nmw_index_0003'"></templateNewAndAd>
+        <templateNewAndAd :skinId="skinId" :templateData="testTemplateData" :adData="adData" :adTag="'bbzxw_index_9'"></templateNewAndAd>
+    </div> -->
+    <div v-for="(item,index) in templateData" :key="index">
+        <!--1.广告通栏-->
+        <div v-if="item.sectorName=='adSector'">
+            <templateAd :skinId="skinId" :adData="adData" :adTag="item.ad.ad_tag"></templateAd>
+        </div>
+        <!--2.头条通栏 data返回值错误 没有依照level字段返回 而是返回了政策法规-->
+        <!-- <div v-if="item.sectorName=='headLineSector'">
+            <templateHeadline :skinId="skinId" :templateData="item.componentList"></templateHeadline>
+        </div> -->
+        <!--3.轮播图通栏 data返回值错误 没有依照level字段返回 而是返回了政策法规-->
+        <!-- <div v-if="item.sectorName=='bannerSector'">
+            <templateHeadline :skinId="skinId" :templateData="item.componentList"></templateHeadline>
+        </div> -->
+        <!--4.静态外链通栏-->
+        <div v-if="item.sectorName=='linkSector'">
+            <templateStaticLink :skinId="skinId"></templateStaticLink>
+        </div>
+        <!--5.图文组合1 标题字段缺少is_url / children_count-->
+        <div v-if="item.sectorName=='manyPictureSector'">
+            <templateNewSector1 :skinId="skinId" :templateData="item.componentList"></templateNewSector1>
+        </div>
+        <!--6.图文组合2 标题字段缺少is_url / children_count-->
+        <div v-if="item.sectorName=='commentSector'">
+            <templateNewSector2 :skinId="skinId" :templateData="item.componentList"></templateNewSector2>
+        </div>
+        <!--7.图文组合3 标题字段缺少is_url / children_count-->
+        <div v-if="item.sectorName=='listSector'">
+            <templateNewSector3 :skinId="skinId" :templateData="item.componentList"></templateNewSector3>
+        </div>
+        <!--8.图文混合模块 标题字段缺少is_url / children_count-->
+        <div v-if="item.sectorName=='onlyImgSector'">
+            <templateNewAndAd :skinId="skinId" :templateData="item.componentList" :adData="adData" :adTag="item.ad.ad_tag"></templateNewAndAd>
+        </div>
     </div>
     <!-- 底部 -->
     <templateFoot></templateFoot>
@@ -106,503 +127,522 @@ if (adResponseStatus.code == 200) {
     adData.value = adResponseStatus.data;
     templateBaseStore.setAdList(adResponseStatus.data)
 }
+//1.6 获得页面数据 后续优化
+// const adData = ref([]);
+// onMounted(async() => {
+//     //当数据在客户端获取时,需要添加v-if判断数据是否已存在
+//     const { $webUrl, $CwebUrl } = useNuxtApp();
+//     //广告列表
+//     let url = `${$webUrl}/web/getWebsiteAdvertisement`
+//     const response = await fetch(url, {
+//         headers: {
+//             'Content-Type': 'application/json',
+//             'Userurl': $CwebUrl,
+//             'Origin': $CwebUrl
+//         }
+//     });
+//     const result = await response.json();
+//     adData.value = result.data;
+//     templateBaseStore.setAdList(adData.value)
+// })
 //1.获得基本信息单元 end---------------------------------------->
 
 //2.页面数据 start---------------------------------------->
 //2.1获得页面数据
-// const responsePageData = await requestDataPromise('/client/indexData', {
-//     method: 'POST',
-//     body: {
-//         'website_id':websiteId.value,
-//         'getpage':'index'//获得首页数据
-//     },
-// });
-// const testTemplateData3 = responsePageData.data.template.index[5];
-// //console.log(testTemplateData3)
-// console.log(responsePageData)
+const response = await requestDataPromise('/client/indexData', {
+    method: 'POST',
+    body: {
+        'website_id':websiteId.value,
+        'getpage':'index'
+    },
+});
+const templateData = response.data.template.index;
+console.log(templateData)
+//2.页面数据 end---------------------------------------->
+
 
 //2.0 测试数据 后期移除
-const testTemplateData = {
-    "sectorName": "text",
-    "componentList": [
-        {
-            "component_type": 1,//1=新闻 2=广告
-            "component_style": 1,//样式
-            "sort": 1,//组件位置
-            "data": {
-                "alias":"一级导航名称",
-                "category_id": 11,
-                "pinyin": "nongyeshengchan",
-                "children_count": 1,//有多少个子集 用于跳转到频道页
-                "text": [
-                    {
-                        "id": 2863,
-                        "title": "1以生态为内核推动文旅发展海南深山黎寨找到乡村振兴金钥匙",
-                        "islink": 0,
-                        "pinyin": "nongminxinnongcun/nongcunxinfangshe"
-                    },
-                    {
-                        "id": 50129,
-                        "title": "2以生态为内核推动文旅发展海南深山黎寨找到乡村振兴金钥匙",
-                        "islink": 0,
-                        "pinyin": "sannongzixun"
-                    },
-                    {
-                        "id": 50129,
-                        "title": "3以生态为内核推动文旅发展海南深山黎寨找到乡村振兴金钥匙",
-                        "islink": 0,
-                        "pinyin": "sannongzixun"
-                    },
-                    {
-                        "id": 2862,
-                        "title": "4以生态为内核推动文旅发展海南深山黎寨找到乡村振兴金钥匙",
-                        "islink": 0,
-                        "pinyin": "sannongzixun/buweidongtai"
-                    },
-                    {
-                        "id": 50126,
-                        "title": "5以生态为内核推动文旅发展海南深山黎寨找到乡村振兴金钥匙",
-                        "islink": 0,
-                        "pinyin": "sannongzixun"
-                    },
-                    {
-                        "id": 3976,
-                        "title": "6以生态为内核推动文旅发展海南深山黎寨找到乡村振兴金钥匙",
-                        "islink": 0,
-                        "pinyin": "sannongzixun"
-                    },
-                    {
-                        "id": 50189,
-                        "title": "7以生态为内核推动文旅发展海南深山黎寨找到乡村振兴金钥匙",
-                        "islink": 0,
-                        "pinyin": "nongminhezuoshe"
-                    },
-                    {
-                        "id": 50190,
-                        "title": "8以生态为内核推动文旅发展海南深山黎寨找到乡村振兴金钥匙",
-                        "islink": 0,
-                        "pinyin": "nongminhezuoshe"
-                    }
-                ],
-                "img": [
-                    {
-                        "id": 50129,
-                        "title": "1以生态为内核推动文旅发展海南深山黎寨找到乡村振兴金钥匙",
-                        "imgurl": "http://img.bjzxtw.org.cn/dev/image/jpeg/20250220/1740044079754901.png",
-                        "author": "linyuting123",
-                        "updated_at": "2025-05-30 13:50:54",
-                        "introduce": "以生态为内核推动文旅发展海南深山黎寨找到乡村振兴金钥匙",
-                        "islink": 0,
-                        "linkurl": "",
-                        "copyfrom": "以生态为内核推动文旅发展海南深山黎寨找到乡村振兴金钥匙",
-                        "cat_arr_id": "[1,201]",
-                        "catid": 201,
-                        "level": "[1,2,3]",
-                        "pinyin": "sannongzixun"
-                    },
-                    {
-                        "id": 50129,
-                        "title": "2以生态为内核推动文旅发展海南深山黎寨找到乡村振兴金钥匙",
-                        "imgurl": "http://img.bjzxtw.org.cn/dev/image/jpeg/20250220/1740044079754901.png",
-                        "author": "佚名",
-                        "updated_at": "2025-05-30 13:50:46",
-                        "introduce": "描述",
-                        "islink": 0,
-                        "linkurl": "",
-                        "copyfrom": "本网",
-                        "cat_arr_id": "[2]",
-                        "catid": 2,
-                        "level": "[2,3]",
-                        "pinyin": "sannongzixun"
-                    },
-                    {
-                        "id": 50129,
-                        "title": "3以生态为内核推动文旅发展海南深山黎寨找到乡村振兴金钥匙",
-                        "imgurl": "http://img.bjzxtw.org.cn/dev/image/jpeg/20250220/1740044079754901.png",
-                        "author": "佚名",
-                        "updated_at": "2025-05-30 13:50:45",
-                        "introduce": "描述",
-                        "islink": 0,
-                        "linkurl": "",
-                        "copyfrom": "本网",
-                        "cat_arr_id": "[1]",
-                        "catid": 1,
-                        "level": "[2]",
-                        "pinyin": "sannongzixun"
-                    },
-                    {
-                        "id": 50129,
-                        "title": "4以生态为内核推动文旅发展海南深山黎寨找到乡村振兴金钥匙",
-                        "imgurl": "http://img.bjzxtw.org.cn/dev/image/jpeg/20250220/1740044079754901.png",
-                        "author": "佚名",
-                        "updated_at": "2025-05-30 13:50:44",
-                        "introduce": "描述",
-                        "islink": 0,
-                        "linkurl": "",
-                        "copyfrom": "本网",
-                        "cat_arr_id": "[11]",
-                        "catid": 11,
-                        "level": "[2]",
-                        "pinyin": "xinnongcun"
-                    },
-                    {
-                        "id": 50129,
-                        "title": "5以生态为内核推动文旅发展海南深山黎寨找到乡村振兴金钥匙",
-                        "imgurl": "http://img.bjzxtw.org.cn/dev/image/jpeg/20250220/1740044079754901.png",
-                        "author": "佚名",
-                        "updated_at": "2025-05-30 13:50:43",
-                        "introduce": "描述",
-                        "islink": 0,
-                        "linkurl": "",
-                        "copyfrom": "本网",
-                        "cat_arr_id": "[14,240]",
-                        "catid": 240,
-                        "level": "[2,3]",
-                        "pinyin": "sannongzixun"
-                    },
-                    {
-                        "id": 50129,
-                        "title": "6以生态为内核推动文旅发展海南深山黎寨找到乡村振兴金钥匙6",
-                        "imgurl": "http://img.bjzxtw.org.cn/dev/image/jpeg/20250220/1740044079754901.png",
-                        "author": "佚名",
-                        "updated_at": "2025-04-16 11:04:29",
-                        "introduce": "描述",
-                        "islink": 0,
-                        "linkurl": "",
-                        "copyfrom": "本网",
-                        "cat_arr_id": null,
-                        "catid": 36,
-                        "level": "[2]",
-                        "pinyin": "sannongzixun"
-                    }
-                ]
-            }
-        },
-        {
-            "component_type": 1,//1=新闻 2=广告
-            "component_style": 1,//样式
-            "sort": 1,//组件位置
-            "data": {
-                "alias":"一级导航名称2",
-                "category_id": 11,
-                "children_count": 0,//有多少个子集 用于跳转到频道页
-                "pinyin": "sannongzixun/zhengcefagui",
-                "text": [
-                    {
-                        "id": 2863,
-                        "title": "1以生态为内核推动文旅发展海南深山黎寨找到乡村振兴金钥匙",
-                        "islink": 0,
-                        "pinyin": "nongminxinnongcun/nongcunxinfangshe"
-                    },
-                    {
-                        "id": 50129,
-                        "title": "2以生态为内核推动文旅发展海南深山黎寨找到乡村振兴金钥匙",
-                        "islink": 0,
-                        "pinyin": "sannongzixun"
-                    },
-                    {
-                        "id": 50129,
-                        "title": "3以生态为内核推动文旅发展海南深山黎寨找到乡村振兴金钥匙",
-                        "islink": 0,
-                        "pinyin": "sannongzixun"
-                    },
-                    {
-                        "id": 2862,
-                        "title": "4以生态为内核推动文旅发展海南深山黎寨找到乡村振兴金钥匙",
-                        "islink": 0,
-                        "pinyin": "sannongzixun/buweidongtai"
-                    },
-                    {
-                        "id": 50126,
-                        "title": "5以生态为内核推动文旅发展海南深山黎寨找到乡村振兴金钥匙",
-                        "islink": 0,
-                        "pinyin": "sannongzixun"
-                    },
-                    {
-                        "id": 3976,
-                        "title": "6以生态为内核推动文旅发展海南深山黎寨找到乡村振兴金钥匙",
-                        "islink": 0,
-                        "pinyin": "sannongzixun"
-                    },
-                    {
-                        "id": 50189,
-                        "title": "7以生态为内核推动文旅发展海南深山黎寨找到乡村振兴金钥匙",
-                        "islink": 0,
-                        "pinyin": "nongminhezuoshe"
-                    },
-                    {
-                        "id": 50190,
-                        "title": "8以生态为内核推动文旅发展海南深山黎寨找到乡村振兴金钥匙",
-                        "islink": 0,
-                        "pinyin": "nongminhezuoshe"
-                    }
-                ],
-                "img": [
-                    {
-                        "id": 50129,
-                        "title": "1以生态为内核推动文旅发展海南深山黎寨找到乡村振兴金钥匙",
-                        "imgurl": "http://img.bjzxtw.org.cn/dev/image/jpeg/20250220/1740044079754901.png",
-                        "author": "linyuting123",
-                        "updated_at": "2025-05-30 13:50:54",
-                        "introduce": "以生态为内核推动文旅发展海南深山黎寨找到乡村振兴金钥匙",
-                        "islink": 0,
-                        "linkurl": "",
-                        "copyfrom": "以生态为内核推动文旅发展海南深山黎寨找到乡村振兴金钥匙",
-                        "cat_arr_id": "[1,201]",
-                        "catid": 201,
-                        "level": "[1,2,3]",
-                        "pinyin": "sannongzixun"
-                    },
-                    {
-                        "id": 50129,
-                        "title": "2以生态为内核推动文旅发展海南深山黎寨找到乡村振兴金钥匙",
-                        "imgurl": "http://img.bjzxtw.org.cn/dev/image/jpeg/20250220/1740044079754901.png",
-                        "author": "佚名",
-                        "updated_at": "2025-05-30 13:50:46",
-                        "introduce": "描述",
-                        "islink": 0,
-                        "linkurl": "",
-                        "copyfrom": "本网",
-                        "cat_arr_id": "[2]",
-                        "catid": 2,
-                        "level": "[2,3]",
-                        "pinyin": "sannongzixun"
-                    },
-                    {
-                        "id": 50129,
-                        "title": "3以生态为内核推动文旅发展海南深山黎寨找到乡村振兴金钥匙",
-                        "imgurl": "http://img.bjzxtw.org.cn/dev/image/jpeg/20250220/1740044079754901.png",
-                        "author": "佚名",
-                        "updated_at": "2025-05-30 13:50:45",
-                        "introduce": "描述",
-                        "islink": 0,
-                        "linkurl": "",
-                        "copyfrom": "本网",
-                        "cat_arr_id": "[1]",
-                        "catid": 1,
-                        "level": "[2]",
-                        "pinyin": "sannongzixun"
-                    },
-                    {
-                        "id": 50129,
-                        "title": "4以生态为内核推动文旅发展海南深山黎寨找到乡村振兴金钥匙",
-                        "imgurl": "http://img.bjzxtw.org.cn/dev/image/jpeg/20250220/1740044079754901.png",
-                        "author": "佚名",
-                        "updated_at": "2025-05-30 13:50:44",
-                        "introduce": "描述",
-                        "islink": 0,
-                        "linkurl": "",
-                        "copyfrom": "本网",
-                        "cat_arr_id": "[11]",
-                        "catid": 11,
-                        "level": "[2]",
-                        "pinyin": "xinnongcun"
-                    },
-                    {
-                        "id": 50129,
-                        "title": "5以生态为内核推动文旅发展海南深山黎寨找到乡村振兴金钥匙",
-                        "imgurl": "http://img.bjzxtw.org.cn/dev/image/jpeg/20250220/1740044079754901.png",
-                        "author": "佚名",
-                        "updated_at": "2025-05-30 13:50:43",
-                        "introduce": "描述",
-                        "islink": 0,
-                        "linkurl": "",
-                        "copyfrom": "本网",
-                        "cat_arr_id": "[14,240]",
-                        "catid": 240,
-                        "level": "[2,3]",
-                        "pinyin": "sannongzixun"
-                    },
-                    {
-                        "id": 50129,
-                        "title": "6以生态为内核推动文旅发展海南深山黎寨找到乡村振兴金钥匙6",
-                        "imgurl": "http://img.bjzxtw.org.cn/dev/image/jpeg/20250220/1740044079754901.png",
-                        "author": "佚名",
-                        "updated_at": "2025-04-16 11:04:29",
-                        "introduce": "描述",
-                        "islink": 0,
-                        "linkurl": "",
-                        "copyfrom": "本网",
-                        "cat_arr_id": null,
-                        "catid": 36,
-                        "level": "[2]",
-                        "pinyin": "sannongzixun"
-                    }
-                ]
-            }
-        },
-        {
-            "component_type": 1,//1=新闻 2=广告
-            "component_style": 1,//样式
-            "sort": 3,//组件位置
-            "data": {
-                "alias":"一级导航名称3",
-                "category_id": 11,
-                "children_count": 0,//有多少个子集 用于跳转到频道页
-                "pinyin": "sannongzixun/zhengcefagui",
-                "text": [
-                    {
-                        "id": 2863,
-                        "title": "1以生态为内核推动文旅发展海南深山黎寨找到乡村振兴金钥匙",
-                        "islink": 0,
-                        "pinyin": "nongminxinnongcun/nongcunxinfangshe"
-                    },
-                    {
-                        "id": 50129,
-                        "title": "2以生态为内核推动文旅发展海南深山黎寨找到乡村振兴金钥匙",
-                        "islink": 0,
-                        "pinyin": "sannongzixun"
-                    },
-                    {
-                        "id": 50129,
-                        "title": "3以生态为内核推动文旅发展海南深山黎寨找到乡村振兴金钥匙",
-                        "islink": 0,
-                        "pinyin": "sannongzixun"
-                    },
-                    {
-                        "id": 2862,
-                        "title": "4以生态为内核推动文旅发展海南深山黎寨找到乡村振兴金钥匙",
-                        "islink": 0,
-                        "pinyin": "sannongzixun/buweidongtai"
-                    },
-                    {
-                        "id": 50126,
-                        "title": "5以生态为内核推动文旅发展海南深山黎寨找到乡村振兴金钥匙",
-                        "islink": 0,
-                        "pinyin": "sannongzixun"
-                    },
-                    {
-                        "id": 3976,
-                        "title": "6以生态为内核推动文旅发展海南深山黎寨找到乡村振兴金钥匙",
-                        "islink": 0,
-                        "pinyin": "sannongzixun"
-                    },
-                    {
-                        "id": 50189,
-                        "title": "7以生态为内核推动文旅发展海南深山黎寨找到乡村振兴金钥匙",
-                        "islink": 0,
-                        "pinyin": "nongminhezuoshe"
-                    },
-                    {
-                        "id": 50190,
-                        "title": "8以生态为内核推动文旅发展海南深山黎寨找到乡村振兴金钥匙",
-                        "islink": 0,
-                        "pinyin": "nongminhezuoshe"
-                    }
-                ],
-                "img": [
-                    {
-                        "id": 50129,
-                        "title": "1以生态为内核推动文旅发展海南深山黎寨找到乡村振兴金钥匙",
-                        "imgurl": "http://img.bjzxtw.org.cn/dev/image/jpeg/20250220/1740044079754901.png",
-                        "author": "linyuting123",
-                        "updated_at": "2025-05-30 13:50:54",
-                        "introduce": "以生态为内核推动文旅发展海南深山黎寨找到乡村振兴金钥匙",
-                        "islink": 0,
-                        "linkurl": "",
-                        "copyfrom": "以生态为内核推动文旅发展海南深山黎寨找到乡村振兴金钥匙",
-                        "cat_arr_id": "[1,201]",
-                        "catid": 201,
-                        "level": "[1,2,3]",
-                        "pinyin": "sannongzixun"
-                    },
-                    {
-                        "id": 50129,
-                        "title": "2以生态为内核推动文旅发展海南深山黎寨找到乡村振兴金钥匙",
-                        "imgurl": "http://img.bjzxtw.org.cn/dev/image/jpeg/20250220/1740044079754901.png",
-                        "author": "佚名",
-                        "updated_at": "2025-05-30 13:50:46",
-                        "introduce": "描述",
-                        "islink": 0,
-                        "linkurl": "",
-                        "copyfrom": "本网",
-                        "cat_arr_id": "[2]",
-                        "catid": 2,
-                        "level": "[2,3]",
-                        "pinyin": "sannongzixun"
-                    },
-                    {
-                        "id": 50129,
-                        "title": "3以生态为内核推动文旅发展海南深山黎寨找到乡村振兴金钥匙",
-                        "imgurl": "http://img.bjzxtw.org.cn/dev/image/jpeg/20250220/1740044079754901.png",
-                        "author": "佚名",
-                        "updated_at": "2025-05-30 13:50:45",
-                        "introduce": "描述",
-                        "islink": 0,
-                        "linkurl": "",
-                        "copyfrom": "本网",
-                        "cat_arr_id": "[1]",
-                        "catid": 1,
-                        "level": "[2]",
-                        "pinyin": "sannongzixun"
-                    },
-                    {
-                        "id": 50129,
-                        "title": "4以生态为内核推动文旅发展海南深山黎寨找到乡村振兴金钥匙",
-                        "imgurl": "http://img.bjzxtw.org.cn/dev/image/jpeg/20250220/1740044079754901.png",
-                        "author": "佚名",
-                        "updated_at": "2025-05-30 13:50:44",
-                        "introduce": "描述",
-                        "islink": 0,
-                        "linkurl": "",
-                        "copyfrom": "本网",
-                        "cat_arr_id": "[11]",
-                        "catid": 11,
-                        "level": "[2]",
-                        "pinyin": "xinnongcun"
-                    },
-                    {
-                        "id": 50129,
-                        "title": "5以生态为内核推动文旅发展海南深山黎寨找到乡村振兴金钥匙",
-                        "imgurl": "http://img.bjzxtw.org.cn/dev/image/jpeg/20250220/1740044079754901.png",
-                        "author": "佚名",
-                        "updated_at": "2025-05-30 13:50:43",
-                        "introduce": "描述",
-                        "islink": 0,
-                        "linkurl": "",
-                        "copyfrom": "本网",
-                        "cat_arr_id": "[14,240]",
-                        "catid": 240,
-                        "level": "[2,3]",
-                        "pinyin": "sannongzixun"
-                    },
-                    {
-                        "id": 50129,
-                        "title": "6以生态为内核推动文旅发展海南深山黎寨找到乡村振兴金钥匙6",
-                        "imgurl": "http://img.bjzxtw.org.cn/dev/image/jpeg/20250220/1740044079754901.png",
-                        "author": "佚名",
-                        "updated_at": "2025-04-16 11:04:29",
-                        "introduce": "描述",
-                        "islink": 0,
-                        "linkurl": "",
-                        "copyfrom": "本网",
-                        "cat_arr_id": null,
-                        "catid": 36,
-                        "level": "[2]",
-                        "pinyin": "sannongzixun"
-                    }
-                ]
-            }
-        },
-    ],
-    "ad": {
-        "ad_tag": "nmw_index_0003"
-    }
-}
+// const testTemplateData = {
+//     "sectorName": "text",
+//     "componentList": [
+//         {
+//             "component_type": 1,//1=新闻 2=广告
+//             "component_style": 1,//样式
+//             "sort": 1,//组件位置
+//             "data": {
+//                 "alias":"一级导航名称",
+//                 "category_id": 11,
+//                 "pinyin": "nongyeshengchan",
+//                 "children_count": 1,//有多少个子集 用于跳转到频道页
+//                 "text": [
+//                     {
+//                         "id": 2863,
+//                         "title": "1以生态为内核推动文旅发展海南深山黎寨找到乡村振兴金钥匙",
+//                         "islink": 0,
+//                         "pinyin": "nongminxinnongcun/nongcunxinfangshe"
+//                     },
+//                     {
+//                         "id": 50129,
+//                         "title": "2以生态为内核推动文旅发展海南深山黎寨找到乡村振兴金钥匙",
+//                         "islink": 0,
+//                         "pinyin": "sannongzixun"
+//                     },
+//                     {
+//                         "id": 50129,
+//                         "title": "3以生态为内核推动文旅发展海南深山黎寨找到乡村振兴金钥匙",
+//                         "islink": 0,
+//                         "pinyin": "sannongzixun"
+//                     },
+//                     {
+//                         "id": 2862,
+//                         "title": "4以生态为内核推动文旅发展海南深山黎寨找到乡村振兴金钥匙",
+//                         "islink": 0,
+//                         "pinyin": "sannongzixun/buweidongtai"
+//                     },
+//                     {
+//                         "id": 50126,
+//                         "title": "5以生态为内核推动文旅发展海南深山黎寨找到乡村振兴金钥匙",
+//                         "islink": 0,
+//                         "pinyin": "sannongzixun"
+//                     },
+//                     {
+//                         "id": 3976,
+//                         "title": "6以生态为内核推动文旅发展海南深山黎寨找到乡村振兴金钥匙",
+//                         "islink": 0,
+//                         "pinyin": "sannongzixun"
+//                     },
+//                     {
+//                         "id": 50189,
+//                         "title": "7以生态为内核推动文旅发展海南深山黎寨找到乡村振兴金钥匙",
+//                         "islink": 0,
+//                         "pinyin": "nongminhezuoshe"
+//                     },
+//                     {
+//                         "id": 50190,
+//                         "title": "8以生态为内核推动文旅发展海南深山黎寨找到乡村振兴金钥匙",
+//                         "islink": 0,
+//                         "pinyin": "nongminhezuoshe"
+//                     }
+//                 ],
+//                 "img": [
+//                     {
+//                         "id": 50129,
+//                         "title": "1以生态为内核推动文旅发展海南深山黎寨找到乡村振兴金钥匙",
+//                         "imgurl": "http://img.bjzxtw.org.cn/dev/image/jpeg/20250220/1740044079754901.png",
+//                         "author": "linyuting123",
+//                         "updated_at": "2025-05-30 13:50:54",
+//                         "introduce": "以生态为内核推动文旅发展海南深山黎寨找到乡村振兴金钥匙",
+//                         "islink": 0,
+//                         "linkurl": "",
+//                         "copyfrom": "以生态为内核推动文旅发展海南深山黎寨找到乡村振兴金钥匙",
+//                         "cat_arr_id": "[1,201]",
+//                         "catid": 201,
+//                         "level": "[1,2,3]",
+//                         "pinyin": "sannongzixun"
+//                     },
+//                     {
+//                         "id": 50129,
+//                         "title": "2以生态为内核推动文旅发展海南深山黎寨找到乡村振兴金钥匙",
+//                         "imgurl": "http://img.bjzxtw.org.cn/dev/image/jpeg/20250220/1740044079754901.png",
+//                         "author": "佚名",
+//                         "updated_at": "2025-05-30 13:50:46",
+//                         "introduce": "描述",
+//                         "islink": 0,
+//                         "linkurl": "",
+//                         "copyfrom": "本网",
+//                         "cat_arr_id": "[2]",
+//                         "catid": 2,
+//                         "level": "[2,3]",
+//                         "pinyin": "sannongzixun"
+//                     },
+//                     {
+//                         "id": 50129,
+//                         "title": "3以生态为内核推动文旅发展海南深山黎寨找到乡村振兴金钥匙",
+//                         "imgurl": "http://img.bjzxtw.org.cn/dev/image/jpeg/20250220/1740044079754901.png",
+//                         "author": "佚名",
+//                         "updated_at": "2025-05-30 13:50:45",
+//                         "introduce": "描述",
+//                         "islink": 0,
+//                         "linkurl": "",
+//                         "copyfrom": "本网",
+//                         "cat_arr_id": "[1]",
+//                         "catid": 1,
+//                         "level": "[2]",
+//                         "pinyin": "sannongzixun"
+//                     },
+//                     {
+//                         "id": 50129,
+//                         "title": "4以生态为内核推动文旅发展海南深山黎寨找到乡村振兴金钥匙",
+//                         "imgurl": "http://img.bjzxtw.org.cn/dev/image/jpeg/20250220/1740044079754901.png",
+//                         "author": "佚名",
+//                         "updated_at": "2025-05-30 13:50:44",
+//                         "introduce": "描述",
+//                         "islink": 0,
+//                         "linkurl": "",
+//                         "copyfrom": "本网",
+//                         "cat_arr_id": "[11]",
+//                         "catid": 11,
+//                         "level": "[2]",
+//                         "pinyin": "xinnongcun"
+//                     },
+//                     {
+//                         "id": 50129,
+//                         "title": "5以生态为内核推动文旅发展海南深山黎寨找到乡村振兴金钥匙",
+//                         "imgurl": "http://img.bjzxtw.org.cn/dev/image/jpeg/20250220/1740044079754901.png",
+//                         "author": "佚名",
+//                         "updated_at": "2025-05-30 13:50:43",
+//                         "introduce": "描述",
+//                         "islink": 0,
+//                         "linkurl": "",
+//                         "copyfrom": "本网",
+//                         "cat_arr_id": "[14,240]",
+//                         "catid": 240,
+//                         "level": "[2,3]",
+//                         "pinyin": "sannongzixun"
+//                     },
+//                     {
+//                         "id": 50129,
+//                         "title": "6以生态为内核推动文旅发展海南深山黎寨找到乡村振兴金钥匙6",
+//                         "imgurl": "http://img.bjzxtw.org.cn/dev/image/jpeg/20250220/1740044079754901.png",
+//                         "author": "佚名",
+//                         "updated_at": "2025-04-16 11:04:29",
+//                         "introduce": "描述",
+//                         "islink": 0,
+//                         "linkurl": "",
+//                         "copyfrom": "本网",
+//                         "cat_arr_id": null,
+//                         "catid": 36,
+//                         "level": "[2]",
+//                         "pinyin": "sannongzixun"
+//                     }
+//                 ]
+//             }
+//         },
+//         {
+//             "component_type": 1,//1=新闻 2=广告
+//             "component_style": 1,//样式
+//             "sort": 1,//组件位置
+//             "data": {
+//                 "alias":"一级导航名称2",
+//                 "category_id": 11,
+//                 "children_count": 0,//有多少个子集 用于跳转到频道页
+//                 "pinyin": "sannongzixun/zhengcefagui",
+//                 "text": [
+//                     {
+//                         "id": 2863,
+//                         "title": "1以生态为内核推动文旅发展海南深山黎寨找到乡村振兴金钥匙",
+//                         "islink": 0,
+//                         "pinyin": "nongminxinnongcun/nongcunxinfangshe"
+//                     },
+//                     {
+//                         "id": 50129,
+//                         "title": "2以生态为内核推动文旅发展海南深山黎寨找到乡村振兴金钥匙",
+//                         "islink": 0,
+//                         "pinyin": "sannongzixun"
+//                     },
+//                     {
+//                         "id": 50129,
+//                         "title": "3以生态为内核推动文旅发展海南深山黎寨找到乡村振兴金钥匙",
+//                         "islink": 0,
+//                         "pinyin": "sannongzixun"
+//                     },
+//                     {
+//                         "id": 2862,
+//                         "title": "4以生态为内核推动文旅发展海南深山黎寨找到乡村振兴金钥匙",
+//                         "islink": 0,
+//                         "pinyin": "sannongzixun/buweidongtai"
+//                     },
+//                     {
+//                         "id": 50126,
+//                         "title": "5以生态为内核推动文旅发展海南深山黎寨找到乡村振兴金钥匙",
+//                         "islink": 0,
+//                         "pinyin": "sannongzixun"
+//                     },
+//                     {
+//                         "id": 3976,
+//                         "title": "6以生态为内核推动文旅发展海南深山黎寨找到乡村振兴金钥匙",
+//                         "islink": 0,
+//                         "pinyin": "sannongzixun"
+//                     },
+//                     {
+//                         "id": 50189,
+//                         "title": "7以生态为内核推动文旅发展海南深山黎寨找到乡村振兴金钥匙",
+//                         "islink": 0,
+//                         "pinyin": "nongminhezuoshe"
+//                     },
+//                     {
+//                         "id": 50190,
+//                         "title": "8以生态为内核推动文旅发展海南深山黎寨找到乡村振兴金钥匙",
+//                         "islink": 0,
+//                         "pinyin": "nongminhezuoshe"
+//                     }
+//                 ],
+//                 "img": [
+//                     {
+//                         "id": 50129,
+//                         "title": "1以生态为内核推动文旅发展海南深山黎寨找到乡村振兴金钥匙",
+//                         "imgurl": "http://img.bjzxtw.org.cn/dev/image/jpeg/20250220/1740044079754901.png",
+//                         "author": "linyuting123",
+//                         "updated_at": "2025-05-30 13:50:54",
+//                         "introduce": "以生态为内核推动文旅发展海南深山黎寨找到乡村振兴金钥匙",
+//                         "islink": 0,
+//                         "linkurl": "",
+//                         "copyfrom": "以生态为内核推动文旅发展海南深山黎寨找到乡村振兴金钥匙",
+//                         "cat_arr_id": "[1,201]",
+//                         "catid": 201,
+//                         "level": "[1,2,3]",
+//                         "pinyin": "sannongzixun"
+//                     },
+//                     {
+//                         "id": 50129,
+//                         "title": "2以生态为内核推动文旅发展海南深山黎寨找到乡村振兴金钥匙",
+//                         "imgurl": "http://img.bjzxtw.org.cn/dev/image/jpeg/20250220/1740044079754901.png",
+//                         "author": "佚名",
+//                         "updated_at": "2025-05-30 13:50:46",
+//                         "introduce": "描述",
+//                         "islink": 0,
+//                         "linkurl": "",
+//                         "copyfrom": "本网",
+//                         "cat_arr_id": "[2]",
+//                         "catid": 2,
+//                         "level": "[2,3]",
+//                         "pinyin": "sannongzixun"
+//                     },
+//                     {
+//                         "id": 50129,
+//                         "title": "3以生态为内核推动文旅发展海南深山黎寨找到乡村振兴金钥匙",
+//                         "imgurl": "http://img.bjzxtw.org.cn/dev/image/jpeg/20250220/1740044079754901.png",
+//                         "author": "佚名",
+//                         "updated_at": "2025-05-30 13:50:45",
+//                         "introduce": "描述",
+//                         "islink": 0,
+//                         "linkurl": "",
+//                         "copyfrom": "本网",
+//                         "cat_arr_id": "[1]",
+//                         "catid": 1,
+//                         "level": "[2]",
+//                         "pinyin": "sannongzixun"
+//                     },
+//                     {
+//                         "id": 50129,
+//                         "title": "4以生态为内核推动文旅发展海南深山黎寨找到乡村振兴金钥匙",
+//                         "imgurl": "http://img.bjzxtw.org.cn/dev/image/jpeg/20250220/1740044079754901.png",
+//                         "author": "佚名",
+//                         "updated_at": "2025-05-30 13:50:44",
+//                         "introduce": "描述",
+//                         "islink": 0,
+//                         "linkurl": "",
+//                         "copyfrom": "本网",
+//                         "cat_arr_id": "[11]",
+//                         "catid": 11,
+//                         "level": "[2]",
+//                         "pinyin": "xinnongcun"
+//                     },
+//                     {
+//                         "id": 50129,
+//                         "title": "5以生态为内核推动文旅发展海南深山黎寨找到乡村振兴金钥匙",
+//                         "imgurl": "http://img.bjzxtw.org.cn/dev/image/jpeg/20250220/1740044079754901.png",
+//                         "author": "佚名",
+//                         "updated_at": "2025-05-30 13:50:43",
+//                         "introduce": "描述",
+//                         "islink": 0,
+//                         "linkurl": "",
+//                         "copyfrom": "本网",
+//                         "cat_arr_id": "[14,240]",
+//                         "catid": 240,
+//                         "level": "[2,3]",
+//                         "pinyin": "sannongzixun"
+//                     },
+//                     {
+//                         "id": 50129,
+//                         "title": "6以生态为内核推动文旅发展海南深山黎寨找到乡村振兴金钥匙6",
+//                         "imgurl": "http://img.bjzxtw.org.cn/dev/image/jpeg/20250220/1740044079754901.png",
+//                         "author": "佚名",
+//                         "updated_at": "2025-04-16 11:04:29",
+//                         "introduce": "描述",
+//                         "islink": 0,
+//                         "linkurl": "",
+//                         "copyfrom": "本网",
+//                         "cat_arr_id": null,
+//                         "catid": 36,
+//                         "level": "[2]",
+//                         "pinyin": "sannongzixun"
+//                     }
+//                 ]
+//             }
+//         },
+//         {
+//             "component_type": 1,//1=新闻 2=广告
+//             "component_style": 1,//样式
+//             "sort": 3,//组件位置
+//             "data": {
+//                 "alias":"一级导航名称3",
+//                 "category_id": 11,
+//                 "children_count": 0,//有多少个子集 用于跳转到频道页
+//                 "pinyin": "sannongzixun/zhengcefagui",
+//                 "text": [
+//                     {
+//                         "id": 2863,
+//                         "title": "1以生态为内核推动文旅发展海南深山黎寨找到乡村振兴金钥匙",
+//                         "islink": 0,
+//                         "pinyin": "nongminxinnongcun/nongcunxinfangshe"
+//                     },
+//                     {
+//                         "id": 50129,
+//                         "title": "2以生态为内核推动文旅发展海南深山黎寨找到乡村振兴金钥匙",
+//                         "islink": 0,
+//                         "pinyin": "sannongzixun"
+//                     },
+//                     {
+//                         "id": 50129,
+//                         "title": "3以生态为内核推动文旅发展海南深山黎寨找到乡村振兴金钥匙",
+//                         "islink": 0,
+//                         "pinyin": "sannongzixun"
+//                     },
+//                     {
+//                         "id": 2862,
+//                         "title": "4以生态为内核推动文旅发展海南深山黎寨找到乡村振兴金钥匙",
+//                         "islink": 0,
+//                         "pinyin": "sannongzixun/buweidongtai"
+//                     },
+//                     {
+//                         "id": 50126,
+//                         "title": "5以生态为内核推动文旅发展海南深山黎寨找到乡村振兴金钥匙",
+//                         "islink": 0,
+//                         "pinyin": "sannongzixun"
+//                     },
+//                     {
+//                         "id": 3976,
+//                         "title": "6以生态为内核推动文旅发展海南深山黎寨找到乡村振兴金钥匙",
+//                         "islink": 0,
+//                         "pinyin": "sannongzixun"
+//                     },
+//                     {
+//                         "id": 50189,
+//                         "title": "7以生态为内核推动文旅发展海南深山黎寨找到乡村振兴金钥匙",
+//                         "islink": 0,
+//                         "pinyin": "nongminhezuoshe"
+//                     },
+//                     {
+//                         "id": 50190,
+//                         "title": "8以生态为内核推动文旅发展海南深山黎寨找到乡村振兴金钥匙",
+//                         "islink": 0,
+//                         "pinyin": "nongminhezuoshe"
+//                     }
+//                 ],
+//                 "img": [
+//                     {
+//                         "id": 50129,
+//                         "title": "1以生态为内核推动文旅发展海南深山黎寨找到乡村振兴金钥匙",
+//                         "imgurl": "http://img.bjzxtw.org.cn/dev/image/jpeg/20250220/1740044079754901.png",
+//                         "author": "linyuting123",
+//                         "updated_at": "2025-05-30 13:50:54",
+//                         "introduce": "以生态为内核推动文旅发展海南深山黎寨找到乡村振兴金钥匙",
+//                         "islink": 0,
+//                         "linkurl": "",
+//                         "copyfrom": "以生态为内核推动文旅发展海南深山黎寨找到乡村振兴金钥匙",
+//                         "cat_arr_id": "[1,201]",
+//                         "catid": 201,
+//                         "level": "[1,2,3]",
+//                         "pinyin": "sannongzixun"
+//                     },
+//                     {
+//                         "id": 50129,
+//                         "title": "2以生态为内核推动文旅发展海南深山黎寨找到乡村振兴金钥匙",
+//                         "imgurl": "http://img.bjzxtw.org.cn/dev/image/jpeg/20250220/1740044079754901.png",
+//                         "author": "佚名",
+//                         "updated_at": "2025-05-30 13:50:46",
+//                         "introduce": "描述",
+//                         "islink": 0,
+//                         "linkurl": "",
+//                         "copyfrom": "本网",
+//                         "cat_arr_id": "[2]",
+//                         "catid": 2,
+//                         "level": "[2,3]",
+//                         "pinyin": "sannongzixun"
+//                     },
+//                     {
+//                         "id": 50129,
+//                         "title": "3以生态为内核推动文旅发展海南深山黎寨找到乡村振兴金钥匙",
+//                         "imgurl": "http://img.bjzxtw.org.cn/dev/image/jpeg/20250220/1740044079754901.png",
+//                         "author": "佚名",
+//                         "updated_at": "2025-05-30 13:50:45",
+//                         "introduce": "描述",
+//                         "islink": 0,
+//                         "linkurl": "",
+//                         "copyfrom": "本网",
+//                         "cat_arr_id": "[1]",
+//                         "catid": 1,
+//                         "level": "[2]",
+//                         "pinyin": "sannongzixun"
+//                     },
+//                     {
+//                         "id": 50129,
+//                         "title": "4以生态为内核推动文旅发展海南深山黎寨找到乡村振兴金钥匙",
+//                         "imgurl": "http://img.bjzxtw.org.cn/dev/image/jpeg/20250220/1740044079754901.png",
+//                         "author": "佚名",
+//                         "updated_at": "2025-05-30 13:50:44",
+//                         "introduce": "描述",
+//                         "islink": 0,
+//                         "linkurl": "",
+//                         "copyfrom": "本网",
+//                         "cat_arr_id": "[11]",
+//                         "catid": 11,
+//                         "level": "[2]",
+//                         "pinyin": "xinnongcun"
+//                     },
+//                     {
+//                         "id": 50129,
+//                         "title": "5以生态为内核推动文旅发展海南深山黎寨找到乡村振兴金钥匙",
+//                         "imgurl": "http://img.bjzxtw.org.cn/dev/image/jpeg/20250220/1740044079754901.png",
+//                         "author": "佚名",
+//                         "updated_at": "2025-05-30 13:50:43",
+//                         "introduce": "描述",
+//                         "islink": 0,
+//                         "linkurl": "",
+//                         "copyfrom": "本网",
+//                         "cat_arr_id": "[14,240]",
+//                         "catid": 240,
+//                         "level": "[2,3]",
+//                         "pinyin": "sannongzixun"
+//                     },
+//                     {
+//                         "id": 50129,
+//                         "title": "6以生态为内核推动文旅发展海南深山黎寨找到乡村振兴金钥匙6",
+//                         "imgurl": "http://img.bjzxtw.org.cn/dev/image/jpeg/20250220/1740044079754901.png",
+//                         "author": "佚名",
+//                         "updated_at": "2025-04-16 11:04:29",
+//                         "introduce": "描述",
+//                         "islink": 0,
+//                         "linkurl": "",
+//                         "copyfrom": "本网",
+//                         "cat_arr_id": null,
+//                         "catid": 36,
+//                         "level": "[2]",
+//                         "pinyin": "sannongzixun"
+//                     }
+//                 ]
+//             }
+//         },
+//     ],
+//     "ad": {
+//         "ad_tag": "nmw_index_0003"
+//     }
+// }
 
-//静态链接测试数据
-const testTemplateData2 = {
-    "sectorName": "linkSector",
-    "componentList": [
-        {
-            "component_type": 3,
-            "component_style": 1,
-            "sort": 1,
-            "componentData": {}
-        }
-    ],
-    "sort": 4
-}
+// //静态链接测试数据
+// const testTemplateData2 = {
+//     "sectorName": "linkSector",
+//     "componentList": [
+//         {
+//             "component_type": 3,
+//             "component_style": 1,
+//             "sort": 1,
+//             "componentData": {}
+//         }
+//     ],
+//     "sort": 4
+// }
 //2.页面数据 end---------------------------------------->
 </script>
 

+ 81 - 0
utils/dataInterface.ts

@@ -0,0 +1,81 @@
+//自助建站接口契约
+
+//文字新闻
+export interface textnum {
+    id: number;
+    catid: number;
+    title: string;
+    introduce: string;
+    tag: string;
+    keyword: string;
+    author: string;
+    copyfrom: string;
+    fromurl: string;
+    hits: number;
+    ip: string;
+    status: number;
+    islink: number;
+    linkurl: string;
+    imgurl: string;
+    admin_user_id: number;
+    cat_arr_id: string;
+    created_at: string;
+    updated_at: string;
+    is_original: number;
+    survey_id: string;
+    survey_name: string;
+    is_survey: number;
+    survey_type: number;
+    web_site_id: string;
+    ignore_ids: number | null;
+    reason: string | null;
+    department_arr_id: string;
+    department_id: number;
+    city_arr_id: string;
+    city_id: number;
+    level: string;
+    commend_id: string;
+    level_text: string;
+    pinyin: string;
+}
+
+//图片新闻
+export interface imgnum {
+    id: number;
+    catid: number;
+    title: string;
+    introduce: string;
+    tag: string;
+    keyword: string;
+    author: string;
+    copyfrom: string;
+    fromurl: string;
+    hits: number;
+    ip: string;
+    status: number;
+    islink: number;
+    linkurl: string;
+    imgurl: string;
+    admin_user_id: number;
+    cat_arr_id: string;
+    created_at: string;
+    updated_at: string;
+    is_original: number;
+    survey_id: string;
+    survey_name: string;
+    is_survey: number;
+    survey_type: number;
+    web_site_id: string;
+    ignore_ids: number | null;
+    reason: string | null;
+    department_arr_id: string;
+    department_id: number;
+    city_arr_id: string;
+    city_id: number;
+    level: string;
+    commend_id: string;
+    level_text: string;
+    article_id: number | null;
+    website_id: number | null;
+    pinyin: string;
+}