Explorar o código

完成详情页面开发

完成详情页面开发
dangyunlong hai 2 días
pai
achega
6f63905ad9

A diferenza do arquivo foi suprimida porque é demasiado grande
+ 35 - 53
components/template/component/article/900x1384/1.vue


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

@@ -6,7 +6,7 @@
                 :title="item.title"
                 :target="item.islink == 1 ? '_blank' : '_self'"
             >
-                {{item.title}}
+                {{getTitleLength(item.title,45)}}
                 <span>{{getTime(item.updated_at, 'month', 1)}}</span>
             </NuxtLink>
         </div>

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

@@ -3,7 +3,7 @@
         <div :class="'mainTopBg' + skinId"></div>
         <div :class="'mainBox' + skinId">
             <div class="mainTitle">{{newsDetail.con_title}}</div>
-            <div v-html=" newsDetail.content"></div>
+            <div v-html="newsDetail.content"></div>
         </div>
         <div :class="'mainBottomBg' + skinId"></div>
     </div>

+ 6 - 6
components/template/component/public/breadcrumb.vue

@@ -12,9 +12,9 @@
                 </span>
             </el-breadcrumb-item>
             <!--第一种情况 当前是2级的列表页 end-->
-            <!--第二种情况 当前是3级的列表页 start-->
+            <!--第二种情况 当前是3级的列表页 如果出现第三级 那么第一层肯定是频道页start-->
             <el-breadcrumb-item v-if="routeLevel==2">
-                <NuxtLink :to="`/${parent_pinyin}/list-1.html`" class="routeName">
+                <NuxtLink :to="`/${parent_pinyin}/index.html`" class="routeName">
                     {{parent_name}}
                 </NuxtLink> 
             </el-breadcrumb-item>
@@ -26,7 +26,7 @@
             <!--第二种情况 当前是3级的列表页 end-->
             <!--第三种情况 当前是2级的详情页 start-->
             <el-breadcrumb-item v-if="routeLevel==3">
-                <NuxtLink :to="`/${pinyin}/index.html`">{{name}}</NuxtLink>
+                <NuxtLink :to="`/${pinyin}/list-1.html`">{{name}}</NuxtLink>
             </el-breadcrumb-item>
             <el-breadcrumb-item v-if="routeLevel==3">
                 <span class="routeName">
@@ -34,15 +34,15 @@
                 </span>
             </el-breadcrumb-item>
             <!--第三种情况 当前是2级的详情页 end-->
-            <!--第四种情况 当前是3级的详情页 start-->
+            <!--第四种情况 当前是3级的详情页 如果出现第三级 那么第一层肯定是频道页start-->
             <el-breadcrumb-item v-if="routeLevel==4">
-                <NuxtLink :to="`/${parent_pinyin}/list-1.html`" class="routeName">
+                <NuxtLink :to="`/${parent_pinyin}/index.html`" class="routeName">
                     {{parent_name}}
                 </NuxtLink> 
             </el-breadcrumb-item>
             <el-breadcrumb-item v-if="routeLevel==4">
                 <NuxtLink :to="`/${parent_pinyin}/${pinyin}/list-1.html`">
-                    {{parent_name}}
+                    {{name}}
                 </NuxtLink> 
             </el-breadcrumb-item>
             <el-breadcrumb-item v-if="routeLevel==4">

+ 2 - 0
components/template/sector/body/ad/1200x90/1.vue

@@ -19,6 +19,8 @@ const props = defineProps({
 });
 //console.log(props.adData)
 //找到传入的广告
+console.log(props.adData)
+console.log(props.adTag)
 const imgurl = requestAd(props.adData,props.adTag)
 </script>
 

+ 9 - 9
components/template/sector/body/article/article/1200x1710/1.vue

@@ -2,7 +2,7 @@
     <div class="articleBigBox">
         <div class="articleBox">
             <div class="listRouterBox">
-                <templateBreadcrumb :routeId="routeId" :articleName="articleData.data.title" />
+                <templateBreadcrumb :routeId="routeId" :articleName="articleData.title" />
             </div>
             <div class="articleContentBox">
                 <div class="articleContentBoxLeft">
