فهرست منبع

增加登录查询功能

增加登录查询功能
dangyunlong 1 ماه پیش
والد
کامیت
d7be6e9b90

+ 1 - 1
.nuxt/manifest/latest.json

@@ -1 +1 @@
-{"id":"dev","timestamp":1742436700227}
+{"id":"dev","timestamp":1742461550645}

+ 0 - 1
.nuxt/manifest/meta/62612851-3c33-4e00-81f9-650b36086538.json

@@ -1 +0,0 @@
-{"id":"62612851-3c33-4e00-81f9-650b36086538","timestamp":1742436289904,"matcher":{"static":{},"wildcard":{},"dynamic":{}},"prerendered":[]}

+ 1 - 0
.nuxt/manifest/meta/cff9a3f4-8b55-485a-8aed-a85bd64bda79.json

@@ -0,0 +1 @@
+{"id":"cff9a3f4-8b55-485a-8aed-a85bd64bda79","timestamp":1742460780220,"matcher":{"static":{},"wildcard":{},"dynamic":{}},"prerendered":[]}

+ 1 - 1
.nuxt/manifest/meta/dev.json

@@ -1 +1 @@
-{"id":"dev","timestamp":1742436700227,"matcher":{"static":{},"wildcard":{},"dynamic":{}},"prerendered":[]}
+{"id":"dev","timestamp":1742461550645,"matcher":{"static":{},"wildcard":{},"dynamic":{}},"prerendered":[]}

+ 3 - 3
.nuxt/nitro.json

@@ -1,5 +1,5 @@
 {
-  "date": "2025-03-20T02:11:44.237Z",
+  "date": "2025-03-20T09:05:57.843Z",
   "preset": "nitro-dev",
   "framework": {
     "name": "nuxt",
@@ -9,9 +9,9 @@
     "nitro": "2.10.4"
   },
   "dev": {
-    "pid": 18096,
+    "pid": 12824,
     "workerAddress": {
-      "socketPath": "\\\\.\\pipe\\nitro\\worker-18096-1.sock"
+      "socketPath": "\\\\.\\pipe\\nitro\\worker-12824-1.sock"
     }
   }
 }

+ 1 - 1
.nuxt/nuxt.d.ts

@@ -1,6 +1,6 @@
 // Generated by nuxi
-/// <reference types="@nuxt/devtools" />
 /// <reference types="@nuxt/telemetry" />
+/// <reference types="@nuxt/devtools" />
 /// <reference path="types/builder-env.d.ts" />
 /// <reference types="nuxt" />
 /// <reference path="types/app-defaults.d.ts" />

+ 0 - 1
components/home/Advertising.vue

@@ -1,5 +1,4 @@
 <template>
-    <!-- 广告位 -->
     <div class="adversing" v-if="imgurl">
         <div class="inner">
             <a href="http://nzgxw.org.cn/" v-if="imgurl.image_url==null" target="_blank">

+ 0 - 1
components/home/Banner1.vue

@@ -1,5 +1,4 @@
 <template>
-    <!-- 第一个广告位 -->
     <div id="banner1">
         <div class="inner">
             <img src="http://img.bjzxtw.org.cn/master/bjzxtw/public/image/banner1.png" alt="三农资讯网广告位">

+ 0 - 2
components/home/BigSwiper.vue

@@ -1,5 +1,4 @@
 <template>
-    <!-- 首页大的轮播图 -->
     <div class="swiper" v-if="imagelist">
         <el-carousel :interval="5000" arrow="always" height="405px" indicator-class="custom-indicator"
             class="custom-carousel" @change="handleIndicatorChange">
@@ -15,7 +14,6 @@
             </template>
         </el-carousel>
     </div>
-
 </template>
 
 <script setup>

+ 0 - 1
components/home/BigTitle_List.vue

@@ -1,5 +1,4 @@
 <template>
-    <!-- 首页头条下面的新闻列表 -->
     <div class="list">
         <div class="inner">
             <ul>

+ 0 - 24
components/home/MoreService.vue

@@ -1,28 +1,4 @@
 <template>
-    <!-- 首页更多服务 -->
-    <!-- <div class="moreServices">
-        <div class="inner">
-            <div class="title">
-                <h1>更多服务</h1>
-                <p> More services</p>
-            </div>
-            <ul class="serviceList">
-                <li v-for="(item, index) in arr" :key="index">
-                    <img class="left" :src="item.leftImg">
-                    <div class="left detail">
-                        <img :src="item.titleTopImg" alt="">
-                        <h3>{{ item.title }}</h3>
-                        <p>
-                            <NuxtLink :to="item.url" target="_blank">
-                                查看详情
-                                <span class="iconfont icon-youjiantou"></span>
-                            </NuxtLink>
-                        </p>
-                    </div>
-                </li>
-            </ul> 
-        </div>
-    </div>-->
     <div class="moreServiceBox">
         <div class="listBox">
             <NuxtLink to="http://dy.qgsnfzzx.org.cn/list-hyfw.html" title="人员查询">

+ 0 - 7
components/home/PageMessage.vue

@@ -1,13 +1,9 @@
-<!-- 资讯 -->
 <template>
     <div class="message">
         <div class="inner">
-            <!-- 大标题 -->
             <div class="bigTitle">
                 <div class="inner" v-for="(item, index) in headlinelist" :key="index">
                     <img src="http://img.bjzxtw.org.cn/master/bjzxtw/public/head/mainTitleicon.png" alt="" class="left">
