Jelajahi Sumber

页面级作用域

页面级作用域
dangyunlong 1 hari lalu
induk
melakukan
17c6b74b7f

+ 10 - 1
components/home/foot.vue

@@ -1,5 +1,6 @@
 <template>
-    <footer class="index_foot">
+    <div>当前皮肤:{{ skinId }}</div>
+    <footer class="index_foot" v-if="routeName=='index'">
         <div class="foot_img_box">
             <a :href="item.url" v-for="(item, index) in bottomLink" target="_blank">
                 <img :src="item.logo_url" alt="">
@@ -59,6 +60,10 @@
 </template>
  
 <script setup>
+//获得route
+const route = useRoute()
+const routeName = route.name;
+
 import { useTemplateBaseStore } from '@/stores/templateBase'
 const templateBaseStore = useTemplateBaseStore()
 //获得底部基本信息 start---------------------------------------->
@@ -68,12 +73,16 @@ const bottomText = ref([])
 const bottomphoto = ref([])
 const bottomMenu = ref([])
 const bottomBase = ref({})
+const skinId = ref("")//皮肤id
 if(templateBaseStore.webSiteInfo.website_foot){
     bottomLink.value = templateBaseStore.webSiteInfo.website_foot.link_img;
     bottomText.value = templateBaseStore.webSiteInfo.website_foot.link_text;
     bottomphoto.value = templateBaseStore.webSiteInfo.website_foot.link_foot;
     bottomMenu.value = templateBaseStore.webSiteInfo.website_foot.foot_cate;
     bottomBase.value = templateBaseStore.webSiteInfo.website_foot.foot_info;
+
+    //获得皮肤id
+    skinId.value = templateBaseStore.webSiteInfo.website_foot.foot_info.template_id;
 }
 </script>
 <style lang="less" scoped>

+ 0 - 90
components/home/foot1.vue

@@ -1,90 +0,0 @@
-<template>
-    <!--注意,foot1与foot的区别就在于,foot1没有友情链接-->
-    <div class="call_us_box">
-        <div class="inner">
-            <span v-for="(item, index) in bottomMenu" :key="index">
-                <NuxtLink :to="{ path: `/about/${item.name_pinyin}/list-1.html` }" v-if="item.type == 1" :title="item.name">
-                    {{ item.name }}
-                </NuxtLink>
-                <NuxtLink :to="{ path: `/about/${item.name_pinyin}/index.html` }" v-if="item.type == 0" :title="item.name">
-                    {{ item.name }}
-                </NuxtLink>
-            </span>
-        </div>
-    </div>
-    <footer class="index_foot">
-        <div class="foot_text_box">
-            <p v-html="bottomBase.statement" class="foot_text_html_css"></p>
-            <p v-html="bottomBase.organizer" class="foot_text_html_css"></p>
-            <p v-html="bottomBase.copyright_information" class="foot_text_html_css"></p>
-            <p><span v-html="bottomBase.icp_number" class="foot_text_html_css"></span><span v-html="bottomBase.record_number" class="foot_text_html_css"></span></p>
-            <p v-html="bottomBase.email" class="foot_text_html_css"></p>
-            <p v-html="bottomBase.company_address" class="foot_text_html_css"></p>
-            <p v-html="bottomBase.contact_number" class="foot_text_html_css"></p>
-        </div>
-        <div class="foot_logo_out" v-if="bottomBase">
-            <a :href="'http://' + bottomBase.project_url" :title="bottomBase.project_name" v-if="bottomBase.project_logo!=''&&bottomBase.project_url!=''">
-                <img :src="bottomBase.project_logo" class="floatLogoRight" :alt="bottomBase.project_name">
-            </a>
-            <span v-else-if="bottomBase.project_logo!=''&&bottomBase.project_url==''">
-                <img :src="bottomBase.project_logo" class="floatLogoRight" :alt="bottomBase.project_name">
-            </span>
-            <a :href="'http://' + bottomBase.company_url" :title="bottomBase.company_name" v-if="bottomBase.company_logo!=''&&bottomBase.company_url!=''">
-                <img :src="bottomBase.company_logo" class="floatLogoLeft" :alt="bottomBase.company_name">
-            </a>
-            <span v-else-if="bottomBase.company_logo!=''&&bottomBase.company_url==''">
-                <img :src="bottomBase.company_logo" class="floatLogoLeft" :alt="bottomBase.company_name">
-            </span>
-        </div>
-        <div class="foot_last_img_box">
-            <a :href="item.url" v-for="(item, index) in bottomphoto" :title="item.title">
-                <img :src="item.logo_url" :alt="item.title">
-            </a>
-        </div>
-
-        <!--在线客服-->
-        <HomeKefu :bottomBase="bottomBase" />
-    </footer>
-</template>
- 
-<script setup>
-//获得底部基本信息 start---------------------------------------->
-//1.获得全部友情链接与底部图片
-const bottomLink = ref([])
-const bottomText = ref([])
-const bottomphoto = ref([])
-const bottomMenu = ref([])
-const bottomBase = ref({})
-
-async function getModelDataAll() {
-    const mkdata =  await requestDataPromise('/web/getWebsiteFootAll', {
-        method: 'GET',
-        query: {
-            'link_textnum':8,
-            'link_imgnum':12,
-            'link_footnum':4
-        },
-    });
-    if(mkdata.code == 200){
-        bottomLink.value = mkdata.data.link_img;
-        bottomText.value = mkdata.data.link_text;
-        bottomphoto.value = mkdata.data.link_foot;
-        bottomMenu.value = mkdata.data.foot_cate;
-        bottomBase.value = mkdata.data.foot_info;
-        
-
-    }else{
-        console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
-        console.log("错误位置:获取友情链接图片")
-        console.log("后端错误反馈:",mkdata.message)
-        console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
-    }
-}
-getModelDataAll();
-//获得底部基本信息 end---------------------------------------->
-</script>
-
-<style lang="less" scoped>
-    @import '@/assets/css/public/footer.less';
-    @import '@/assets/css/public/kefu.less';
-</style>

+ 4 - 1
components/home/pageHead.vue

@@ -2,7 +2,7 @@
     <header>
         <nav class="headerNav">
             <div class="inner">
-                <div class="left">你好,欢迎来到{{webSiteName}}!</div>
+                <div class="left">你好,欢迎来到{{webSiteName}}!当前皮肤:{{ skinId }}</div>
                 <div class="right">
                     <div class="menu">
                         <button class="reg" @click="goTopic"><img src="http://img.bjzxtw.org.cn/master/bjzxtw/public/head/topicon1.png">商圈</button>
