|
@@ -4,11 +4,11 @@
|
|
|
<!-- 菜单 -->
|
|
|
<templateMenu></templateMenu>
|
|
|
<!-- 内容 -->
|
|
|
- <div>
|
|
|
+ <div v-for="(item,index) in templateData" :key="index">
|
|
|
<!--广告组件-->
|
|
|
- <templateAd :adTag="'bbzxw_list_2'" :skinId="skinId" :adData="adData"></templateAd>
|
|
|
+ <templateAd :skinId="skinId" :adData="adData" :adTag="item.ad.ad_tag" v-if="item.sectorName=='adSector'"></templateAd>
|
|
|
<!--列表组件-->
|
|
|
- <templateList :skinId="skinId" :templateData="testTemplateData" :routeId="routeId" :pageData="pageData"></templateList>
|
|
|
+ <templateList :skinId="skinId" :templateData="item.componentList" :routeId="routeId" :pageData="pageData" :newsList="newsList" v-if="item.sectorName=='fixedListSector'"></templateList>
|
|
|
</div>
|
|
|
<!-- 底部 -->
|
|
|
<templateFoot></templateFoot>
|
|
@@ -23,7 +23,7 @@ import templateFoot from '@/components/template/sector/foot/1200x580/1.vue'
|
|
|
//0.2局部通栏
|
|
|
//0.2.1广告组件
|
|
|
import templateAd from '@/components/template/sector/body/ad/1200x90/1.vue'
|
|
|
-//0.2.3列表组件
|
|
|
+//0.2.2列表组件
|
|
|
import templateList from '@/components/template/sector/body/list/list/1200x1220/1.vue'
|
|
|
//0.加载全局模板组件 end---------------------------------------->
|
|
|
|
|
@@ -42,21 +42,13 @@ 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',
|
|
|
- query: {
|
|
|
- 'placeid': 1,
|
|
|
- 'pid': routeId.value,
|
|
|
- 'num': 8
|
|
|
- },
|
|
|
-});
|
|
|
-//1.4获得pinia源
|
|
|
+//1.3获得pinia源
|
|
|
import { useTemplateBaseStore } from '@/stores/templateBase'
|
|
|
const templateBaseStore = useTemplateBaseStore()
|
|
|
-//1.5获得该页的皮肤id - 在每个组件中也是同样的获得方法
|
|
|
+//1.4获得该页的皮肤id - 在每个组件中也是同样的获得方法
|
|
|
const skinId = ref("")
|
|
|
-//1.6获得站点基本信息
|
|
|
+const websiteId = ref("")
|
|
|
+//1.5获得站点基本信息
|
|
|
const responseStatus = await requestDataPromise('/web/getWebsiteAllinfo', {
|
|
|
method: 'GET',
|
|
|
query: {
|
|
@@ -68,20 +60,11 @@ 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;
|
|
|
-}
|
|
|
-//1.8.seo
|
|
|
+//1.6.seo
|
|
|
const setData = await requestDataPromise('/web/getWebsiteCategoryHead', {
|
|
|
method: 'GET',
|
|
|
query: {
|
|
@@ -103,499 +86,53 @@ 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":"最新资讯",
|
|
|
- "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"
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-//静态链接测试数据
|
|
|
-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':'index'
|
|
|
+ },
|
|
|
+});
|
|
|
+//页面模板数据
|
|
|
+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 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,
|
|
|
"total": total.value
|
|
|
});
|
|
|
-
|
|
|
//2.页面数据 end---------------------------------------->
|
|
|
</script>
|
|
|
|