-                    <!-- <h1 class="left">{{ item.title }}</h1> -->
-                    <!-- <a>{{ item.title }}</a> -->
                     <NuxtLink :to="item.linkurl" v-if="item.islink==1" :title="item.title">
                         <h1 class="left">{{ item.title }}</h1>
                     </NuxtLink>
@@ -16,14 +12,11 @@
                     </NuxtLink>
                 </div>
             </div>
-            <!-- 大标题下的列表 -->
             <HomeBigTitleList></HomeBigTitleList>
             <div class="messageLeft">
-                <!-- 轮播图 -->
                 <HomeBigSwiper></HomeBigSwiper>
             </div>
             <div class="messageRight">
-                <!-- 列表 -->
                 <div class="hotTop">
                     <h3>今日热点</h3>
                     <ul>

+ 0 - 4
components/home/Slider.vue

@@ -28,7 +28,6 @@
                             <img :src="boxData1[0].imgurl" :alt="boxData1[0].title">
                             <div>
                                 <p><span>专题</span>{{ boxData1[0].title }}</p>
-                                <!-- <span>{{getTime(boxData1[0].updated_at,'month',1)}}</span> -->
                             </div>
                         </NuxtLink>
                     </div>
@@ -37,14 +36,12 @@
                             <img :src="boxData1[1].imgurl" :alt="boxData1[1].title">
                             <div>
                                 <p>{{boxData1[1].title}}</p>
-                                <!-- <span>{{getTime(boxData1[1].updated_at,'month',1)}}</span> -->
                             </div>
                         </NuxtLink>
                         <NuxtLink :to="`/newsDetail/${boxData1[2].id}`" class="imgbg" :title="boxData1[2].title">
                             <img :src="boxData1[2].imgurl" :alt="boxData1[2].title">
                             <div>
                                 <p>{{boxData1[2].title}}</p>
-                                <!-- <span>{{getTime(boxData1[2].updated_at,'month',1)}}</span> -->
                             </div>
                         </NuxtLink>
                     </div>
@@ -53,7 +50,6 @@
                             <img :src="boxData1[3].imgurl" :alt="boxData1[3].title">
                             <div>
                                 <p>{{boxData1[3].title}}</p>
-                                <!-- <span>{{getTime(boxData1[3].updated_at,'month',1)}}</span> -->
                             </div>
                         </NuxtLink>
                     </div>

+ 0 - 1
components/home/bigTitle.vue

@@ -1,5 +1,4 @@
 <template>
-    <!-- 首页头条 -->
     <div class="bigTitle">
         <div class="inner">
             <img src="../../static/images/Group 1550@2x.png" alt="" class="left">

+ 0 - 5
components/home/foot.vue

@@ -1,10 +1,5 @@
  <template>
     <footer class="index_foot">
-        <!-- <div class="index_foot_name_box">
-            <div class="index_foot_name">YOUQING</div>
-            <div class="index_foot_name">友情链接</div>
-            <div class="index_foot_name">LIANJIE</div>		
-        </div> -->
         <div class="foot_img_box"> 
             <a :href="item.url" v-for="(item, index) in bottomLink" :title="item.title" target="_blank">
                 <img :src="item.logo_url" :alt="item.title">

+ 0 - 2
components/home/foot1.vue

@@ -11,10 +11,8 @@
             </span>
         </div>
         <div class="foot_text_box" v-if="bottomBase">
-            <!-- <p>{{ bottomBase.statistics_onetext }} <a :href="'http://' + bottomBase.statistics_twourl">中农兴业</a> {{ bottomBase.statistics_twotext }}</p> -->
             <p>{{ bottomBase.statistics_onetext }} <a :href="bottomBase.record_number_url" title="中农兴业">中农兴业</a> {{ bottomBase.statistics_twotext }}</p>
             <p>{{ bottomBase.organizer }} <a :href="currentDomain" :title="webSiteName">{{ webSiteName }}</a>  {{ webSiteUrl }} 版权所有。</p>
-            <!-- <p><img :src="bottomBase.icp_number_img"><a :href="'http://' + bottomBase.statistics_twourl">{{ bottomBase.record_number }}</a> <a :href="'http://' + bottomBase.icp_number_url">{{ bottomBase.icp_number }}</a> </p> -->
             <p><a :href="bottomBase.record_number_url" title="ICP备案号">{{ bottomBase.record_number }}</a> &nbsp;&nbsp; <img src="http://snzxwt.org/images/beian.png"><a :href="bottomBase.icp_number_url" title="京公网安备案号">{{ bottomBase.icp_number }}</a> </p>
             <p>{{ bottomBase.email }}</p>
             <p>{{ bottomBase.company_address }}</p>

+ 72 - 24
components/home/pageHead.vue

@@ -63,7 +63,7 @@
 
 <script setup>
 //1.加载基本依赖 start ---------------------------------------->
-import { ref, watch } from 'vue'
+import { ref, watch, onMounted } from 'vue'
 import { ElDialog } from 'element-plus'
 import { getToken, setToken, removeToken } from '@/store/useCookieStore'
 import { setTicket, removeTicket } from '@/store/useticketStore'