@@ -321,9 +321,12 @@ onMounted(async () => {
 //获得网站logo
 const logo = ref("")
 const webSiteName = ref("")
+const skinId = ref("")
 if(templateBaseStore.webSiteInfo.website_head){
     logo.value = templateBaseStore.webSiteInfo.website_head.logo;
     webSiteName.value = templateBaseStore.webSiteInfo.website_head.title;
+    //获得皮肤id
+    skinId.value = templateBaseStore.webSiteInfo.website_foot.foot_info.template_id;
 }
 //adImg.value
 //获得广告

+ 8 - 0
components/home/pageNavigation.vue

@@ -1,5 +1,6 @@
 <template>
     <div class="menuStyle1">
+        当前皮肤:{{ skinId }}
         <div class="menuBoxBg">
             <div class="menuBox" ref="menuBox">
                 <div v-for="(item, index) in navigation" :key="index">
@@ -17,6 +18,13 @@
 </template>
 
 <script setup>
+//1.1 pinia
+import { useTemplateBaseStore } from '@/stores/templateBase'
+const templateBaseStore = useTemplateBaseStore()
+//获得皮肤id
+const skinId = ref("")
+skinId.value = templateBaseStore.webSiteInfo.website_foot.foot_info.template_id;
+
 //1.获取导航菜单 start ---------------------------------------->
 //第一行导航菜单 10个
 const navigation = ref([]);

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

@@ -125,7 +125,7 @@
     <!-- 广告1 -->
     <HomeAdvertising :imgurl="adImg2"></HomeAdvertising>
     <!-- 页面底部 -->
-    <HomeFoot1></HomeFoot1>
+    <HomeFoot></HomeFoot>
 </template>
 
 <script setup>

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

@@ -52,7 +52,7 @@
         <!-- 列表页广告二 -->
         <HomeTopTen :imgurl="adImg2" v-if="adImg2"></HomeTopTen>
         <!-- 页面底部 -->
-        <HomeFoot1></HomeFoot1>
+        <HomeFoot></HomeFoot>
     </div>
 </template>
 

+ 57 - 121
pages/[dir]/[id].vue

@@ -2,131 +2,67 @@
     <!-- 页面头部 -->
     <HomePageHead></HomePageHead>
     <!-- 导航栏 -->
-    <HomePageNavigation1></HomePageNavigation1>
-    <!-- 广告1 -->
-    <HomeAdvertising :imgurl="adImg1"></HomeAdvertising>
-
-    <!-- 资讯列表 -->
-    <div class="newsDetail">
-        <div class="inner">
-            <div class="innerLeft">
-                <!-- 面包屑导航 -->
-                <div class="breadcrumb">
-                    <div class="inner">
-                        <span class="location">当前位置:</span>
-                        <el-breadcrumb :separator-icon="ArrowRight">
-                            <el-breadcrumb-item>
-                                <NuxtLink to="/">首页</NuxtLink>
-                            </el-breadcrumb-item>
-                            <el-breadcrumb-item v-if="parent_name != ''">
-                                <NuxtLink :to="`/${parent_pinyin}/index.html`"> {{ parent_name }}</NuxtLink>
-                            </el-breadcrumb-item>
-                            <el-breadcrumb-item>{{ routeNewsTtitle }}</el-breadcrumb-item>
-                        </el-breadcrumb>
-                    </div>
-                </div>
-                <div class="LeftTop">
-                    <h1>{{ newsDetail.title }}</h1>
-                    <p>
-                        来源: <span>{{ newsDetail.copyfrom }}</span>
-                        作者: <span>{{ newsDetail.author }}</span>
-                        发布时间: <span>{{ time }}</span>
-                    </p>
-                </div>
-                <div class="leftBottom" v-html="newsDetail.content" v-if="newsDetail.content" @click="openPreview">
-                </div>
-                <div v-if="previewVisible" class="preview-modal" @click="closePreview">
-                    <img :src="selectedImage" alt="Preview">
-                </div>
-                <!-- 免责声明: -->
-                <div class="disclaimer" v-if="newsDetail.copyfrom != '本网'">
-                    <p>原文链接:{{ newsDetail.fromurl }}</p>
-                    <p>[免责声明]本文来源于网络转载,仅供学习交流使用,不构成商业目的。 版权归原作者所有,如涉及作品内容,版权和其他问题,请在30日与本网联系,我们将第一时间处理。</p>
-                </div>
-                <div v-if="articleChoice">
-                    <!-- 投票 start ---------------------------------------->
-                    <div class="index_3_box_vote" v-if="articleChoice">
-                        <div class="voteTitle">投票区</div>
-                        <div class="inquire">
-                            <p v-if="voteList.length > 0">{{ voteList[0].survey_name }}</p>
-                            <div class="radioBox">
-                                <!--投票选项-->
-                                <div v-if="!isDisabled">
-                                    <div class="radio" v-if="isRadio">
-                                        <el-radio-group v-model="radio1" @change="handleRadioChange">
-                                            <el-radio v-for="item in voteList" :key="item.id" :value="item.id"
-                                                size="large">
-                                                <span v-if="item.is_other == 0">{{ item.choice_name }}</span>
-                                                <span v-else>其他</span>
-                                            </el-radio>
-                                        </el-radio-group>
-                                        <el-input v-if="showUserChoice" v-model="userChoice" :rows="2" type="textarea"
-                                            resize="none" placeholder="请输入.." />
-                                    </div>
-                                    <div class="checkInputBox" v-else>
-                                        <el-checkbox-group v-model="check1" @change="handleCheckboxChange">
-                                            <span v-for="item in voteList" :key="item.id">
-                                                <span v-if="item.is_other == 0">
-                                                    <el-checkbox size="large" :label="item.choice_name"
-                                                        :value="item.id" />
-                                                </span>
-                                                <span v-else>
-                                                    <el-checkbox size="large" label="其他" :value="item.id" />
-                                                </span>
-                                            </span>
-                                        </el-checkbox-group>
-                                        <el-input v-if="showUserChoice" v-model="userChoice" :rows="2" type="textarea"
-                                            resize="none" placeholder="请输入.." />
-                                    </div>
-                                </div>
-                                <!--投票结果-->
-                                <div class="inquireData" v-else>
-                                    <div v-for="item in websiteSurveyData.data" :key="item.id">
-                                        <div class="inquireDataItem active" v-if="item.status == 1">
-                                            <div class="inquireDataItemTitle">
-                                                <span v-if="item.choice_name == ''">其他</span>
-                                                <span v-else>{{ item.choice_name }}</span>
-                                            </div>
-                                            <div class="inquireDataItemNum">{{ item.results }}票</div>
-                                        </div>
-                                        <div class="inquireDataItem" v-else>
-                                            <div class="inquireDataItemTitle">
-                                                <span v-if="item.choice_name == ''">其他</span>
-                                                <span v-else>{{ item.choice_name }}</span>
-                                            </div>
-                                            <div class="inquireDataItemNum">{{ item.results }}票</div>
-                                        </div>
-                                    </div>
-                                </div>
-                            </div>
-                            <div class="btn">
-                                <button class="voting" @click="addWebsiteSurvey" :disabled="isDisabled"
-                                    v-if="!isDisabled">投票</button>
-                            </div>
-                        </div>
-                    </div>
-                    <!-- 投票 end ---------------------------------------->
-                </div>
-            </div>
-            <div class="innerRight">
-                <!-- 热点资讯1 -->
-                <div class="hotList1">
-                    <DetailHotNews></DetailHotNews>
-                </div>
-                <!-- 热点资讯2 -->
-                <div class="hotList2">
-                    <DetailHotNews2></DetailHotNews2>
-                </div>
-            </div>
-        </div>
-    </div>
-    <!-- 广告2 -->
-    <HomeAdvertising :imgurl="adImg2"></HomeAdvertising>
+    <HomePageNavigation></HomePageNavigation>
+
+
+    <div>当前皮肤:{{ skinId }}</div>
+        <div>/sannongzixun/601517.html</div>
+        <div><br/><br/><br/></div>
+
+        
     <!-- 页面底部 -->
-    <HomeFoot1></HomeFoot1>
+    <HomeFoot></HomeFoot>
 </template>
 
 <script setup>
+//0.pinia单基本信息 start---------------------------------------->
+//0.1获得pinia源
+import { useTemplateBaseStore } from '@/stores/templateBase'
+const templateBaseStore = useTemplateBaseStore()
+//0.2获得该页的皮肤id - 在每个组件中也是同样的获得方法
+const skinId = ref("")
+//0.3获得站点基本信息
+let getTemplateBaseInfo = async () => {
+    const responseStatus = await requestDataPromise('/web/getWebsiteAllinfo', {
+        method: 'GET',
+        query: {
+            'link_textnum':24,
+            'link_imgnum':18,
+            'link_footnum':4
+        },
+    });
+    if (responseStatus.code == 200) {
+        templateBaseStore.setWebSiteInfo(responseStatus.data)
+        skinId.value = templateBaseStore.webSiteInfo.website_foot.foot_info.template_id;
+    }
+}
+getTemplateBaseInfo();
+//0.4获得广告池
+let getAdList = async (adKey) => {
+    const responseStatus = await requestDataPromise('/web/getWebsiteAdvertisement', {
+        method: 'GET',
+        query: {
+            
+        },
+    });
+    if (responseStatus.code == 200) {
+        //console.log(responseStatus.data)
+        templateBaseStore.setAdList(responseStatus.data)
+        //获取广告
+        //adImg.value = requestAd(templateBaseStore.webAdList,templateBaseStore.webSiteInfo.website_head.ad_key + "_" + "top")
+    }
+}
+getAdList();
+//0.5设置seo信息
+
+
+//0.pinia单基本信息 end---------------------------------------->
+
+
+
+
+
+
 //1.页面依赖 start ---------------------------------------->
 import { onMounted } from 'vue'
 import { ElBreadcrumb, ElBreadcrumbItem, ElRadio, ElRadioGroup, ElCheckbox, ElCheckboxGroup, ElMessage, ElInput } from 'element-plus'

+ 53 - 468
pages/[dir]/index.html.vue

@@ -2,250 +2,69 @@
     <div>
         <HomePageHead></HomePageHead>
         <HomePageNavigation></HomePageNavigation>
-        <HomeSecondaryHeading :titleData="pageData" :pinyinid="routeId"></HomeSecondaryHeading>
-        <main class="index_main">
-            <section class="index_1 clearfix">
-                <div class="index_1_left">
-                    <div class="roll_1_box">
-                        <HomeSmallSwiper1 :data="pageData[0].data"></HomeSmallSwiper1>
-                    </div>
-                </div>
-                <div class="index_1_right">
-                    <div class="index_1_color_box">
-                        <h3 class="index_1_head_h3 clearfix">
-                            <NuxtLink class="index_1_head_a" :href="getLinkPath(pageData[0])" v-if="pageData[0]"
-                                :title="pageData[0].alias">
-                                {{ pageData[0].alias }}
-                            </NuxtLink>
-                        </h3>
-                        <div class="index_1_ul" v-if="pageData[0].data2">
-                            <NuxtLink class="index_1_ul_a dot1" :href="getLinkPathDetail(item)" :title="item.title"
-                                v-for="item in pageData[0].data2" :key="item.id"
-                                :target="item.islink == 1 ? '_blank' : '_self'">
-                                {{ item.title }}
-                            </NuxtLink>
-                        </div>
-                    </div>
-                </div>
-            </section>
-            <HomeAdvertisingClass :adData1="adImg1" :adData2="adImg2"></HomeAdvertisingClass>
-            <section class="index_2 clearfix">
-                <div class="index_2_left" v-if="pageData[1]">
-                    <h3 class="index_2_left_h3 clearfix">
-                        <NuxtLink class="index_2_left_h3_a index_2_left_h3_a_only" :href="getLinkPath(pageData[1])"
-                            v-if="pageData[1]" :title="pageData[1].alias">
-                            {{ pageData[1].alias }}
-                        </NuxtLink>
-                    </h3>
-                    <div class="index_2_left_img_out">
-                        <div class="index_2_big_img_ul clearfix">
-                            <div class="index_2_big_img_li">
-                                <NuxtLink class="index_2_big_img_li_a" :href="getLinkPathDetail(item)"
-                                    :title="item.title" v-for="item in pageData[1].data" :key="item.id"
-                                    :target="item.islink == 1 ? '_blank' : '_self'">
-                                    <img :src="item.imgurl" title="item.title" alt="item.title">
-                                    <div class="index_2_img_li_dot1 dot1">{{ item.title }}</div>
-                                </NuxtLink>
-                            </div>
-                        </div>
-                        <div class="index_2_img_ul clearfix">
-                            <div class="index_2_img_li" v-for="item in pageData[1].data2" :key="item.id">
-                                <NuxtLink class="index_2_img_li_a" :href="getLinkPathDetail(item)" :title="item.title"
-                                    :target="item.islink == 1 ? '_blank' : '_self'">
-                                    <img :src="item.imgurl" title="item.title" alt="item.title">
-                                    <div class="index_2_img_li_dot1 dot1">{{ item.title }}</div>
-                                </NuxtLink>
-                            </div>
-                        </div>
-                    </div>
-
-                    <div class="index_2_left_ul_box">
-                        <div class="index_2_left_ul index_2_left_ul_group_6">
-                            <div class="index_2_left_ul_li dot1" v-for="item in pageData[1].data3" :key="item.id">
-                                <NuxtLink class="index_2_left_ul_li_a_name" :href="getLinkPath1(item)"
-                                    :title="item.title" :key="item.id" :target="item.islink == 1 ? '_blank' : '_self'">
-                                    {{ item.alias }}
-                                </NuxtLink>
-                                <NuxtLink class="index_2_left_ul_li_a_text" :href="getLinkPathDetail1(item)"
-                                    :title="item.title" :key="item.id" :target="item.islink == 1 ? '_blank' : '_self'">
-                                    {{ item.title }}
-                                </NuxtLink>
-                            </div>
-                        </div>
-                    </div>
-                </div>
-                <div class="index_2_right" v-if="pageData[2]">
-                    <h3 class="index_2_right_head">
-                        <NuxtLink class="index_2_right_head_a" :href="getLinkPath(pageData[2])" v-if="pageData[2]"
-                            :title="pageData[2].alias">
-                            {{ pageData[2].alias }}
-                        </NuxtLink>
-                    </h3>
-                    <div class="index_2_right_img_ul">
-                        <div class="index_2_right_img_li clearfix" v-for="item in pageData[2].data" :key="item.id">
-                            <NuxtLink class="index_2_right_img_li_a" :href="getLinkPathDetail(item)" :title="item.title"
-                                :key="item.id" :target="item.islink == 1 ? '_blank' : '_self'">
-                                <div class="index_2_right_img_li_a_img_box">
-                                    <img class="" :src="item.imgurl" title="" alt="">
-                                </div>
-                                <div class="index_2_right_img_li_dot3 dot3">
-                                    {{ item.title }}
-                                </div>
-                            </NuxtLink>
-                        </div>
-                    </div>
-                    <div class="index_1_ul index_1_ul_2">
-                        <NuxtLink class="index_1_ul_a dot1" :href="getLinkPathDetail(item)" :title="item.title"
-                            v-for="item in pageData[2].data3" :key="item.id"
-                            :target="item.islink == 1 ? '_blank' : '_self'">
-                            {{ item.title }}
-                        </NuxtLink>
-                    </div>
-                    <div class="index_2_right_img_ul">
-                        <div class="index_2_right_img_li clearfix" v-for="item in pageData[2].data2" :key="item.id">
-                            <NuxtLink class="index_2_right_img_li_a" :href="getLinkPathDetail(item)" :title="item.title"
-                                :key="item.id" :target="item.islink == 1 ? '_blank' : '_self'">
-                                <div class="index_2_right_img_li_a_img_box">
-                                    <img class="" :src="item.imgurl" title="" alt="">
-                                </div>
-                                <div class="index_2_right_img_li_dot3 dot3">
-                                    {{ item.title }}
-                                </div>
-                            </NuxtLink>
-                        </div>
-                    </div>
-                </div>
-            </section>
 
-            <section class="index_3 clearfix">
-                <div class="index_2_left" v-if="pageData[4]">
-                    <h3 class="index_2_left_h3 clearfix">
-                        <NuxtLink :class="{ 'index_2_left_h3_a': true, 'index_2_left_h3_a_only': showTabs == 1 }"
-                            :href="getLinkPath(pageData[3])" v-if="pageData[3]" :title="pageData[3].alias"
-                            @mouseenter="qhtabs(1)">
-                            {{ pageData[3].alias }}
-                        </NuxtLink>
-                        <NuxtLink :class="{ 'index_2_left_h3_a': true, 'index_2_left_h3_a_only': showTabs == 2 }"
-                            :href="getLinkPath(pageData[4])" v-if="pageData[4]" :title="pageData[4].alias"
-                            @mouseenter="qhtabs(2)">
-                            {{ pageData[4].alias }}
-                        </NuxtLink>
-                    </h3>
-                    <div v-if="showTabs == 1">
-                        <div class="index_2_left_img_out">
-                            <div class="index_2_left_ul index_2_left_ul_group_5">
-                                <div class="index_2_left_ul_li dot1" v-for="item in pageData[3].data" :key="item.id">
-                                    <NuxtLink class="index_2_left_ul_li_a_name" :href="getLinkPath1(item)"
-                                        :title="item.title" :key="item.id"
-                                        :target="item.islink == 1 ? '_blank' : '_self'">
-                                        {{ item.alias }}
-                                    </NuxtLink>
-                                    <NuxtLink class="index_2_left_ul_li_a_text" :href="getLinkPathDetail1(item)"
-                                        :title="item.title" :key="item.id"
-                                        :target="item.islink == 1 ? '_blank' : '_self'">
-                                        {{ item.title }}
-                                    </NuxtLink>
-                                </div>
-                            </div>
-                        </div>
-                        <div class="index_2_left_ul_box">
-                            <div class="index_3_img_ul">
-                                <div class="index_3_img_li clearfix" v-for="item in pageData[3].data2" :key="item.id">
-                                    <NuxtLink class="index_3_img_li_a" :href="getLinkPathDetail1(item)"
-                                        :title="item.title" :key="item.id"
-                                        :target="item.islink == 1 ? '_blank' : '_self'">
-                                        <div class="index_3_img_li_img_box">
-                                            <img :src="item.imgurl" title="item.title" alt="item.title">
-                                        </div>
-                                        <div class="index_3_img_li_in">
-                                            <div class="index_3_img_li_dot3 dot3">
-                                                {{ item.title }}
-                                            </div>
-                                            <NuxtLink class="index_2_left_ul_li_a_name" :href="getLinkPath1(item)"
-                                                :title="item.title" :key="item.id"
-                                                :target="item.islink == 1 ? '_blank' : '_self'">
-                                                <span class="index_3_img_li_tag">{{ item.alias }}</span>
-                                            </NuxtLink>
-                                        </div>
-                                    </NuxtLink>
-                                </div>
-                            </div>
-                        </div>
-                    </div>
-                    <div v-if="showTabs == 2">
-                        <div class="index_2_left_img_out">
-                            <div class="index_2_left_ul index_2_left_ul_group_5">
-                                <div class="index_2_left_ul_li dot1" v-for="item in pageData[4].data" :key="item.id">
-                                    <NuxtLink class="index_2_left_ul_li_a_name" :href="getLinkPath1(item)"
-                                        :title="item.title" :key="item.id"
-                                        :target="item.islink == 1 ? '_blank' : '_self'">
-                                        {{ item.alias }}
-                                    </NuxtLink>
-                                    <NuxtLink class="index_2_left_ul_li_a_text" :href="getLinkPathDetail1(item)"
-                                        :title="item.title" :key="item.id"
-                                        :target="item.islink == 1 ? '_blank' : '_self'">
-                                        {{ item.title }}
-                                    </NuxtLink>
-                                </div>
-                            </div>
-                        </div>
-                        <div class="index_2_left_ul_box">
-                            <div class="index_3_img_ul">
-                                <div class="index_3_img_li clearfix" v-for="item in pageData[4].data2" :key="item.id">
-                                    <NuxtLink class="index_3_img_li_a" :href="getLinkPathDetail1(item)"
-                                        :title="item.title" :key="item.id"
-                                        :target="item.islink == 1 ? '_blank' : '_self'">
-                                        <div class="index_3_img_li_img_box">
-                                            <img :src="item.imgurl" title="item.title" alt="item.title">
-                                        </div>
-                                        <div class="index_3_img_li_in">
-                                            <div class="index_3_img_li_dot3 dot3">
-                                                {{ item.title }}
-                                            </div>
-                                            <NuxtLink class="index_2_left_ul_li_a_name" :href="getLinkPath1(item)"
-                                                :title="item.title" :key="item.id"
-                                                :target="item.islink == 1 ? '_blank' : '_self'">
-                                                <span class="index_3_img_li_tag">{{ item.alias }}</span>
-                                            </NuxtLink>
-                                        </div>
-                                    </NuxtLink>
-                                </div>
-                            </div>
-                        </div>
-                    </div>
-                </div>
 
-                <div class="index_2_right">
-                    <h3 class="index_2_right_head">
-                        <NuxtLink class="index_2_right_head_a" :href="getLinkPath(pageData[5])" v-if="pageData[5]"
-                            :title="pageData[5].alias">
-                            {{ pageData[5].alias }}
-                        </NuxtLink>
-                    </h3>
-                    <div class="index_3_num_ul" v-if="pageData[5]">
-                        <NuxtLink class="index_1_ul_a dot1" :href="getLinkPathDetail(item)" :title="item.title"
-                            v-for="item in pageData[5].data" :key="item.id"
-                            :target="item.islink == 1 ? '_blank' : '_self'">
-                            {{ item.title }}
-                        </NuxtLink>
-                    </div>
-                </div>
-            </section>
-        </main>
+        <div>当前皮肤:{{ skinId }}</div>
+        <div>/sannongzixun/601517.html</div>
+        <div><br/><br/><br/></div>
+        <HomeSecondaryHeading :titleData="pageData" :pinyinid="routeId"></HomeSecondaryHeading>
+        
         <!-- 页脚部分 -->
-        <HomeFoot1></HomeFoot1>
+        <HomeFoot></HomeFoot>
     </div>
 </template>
 
 <script setup>
-//0.加载页面依赖 start ---------------------------------------->
+//0.pinia单基本信息 start---------------------------------------->
+//0.1获得pinia源
+import { useTemplateBaseStore } from '@/stores/templateBase'
+const templateBaseStore = useTemplateBaseStore()
+//0.2获得该页的皮肤id - 在每个组件中也是同样的获得方法
+const skinId = ref("")
+//0.3获得站点基本信息
+let getTemplateBaseInfo = async () => {
+    const responseStatus = await requestDataPromise('/web/getWebsiteAllinfo', {
+        method: 'GET',
+        query: {
+            'link_textnum':24,
+            'link_imgnum':18,
+            'link_footnum':4
+        },
+    });
+    if (responseStatus.code == 200) {
+        templateBaseStore.setWebSiteInfo(responseStatus.data)
+        skinId.value = templateBaseStore.webSiteInfo.website_foot.foot_info.template_id;
+    }
+}
+getTemplateBaseInfo();
+//0.4获得广告池
+let getAdList = async (adKey) => {
+    const responseStatus = await requestDataPromise('/web/getWebsiteAdvertisement', {
+        method: 'GET',
+        query: {
+            
+        },
+    });
+    if (responseStatus.code == 200) {
+        //console.log(responseStatus.data)
+        templateBaseStore.setAdList(responseStatus.data)
+        //获取广告
+        //adImg.value = requestAd(templateBaseStore.webAdList,templateBaseStore.webSiteInfo.website_head.ad_key + "_" + "top")
+    }
+}
+getAdList();
+//0.5设置seo信息
+
+//0.pinia单基本信息 end---------------------------------------->
+
+//1.加载页面依赖 start ---------------------------------------->
 import { ref, onMounted } from 'vue';
 import { ElMessage } from 'element-plus';
-//0.加载页面依赖 end ---------------------------------------->
+//1.加载页面依赖 end ---------------------------------------->
 
-//1.获得路由id start ---------------------------------------->
+//2.获得路由id start ---------------------------------------->
 const targetSegment = getRoutePath(1);
-//1.1 获得当前的路由id
+//2.1 获得当前的路由id
 let routeId;
 //通过导航路径反向查询导航id
 const getRouteId = await requestDataPromise('/web/getWebsiteRoute', {
@@ -259,243 +78,9 @@ if (getRouteId.code == 200) {
 } else {
     console.log("获得路由id出错!", getRouteId.message)
 }
-//1.获得路由id end ---------------------------------------->
-
-//2.选项卡 start ---------------------------------------->
-let showTabs = ref(1)
-let qhtabs = function (number) {
-    console.log(number)
-    showTabs.value = number
-}
-//2.选项卡 end ---------------------------------------->
-
-//3.广告 start ---------------------------------------->
-let adImg1 = ref({})
-let adImg2 = ref({})
-onMounted(async () => {
-    //从客户端获取行政职能部门 加快打开速度
-    const { $webUrl, $CwebUrl } = useNuxtApp();
-    //广告1
-    let url = `${$webUrl}/web/getWebsiteAdvertisement?ad_tag=nmw_category_0001`
-    const responseAd1 = await fetch(url, {
-        headers: {
-            'Content-Type': 'application/json',
-            'Userurl': $CwebUrl,
-            'Origin': $CwebUrl
-        }
-    });
-    const resultAd1 = await responseAd1.json();
-    adImg1.value = resultAd1.data[0];
-
-    //广告2
-    let url2 = `${$webUrl}/web/getWebsiteAdvertisement?ad_tag=nmw_category_0002`
-    const responseAd2 = await fetch(url2, {
-        headers: {
-            'Content-Type': 'application/json',
-            'Userurl': $CwebUrl,
-            'Origin': $CwebUrl
-        }
-    });
-    const resultAd2 = await responseAd2.json();
-    adImg2.value = resultAd2.data[0];
-})
-//3.广告 end ---------------------------------------->
+//2.获得路由id end ---------------------------------------->
 
 //4.页面数据 start ---------------------------------------->
-const pageData = ref([
-    //示例:
-    // {
-    //     id: 1, 
-    //     title: "", //该导航的标题
-    //     data: [], //数据1
-    //     data1: [], //数据2
-    //     data2: [], //数据3
-    //     data3: [], //数据4
-    //     data4: [], //数据5
-    //     category_id1: "",  //子导航id1
-    //     category_id2: "", 
-    //     category_id3: "",
-    //     category_id4: "",
-    //     title1: "", //子导航标题1
-    //     title2: "",
-    //     title3: "",
-    //     title4: "",
-    //     cid: "" //该导航的id
-    // },
-])
-
-//4.1 获取所有导航
-try {
-    const navigateData = await requestDataPromise('/web/getWebsiteModelCategory', {
-        method: 'GET',
-        query: {
-            'placeid': 1,
-            'pid': routeId,
-            'num': 16
-        },
-    });
-    if (navigateData.code == 200) {
-        // 遍历可用的导航池放到页面中
-        for (let index in navigateData.data) {
-            let data = {
-                title: navigateData.data[index].name,
-                cid: navigateData.data[index].category_id,
-                children_count: navigateData.data[index].children_count,
-                alias: navigateData.data[index].alias,
-                aLIas_pinyin: targetSegment + "/" + navigateData.data[index].aLIas_pinyin,
-                data: [],
-                data1: [],
-                data2: [],
-                data3: [],
-                data4: [],
-                category_id1: "",
-                category_id2: "",
-                category_id3: "",
-                category_id4: "",
-                title1: "",
-                title2: "",
-                title3: "",
-                title4: ""
-            };
-            if (navigateData.data[index].is_url == 1) {
-                // 处理 URL 的逻辑
-            } else {
-                //每个页面最多8个模块
-                pageData.value.push(data);
-            }
-        }
-        //导航池加载完毕,开始申请模块数据
-        let getJson = [
-            // { "parent": routeId + ",0,0", "child": pageData.value[0].cid + ",5,7" },//模块1理论前沿
-            // { "parent": routeId + ",0,0", "child": pageData.value[1].cid + ",3,11" },//模块2典型经验
-            // { "parent": routeId + ",0,0", "child": pageData.value[2].cid + ",4,2" },//模块3农业天地
-            // { "parent": routeId + ",0,0", "child": pageData.value[3].cid + ",3,10" },//模块4美丽乡村
-            // { "parent": routeId + ",0,0", "child": pageData.value[4].cid + ",3,10" },//模块5农民之家
-            // { "parent": routeId + ",0,0", "child": pageData.value[5].cid + ",0,7" },//模块6农业天地
-            // { "parent": routeId + ",0,0", "child": pageData.value[6].cid + ",2,3" },//模块7农村建设
-            // { "parent": routeId + ",0,0", "child": pageData.value[7].cid + ",4,0" },//模块8高端资讯
-        ]
-        for (let index in pageData.value) {
-            // console.log("index", index)
-            if (index == 0) {
-                getJson.push({ "parent": routeId + ",0,0", "child": pageData.value[index].cid + ",5,7" })//模块1理论前沿
-            } else if (index == 1) {
-                getJson.push({ "parent": routeId + ",0,0", "child": pageData.value[index].cid + ",3,11" })//模块2典型经验
-            } else if (index == 2) {
-                getJson.push({ "parent": routeId + ",0,0", "child": pageData.value[index].cid + ",4,2" })//模块3农业天地
-            } else if (index == 3) {
-                getJson.push({ "parent": routeId + ",0,0", "child": pageData.value[index].cid + ",3,10" })//模块4美丽乡村
-            } else if (index == 4) {
-                getJson.push({ "parent": routeId + ",0,0", "child": pageData.value[index].cid + ",3,10" })//模块5农民之家 
-            } else if (index == 5) {
-                getJson.push({ "parent": routeId + ",0,0", "child": pageData.value[index].cid + ",0,9" })//模块6农业天地 
-            } else if (index == 6) {
-                getJson.push({ "parent": routeId + ",0,0", "child": pageData.value[index].cid + ",2,3" })//模块7农村建设 
-            } else if (index == 7) {
-                getJson.push({ "parent": routeId + ",0,0", "child": pageData.value[index].cid + ",4,0" })//模块8高端资讯 
-            }
-        }
-        let jsonString = JSON.stringify(getJson);
-        getPageAllData(jsonString);
-
-        //频道页特殊数据
-        let getJson1 = []
-        for (let index in pageData.value) {
-            // console.log("index", index)
-            if (index == 1) {
-                getJson1.push({ "parent": pageData.value[index].cid + ",0,11" })//模块2典型经验
-            } else if (index == 3) {
-                getJson1.push({ "parent": pageData.value[index].cid + ",3,10" })//模块4美丽乡村
-            } else if (index == 4) {
-                getJson1.push({ "parent": pageData.value[index].cid + ",3,10" })//模块5农民之家 
-            }
-        }
-        let jsonString1 = JSON.stringify(getJson1);
-        getPageAllData1(jsonString1);
-
-    } else {
-        console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
-        console.log("错误位置:分类页导航池")
-        console.log("后端错误反馈:", navigateData.message)
-        console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
-    }
-} catch (error) {
-    console.log("错误:导航池渲染执行接口出错!请检查频道页渲染的模块数据是否完整!")
-}
-
-
-async function getPageAllData(jsonString) {
-    const mkdata = await requestDataPromise('/web/getWebsiteAllArticle', {
-        method: 'GET',
-        query: {
-            'id': jsonString
-        },
-    });
-    console.log('模块数据:', mkdata);
-
-
-    if (mkdata.code == 200) {
-        //模块1
-        pageData.value[0].data = mkdata.data[0].child.imgnum;
-        pageData.value[0].data2 = mkdata.data[0].child.textnum;
-        //模块2
-        for (let index in mkdata.data[1].child.imgnum) {
-            if (index == 0) {
-                pageData.value[1].data.push(mkdata.data[1].child.imgnum[index]);
-            } else {
-                pageData.value[1].data2.push(mkdata.data[1].child.imgnum[index]);
-            }
-        }
-        // pageData.value[1].data3 = mkdata.data[1].child.textnum;
-        //模块3
-        for (let index in mkdata.data[2].child.imgnum) {
-            if (index <= 1) {
-                pageData.value[2].data.push(mkdata.data[2].child.imgnum[index]);
-            } else {
-                pageData.value[2].data2.push(mkdata.data[2].child.imgnum[index]);
-            }
-        }
-        pageData.value[2].data3 = mkdata.data[2].child.textnum;
-        //模块4
-        // pageData.value[3].data = mkdata.data[3].child.textnum;
-        // pageData.value[3].data2 = mkdata.data[3].child.imgnum;
-        // //模块5
-        // pageData.value[4].data = mkdata.data[4].child.textnum;
-        // pageData.value[4].data2 = mkdata.data[4].child.imgnum;
-        //模块6
-        pageData.value[5].data = mkdata.data[5].child.textnum;
-
-    } else {
-        ElMessage.error(mkdata.message)
-    }
-}
-
-
-//频道页特殊数据
-async function getPageAllData1(jsonString1) {
-    const mkdata = await requestDataPromise('/web/getWebsiteArticles', {
-        method: 'GET',
-        query: {
-            'id': jsonString1
-        },
-    });
-    console.log('模块数据111:', mkdata);
-
-
-    if (mkdata.code == 200) {
-        //模块2
-        pageData.value[1].data3 = mkdata.data[0].textnum;
-        //模块4
-        pageData.value[3].data = mkdata.data[1].textnum;
-        pageData.value[3].data2 = mkdata.data[1].imgnum;
-        //模块5
-        pageData.value[4].data = mkdata.data[2].textnum;
-        pageData.value[4].data2 = mkdata.data[2].imgnum;
-
-    } else {
-        ElMessage.error(mkdata.message)
-    }
-}
 //4.页面数据 end ---------------------------------------->
 
 //5.设置seo信息 start---------------------------------------->

+ 12 - 47
pages/[dir]/list-[id].vue

@@ -3,60 +3,25 @@
         <!-- 页面头部 -->
         <HomePageHead></HomePageHead>
         <!-- 导航栏 -->
-        <HomePageNavigation1></HomePageNavigation1>
+        <HomePageNavigation></HomePageNavigation>
         <!-- 列表页广告一 -->
         <HomeTopTen :imgurl="adImg1" v-if="adImg1"></HomeTopTen>
-        <!-- 二级标题-->
-        <HomeListSecondaryHeading v-if="parent_name != ''" :name="parent_name" :nav="secondNav" :pinyin="parent_pinyin">
-        </HomeListSecondaryHeading>
-        <!-- 资讯列表 -->
-        <div class="newsList">
-            <div class="inner">
-                <div class="innerLeft">
-                    <!-- 面包屑导航 -->
-                    <div class="breadcrumb">
-                        <div class="inner">
-                            <span class="location">当前位置:</span>
-                            <el-breadcrumb :separator-icon="ArrowRight">
-                                <el-breadcrumb-item>
-                                    <NuxtLink to="/">首页</NuxtLink>
-                                </el-breadcrumb-item>
-                                <el-breadcrumb-item v-if="parent_name != ''">
-                                    <NuxtLink :to="`/${parent_pinyin}/index.html`"> {{ parent_name }}</NuxtLink>
-                                </el-breadcrumb-item>
-                                <el-breadcrumb-item>{{ name }}</el-breadcrumb-item>
-                            </el-breadcrumb>
-                        </div>
-                    </div>
-                    <ul class="list">
-                        <li v-for="(item, index) in newsList" :key="index">
-                            <NuxtLink :href="getLinkPathDetail(item)" :title="item.alias">
-                                <span class="listTitle">{{ item.title }}</span>
-                                <span class="time">{{ getTime(item.updated_at, 'month', 1) }}</span>
-                            </NuxtLink>
-                        </li>
-                    </ul>
-                    <!-- 分页器 -->
-                    <div class="pagination" v-if="total > 0">
-                        <el-pagination size="small" background layout="prev, pager, next" :total="total" class="mt-4"
-                            :page-size="pageSize" :current-page="pageNum" prev-text="上一页" next-text="下一页"
-                            @current-change="changePage" />
-                    </div>
-                </div>
-                <div class="innerRight">
-                    <DetailHotNews></DetailHotNews>
-                    <DetailHotNews2></DetailHotNews2>
-                </div>
-            </div>
-        </div>
-        <!-- 列表页广告二 -->
-        <HomeTopTen :imgurl="adImg2" v-if="adImg2"></HomeTopTen>
+        <div>当前皮肤:{{ skinId }}</div>
+        <div><br/><br/><br/></div>
+        
         <!-- 页面底部 -->
-        <HomeFoot1></HomeFoot1>
+        <HomeFoot></HomeFoot>
     </div>
 </template>
 
 <script setup>
+//获得皮肤id
+import { useTemplateBaseStore } from '@/stores/templateBase'
+const templateBaseStore = useTemplateBaseStore()
+const skinId = ref("")//皮肤id
+skinId.value = templateBaseStore.webSiteInfo.website_foot.foot_info.template_id;
+
+
 //1.页面必备依赖 start ---------------------------------------->
 import { ElBreadcrumb, ElBreadcrumbItem, ElPagination } from 'element-plus';
 import { ArrowRight } from '@element-plus/icons-vue';

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

@@ -60,7 +60,7 @@
     <!-- 广告二 -->
     <HomeTopTen :imgurl="adImg2" v-if="adImg2"></HomeTopTen>
     <!-- 页面底部 -->
-    <HomeFoot1></HomeFoot1>
+    <HomeFoot></HomeFoot>
 </template>
 
 <script setup>

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

@@ -60,7 +60,7 @@
     <!-- 广告二 -->
     <HomeTopTen :imgurl="adImg2" v-if="adImg2"></HomeTopTen>
     <!-- 页面底部 -->
-    <HomeFoot1></HomeFoot1>
+    <HomeFoot></HomeFoot>
 </template>
 
 <script setup>

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

@@ -117,7 +117,7 @@
         <!-- 列表页广告二 -->
         <HomeTopTen :imgurl="adImg2" v-if="adImg2"></HomeTopTen>
         <!-- 页面底部 -->
-        <HomeFoot1></HomeFoot1>
+        <HomeFoot></HomeFoot>
     </div>
 </template>
 

+ 1 - 1
pages/advertising/adDetail.vue

@@ -83,7 +83,7 @@
 
         </div>
         <!-- 广告页面底部 -->
-        <HomeFoot1></HomeFoot1>
+        <HomeFoot></HomeFoot>
     </div>
 </template>
 

+ 1 - 1
pages/advertising/index.vue

@@ -170,7 +170,7 @@
             </div>
         </div>
         <!-- 广告页面底部 -->
-        <HomeFoot1></HomeFoot1>
+        <HomeFoot></HomeFoot>
 
     </div>
 </template>

+ 16 - 307
pages/index.vue

@@ -2,6 +2,7 @@
     <div>
         <HomePageHead></HomePageHead>
         <HomePageNavigation></HomePageNavigation>
+        <div>当前皮肤:{{ skinId }}</div>
         <HomeAdvertising :imgurl="adImg1"></HomeAdvertising>
         <!--头条-->
         <!-- <HomePageMessage></HomePageMessage> -->
@@ -432,13 +433,13 @@
 </template>
 
 <script setup>
-//1.加载页面必备组件 start---------------------------------------->
-//1.1 pinia
+//0.pinia单基本信息 start---------------------------------------->
+//0.1获得pinia源
 import { useTemplateBaseStore } from '@/stores/templateBase'
 const templateBaseStore = useTemplateBaseStore()
-
-const adKey = ref('')
-//6.获得站点基本信息 start---------------------------------------->
+//0.2获得该页的皮肤id - 在每个组件中也是同样的获得方法
+const skinId = ref("")
+//0.3获得站点基本信息
 let getTemplateBaseInfo = async () => {
     const responseStatus = await requestDataPromise('/web/getWebsiteAllinfo', {
         method: 'GET',
@@ -450,12 +451,11 @@ let getTemplateBaseInfo = async () => {
     });
     if (responseStatus.code == 200) {
         templateBaseStore.setWebSiteInfo(responseStatus.data)
-        console.log()
+        skinId.value = templateBaseStore.webSiteInfo.website_foot.foot_info.template_id;
     }
 }
 getTemplateBaseInfo();
-
-//获得广告网站广告池
+//0.4获得广告池
 let getAdList = async (adKey) => {
     const responseStatus = await requestDataPromise('/web/getWebsiteAdvertisement', {
         method: 'GET',
@@ -466,312 +466,23 @@ let getAdList = async (adKey) => {
     if (responseStatus.code == 200) {
         //console.log(responseStatus.data)
         templateBaseStore.setAdList(responseStatus.data)
+        //获取广告
+        //adImg.value = requestAd(templateBaseStore.webAdList,templateBaseStore.webSiteInfo.website_head.ad_key + "_" + "top")
     }
 }
 getAdList();
+//0.5设置seo信息
+
 
-//6.获得站点基本信息 end---------------------------------------->
+//0.pinia单基本信息 end---------------------------------------->
 
-//1.2 vue
+//1.加载页面必备组件 start---------------------------------------->
 import { ref, onMounted } from 'vue';
 import { ElMessage } from 'element-plus';
 //1.加载页面必备组件 end---------------------------------------->
 
-//2.选项卡 start---------------------------------------->
-const hoverStatus = ref(1)
-const qhPic = function (num) {
-    hoverStatus.value = num;
-}
-//2.选项卡 end---------------------------------------->
-
-//3.广告 start---------------------------------------->
-//获得所有广告
-let adImg1 = ref({})
-let adImg2 = ref({})
-let adImg3 = ref({})
-let adImg4 = ref({})
-
-onMounted(async () => {
-    //从客户端获取行政职能部门 加快打开速度//从客户端获取行政职能部门 加快打开速度
-    const { $webUrl, $CwebUrl } = useNuxtApp();
-
-    //从客户端启动广告
-    //广告1
-    let url = `${$webUrl}/web/getWebsiteAdvertisement?ad_tag=nmw_index_0001`
-    const responseAd1 = await fetch(url, {
-        headers: {
-            'Content-Type': 'application/json',
-            'Userurl': $CwebUrl,
-            'Origin': $CwebUrl
-        }
-    });
-    const resultAd1 = await responseAd1.json();
-    adImg1.value = resultAd1.data[0];
-
-    //广告2
-    let url2 = `${$webUrl}/web/getWebsiteAdvertisement?ad_tag=nmw_index_0002`
-    const responseAd2 = await fetch(url2, {
-        headers: {
-            'Content-Type': 'application/json',
-            'Userurl': $CwebUrl,
-            'Origin': $CwebUrl
-        }
-    });
-    const resultAd2 = await responseAd2.json();
-    adImg2.value = resultAd2.data[0];
-
-    //广告3
-    let url3 = `${$webUrl}/web/getWebsiteAdvertisement?ad_tag=nmw_index_0003`
-    const responseAd3 = await fetch(url3, {
-        headers: {
-            'Content-Type': 'application/json',
-            'Userurl': $CwebUrl,
-            'Origin': $CwebUrl
-        }
-    });
-    const resultAd3 = await responseAd3.json();
-    adImg3.value = resultAd3.data[0];
-    //console.log('ad3', adImg3.value);
-
-
-    //广告4
-    let url4 = `${$webUrl}/web/getWebsiteAdvertisement?ad_tag=nmw_index_0004`
-    const responseAd4 = await fetch(url4, {
-        headers: {
-            'Content-Type': 'application/json',
-            'Userurl': $CwebUrl,
-            'Origin': $CwebUrl
-        }
-    });
-    const resultAd4 = await responseAd4.json();
-    adImg4.value = resultAd4.data[0];
-
-})
-//3.广告 end---------------------------------------->
-
-//4.页面数据 start---------------------------------------->
-//4.1导航
-const pageData = ref([
-    //示例 { cid: "", title: "", data: [] ,children_count:""},
-]);
-//4.2 模块数据
-//模块1
-const boxData1 = ref([])
-const boxData1data2 = ref([])
-const boxData1data3 = ref([])
-const boxData1data4 = ref([])
-//模块2
-const boxData2 = ref([]);
-const boxData2data2 = ref([]);
-//模块3 
-const boxData3 = ref([]);
-const boxData3data2 = ref([]);
-//模块4
-const boxData4 = ref([]);
-const boxData4data2 = ref([]);
-//模块5
-const boxData5 = ref([]);
-//模块6
-const boxData6 = ref([]);
-const boxData6data2 = ref([]);
-const boxData6data3 = ref([]);
-const boxData6data4 = ref([]);
-//模块7
-const boxData7 = ref([]);
-const boxData7data2 = ref([]);
-const boxData7data3 = ref([]);
-const boxData7data4 = ref([]);
-//模块8
-const boxData8 = ref([]);
-const boxData8data2 = ref([]);
-//模块9
-const boxData9 = ref([]);
-const boxData9data2 = ref([]);
-//模块10 
-const boxData10 = ref([]);
-const boxData10data2 = ref([]);
-
-const { $pageNav } = useNuxtApp();
-
-//4.3获得导航数据
-try {
-    const navigateData = await requestDataPromise('/web/getWebsiteModelCategory', {
-        method: 'GET',
-        query: {
-            'placeid': 1,
-            'pid': 0,
-            'num': 30
-        },
-    });
-    if (navigateData.code == 200) {
-        // 遍历可用的导航池放到页面中
-        for (let index in navigateData.data) {
-            let data = {
-                title: navigateData.data[index].name,
-                cid: navigateData.data[index].category_id,
-                children_count: navigateData.data[index].children_count,
-                alias: navigateData.data[index].alias,
-                aLIas_pinyin: navigateData.data[index].aLIas_pinyin
-            };
-            //渲染标题
-            //1 农业生产372
-            if (navigateData.data[index].category_id == $pageNav[0]) { pageData.value[0] = data }
-            //2 三农资讯445 499
-            if (navigateData.data[index].category_id == $pageNav[1]) { pageData.value[1] = data }
-            //3 市场行情377
-            if (navigateData.data[index].category_id == $pageNav[2]) { pageData.value[2] = data }
-            //4 商贸信息375
-            if (navigateData.data[index].category_id == $pageNav[3]) { pageData.value[3] = data }
-            //5 农民生活373
-            if (navigateData.data[index].category_id == $pageNav[4]) { pageData.value[4] = data }
-            //6 法治天地432
-            if (navigateData.data[index].category_id == $pageNav[5]) { pageData.value[5] = data }
-            //7 招商引资431
-            if (navigateData.data[index].category_id == $pageNav[6]) { pageData.value[6] = data }
-            //8 农知农技374
-            if (navigateData.data[index].category_id == $pageNav[7]) { pageData.value[7] = data }
-            //9 农民合作社433
-            if (navigateData.data[index].category_id == $pageNav[8]) { pageData.value[8] = data }
-            //10 新农村11
-            if (navigateData.data[index].category_id == $pageNav[9]) { pageData.value[9] = data }
-        }
-    } else {
-        //console.log("获取导航池出错!", navigateData.message)
-    }
-} catch (error) {
-    //console.log("错误:导航池渲染执行接口出错!请检查首页的14的模块的具体执行方法!")
-}
-
-let getJson = [
-    { "parent": $pageNav[0] + ",2,12", "child": "" },//模块1 农业生产372
-    { "parent": $pageNav[1] + ",1,4", "child": "" },//模块2 三农资讯328
-    { "parent": $pageNav[2] + ",1,4", "child": "" },//模块3 市场行情377
-    { "parent": $pageNav[3] + ",1,10", "child": "" },//模块4 商贸信息375
-    { "parent": $pageNav[4] + ",1,8", "child": "" },//模块5 农民生活373
-    { "parent": $pageNav[5] + ",3,11", "child": "" },//模块6 法治天地432
-    { "parent": $pageNav[6] + ",4,4", "child": "" },//模块7 招商引资431
-    { "parent": $pageNav[7] + ",1,5", "child": "" },//模块8 农知农技374
-    { "parent": $pageNav[8] + ",1,5", "child": "" },//模块9 农民合作社433
-    { "parent": $pageNav[9] + ",1,5", "child": "" },//模块10 新农村11 748
-]
-
-let jsonString = JSON.stringify(getJson);
-
-async function getPageAllData() {
-    const mkdata = await requestDataPromise('/web/getWebsiteAllArticle', {
-        method: 'GET',
-        query: {
-            'id': jsonString
-        },
-    });
-    //console.log('mkdata', mkdata)
-
-    if (mkdata.code == 200) {
-        //模块1
-        boxData1.value = mkdata.data[0].imgnum;
-        mkdata.data[0].textnum.forEach((item, index) => {
-            if (index < 4) {
-                boxData1data2.value.push(item);
-            } else if (index < 8) {
-                boxData1data3.value.push(item);
-            } else if (index < 12) {
-                boxData1data4.value.push(item);
-            }
-        });
-        //模块2
-        boxData2.value = mkdata.data[1].imgnum;
-        boxData2data2.value = mkdata.data[1].textnum;
-        //模块3
-        boxData3.value = mkdata.data[2].imgnum;
-        boxData3data2.value = mkdata.data[2].textnum;
-        //模块4
-        // boxData4.value = mkdata.data[3].textnum;
-        // boxData4data2.value = mkdata.data[3].imgnum;
-        //模块5
-        boxData5.value = mkdata.data[4].textnum;
-        //模块6
-        mkdata.data[5].imgnum.forEach((item, index) => {
-            if (index < 1) {
-                boxData6.value.push(item);
-            } else {
-                boxData6data2.value.push(item);
-            }
-        });
-        // mkdata.data[5].textnum.forEach((item, index) => {
-        //     if (index < 6) {
-        //         boxData6data3.value.push(item);
-        //     } else {
-        //         boxData6data4.value.push(item);
-        //     }
-        // })
-        //模块7
-        mkdata.data[6].imgnum.forEach((item, index) => {
-            if (index < 2) {
-                boxData7.value.push(item);
-            } else {
-                boxData7data2.value.push(item);
-            }
-        });
-        mkdata.data[6].textnum.forEach((item, index) => {
-            if (index < 2) {
-                boxData7data3.value.push(item);
-            } else {
-                boxData7data4.value.push(item);
-            }
-        });
-        //模块8
-        boxData8.value = mkdata.data[7].imgnum;
-        // boxData8data2.value = mkdata.data[7].textnum;
-        //模块9
-        boxData9.value = mkdata.data[8].imgnum;
-        boxData9data2.value = mkdata.data[8].textnum;
-        //模块10
-        boxData10.value = mkdata.data[9].imgnum;
-        boxData10data2.value = mkdata.data[9].textnum;
-    } else {
-        ElMessage.error(mkdata.message)
-    }
-}
-getPageAllData();
-
-//获取模块下的特殊数据
-let getJson1 = [
-    { "parent": $pageNav[3] + ",1,10" },//模块4 商贸信息375
-    { "parent": $pageNav[5] + ",0,10" },//模块6 法治天地432
-    { "parent": $pageNav[7] + ",0,5" },//模块8 农知农技374
-]
-let jsonString1 = JSON.stringify(getJson1);
-//获取模块下的特殊数据
-async function getPageData() {
-    const mkdata = await requestDataPromise('/web/getWebsiteArticles', {
-        method: 'GET',
-        query: {
-            'id': jsonString1
-        },
-    });
-    //console.log("成功获取模块数据2222!", mkdata);
-    if (mkdata.code == 200) {
-        // console.log("成功获取模块数据2222!", mkdata);
-
-        //模块4商贸信息375
-        boxData4.value = mkdata.data[0].textnum;
-        boxData4data2.value = mkdata.data[0].imgnum;
-        //模块6法治天地426
-        mkdata.data[1].textnum.forEach((item, index) => {
-            if (index < 6) {
-                boxData6data3.value.push(item);
-            } else {
-                boxData6data4.value.push(item);
-            }
-        });
-        //模块8农知农技374
-        boxData8data2.value = mkdata.data[2].textnum;
-    }
-
-}
-getPageData();
-
-//4.页面数据 end---------------------------------------->
+//2.页面数据 start---------------------------------------->
+//2.页面数据 end---------------------------------------->
 
 //5.设置seo数据 start---------------------------------------->
 //获取seo数据
@@ -797,8 +508,6 @@ if (setData.code == 200) {
     //console.log("设置首页SEO出错!", setData.message)
 }
 //5.设置seo数据 start---------------------------------------->
-
-
 </script>
 
 <style lang="less" scoped>

+ 1 - 1
pages/search/[id].vue

@@ -53,7 +53,7 @@
         <!-- 列表页广告二 -->
         <HomeTopTen :imgurl="adImg2" v-if="adImg2"></HomeTopTen>
         <!-- 页面底部 -->
-        <HomeFoot1></HomeFoot1>
+        <HomeFoot></HomeFoot>
     </div>
 </template>
 

+ 1 - 1
pages/topic/[id].vue

@@ -90,7 +90,7 @@
             </div>
         </div>
         <!-- 页面底部 -->
-        <HomeFoot1></HomeFoot1>
+        <HomeFoot></HomeFoot>
 
     </div>
 </template>

+ 1 - 1
pages/topic/index.vue

@@ -87,7 +87,7 @@
             </div>
         </div>
         <!-- 页面底部 -->
-        <HomeFoot1></HomeFoot1>
+        <HomeFoot></HomeFoot>
 
     </div>
 </template>