@@ -10,19 +10,19 @@
                 </div>
                 <div class="articleContentBoxRight">
                     <div class="articleContentBoxRightTop">
-                        <div v-if="templateData.componentList[1].component_style == 1">
-                            <news1style :templateData="templateData.componentList[1].data" :skinId="skinId"/>
+                        <div v-if="templateData[1].component_style.toString()=='1'">
+                            <news1style :skinId="skinId"/>
                         </div>
-                        <div v-if="templateData.componentList[1].component_style == 2">
-                            <news2style :templateData="templateData.componentList[1].data" :skinId="skinId"/>
+                        <div v-if="templateData[1].component_style.toString()=='2'">
+                            <news2style :skinId="skinId"/>
                         </div>
                     </div>
                     <div class="articleContentBoxRightBottom">
-                        <div v-if="templateData.componentList[2].component_style == 1">
-                            <hotNews1style :templateData="templateData.componentList[2].data" :skinId="skinId"/>
+                        <div v-if="templateData[2].component_style.toString()=='1'">
+                            <hotNews1style :skinId="skinId"/>
                         </div>
-                        <div v-if="templateData.componentList[2].component_style == 2">
-                            <hotNews2style :templateData="templateData.componentList[2].data" :skinId="skinId"/>
+                        <div v-if="templateData[2].component_style.toString()=='2'">
+                            <hotNews2style :skinId="skinId"/>
                         </div>
                     </div>
                 </div>

+ 2 - 5
components/template/sector/body/class/menu/1200x100/1.vue

@@ -1,10 +1,10 @@
 <template>
     <div class="channelMenuBox">
         <div class="channelMenuSector">
-            <div v-if="templateData.componentList[0].component_style.toString()=='1'">
+            <div v-if="templateData[0].component_style.toString()=='1'">
                 <menu1Style :skinId="skinId" :navigateData="navigateData" :routeId="routeId"/>
             </div>
-            <div v-if="templateData.componentList[0].component_style.toString()=='2'">
+            <div v-if="templateData[0].component_style.toString()=='2'">
                 <menu2Style :skinId="skinId" :navigateData="navigateData" :routeId="routeId"/>
             </div>
         </div>
@@ -16,9 +16,6 @@
 import menu1Style from '@/components/template/component/menu/1200x100/1.vue'
 //样式2
 import menu2Style from '@/components/template/component/menu/1200x100/2.vue'