@@ -157,29 +157,31 @@ let getUserInfo = async () => {
 getUserInfo();
 
 //获取登录状态
-let getLoginStatus = async () => {
-    //let url = $BwebUrl + '/auth/loginstatus.php' //王鹏
-    let url = $webUrl + '/api/loginStatus' //刘佳伟
-    const responseStatus =  await requestDataWebUrl( url, {
-        method: 'GET',
-        query: {
-            'token': tokenStatus
-        },
-    });
-    console.log('登录状态', responseStatus);
-    if(responseStatus.data.code == 200){
-        if(responseStatus.data.data.islogin == true){
-            showToken.value = true 
-        }else{
-            showToken.value = false
-            exit()
-        }
-    }else if(responseStatus.data.code == 0){
-        //退出登录
-        exit();
-    }
-}
-getLoginStatus();
+// let getLoginStatus = async () => {
+//     //let url = $BwebUrl + '/auth/loginstatus.php' //王鹏
+//     let url = $webUrl + '/api/loginStatus' //刘佳伟
+//     const responseStatus =  await requestDataWebUrl( url, {
+//         method: 'GET',
+//         query: {
+//             'token': tokenStatus
+//         },
+//     });
+//     console.log('登录状态', responseStatus);
+//     if(responseStatus.data.code == 200){
+//         if(responseStatus.data.data.islogin == true){
+//             showToken.value = true 
+//         }else{
+//             showToken.value = false
+//             exit()
+//         }
+//     }else if(responseStatus.data.code == 0){
+//         //退出登录
+//         exit();
+//     }
+// }
+// getLoginStatus();
+
+
 //2.登录逻辑 end ---------------------------------------->
 
 //3.跳转菜单逻辑 start ---------------------------------------->
@@ -278,6 +280,52 @@ async function getAdData(){
 }
 getAdData();
 //4.获取广告 end ---------------------------------------->
+
+
+//5.获取登录状态 start ---------------------------------------->
+onMounted(async () => {
+    //从客户端阶段开始 持续查询登录状态
+    let getLoginStatus = async () => {
+        const { $webUrl, $CwebUrl } = useNuxtApp();
+        //let url = $webUrl + '/api/loginStatus'
+        const queryParams = new URLSearchParams({
+            token: getToken()
+        });
+        let url = `${$webUrl}/api/loginStatus?${queryParams.toString()}`
+        
+        const responseStatus =  await fetch( url, {
+            method: 'GET',
+            headers: {
+                'Content-Type': 'application/json',
+                'Userurl': $CwebUrl,
+                //'token': getToken(),
+                'Origin': $CwebUrl
+            }
+        });
+        const result = await responseStatus.json();
+        console.log(result.data.islogin)
+        if(result.code == 200){
+            if(result.data.isLogin == true){
+                console.log("用户已经登录!");
+                showToken.value = true 
+            }else{
+                console.log("用户未登录!");
+                showToken.value = false
+                //退出登录
+                isShow.value = false;
+                removeToken();
+                removeTicket();
+            }
+        }else if(result.data.code == 0){
+            //退出登录
+            isShow.value = false;
+            removeToken();
+            removeTicket();
+        }
+    }
+    setInterval(getLoginStatus, 5000);
+})
+//5.获取登录状态 end ---------------------------------------->
 </script>
 
 <style lang="less" scoped>

+ 40 - 20
components/home/pageNavigation.vue

@@ -54,7 +54,7 @@
             <div class="inner">
                 <div class="role left">
                     <div class="title">行政职能查询</div>
-                    <div class="searchRole" v-if="department.length > 0">
+                    <div class="searchRole">
                         <el-select v-model="depValue" placeholder="职能部门" filterable size="large" style="width: 330px">
                             <el-option v-for="(item, index) in department" :key="index" :label="item.name" :value="item.id" />
                         </el-select>
@@ -114,27 +114,27 @@ getPageData2();
 //2.加载模块数据 end ---------------------------------------->
 
 //3.职能部门 start ---------------------------------------->
-let department = ref("安全")
+let department = ref("")
 const depValue = ref("")
 const typeValue = ref("")
-let departmentList = async () => {
-    const mkdata = await requestDataPromise('/web/selectWebsiteDepartment', {
-        method: 'GET',
-        query: {
-            'keyword': department.value,
-        },
-    });
-    if(mkdata.code == 200){
-        department.value = mkdata.data;
-    }else{
-        console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
-        console.log("错误位置:获取职能部门")
-        console.log("后端错误反馈:",mkdata.message)
-        console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
-    }
-}
-//获得所有部门
-departmentList();
+// let departmentList = async () => {
+//     const mkdata = await requestDataPromise('/web/selectWebsiteDepartment', {
+//         method: 'GET',
+//         query: {
+//             'keyword': department.value,
+//         },
+//     });
+//     if(mkdata.code == 200){
+//         department.value = mkdata.data;
+//     }else{
+//         console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
+//         console.log("错误位置:获取职能部门")
+//         console.log("后端错误反馈:",mkdata.message)
+//         console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
+//     }
+// }
+// //获得所有部门
+// departmentList();
 //3.职能部门 end ---------------------------------------->
 
 //4.展示行政区划 start ---------------------------------------->
@@ -242,6 +242,26 @@ let goToPrimary = async () => {
 }
 
 //5.执行搜索 end ---------------------------------------->
+
+
+onMounted(async ()  => {
+    //从客户端获取行政职能部门 加快打开速度
+    try {
+        const { $webUrl, $CwebUrl } = useNuxtApp();
+        const response = await fetch($webUrl + '/web/selectWebsiteDepartment', {
+            headers: {
+                'Content-Type': 'application/json',
+                'Userurl': $CwebUrl,
+                'Origin': $CwebUrl
+            }
+        });
+        const result = await response.json();
+        department.value = result.data;
+    } catch (error) {
+        console.error('获取部门数据失败:', error);
+    }
+})
+
 </script>
 
 <style lang="less" scoped>

+ 19 - 19
components/home/pageNavigation1.vue

@@ -82,27 +82,27 @@ getPageData2();
 //2.加载模块数据 end ---------------------------------------->
 
 //3.职能部门 start ---------------------------------------->
-let department = ref("安全")
+// let department = ref("")
 const depValue = ref("")
 const typeValue = ref("")
-let departmentList = async () => {
-    const mkdata = await requestDataPromise('/web/selectWebsiteDepartment', {
-        method: 'GET',
-        query: {
-            'keyword': department.value,
-        },
-    });
-    if(mkdata.code == 200){
-        department.value = mkdata.data;
-    }else{
-        console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
-        console.log("错误位置:获取职能部门")
-        console.log("后端错误反馈:",mkdata.message)
-        console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
-    }
-}
-//获得所有部门
-departmentList();
+// let departmentList = async () => {
+//     const mkdata = await requestDataPromise('/web/selectWebsiteDepartment', {
+//         method: 'GET',
+//         query: {
+//             'keyword': department.value,
+//         },
+//     });
+//     if(mkdata.code == 200){
+//         department.value = mkdata.data;
+//     }else{
+//         console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
+//         console.log("错误位置:获取职能部门")
+//         console.log("后端错误反馈:",mkdata.message)
+//         console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
+//     }
+// }
+// //获得所有部门
+// departmentList();
 //3.职能部门 end ---------------------------------------->
 
 //4.展示行政区划 start ---------------------------------------->

+ 0 - 1
components/home/sannongzixun.vue

@@ -1,5 +1,4 @@
 <template>
-    <!-- 三农资讯广告位 -->
     <div class="sannongzixun">
         <div class="inner">
             <img src="../../static/image/Group 1548.png" alt="">

+ 15 - 89
pages/index.vue

@@ -1,20 +1,10 @@
 <template>
     <div>
-        <!-- 页面头部 -->
         <HomePageHead></HomePageHead>
-        <!-- 页面导航 -->
         <HomePageNavigation></HomePageNavigation>
-        <!-- 资讯 -->
         <HomePageMessage></HomePageMessage>
-        <!-- 十强称号logo -->
         <HomeAdvertising :imgurl="adImg2" v-if="adImg2"></HomeAdvertising>
-        <!-- 更多服务 -->
         <HomeMoreService></HomeMoreService>
-        <!-- 板块标题 -->
-        <!-- <div class="titleBox" id="ztzx">
-            <img src="../public/index/theme1.png" alt="主题资讯">
-        </div> -->
-        <!-- 模块一 新农村 pagedata[0] -->
         <div class="farming" >
             <div class="inner">
                 <div class="farmerLeft" v-if="pageData.length>=1">
@@ -58,7 +48,6 @@
                         </ul>
                     </div>
                 </div>
-                <!-- 模块二 贴身宝贝 pagedata[1] -->
                 <div class="farmerRight" v-if="pageData.length>=2">
                     <div class="rich">
                         <h3 v-if="pageData[1].cid">
@@ -93,7 +82,6 @@
         <div class="scienceEducation">
             <div class="inner">
                 <div class="scienceLeft" v-if="pageData.length>=3">
-                    <!-- 模块三 政策法规 pagedata[2] -->
                     <HomeSlider :message="pageData[2]"></HomeSlider>
                 </div>
                 <div class="scienceRight" v-if="pageData.length>=4">
@@ -105,7 +93,6 @@
                             <img :src="adImg3.image_src">
                         </a>
                     </div>
-                    <!-- 模块四 三农之窗 pagedata[3] -->
                     <h3 v-if="pageData[3].cid">
                         <span>
                             <NuxtLink
@@ -138,7 +125,6 @@
             </div>
         </div>
         <HomeTopTen :imgurl="adImg4" v-if="adImg4"></HomeTopTen>
-        <!-- 模块五 区域经济 pagedata[4] -->
         <div class="layoutCopy">
             <div class="layoutCopyLeft">
                 <div class="layoutCopyLeftTop">
@@ -187,7 +173,6 @@
                             </NuxtLink>
                         </div>
                     </div>
-                    <!-- 模块五 三农投资 pagedata[5] -->
                     <div class="layoutCopyLeft2" v-if="pageData.length>=6">
                         <div class="layoutTitleBox" v-if="pageData[5]">
                             <div class="layoutTitle" v-if="pageData[5].cid">
@@ -203,10 +188,10 @@
                                 </NuxtLink>
                             </div>
                             <div class="layoutMore" v-if="pageData[5].cid">
-                                <NuxtLink :to="{ path: `/newsList/${pageData[5].cid}`, query: { catid: pageData[5].cid } }" v-if="pageData[5]&&pageData[5].children_count==0" :title="pageData[5].alias">
+                                <NuxtLink :to="{ path: `/newsList/${pageData[5].cid}`}" v-if="pageData[5]&&pageData[5].children_count==0" :title="pageData[5].alias">
                                     查看更多
                                 </NuxtLink>
-                                <NuxtLink :to="{ path: `/primaryNavigation/${pageData[5].cid}`, query: { catid: pageData[5].cid } }" v-else-if="pageData[5]&&pageData[5].children_count!=0" :title="pageData[5].alias">
+                                <NuxtLink :to="{ path: `/primaryNavigation/${pageData[5].cid}`}" v-else-if="pageData[5]&&pageData[5].children_count!=0" :title="pageData[5].alias">
                                     查看更多
                                 </NuxtLink>
                             </div>
@@ -214,11 +199,9 @@
                         <div class="layoutCopyData_style2">
                             <NuxtLink :to="item.linkurl" v-for="item in boxData6" v-show='item.islink==1' :title="item.title">
                                 <p class="title">{{ item.title }}</p>
-                                <!-- <p>{{getTime(item.updated_at,'month',1)}}</p> -->
                             </NuxtLink>
                             <NuxtLink :to="`/newsDetail/${item.id}`" v-for="item in boxData6" v-show='item.islink==0' :title="item.title">
                                 <p class="title">{{ item.title }}</p>
-                                <!-- <p>{{getTime(item.updated_at,'month',1)}}</p> -->
                             </NuxtLink>
                         </div>
                     </div>
@@ -239,12 +222,12 @@
                         </div>
                         <div class="layoutMore" v-if="pageData[6].cid">
                             <NuxtLink
-                                :to="{ path: `/newsList/${pageData[6].cid}`, query: { catid: pageData[6].cid } }"
+                                :to="{ path: `/newsList/${pageData[6].cid}`}"
                                 v-if="pageData[6]&&pageData[6].children_count==0" :title="pageData[6].alias">
                                 查看更多
                             </NuxtLink>
                             <NuxtLink
-                                :to="{ path: `/primaryNavigation/${pageData[6].cid}`, query: { catid: pageData[6].cid } }"
+                                :to="{ path: `/primaryNavigation/${pageData[6].cid}`}"
                                 v-else-if="pageData[6]&&pageData[6].children_count!=0" :title="pageData[6].alias">
                                 查看更多
                             </NuxtLink>
@@ -306,12 +289,12 @@
                     </div>
                     <div class="layoutMore" v-if="pageData[7].cid">
                         <NuxtLink
-                            :to="{ path: `/newsList/${pageData[7].cid}`, query: { catid: pageData[7].cid } }"
+                            :to="{ path: `/newsList/${pageData[7].cid}`}"
                             v-if="pageData[7]&&pageData[7].children_count==0" :title="pageData[7].alias">
                             查看更多
                         </NuxtLink>
                         <NuxtLink
-                            :to="{ path: `/primaryNavigation/${pageData[7].cid}`, query: { catid: pageData[7].cid } }"
+                            :to="{ path: `/primaryNavigation/${pageData[7].cid}`}"
                             v-else-if="pageData[7]&&pageData[7].children_count!=0" :title="pageData[7].alias">
                             查看更多
                         </NuxtLink>
@@ -341,12 +324,6 @@
                 </div>
             </div>
         </div>
-
-        
-        <!-- 板块标题 -->
-        <!-- <div class="titleBox" id="hdzx">
-            <img src="../public/index/theme2.png" alt="互动资讯">
-        </div> -->
         <div class="farming">
             <div class="inner">
                 <div class="farmerLeft">
@@ -380,8 +357,6 @@
                                 </span>
                             </div>
                         </h3>
-
-                        <!--模块9 start -->
                         <ul class="mode1ul_style1" v-if="tabsData1==1">
                             <li v-for="(item,index) in boxData9" class="imgbg">
                                 <NuxtLink :to="item.linkurl" v-if="item.islink==1" :title="item.title">
@@ -418,9 +393,6 @@
                                 </NuxtLink>
                             </li>
                         </ul>
-                        <!--模块9 end -->
-
-                        <!--模块10 start -->
                         <ul class="mode1ul_style1" v-if="tabsData1==2">
                             <li v-for="(item,index) in boxData10" class="imgbg">
                                 <NuxtLink :to="item.linkurl" v-if="item.islink==1" :title="item.title">
@@ -457,9 +429,6 @@
                                 </NuxtLink>
                             </li>
                         </ul>
-                        <!--模块10 end -->
-
-
                     </div>
                 </div>
                 <div class="farmerRight">
@@ -478,12 +447,12 @@
                                 </NuxtLink>
                             </span>
                             <NuxtLink
-                                :to="{ path: `/newsList/${pageData[10].cid}`, query: { catid: pageData[1].cid } }"
+                                :to="{ path: `/newsList/${pageData[10].cid}`}"
                                 v-if="pageData[10]&&pageData[10].children_count==0" :title="pageData[10].alias">
                                 查看更多
                             </NuxtLink>
                             <NuxtLink
-                                :to="{ path: `/primaryNavigation/${pageData[10].cid}`, query: { catid: pageData[1].cid } }"
+                                :to="{ path: `/primaryNavigation/${pageData[10].cid}`}"
                                 v-else-if="pageData[10]&&pageData[10].children_count!=0" :title="pageData[10].alias">
                                 查看更多
                             </NuxtLink>
@@ -554,8 +523,6 @@
                 </div>
             </div>
         </div>
-
-        <!--删除线 ------------------------------------------------------------------------------------->
         <section class="index_3 clearfix">
              <div class="index_3_box_left">
                  <div class="index_2_head_box clearfix">
@@ -589,7 +556,6 @@
 
                      </div>
                  </div>
-                 <!-- 模块12 -->
                  <div class="index_3_ul clearfix" v-if="tabsData2==1">
                      <div :class="['index_3_li',index < 2 ? 'index_3_li_color' : '']" v-for="(item, index) in boxData12">
                         <NuxtLink :to="item.linkurl" v-if="item.islink==1" :title="item.title">
@@ -607,7 +573,6 @@
                     </div>
                 </div>
 
-                <!-- 模块13 -->
                 <div class="index_3_ul clearfix" v-if="tabsData2==2">
                      <div :class="['index_3_li',index < 2 ? 'index_3_li_color' : '']" v-for="(item, index) in boxData13">
                         <NuxtLink :to="item.linkurl" v-if="item.islink==1" :title="item.title">
@@ -631,7 +596,6 @@
                     <div class="inquire" v-if="voteList.length>0">
                         <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">
@@ -670,7 +634,6 @@
                                     />
                                 </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">
@@ -698,9 +661,6 @@
                 </div>
             </div>
         </section>
-        <!-- 删除线 ------------------------------------------------------------------------------------->
-
-
         <div class="titleBox" v-if="adImg5">
             <a href="http://nzgxw.org.cn/" v-if="adImg5.image_url==null" target="_blank">
                 <img :src="adImg5.thumb">
@@ -749,7 +709,6 @@
                         </NuxtLink>
                     </div>
                 </div>
-                <!-- 模块14 -->
                 <div class="lastPartContext" v-if="tabsData3==1">
                     <div class="left">
                         <ul class="mode1ul_style1">
@@ -761,8 +720,6 @@
                                             <span v-if="index==0">专题</span>
                                             {{ item.title }}
                                         </p>
-                                        
-                                        <!-- <p>{{getTime(item.updated_at,'month',1)}}</p> -->
                                     </div>
                                 </NuxtLink>
                                 <NuxtLink :to="{ path: `/newsDetail/${item.id}`, query: { listId: routeId, listName: routeName } }" v-if="item.islink==0" :title="item.title">
@@ -772,7 +729,6 @@
                                             <span v-if="index==0">专题</span>
                                             {{ item.title }}
                                         </p>
-                                        <!-- <p>{{getTime(item.updated_at,'month',1)}}</p> -->
                                     </div>
                                 </NuxtLink>
                             </li>
@@ -781,11 +737,9 @@
                             <li v-for="item in boxData14data2">
                                 <NuxtLink :to="item.linkurl" v-if="item.islink==1" :title="item.title">
                                     <p class="title">{{ item.title }}</p>
-                                    <!-- <p>{{getTime(item.updated_at,'month',1)}}</p> -->
                                 </NuxtLink>
                                 <NuxtLink :to="{ path: `/newsDetail/${item.id}`, query: { listId: routeId, listName: routeName } }" v-if="item.islink==0" :title="item.title">
                                     <p class="title">{{ item.title }}</p>
-                                    <!-- <p>{{getTime(item.updated_at,'month',1)}}</p> -->
                                 </NuxtLink>
                             </li>
                         </ul>
@@ -794,12 +748,12 @@
                         <div class="title">
                             <h3 v-if="boxData14menu[0]">
                                 <NuxtLink
-                                    :to="{ path: `/newsList/${boxData14menu[0].category_id}`, query: { catid: boxData14menu[0].cid } }"
+                                    :to="{ path: `/newsList/${boxData14menu[0].category_id}`}"
                                     v-if="boxData14menu[0]" class="leftTitle" :title="boxData14menu[0].alias">
                                     {{ boxData14menu[0].alias }}
                                 </NuxtLink>
                                 <NuxtLink
-                                    :to="{ path: `/newsList/${boxData14menu[0].category_id}`, query: { catid: boxData14menu[0].cid } }"
+                                    :to="{ path: `/newsList/${boxData14menu[0].category_id}`}"
                                     v-if="boxData14menu[0]" :title="boxData14menu[0].alias">
                                     查看更多
                                 </NuxtLink>
@@ -825,8 +779,6 @@
                         </ul>
                     </div>
                 </div>
-
-                <!-- 模块15 -->
                 <div class="lastPartContext" v-if="tabsData3==2">
                     <div class="left">
                         <ul class="mode1ul_style1">
@@ -838,7 +790,6 @@
                                             <span v-if="index==0">专题</span>
                                             {{ item.title }}
                                         </p>
-                                        <!-- <p>{{getTime(item.updated_at,'month',1)}}</p> -->
                                     </div>
                                 </NuxtLink>
                                 <NuxtLink :to="{ path: `/newsDetail/${item.id}`, query: { listId: routeId, listName: routeName } }" v-if="item.islink==0" :title="item.title">
@@ -848,7 +799,6 @@
                                             <span v-if="index==0">专题</span>
                                             {{ item.title }}
                                         </p>
-                                        <!-- <p>{{getTime(item.updated_at,'month',1)}}</p> -->
                                     </div>
                                 </NuxtLink>
                             </li>
@@ -857,11 +807,9 @@
                             <li v-for="item in boxData15data2">
                                 <NuxtLink :to="item.linkurl"  v-if="item.islink==1" :title="item.title">
                                     <p class="title">{{ item.title }}</p>
-                                    <!-- <p>{{getTime(item.updated_at,'month',1)}}</p> -->
                                 </NuxtLink>
                                 <NuxtLink :to="{ path: `/newsDetail/${item.id}`, query: { listId: routeId, listName: routeName } }"  v-if="item.islink==0" :title="item.title">
                                     <p class="title">{{ item.title }}</p>
-                                    <!-- <p>{{getTime(item.updated_at,'month',1)}}</p> -->
                                 </NuxtLink>
                             </li>
                         </ul>
@@ -870,12 +818,12 @@
                         <div class="title">
                             <h3 v-if="boxData15menu[0]">
                                 <NuxtLink
-                                    :to="{ path: `/newsList/${boxData15menu[0].category_id}`, query: { catid: boxData15menu[0].cid } }"
+                                    :to="{ path: `/newsList/${boxData15menu[0].category_id}`}"
                                     v-if="boxData15menu[0]" class="leftTitle" :title="boxData15menu[0].alias">
                                     {{ boxData15menu[0].alias }}
                                 </NuxtLink>
                                 <NuxtLink
-                                    :to="{ path: `/newsList/${boxData15menu[0].category_id}`, query: { catid: boxData15menu[0].cid } }"
+                                    :to="{ path: `/newsList/${boxData15menu[0].category_id}`}"
                                     v-if="boxData15menu[0]" :title="boxData15menu[0].alias">
                                     查看更多
                                 </NuxtLink>
@@ -903,7 +851,6 @@
                 </div>
             </div>
         </div>
-        
         <section class="index_2 clearfix">
             <div class="index_2_head_box clearfix" v-if="pageData.length>=16">
                 <div class="index_1_head_box index_1_head_box_2 clearfix">
@@ -943,10 +890,8 @@
                         {{item.alias}}
                     </NuxtLink>
                 </div>
-
             </div>
             <div class=" clearfix">
-                <!--模块16-->
                 <div class=" clearfix" v-if="tabsData4==1">
                     <div class="index_1_box">
                         <div class="index_2_big_img_ul">
@@ -958,7 +903,7 @@
                                         {{boxData16[0].title}}
                                     </div>
                                     <div class="index_1_box_right_img_li_dot1 dot1">
-                                        <!-- {{getTime(boxData16[0].updated_at,'month',1)}} -->
+
                                     </div>
                                 </NuxtLink>
                                 <NuxtLink :to="{ path: `/newsDetail/${boxData16[0].id}`}"  v-if="boxData16[0].islink==0" :title="boxData16[0].title">
@@ -968,7 +913,7 @@
                                         {{boxData16[0].title}}
                                     </div>
                                     <div class="index_1_box_right_img_li_dot1 dot1">
-                                        <!-- {{getTime(boxData16[0].updated_at,'month',1)}} -->
+                                        
                                     </div>
                                 </NuxtLink>
                             </div>
@@ -1010,9 +955,6 @@
                                     <div class="index_2_big_img_li_dot2 dot2">
                                         {{boxData16[3].title}}
                                     </div>
-                                    <!--<div class="index_1_box_right_img_li_dot1 dot1">
-                                         {{getTime(boxData16[3].updated_at,'month',1)}} 
-                                    </div>-->
                                 </div>
                             </NuxtLink>
                             <NuxtLink :to="{ path: `/newsDetail/${boxData16[3].id}`}" v-if="boxData16[3].islink==0" :title="boxData16[3].title">
@@ -1021,9 +963,6 @@
                                     <div class="index_2_big_img_li_dot2 dot2">
                                         {{boxData16[3].title}}
                                     </div>
-                                     <!--<div class="index_1_box_right_img_li_dot1 dot1">
-                                        {{getTime(boxData16[3].updated_at,'month',1)}}
-                                    </div> -->
                                 </div>
                             </NuxtLink>
                         </div>
@@ -1036,17 +975,11 @@
                                     <div class="index_1_li_dot2 dot2">
                                        {{ item.title }}
                                     </div>
-                                    <!--<div class="index_1_li_time">
-                                         {{getTime(item.updated_at,'month',1)}}
-                                    </div>  -->
                                 </NuxtLink>
                                 <NuxtLink :to="{ path: `/newsDetail/${item.id}`}" v-if="item.islink==0" :title="item.title">
                                     <div class="index_1_li_dot2 dot2">
                                        {{ item.title }}
                                     </div>
-                                    <!-- <div class="index_1_li_time">
-                                        {{getTime(item.updated_at,'month',1)}}
-                                    </div>  -->
                                 </NuxtLink>
                             </div>
                         </div>
@@ -1084,7 +1017,6 @@
                         </div>						
                     </div>
 				</div>
-                <!--模块17-->
                 <div class=" clearfix" v-if="tabsData4==2">
                     <div class="index_1_box">
                         <div class="index_2_big_img_ul">
@@ -1211,11 +1143,6 @@
 			</div>
         </section>
 
-
-
-
-        
-
         <section class="index_1 clearfix">
             <div class="index_1_box">
                 <div class="index_1_head_box clearfix" v-if="pageData.length>=18">
@@ -1371,7 +1298,6 @@
                  </div>
              </div>
         </section>
-        <!-- 页面底部 -->
         <HomeFoot></HomeFoot>
     </div>
 </template>
@@ -1425,7 +1351,7 @@ const websiteSurveyData = ref([]);//投票结果
 //3.2获得投票列表
 let voteList = ref([]);
 async function getVoteList(){
-    const voteData = await requestHome('/web/getWebsiteSurvey',{method:'GET',query:{'art_id':4150}});
+    const voteData = await requestHome('/web/getWebsiteSurvey',{method:'GET',query:{'art_id':50134}});
     //这里有问题,后台传入的数据已经发生了变化,按照传入的进行修改
     if(voteData.code == 200){
         voteList.value = voteData.data;

+ 10 - 10
pages/primaryNavigation/[id].vue

@@ -120,7 +120,7 @@
                             </NuxtLink>
                             <span>
                                 <NuxtLink
-                                    :to="{ path: `/newsList/${pageData[2].cid}`, query: { catid: pageData[2].cid } }"
+                                    :to="{ path: `/newsList/${pageData[2].cid}`}"
                                     v-if="pageData[2]" :title="pageData[2].title">查看更多</NuxtLink>
                             </span>
                         </h3>
@@ -155,7 +155,7 @@
                             </NuxtLink>
                             <span>
                                 <NuxtLink
-                                    :to="{ path: `/newsList/${pageData[3].cid}`, query: { catid: pageData[3].cid } }"
+                                    :to="{ path: `/newsList/${pageData[3].cid}`}"
                                     v-if="pageData[3]" :title="pageData[3].title">查看更多</NuxtLink>
                             </span>
                         </h3>
@@ -190,7 +190,7 @@
                             </NuxtLink>
                             <span>
                                 <NuxtLink
-                                    :to="{ path: `/newsList/${pageData[4].cid}`, query: { catid: pageData[4].cid } }"
+                                    :to="{ path: `/newsList/${pageData[4].cid}`}"
                                     v-if="pageData[4]" :title="pageData[4].title">查看更多</NuxtLink>
                             </span>
                         </h3>
@@ -238,7 +238,7 @@
                                     </NuxtLink>
                                     <span>
                                         <NuxtLink
-                                            :to="{ path: `/newsList/${pageData[5].cid}`, query: { catid: pageData[5].cid } }"
+                                            :to="{ path: `/newsList/${pageData[5].cid}`}"
                                             v-if="pageData[5]" :title="pageData[5].title">查看更多</NuxtLink>
                                     </span>
                                 </h3>
@@ -287,7 +287,7 @@
                                     </NuxtLink>
                                     <span>
                                         <NuxtLink
-                                            :to="{ path: `/newsList/${pageData[6].cid}`, query: { catid: pageData[6].cid } }"
+                                            :to="{ path: `/newsList/${pageData[6].cid}`}"
                                             v-if="pageData[6]" :title="pageData[6].title">查看更多</NuxtLink>
                                     </span>
 
@@ -355,7 +355,7 @@
                             </NuxtLink>
                             <span>
                                 <NuxtLink
-                                    :to="{ path: `/newsList/${pageData[8].cid}`, query: { catid: pageData[8].cid } }"
+                                    :to="{ path: `/newsList/${pageData[8].cid}`}"
                                     v-if="pageData[8]" :title="pageData[8].title">查看更多</NuxtLink>
                             </span>
 
@@ -396,7 +396,7 @@
                             </NuxtLink>
                             <span>
                                 <NuxtLink
-                                    :to="{ path: `/newsList/${pageData[9].cid}`, query: { catid: pageData[9].cid } }"
+                                    :to="{ path: `/newsList/${pageData[9].cid}`}"
                                     v-if="pageData[9]" :title="pageData[9].title">查看更多</NuxtLink>
                             </span>
                         </h3>
@@ -419,7 +419,7 @@
                             </NuxtLink>
                             <span>
                                 <NuxtLink
-                                    :to="{ path: `/newsList/${pageData[10].cid}`, query: { catid: pageData[10].cid } }"
+                                    :to="{ path: `/newsList/${pageData[10].cid}`}"
                                     v-if="pageData[10]" :title="pageData[10].title">查看更多</NuxtLink>
                             </span>
 
@@ -444,7 +444,7 @@
                         </NuxtLink>
                         <span>
                             <NuxtLink
-                                :to="{ path: `/newsList/${pageData[11].cid}`, query: { catid: pageData[11].cid } }"
+                                :to="{ path: `/newsList/${pageData[11].cid}`}"
                                 v-if="pageData[11]" :title="pageData[11].title">查看更多</NuxtLink>
                         </span>
                     </h3>
@@ -601,7 +601,7 @@
                         </NuxtLink>
                         <span>
                             <NuxtLink
-                                :to="{ path: `/newsList/${pageData[13].cid}`, query: { catid: pageData[13].cid } }"
+                                :to="{ path: `/newsList/${pageData[13].cid}`}"
                                 v-if="pageData[13]" :title="pageData[13].title">查看更多</NuxtLink>
                         </span>
 

+ 8 - 8
plugins/globals.js

@@ -1,9 +1,9 @@
 export default defineNuxtPlugin((nuxtApp) => {
   //Pre环境
-  // nuxtApp.provide('webUrl', 'http://apipre1.bjzxtw.org.cn:29501')
-  // nuxtApp.provide('CwebUrl', 'http://nwpre.bjzxtw.org.cn')
-  // nuxtApp.provide('BwebUrl', 'http://adminpre.bjzxtw.org.cn')
-  // nuxtApp.provide('userUrl', 'http://localhost:3000')
+  nuxtApp.provide('webUrl', 'http://apipre1.bjzxtw.org.cn:29501')
+  nuxtApp.provide('CwebUrl', 'http://nwpre.bjzxtw.org.cn')
+  nuxtApp.provide('BwebUrl', 'http://adminpre.bjzxtw.org.cn')
+  nuxtApp.provide('userUrl', 'http://localhost:3000')
 
   //正式环境
   // nuxtApp.provide('webUrl', 'https://flzxw.bjzxtw.org.cn')
@@ -24,8 +24,8 @@ export default defineNuxtPlugin((nuxtApp) => {
   // nuxtApp.provide('userUrl', 'http://localhost:3000')
 
   //Dev环境
-  nuxtApp.provide('webUrl', 'http://apidev.bjzxtw.org.cn')
-  nuxtApp.provide('CwebUrl', 'http://nwdev.bjzxtw.org.cn')
-  nuxtApp.provide('BwebUrl', 'http://admindev.bjzxtw.org.cn')
-  nuxtApp.provide('userUrl', 'http://localhost:3000')
+  // nuxtApp.provide('webUrl', 'http://apidev.bjzxtw.org.cn')
+  // nuxtApp.provide('CwebUrl', 'http://nwdev.bjzxtw.org.cn')
+  // nuxtApp.provide('BwebUrl', 'http://admindev.bjzxtw.org.cn')
+  // nuxtApp.provide('userUrl', 'http://localhost:3000')
 })