-
-//引入vue
-import {ref} from 'vue';
 //获得新闻数据
 const props = defineProps({
     skinId: Number,//皮肤id

+ 0 - 4
components/template/sector/body/list/list/1200x1220/1.vue

@@ -66,8 +66,6 @@ import news2style from '@/components/template/component/list/270x450/2.vue'
 //热点精选
 import hotNews1style from '@/components/template/component/list/270x580/1.vue'
 import hotNews2style from '@/components/template/component/list/270x580/2.vue'
-import { TemplateComponentPublicNodata } from '#components';
-
 const props = defineProps({
     skinId: Number,//皮肤id
     templateData:Object,//新闻数据
@@ -75,7 +73,6 @@ const props = defineProps({
     pageData:Object,//分页数据
     newsList:Object,//新闻列表
 });
-
 //分页事件
 let changePage = (value) => {
     const targetSegment = getRoutePath(1);
@@ -83,7 +80,6 @@ let changePage = (value) => {
     console.log("当前页码", value);
     navigateTo(`/${targetSegment}/list-${value}.html`)
 }
-
 //页面数据---------------------------------------->
 </script>
 

+ 1 - 1
composables/publicFunction.ts

@@ -81,7 +81,7 @@ const getLinkPathDetail1 = (item: any) => {
 //3.格式化跳转路径 end ---------------------------------------->
 
 //4.获得路由路径 start ---------------------------------------->
-const getRoutePath = (type: Number) => {
+const getRoutePath = (type:number) => {
   const route = useRoute();
   //获得当前的完整路径
   const fullPath = route.path;

+ 54 - 563
pages/[dir]/[dir]/[id].vue

@@ -4,17 +4,21 @@
     <!-- 菜单 -->
     <templateMenu></templateMenu>
     <!-- 内容 -->
-    <div>
+    <div v-for="(item,index) in templateData" :key="index">
         <!--广告组件-->
-        <templateAd :adTag="'nmw_detail_0001'" :skinId="skinId" :adData="adData"></templateAd>
+        <div v-if="item.sectorName=='adSector'">
+            <templateAd :skinId="skinId" :adData="adData" :adTag="item.ad.ad_tag"></templateAd>
+        </div>
         <!--资讯正文-->
-        <templateArticle :skinId="skinId" :templateData="testTemplateData" :articleData="articleData" :routeId="routeId"></templateArticle>
+        <div v-if="item.sectorName=='articleSector'">
+            <templateArticle :skinId="skinId" :templateData="item.componentList" :articleData="articleData" :routeId="routeId"></templateArticle>
+        </div>
     </div>
     <!-- 底部 -->
     <templateFoot></templateFoot>
 </template>
 
-<script setup>
+<script setup lang="ts">
 //0.加载全局模板组件 start---------------------------------------->
 //0.1全局通栏
 import templateHead from '@/components/template/sector/head/1200x200/1.vue'
@@ -32,7 +36,7 @@ import templateArticle from '@/components/template/sector/body/article/article/1
 import { ref, onMounted } from 'vue';
 //1.2使用url查询导航池id
 const targetSegment = getRoutePath(2);//当前页面的url路径 
-const routeId = ref("");//当前url路径代表的cid
+const routeId = ref<number>(0);//当前url路径代表的cid
 const getRouteId = await requestDataPromise('/web/getWebsiteRoute', {
     method: 'GET',
     query: {
@@ -42,7 +46,6 @@ const getRouteId = await requestDataPromise('/web/getWebsiteRoute', {
 if (getRouteId.code == 200) {
     routeId.value = getRouteId.data.category_id
 }
-
 //1.3获得二级导航
 const navigateData = await requestDataPromise('/web/getWebsiteModelCategory', {
     method: 'GET',
@@ -54,9 +57,10 @@ const navigateData = await requestDataPromise('/web/getWebsiteModelCategory', {
 });
 //1.4获得pinia源
 import { useTemplateBaseStore } from '@/stores/templateBase'
-const templateBaseStore = useTemplateBaseStore()
+const templateBaseStore:any = useTemplateBaseStore()
 //1.5获得该页的皮肤id - 在每个组件中也是同样的获得方法
-const skinId = ref("")
+const skinId = ref<number>(0)
+const websiteId = ref("");
 //1.6获得站点基本信息
 const responseStatus = await requestDataPromise('/web/getWebsiteAllinfo', {
     method: 'GET',
@@ -69,572 +73,59 @@ const responseStatus = await requestDataPromise('/web/getWebsiteAllinfo', {
 if (responseStatus.code == 200) {
     //1.6.1设置站点基本信息
     templateBaseStore.setWebSiteInfo(responseStatus.data)
+    websiteId.value = responseStatus.data.website_head.id;
     //1.6.2设置皮肤id
     skinId.value = templateBaseStore.webSiteInfo.website_foot.foot_info.template_id;
 }
-//1.7获得广告池
-const adData = ref([]);
-const adResponseStatus = await requestDataPromise('/web/getWebsiteAdvertisement', {
-    method: 'GET',
-    query: {},
+//1.获得基本信息单元 end---------------------------------------->
+
+//2.页面数据 start---------------------------------------->
+//2.1获得页面数据
+const response:any = await requestDataPromise('/client/indexData', {
+    method: 'POST',
+    body: {
+        'website_id':websiteId.value,
+        'getpage':'article'
+    },
 });
-if (adResponseStatus.code == 200) {
-    templateBaseStore.setAdList(adResponseStatus.data)
-    adData.value = adResponseStatus.data;
+//2.2模板数据
+const templateData = response.data.template.article;
+console.log(templateData)
+//2.3广告数据
+const adData = ref<any[]>([]);
+adData.value.push(response.data.ad.top)
+for(let item of response.data.ad.article){
+    adData.value.push(item)
 }
-//1.8.seo
-const setData = await requestDataPromise('/web/getWebsiteCategoryHead', {
+templateBaseStore.setAdList(adData.value)
+//2.4获得文章详情
+const route:any = useRoute();
+const articleId = parseInt(route.params.id); //获得该页面的id
+const articleData = ref({});
+const mkdata = await requestDataPromise('/web/selectWebsiteArticleInfo', {
     method: 'GET',
     query: {
-        'catid': routeId.value
+        'articleid': articleId
     },
 });
-let seoTitle = setData.data.seo_title;
-let seoDescription = setData.data.seo_description;
-let seoKeywords = setData.data.seo_keywords;
-let seoSuffix = setData.data.suffix;
-let seoName = setData.data.website_name;
-useSeoMeta({
-    title: seoTitle + "_" + seoSuffix,
-    meta: [
-        { name: 'keywords', content: seoKeywords + "_" + seoName + "_" + seoSuffix, tagPriority: 10 },
-        { name: 'description', content: seoDescription + "_" + seoName + "_" + seoSuffix, tagPriority: 10 }
-    ]
-});
-//1.获得基本信息单元 end---------------------------------------->
-
-//2.获得页面数据 start---------------------------------------->
-//2.0 测试数据 后期移除
-const articleData = {
-    "code": 200,
-    "message": "success",
-    "data": {
-        "id": null,
-        "catid": 315,
-        "title": "以生态为内核推动文旅发展海南深山黎寨找到乡村振兴金钥匙",
-        "introduce": "以生态为内核推动文旅发展海南深山黎寨找到乡村振兴金钥匙",
-        "tag": "",
-        "keyword": "以生态为内核推动文旅发展海南深山黎寨找到乡村振兴金钥匙",
-        "author": "lin",
-        "copyfrom": "以生态为内核推动文旅发展海南深山黎寨找到乡村振兴金钥匙",
-        "fromurl": "",
-        "hits": 0,
-        "ip": "114.255.249.227, 127.0.0.1",
-        "status": 1,
-        "islink": 0,
-        "linkurl": "",
-        "imgurl": "http://img.bjzxtw.org.cn/pre/image/png/20250620/1750408152809621.png",
-        "admin_user_id": 79,
-        "cat_arr_id": "[28,315]",
-        "created_at": "2025-03-19 13:58:49",
-        "updated_at": "2025-07-15 17:10:29",
-        "is_original": 1,
-        "survey_id": "",
-        "survey_name": "",
-        "is_survey": 0,
-        "survey_type": 0,
-        "web_site_id": "2",
-        "ignore_ids": null,
-        "reason": null,
-        "department_arr_id": "[]",
-        "department_id": 0,
-        "city_arr_id": "[]",
-        "city_id": 0,
-        "level": "[2]",
-        "commend_id": "[3505]",
-        "level_text": "[2]",
-        "article_id": null,
-        "content": "<p>新华社北京3月18日电 3月18日,国家副主席韩正在北京会见英国伦敦金融城市长靳翊伟。</p><p>韩正表示,伦敦金融城是世界著名金融中心,为推动中英金融、经贸领域合作作出积极贡献。中国和英国同为世界主要经济体,合作互补性强、前景广阔。无论世界如何变化,中国内外政策都会保持连贯性。中方愿同英方秉持战略伙伴定位,加强沟通合作,共同推动世界多极化、经济全球化,落实好两国领导人达成的重要共识,使中英合作成果更好惠及两国和世界。</p><p>靳翊伟表示,英中在绿色经济、可持续金融、可再生能源领域合作前景巨大。伦敦金融城欢迎更多中资企业赴伦敦发展兴业,愿全力提供支持和便利。</p>",
-        "website_url": null,
-        "email": null,
-        "contacts": null,
-        "contacts_mobile": null,
-        "contacts_address": null,
-        "zip_code": null,
-        "enterprise_name": null,
-        "category_id": 315,
-        "cat_name": "三农专题",
-        "website_name": "三农资讯网-测试专用",
-        "suffix": "全国三农信息一体化应用平台",
-        "commendArticle": [
-            {
-                "id": 3505,
-                "title": "以生态为内核推动文旅发展海南深山黎寨找到乡村振兴金钥匙",
-                "catid": 1,
-                "imgurl": "http://img.bjzxtw.org.cn/dev/image/jpeg/20250220/1740044079754901.png",
-                "hits": 0,
-                "created_at": "2025-02-19 20:30:35"
-            }
+if (mkdata.code == 200) {
+    //设置文章正文
+    articleData.value = mkdata.data;
+    //设置seo
+    let seoTitle = mkdata.data.title;
+    let seoDescription = mkdata.data.introduce;
+    let seoKeywords = mkdata.data.keyword;
+    let seoSuffix = mkdata.data.suffix;
+    let seoName = mkdata.data.website_name;
+    useHead({
+        title: seoTitle + "_" + seoName + "_" + seoSuffix,
+        meta: [
+            { name: 'keywords', content: seoKeywords + "_" + seoName + "_" + seoSuffix, tagPriority: 10 },
+            { name: 'description', content: seoDescription + "_" + seoName + "_" + seoSuffix, tagPriority: 10 }
         ]
-    }
-}
-
-//2.0 测试数据 后期移除
-const testTemplateData = {
-    "sectorName": "text",
-    "componentList": [
-        {
-            "component_type": 1,//1=新闻 2=广告
-            "component_style": 1,//样式
-            "sort": 1,//组件位置
-            "data": {
-                "alias":"一级导航名称",
-                "category_id": 11,
-                "pinyin": "nongyeshengchan",
-                "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":"最新资讯",
-                "category_id": 11,
-                "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":"热点精选",
-                "category_id": 11,
-                "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"
-    }
+    });
 }
-//2.获得页面数据 end---------------------------------------->
+//2.页面数据 end---------------------------------------->
 </script>
 
 <style lang="less" scoped>

+ 50 - 497
pages/[dir]/[dir]/list-[id].vue

@@ -4,13 +4,19 @@
     <!-- 菜单 -->
     <templateMenu></templateMenu>
     <!-- 内容 -->
-    <div>
+    <div v-for="(item,index) in templateData" :key="index">
+        <!--列表菜单-->
+        <div v-if="item.sectorName=='channelMenu'">
+            <templateChannelMenu :skinId="skinId" :routeId="routeId" :navigateData="navigateData.data" :templateData="item.componentList"></templateChannelMenu>
+        </div>
         <!--广告组件-->
-        <templateAd :adTag="'nmw_list_0001'" :skinId="skinId" :adData="adData"></templateAd>
-        <!--频道菜单-->
-        <templateChannelMenu :skinId="skinId" :navigateData="navigateData.data" :templateData="testTemplateData2" :routeId="parentRouteId"></templateChannelMenu>
+        <div v-if="item.sectorName=='adSector'">
+            <templateAd :skinId="skinId" :adData="adData" :adTag="item.ad.ad_tag" ></templateAd>
+        </div>
         <!--列表组件-->
-        <templateList :skinId="skinId" :templateData="testTemplateData" :routeId="routeId" :pageData="pageData"></templateList>
+        <div v-if="item.sectorName=='fixedListSector'">
+            <templateList :skinId="skinId" :templateData="item.componentList" :routeId="routeId" :pageData="pageData" :newsList="newsList"></templateList>
+        </div>
     </div>
     <!-- 底部 -->
     <templateFoot></templateFoot>
@@ -71,6 +77,7 @@ import { useTemplateBaseStore } from '@/stores/templateBase'
 const templateBaseStore = useTemplateBaseStore()
 //1.5获得该页的皮肤id - 在每个组件中也是同样的获得方法
 const skinId = ref("")
+const websiteId = ref("")
 //1.6获得站点基本信息
 const responseStatus = await requestDataPromise('/web/getWebsiteAllinfo', {
     method: 'GET',
@@ -83,19 +90,10 @@ const responseStatus = await requestDataPromise('/web/getWebsiteAllinfo', {
 if (responseStatus.code == 200) {
     //1.6.1设置站点基本信息
     templateBaseStore.setWebSiteInfo(responseStatus.data)
+    websiteId.value = responseStatus.data.website_head.id;
     //1.6.2设置皮肤id
     skinId.value = templateBaseStore.webSiteInfo.website_foot.foot_info.template_id;
 }
-//1.7获得广告池
-const adData = ref([]);
-const adResponseStatus = await requestDataPromise('/web/getWebsiteAdvertisement', {
-    method: 'GET',
-    query: {},
-});
-if (adResponseStatus.code == 200) {
-    templateBaseStore.setAdList(adResponseStatus.data)
-    adData.value = adResponseStatus.data;
-}
 //1.8.seo
 const setData = await requestDataPromise('/web/getWebsiteCategoryHead', {
     method: 'GET',
@@ -118,493 +116,48 @@ useSeoMeta({
 //1.获得基本信息单元 end---------------------------------------->
 
 //2.页面数据 start---------------------------------------->
-//2.0 测试数据 后期移除
-const testTemplateData = {
-    "sectorName": "text",
-    "componentList": [
-        {
-            "component_type": 1,//1=新闻 2=广告
-            "component_style": 1,//样式
-            "sort": 1,//组件位置
-            "data": {
-                "alias":"一级导航名称",
-                "category_id": 11,
-                "pinyin": "nongyeshengchan",
-                "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,
-                "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,
-                "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
+//2.1获得页面模板数据
+const response = await requestDataPromise('/client/indexData', {
+    method: 'POST',
+    body: {
+        'website_id':websiteId.value,
+        'getpage':'list'
+    },
+});
+//页面模板数据
+const templateData = response.data.template.list;
+console.log(templateData)
+//2.2广告数据
+const adData = ref([]);
+adData.value.push(response.data.ad.top)
+for(let item of response.data.ad.list){
+    adData.value.push(item)
 }
-
-//分页数据
+templateBaseStore.setAdList(adData.value)
+//2.3分页数据
 const route = useRoute();
 let pageNum = ref(1); //当前页码
 pageNum.value = parseInt(route.params.id);//路由中传递的分页页码
-let total = ref(100); //总条数
+let total = ref(0); //总条数
 let pageSize = ref(20); //每页条数
-
+//3.1新闻列表数据
+const newsList = ref([]);
+let newslists = async () => {
+    const listData = await requestDataPromise('/web/getWebsiteArticleList', {
+        method: 'GET',
+        query: {
+            'page': pageNum.value,
+            'pageSize': pageSize.value,
+            'catid': routeId.value
+        },
+    });
+    console.log(listData)
+    if (listData.code == 200) {
+        newsList.value = listData.data.rows;
+        pageData.value.total =  listData.data.count;
+    }
+}
+newslists();
 let pageData = ref({
     "pageNum": pageNum.value,
     "pageSize": pageSize.value,

A diferenza do arquivo foi suprimida porque é demasiado grande
+ 34 - 70
pages/[dir]/[id].vue


+ 527 - 495
pages/[dir]/index.html.vue

@@ -4,21 +4,18 @@
     <!-- 菜单 -->
     <templateMenu></templateMenu>
     <!-- 内容 -->
-    <div>
-        <!--频道菜单-->
+    <!-- <div>
         <templateChannelMenu :skinId="skinId" :navigateData="navigateData.data" :templateData="testTemplateData2" :routeId="routeId"></templateChannelMenu>
-        <!--滚动图文组合-->
         <templateScrollList :skinId="skinId" :templateData="testTemplateData"></templateScrollList>
-        <!--广告组件-->
-        <!-- <templateAd :adTag="'bbzxw_class_2'" :skinId="skinId" :adData="adData"></templateAd> -->
-        <!--图文组合3-->
         <templateNewSector3 :skinId="skinId" :templateData="testTemplateData"></templateNewSector3>
-        <!--广告组件-->
         <templateAd :adTag="'nmw_category_0001'" :skinId="skinId" :adData="adData"></templateAd>
-        <!--图文组合1-->
         <templateNewSector1 :skinId="skinId" :templateData="testTemplateData"></templateNewSector1>
-        <!--图文组合2-->
         <templateNewSector2 :skinId="skinId" :templateData="testTemplateData"></templateNewSector2>
+    </div> -->
+    <div v-for="(item,index) in templateData" :key="index">
+        <div v-if="item.sectorName=='channelMenu'">
+            <templateChannelMenu :skinId="skinId" :routeId="routeId" :navigateData="navigateData.data" :templateData="item.componentList"></templateChannelMenu>
+        </div>
     </div>
     <!-- 底部 -->
     <templateFoot></templateFoot>
@@ -75,6 +72,7 @@ import { useTemplateBaseStore } from '@/stores/templateBase'
 const templateBaseStore = useTemplateBaseStore()
 //1.5获得该页的皮肤id - 在每个组件中也是同样的获得方法
 const skinId = ref("")
+const websiteId = ref("")
 //1.6获得站点基本信息
 const responseStatus = await requestDataPromise('/web/getWebsiteAllinfo', {
     method: 'GET',
@@ -87,19 +85,20 @@ const responseStatus = await requestDataPromise('/web/getWebsiteAllinfo', {
 if (responseStatus.code == 200) {
     //1.6.1设置站点基本信息
     templateBaseStore.setWebSiteInfo(responseStatus.data)
+    websiteId.value = responseStatus.data.website_head.id;//获得网站id
     //1.6.2设置皮肤id
     skinId.value = templateBaseStore.webSiteInfo.website_foot.foot_info.template_id;
 }
 //1.7获得广告池
-const adData = ref([]);
-const adResponseStatus = await requestDataPromise('/web/getWebsiteAdvertisement', {
-    method: 'GET',
-    query: {},
-});
-if (adResponseStatus.code == 200) {
-    templateBaseStore.setAdList(adResponseStatus.data)
-    adData.value = adResponseStatus.data;
-}
+// const adData = ref([]);
+// const adResponseStatus = await requestDataPromise('/web/getWebsiteAdvertisement', {
+//     method: 'GET',
+//     query: {},
+// });
+// if (adResponseStatus.code == 200) {
+//     templateBaseStore.setAdList(adResponseStatus.data)
+//     adData.value = adResponseStatus.data;
+// }
 //1.8.seo
 const setData = await requestDataPromise('/web/getWebsiteCategoryHead', {
     method: 'GET',
@@ -122,485 +121,518 @@ useSeoMeta({
 //1.获得基本信息单元 end---------------------------------------->
 
 //2.页面数据 start---------------------------------------->
-//2.0 测试数据 后期移除
-const testTemplateData = {
-    "sectorName": "text",
-    "componentList": [
-        {
-            "component_type": 1,//1=新闻 2=广告
-            "component_style": 1,//样式
-            "sort": 1,//组件位置
-            "data": {
-                "alias":"一级导航名称",
-                "category_id": 11,
-                "pinyin": "nongyeshengchan",
-                "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,
-                "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,
-                "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 response = await requestDataPromise('/client/indexData', {
+    method: 'POST',
+    body: {
+        'website_id':websiteId.value,
+        'getpage':'class'
+    },
+});
+//页面数据
+const templateData = response.data.template.class;
+console.log(templateData)
+//广告数据
+const adData = ref([]);
+adData.value.push(response.data.ad.top)
+for(let item of response.data.ad.class){
+    adData.value.push(item)
 }
+templateBaseStore.setAdList(adData.value)
 
-//静态链接测试数据
-const testTemplateData2 = {
-    "sectorName": "linkSector",
-    "componentList": [
-        {
-            "component_type": 3,
-            "component_style": 1,
-            "sort": 1,
-            "componentData": {}
-        }
-    ],
-    "sort": 4
-}
+
+console.log(navigateData)
+
+
+
+
+
+
+
+
+
+
+
+
+
+//2.0 测试数据 后期移除
+// const testTemplateData = {
+//     "sectorName": "text",
+//     "componentList": [
+//         {
+//             "component_type": 1,//1=新闻 2=广告
+//             "component_style": 1,//样式
+//             "sort": 1,//组件位置
+//             "data": {
+//                 "alias":"一级导航名称",
+//                 "category_id": 11,
+//                 "pinyin": "nongyeshengchan",
+//                 "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,
+//                 "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,
+//                 "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
+// }
 //2.页面数据 end---------------------------------------->
 </script>
 

+ 7 - 3
pages/[dir]/list-[id].vue

@@ -6,9 +6,13 @@
     <!-- 内容 -->
     <div v-for="(item,index) in templateData" :key="index">
         <!--广告组件-->
-        <templateAd :skinId="skinId" :adData="adData" :adTag="item.ad.ad_tag" v-if="item.sectorName=='adSector'"></templateAd>
+        <div v-if="item.sectorName=='adSector'">
+            <templateAd :skinId="skinId" :adData="adData" :adTag="item.ad.ad_tag" ></templateAd>
+        </div>
         <!--列表组件-->
-        <templateList :skinId="skinId" :templateData="item.componentList" :routeId="routeId" :pageData="pageData" :newsList="newsList" v-if="item.sectorName=='fixedListSector'"></templateList>
+        <div v-if="item.sectorName=='fixedListSector'">
+            <templateList :skinId="skinId" :templateData="item.componentList" :routeId="routeId" :pageData="pageData" :newsList="newsList"></templateList>
+        </div>
     </div>
     <!-- 底部 -->
     <templateFoot></templateFoot>
@@ -108,7 +112,7 @@ templateBaseStore.setAdList(adData.value)
 const route = useRoute();
 let pageNum = ref(1); //当前页码
 pageNum.value = parseInt(route.params.id);//路由中传递的分页页码
-let total = ref(100); //总条数
+let total = ref(0); //总条数
 let pageSize = ref(20); //每页条数
 //3.1新闻列表数据
 const newsList = ref([]);

+ 76 - 2
utils/dataInterface.ts

@@ -1,6 +1,80 @@
 //自助建站接口契约
 
-//单页-详情
+//详情页 start ---------------------------------------->
+//文章正文
+export interface IArticleDetail {
+    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: string|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;
+    content: string;
+    article_id: number;
+    website_url: string|null;
+    email: string|null;
+    contacts: string|null;
+    contacts_mobile:string|null;
+    contacts_address:string|null;
+    zip_code: string|null;
+    enterprise_name: string|null;
+    category_id: number;
+    cat_name: string;
+    website_name: string;
+    suffix: string;
+    commendArticle: any[];//推荐文章,暂时未确定
+}
+//投票结果
+export interface ISurveyResult {
+    choice: number[];
+    data: ISurveyResultData[];
+}
+export interface ISurveyResultData {
+    art_id: number;
+    choice_name: string;
+    created_at: string;
+    id: number;
+    is_other: number;
+    other_id: number;
+    results: number;
+    sur_id: string;
+    survey_name: string;
+    updated_at: string;
+    user_id: number|null;
+    website_id: number;
+    status?:number;
+}
+//详情页 end ---------------------------------------->
+
+//单页-详情 start ---------------------------------------->
 export interface INewsDetail {
     id?:number;
     list_title?:string;
@@ -23,5 +97,5 @@ export interface IBottomMenu {
     name_pinyin:string;
     pid:number;
 }
-
+//单页-详情 end ---------------------------------------->
 

Algúns arquivos non se mostraron porque demasiados arquivos cambiaron neste cambio