Browse Source

修改bug

Jing 16 hours ago
parent
commit
4bae19c9c2

File diff suppressed because it is too large
+ 979 - 0
.nuxt/dev/index.mjs


File diff suppressed because it is too large
+ 0 - 0
.nuxt/dev/index.mjs.map


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

@@ -31,4 +31,5 @@ export { injectHead, useHead, useSeoMeta, useHeadSafe, useServerHead, useServerS
 export { requestData, requestDataPromise, requestDataWebUrl, requestHome } from '../composables/getData';
 export { getTime, getTitleLength, getLinkPath, getLinkPathDetail, getRoutePath, getLinkPath1 } from '../composables/publicFunction';
 export { seoSetup } from '../composables/useSeo';
+export { useNuxtDevTools } from '../node_modules/@nuxt/devtools/dist/runtime/use-nuxt-devtools';
 export { definePageMeta } from '../node_modules/nuxt/dist/pages/runtime/composables';

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

@@ -1 +1 @@
-{"id":"70bd7ecd-8e56-45d4-a2b8-dc54ae84af25","timestamp":1745823176546}
+{"id":"dev","timestamp":1745896415112}

+ 1 - 0
.nuxt/manifest/meta/4d736bd1-bb92-4c75-8b30-48d61f54b405.json

@@ -0,0 +1 @@
+{"id":"4d736bd1-bb92-4c75-8b30-48d61f54b405","timestamp":1745891591411,"matcher":{"static":{},"wildcard":{},"dynamic":{}},"prerendered":[]}

+ 0 - 1
.nuxt/manifest/meta/70bd7ecd-8e56-45d4-a2b8-dc54ae84af25.json

@@ -1 +0,0 @@
-{"id":"70bd7ecd-8e56-45d4-a2b8-dc54ae84af25","timestamp":1745823176546,"matcher":{"static":{},"wildcard":{},"dynamic":{}},"prerendered":[]}

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

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

+ 17 - 0
.nuxt/nitro.json

@@ -0,0 +1,17 @@
+{
+  "date": "2025-04-29T03:13:38.388Z",
+  "preset": "nitro-dev",
+  "framework": {
+    "name": "nuxt",
+    "version": "3.15.2"
+  },
+  "versions": {
+    "nitro": "2.10.4"
+  },
+  "dev": {
+    "pid": 21788,
+    "workerAddress": {
+      "socketPath": "\\\\.\\pipe\\nitro\\worker-21788-1.sock"
+    }
+  }
+}

+ 9 - 0
.nuxt/nuxt.json

@@ -0,0 +1,9 @@
+{
+  "_hash": "8kgLHaxpUK",
+  "project": {
+    "rootDir": "D:/01_AA_ssr_pre/nongmingongwang"
+  },
+  "versions": {
+    "nuxt": "3.15.2"
+  }
+}

+ 1 - 1
.nuxt/tsconfig.json

@@ -102,7 +102,7 @@
         "./imports"
       ],
       "#app-manifest": [
-        "./manifest/meta/70bd7ecd-8e56-45d4-a2b8-dc54ae84af25.json"
+        "./manifest/meta/dev.json"
       ],
       "#components": [
         "./components"

+ 1 - 0
.nuxt/types/build.d.ts

@@ -11,6 +11,7 @@ declare module "#build/paths.mjs";
 declare module "#build/root-component.mjs";
 declare module "#build/plugins.server.mjs";
 declare module "#build/test-component-wrapper.mjs";
+declare module "#build/devtools/settings.mjs";
 declare module "#build/routes.mjs";
 declare module "#build/pages.mjs";
 declare module "#build/router.options.mjs";

+ 2 - 0
.nuxt/types/imports.d.ts

@@ -123,6 +123,7 @@ declare global {
   const useModel: typeof import('vue')['useModel']
   const useNuxtApp: typeof import('../../node_modules/nuxt/dist/app/nuxt')['useNuxtApp']
   const useNuxtData: typeof import('../../node_modules/nuxt/dist/app/composables/asyncData')['useNuxtData']
+  const useNuxtDevTools: typeof import('../../node_modules/@nuxt/devtools/dist/runtime/use-nuxt-devtools')['useNuxtDevTools']
   const usePreviewMode: typeof import('../../node_modules/nuxt/dist/app/composables/preview')['usePreviewMode']
   const useRequestEvent: typeof import('../../node_modules/nuxt/dist/app/composables/ssr')['useRequestEvent']
   const useRequestFetch: typeof import('../../node_modules/nuxt/dist/app/composables/ssr')['useRequestFetch']
@@ -311,6 +312,7 @@ declare module 'vue' {
     readonly useModel: UnwrapRef<typeof import('vue')['useModel']>
     readonly useNuxtApp: UnwrapRef<typeof import('../../node_modules/nuxt/dist/app/nuxt')['useNuxtApp']>
     readonly useNuxtData: UnwrapRef<typeof import('../../node_modules/nuxt/dist/app/composables/asyncData')['useNuxtData']>
+    readonly useNuxtDevTools: UnwrapRef<typeof import('../../node_modules/@nuxt/devtools/dist/runtime/use-nuxt-devtools')['useNuxtDevTools']>
     readonly usePreviewMode: UnwrapRef<typeof import('../../node_modules/nuxt/dist/app/composables/preview')['usePreviewMode']>
     readonly useRequestEvent: UnwrapRef<typeof import('../../node_modules/nuxt/dist/app/composables/ssr')['useRequestEvent']>
     readonly useRequestFetch: UnwrapRef<typeof import('../../node_modules/nuxt/dist/app/composables/ssr')['useRequestFetch']>

+ 7 - 2
.nuxt/types/plugins.d.ts

@@ -9,12 +9,17 @@ type NuxtAppInjections =
   InjectionType<typeof import("../../node_modules/nuxt/dist/app/plugins/revive-payload.client.js")> &
   InjectionType<typeof import("../../node_modules/nuxt/dist/head/runtime/plugins/unhead.js")> &
   InjectionType<typeof import("../../node_modules/nuxt/dist/pages/runtime/plugins/router.js")> &
-  InjectionType<typeof import("../../node_modules/nuxt/dist/app/plugins/payload.client.js")> &
+  InjectionType<typeof import("../../node_modules/nuxt/dist/app/plugins/browser-devtools-timing.client.js")> &
   InjectionType<typeof import("../../node_modules/nuxt/dist/app/plugins/navigation-repaint.client.js")> &
   InjectionType<typeof import("../../node_modules/nuxt/dist/app/plugins/check-outdated-build.client.js")> &
   InjectionType<typeof import("../../node_modules/nuxt/dist/app/plugins/revive-payload.server.js")> &
   InjectionType<typeof import("../../node_modules/nuxt/dist/app/plugins/chunk-reload.client.js")> &
   InjectionType<typeof import("../../node_modules/nuxt/dist/pages/runtime/plugins/prefetch.client.js")> &
+  InjectionType<typeof import("../../node_modules/nuxt/dist/pages/runtime/plugins/check-if-page-unused.js")> &
+  InjectionType<typeof import("../../node_modules/@nuxt/devtools/dist/runtime/plugins/devtools.server.js")> &
+  InjectionType<typeof import("../../node_modules/@nuxt/devtools/dist/runtime/plugins/devtools.client.js")> &
+  InjectionType<typeof import("../../node_modules/nuxt/dist/app/plugins/dev-server-logs.js")> &
+  InjectionType<typeof import("../../node_modules/nuxt/dist/app/plugins/check-if-layout-used.js")> &
   InjectionType<typeof import("../../plugins/element-plus")> &
   InjectionType<typeof import("../../plugins/request")> &
   InjectionType<typeof import("../../plugins/category")> &
@@ -25,7 +30,7 @@ declare module '#app' {
   interface NuxtApp extends NuxtAppInjections { }
 
   interface NuxtAppLiterals {
-    pluginName: 'nuxt:revive-payload:client' | 'nuxt:head' | 'nuxt:router' | 'nuxt:payload' | 'nuxt:revive-payload:server' | 'nuxt:chunk-reload' | 'nuxt:global-components' | 'nuxt:prefetch'
+    pluginName: 'nuxt:revive-payload:client' | 'nuxt:head' | 'nuxt:router' | 'nuxt:browser-devtools-timing' | 'nuxt:revive-payload:server' | 'nuxt:chunk-reload' | 'nuxt:global-components' | 'nuxt:prefetch' | 'nuxt:checkIfPageUnused' | 'nuxt:checkIfLayoutUsed'
   }
 }
 

+ 2 - 0
assets/css/class.less

@@ -216,6 +216,7 @@ section {
 .index_5_box_1 {
     float: left;
     width: 350px;
+    height: 483px;
     margin-top: 20px;
     margin-right: 20px;
 }
@@ -448,6 +449,7 @@ section {
 .channel_3_ul {
     margin-top: 11px;
     width: 660px;
+    height: 330px;
 
     .channel_3_ul .index_2_ul_a {
         height: 52px;

+ 3 - 2
assets/css/public/footer.less

@@ -61,7 +61,7 @@
 
 .foot_frind_box {
     display: block;
-    margin: 20px auto 30px;
+    margin: 20px auto 20px;
     overflow: hidden;
     display: flex;
     width: 100%;
@@ -88,12 +88,13 @@
     color: #333;
     font-size: 16px;
     margin: 0 30px;
+    margin-bottom: 20px;
 }
 
 .call_us_box {
     display: block;
     width: 100%;
-    margin: 40px auto 0;
+    margin: 20px auto 0;
     overflow: hidden;
     text-align: center;
     font-size: 0px;

+ 188 - 158
assets/css/public/kefu.less

@@ -1,161 +1,191 @@
 //添加在线客服
 .kefu {
-  bottom: 100px;
-  height: 430px;
-  position: fixed;
-  right: 10px;
-  width: 100px;
-  .kefu_itemKf {
-      background-color: #fff;
-      border-radius: 10px;
-      box-shadow: 0 4px 16px #0000001a;
-      height: 100px;
-      margin-bottom: 15px;
-      text-align: center;
-      width: 100px;
-      box-sizing: border-box;
-      position: relative;
-      cursor: pointer;
-      margin-bottom: 100px;
-      a {
-          >p {
-              color: #666;
-              font-size: 14px;
-              font-weight: 500;
-              line-height: 16px;
-          }
-          >img {
-              margin-top: 15px;
-              width: 50px;
-              height:50px;
-              margin-bottom: 5px;
-          }
-      }
-  }
-  .kefu_itemQQ {
-      background-color: #fff;
-      border-radius: 10px;
-      box-shadow: 0 4px 16px #0000001a;
-      height: 100px;
-      margin-bottom: 15px;
-      text-align: center;
-      width: 100px;
-      box-sizing: border-box;
-      position: relative;
-      cursor: pointer;
-      >p {
-          color: #666;
-          font-size: 14px;
-          font-weight: 500;
-          line-height: 16px;
-      }
-      >img {
-          margin-top: 10px;
-          width: 60px;
-          height: 60px;
-      }
-      &:hover {
-          .kefu_item_content_QQ {
-              display: block;
-          }
-      }
-  }
-  .kefu_itemPhone {
-      background-color: #fff;
-      border-radius: 10px;
-      box-shadow: 0 4px 16px #0000001a;
-      height: 100px;
-      margin-bottom: 15px;
-      text-align: center;
-      width: 100px;
-      box-sizing: border-box;
-      position: relative;
-      cursor: pointer;
-      >p {
-          color: #666;
-          font-size: 14px;
-          font-weight: 500;
-          line-height: 16px;
-      }
-      >img {
-          margin-top: 10px;
-          width: 60px;
-          height: 60px;
-      }
-      &:hover {
-          .kefu_item_content_phone {
-              display: block;
-          }
-      }
-  }
-  .kefu_item_content_QQ {
-      position: absolute;
-      top: -100px;
-      right: 100px;
-      background: #fff;
-      border-radius: 10px;
-      display: none;
-      width: 190px;
-      height: 330px;
-      background: #fff;
-      box-shadow: 0 4px 16px #0000001a;
-      z-index: 99;
-      box-sizing: border-box;
-      padding: 20px;
-      img {
-          margin-bottom: 10px;
-      }
-      .qqfs {
-          margin-bottom: 20px;
-          font-size: 14px;
-          color: #333;
-      }
-      .arrow {
-          width: 0;
-          height: 0;
-          width: 0;
-          border-top: 20px solid transparent;
-          border-bottom: 20px solid transparent; 
-          border-left: 20px solid #fff; 
-          position: absolute;
-          top: 120px;
-          right: -20px;
-          transform: translateX(-50%);
-          z-index: 100;
-      }
-  }
-  .kefu_item_content_phone {
-      position: absolute;
-      top: 0;
-      right: 100px;
-      background: #fff;
-      border-radius: 10px;
-      display: none;
-      width: 190px;
-      height: 80px;
-      background: #fff;
-      box-shadow: 0 4px 16px #0000001a;
-      z-index: 99;
-      box-sizing: border-box;
-      padding: 20px;
-      text-align: left;
-      color: #333;
-      .kefu_item_content_phone_title {
-          margin-bottom: 5px;
-          font-weight: bold;
-      }
-      .arrow {
-          width: 0;
-          height: 0;
-          width: 0;
-          border-top: 20px solid transparent;
-          border-bottom: 20px solid transparent; 
-          border-left: 20px solid #fff; 
-          position: absolute;
-          top: 20px;
-          right: -20px;
-          transform: translateX(-50%);
-          z-index: 100;
-      }
-  }
+    bottom: 100px;
+    height: 430px;
+    position: fixed;
+    right: 10px;
+    width: 100px;
+
+    .kefu_itemKf {
+        background-color: #fff;
+        border-radius: 10px;
+        box-shadow: 0 4px 16px #0000001a;
+        height: 100px;
+        margin-bottom: 15px;
+        text-align: center;
+        width: 100px;
+        box-sizing: border-box;
+        position: relative;
+        cursor: pointer;
+        margin-bottom: 100px;
+
+        a {
+            >p {
+                color: #666;
+                font-size: 14px;
+                font-weight: 500;
+                line-height: 16px;
+            }
+
+            >img {
+                margin-top: 15px;
+                width: 50px;
+                height: 50px;
+                margin-bottom: 5px;
+            }
+        }
+    }
+
+    .kefu_itemQQ {
+        background-color: #fff;
+        border-radius: 10px;
+        box-shadow: 0 4px 16px #0000001a;
+        height: 100px;
+        margin-bottom: 15px;
+        text-align: center;
+        width: 100px;
+        box-sizing: border-box;
+        position: relative;
+        cursor: pointer;
+
+        >p {
+            color: #666;
+            font-size: 14px;
+            font-weight: 500;
+            line-height: 16px;
+        }
+
+        >img {
+            margin-top: 10px;
+            width: 60px;
+            height: 60px;
+        }
+
+        &:hover {
+            .kefu_item_content_QQ {
+                display: block;
+            }
+        }
+    }
+
+    .kefu_itemPhone {
+        background-color: #fff;
+        border-radius: 10px;
+        box-shadow: 0 4px 16px #0000001a;
+        height: 100px;
+        margin-bottom: 15px;
+        text-align: center;
+        width: 100px;
+        box-sizing: border-box;
+        position: relative;
+        cursor: pointer;
+
+        >p {
+            color: #666;
+            font-size: 14px;
+            font-weight: 500;
+            line-height: 16px;
+        }
+
+        >img {
+            margin-top: 10px;
+            width: 60px;
+            height: 60px;
+        }
+
+        &:hover {
+            .kefu_item_content_phone {
+                display: block;
+            }
+        }
+    }
+
+    .kefu_item_content_QQ {
+        position: absolute;
+        top: -100px;
+        right: 100px;
+        background: #fff;
+        border-radius: 10px;
+        display: none;
+        width: 190px;
+        height: 330px;
+        background: #fff;
+        box-shadow: 0 4px 16px #0000001a;
+        z-index: 99;
+        box-sizing: border-box;
+        padding: 20px;
+
+        img {
+            margin-bottom: 10px;
+        }
+
+
+
+        .arrow {
+            width: 0;
+            height: 0;
+            width: 0;
+            border-top: 20px solid transparent;
+            border-bottom: 20px solid transparent;
+            border-left: 20px solid #fff;
+            position: absolute;
+            top: 120px;
+            right: -20px;
+            transform: translateX(-50%);
+            z-index: 100;
+        }
+
+        .qqadd {
+            height: 150px;
+            position: relative;
+
+            img {
+                width: 100px;
+                height: 100px;
+            }
+
+            .qqfs {
+                margin-bottom: 20px;
+                font-size: 14px;
+                color: #333;
+            }
+        }
+    }
+
+    .kefu_item_content_phone {
+        position: absolute;
+        top: 0;
+        right: 100px;
+        background: #fff;
+        border-radius: 10px;
+        display: none;
+        width: 190px;
+        height: 80px;
+        background: #fff;
+        box-shadow: 0 4px 16px #0000001a;
+        z-index: 99;
+        box-sizing: border-box;
+        padding: 20px;
+        text-align: left;
+        color: #333;
+
+        .kefu_item_content_phone_title {
+            margin-bottom: 5px;
+            font-weight: bold;
+        }
+
+        .arrow {
+            width: 0;
+            height: 0;
+            width: 0;
+            border-top: 20px solid transparent;
+            border-bottom: 20px solid transparent;
+            border-left: 20px solid #fff;
+            position: absolute;
+            top: 20px;
+            right: -20px;
+            transform: translateX(-50%);
+            z-index: 100;
+        }
+    }
 }

+ 15 - 10
assets/css/public/nav.less

@@ -16,10 +16,15 @@
 
         li:first-child {
             color: #fff59d;
-            padding: 0 50px;
+            margin-left: 10px;
+        }
+
+        li:last-child {
+            margin-right: 10px;
         }
 
         li {
+            width: 80px;
             font-family: PingFang SC;
             height: 70px;
             line-height: 70px;
@@ -59,18 +64,16 @@
             display: flex;
             flex-wrap: wrap;
 
-            .navList:first-child {
-                padding-left: 20px;
-            }
-
             .navList {
+                width: 80px;
+                text-align: center;
                 font-family: PingFang SC;
                 height: 50px;
                 line-height: 50px;
                 font-weight: 400;
                 font-size: 16px;
                 color: #333333;
-                margin: 0 23px;
+                margin: 0 21px;
 
                 a {
                     color: #333;
@@ -107,7 +110,7 @@
             font-size: 16px;
             color: #666666;
             line-height: 50px;
-            padding-left: 35px;
+            padding-left: 20px;
         }
 
         .title1 {
@@ -150,7 +153,8 @@
                 background: url('@/public/image/Iconly/Broken/Search.png');
                 cursor: pointer;
             }
-            .searchbtn{
+
+            .searchbtn {
                 display: inline-block;
                 margin-left: 60px;
             }
@@ -204,9 +208,10 @@
                 font-weight: 600;
             }
         }
-        .box111{
+
+        .box111 {
             display: inline-block;
-            width: 60px;
+            width: 95px;
         }
     }
 }

+ 2 - 0
components/home/foot.vue

@@ -79,6 +79,8 @@ async function getModelDataAll() {
         },
     });
     if(mkdata.code == 200){
+        console.log("获取底部基本信息成功",mkdata)
+        // console.log(mkdata)
         bottomLink.value = mkdata.data.link_img;
         bottomText.value = mkdata.data.link_text;
         bottomphoto.value = mkdata.data.link_foot;

+ 2 - 2
components/home/kefu.vue

@@ -12,11 +12,11 @@
       <p>QQ客服</p>
       <div class="kefu_item_content_QQ">
         <div @click="addQQFriend(bottomBase.customer_service_qq)" class="qqadd">
-          <img :src="service_qq_img" width="100">
+          <img :src="bottomBase.service_qq_img" width="100">
           <div class="qqfs">{{ bottomBase.customer_service_qq }}</div>
         </div>
         <div @click="addQQFriend(bottomBase.communications)" class="qqadd">
-          <img :src="communications_img" width="100">
+          <img :src="bottomBase.communications_img" width="100">
           <div class="qqfs">{{ bottomBase.communications }}</div>
         </div>
         <div class="arrow"></div>

+ 32 - 22
pages/[dir]/[dir]/[id].vue

@@ -38,11 +38,7 @@
                         发布时间: <span>{{ time }}</span>
                     </p>
                 </div>
-                <div 
-                    class="leftBottom" 
-                    v-html="newsDetail.content" 
-                    v-if="newsDetail.content" 
-                    @click="openPreview">
+                <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">
@@ -68,6 +64,7 @@
             </div>
         </div>
     </div>
+    <HomeTopTen :imgurl="adImg2" v-if="adImg2"></HomeTopTen>
     <!-- 页面底部 -->
     <HomeFoot1></HomeFoot1>
 </template>
@@ -75,7 +72,7 @@
 <script setup>
 //1.页面依赖 start ---------------------------------------->
 import { onMounted } from 'vue'
-import { ElBreadcrumb, ElBreadcrumbItem,ElRadio, ElRadioGroup,ElCheckbox,ElCheckboxGroup,ElMessage,ElInput } from 'element-plus'
+import { ElBreadcrumb, ElBreadcrumbItem, ElRadio, ElRadioGroup, ElCheckbox, ElCheckboxGroup, ElMessage, ElInput } from 'element-plus'
 import { ArrowRight } from '@element-plus/icons-vue'
 //1.页面依赖 end ---------------------------------------->
 
@@ -92,12 +89,12 @@ const getRouteId = await requestDataPromise('/web/getWebsiteRoute', {
         'pinyin': targetSegment,
     },
 });
-if(getRouteId.code == 200){
+if (getRouteId.code == 200) {
     routeId = getRouteId.data.category_id
-}else{
+} else {
     console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
     console.log("错误位置:通过url路径查询导航池id")
-    console.log("后端错误反馈:",getRouteId.message)
+    console.log("后端错误反馈:", getRouteId.message)
     console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
 }
 //2.页面路径 end ---------------------------------------->
@@ -114,7 +111,7 @@ let getParentNav = async () => {
             'catid': routeId
         },
     });
-    
+
     if (listData.code == 200) {
         parent_name.value = listData.data.alias;
         parent_id.value = listData.data.parent_id;
@@ -144,15 +141,15 @@ const routLevelId = ref("");
 const articleChoice = ref(false);
 //4.5 获取详情
 async function getPageData() {
-    const mkdata =  await requestDataPromise('/web/selectWebsiteArticleInfo', {
+    const mkdata = await requestDataPromise('/web/selectWebsiteArticleInfo', {
         method: 'GET',
         query: {
             'articleid': articleId
         },
     });
-    if(mkdata.code==200){
+    if (mkdata.code == 200) {
         //判断是否显示投票
-        if(mkdata.data.is_survey==1){
+        if (mkdata.data.is_survey == 1) {
             console.log("本篇文章含有投票!")
             articleChoice.value = true;
         }
@@ -169,10 +166,10 @@ async function getPageData() {
         } else {
             routeNewsTtitle.value = newsDetail.value.title
         }
-    }else{
+    } else {
         console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
         console.log("错误位置:获取详情内容")
-        console.log("后端错误反馈:",mkdata.message)
+        console.log("后端错误反馈:", mkdata.message)
         console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
     }
 }
@@ -182,7 +179,8 @@ getPageData();
 
 //5.广告 start ---------------------------------------->
 let adImg1 = ref([]);
-onMounted(async ()  => {
+let adImg2 = ref([]);
+onMounted(async () => {
     const { $webUrl, $CwebUrl } = useNuxtApp();
     //广告1
     let url = `${$webUrl}/web/getWebsiteAdvertisement?ad_tag=nmgw_detail_0001`
@@ -195,17 +193,29 @@ onMounted(async ()  => {
     });
     const resultAd1 = await responseAd1.json();
     adImg1.value = resultAd1.data[0];
+
+    //广告2
+    let url2 = `${$webUrl}/web/getWebsiteAdvertisement?ad_tag=nmgw_detail_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];
 })
 //5.广告 end ---------------------------------------->
 
 //6.设置seo信息 start---------------------------------------->
-const setData =  await requestDataPromise('/web/selectWebsiteArticleInfo', {
+const setData = await requestDataPromise('/web/selectWebsiteArticleInfo', {
     method: 'GET',
     query: {
         'articleid': articleId
     },
 });
-if(setData.code==200){
+if (setData.code == 200) {
     let seoTitle = setData.data.title;
     let seoDescription = setData.data.introduce;
     let seoKeywords = setData.data.keyword;
@@ -215,12 +225,12 @@ if(setData.code==200){
     useSeoMeta({
         title: seoTitle + "_" + seoName + "_" + seoSuffix,
         meta: [
-            { name: 'description', content: seoDescription + "_" + seoName + "_" + seoSuffix , tagPriority: 10 },
-            { name: 'keywords', content: seoKeywords + "_" + seoName + "_" + seoSuffix , tagPriority: 10 }
+            { name: 'description', content: seoDescription + "_" + seoName + "_" + seoSuffix, tagPriority: 10 },
+            { name: 'keywords', content: seoKeywords + "_" + seoName + "_" + seoSuffix, tagPriority: 10 }
         ]
     });
-}else{
-    console.log("获取广告数据失败!",setData.message)
+} else {
+    console.log("获取广告数据失败!", setData.message)
 }
 //6.设置seo信息 end---------------------------------------->
 

+ 32 - 21
pages/[dir]/[id].vue

@@ -5,7 +5,7 @@
     <HomePageNavigation></HomePageNavigation>
     <!-- 列表页广告一 -->
     <HomeTopTen :imgurl="adImg1" v-if="adImg1"></HomeTopTen>
-    
+
     <!-- 资讯列表 -->
     <div class="newsDetail">
         <div class="inner">
@@ -36,11 +36,7 @@
                         发布时间: <span>{{ time }}</span>
                     </p>
                 </div>
-                <div 
-                    class="leftBottom" 
-                    v-html="newsDetail.content" 
-                    v-if="newsDetail.content" 
-                    @click="openPreview">
+                <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">
@@ -66,6 +62,8 @@
             </div>
         </div>
     </div>
+    <!-- 列表页广告一 -->
+    <HomeTopTen :imgurl="adImg2" v-if="adImg2"></HomeTopTen>
     <!-- 页面底部 -->
     <HomeFoot1></HomeFoot1>
 </template>
@@ -73,7 +71,7 @@
 <script setup>
 //1.页面依赖 start ---------------------------------------->
 import { onMounted } from 'vue'
-import { ElBreadcrumb, ElBreadcrumbItem} from 'element-plus'
+import { ElBreadcrumb, ElBreadcrumbItem } from 'element-plus'
 import { ArrowRight } from '@element-plus/icons-vue'
 //1.页面依赖 end ---------------------------------------->
 
@@ -87,9 +85,9 @@ const getRouteId = await requestDataPromise('/web/getWebsiteRoute', {
         'pinyin': targetSegment,
     },
 });
-if(getRouteId.code == 200){
+if (getRouteId.code == 200) {
     routeId = getRouteId.data.category_id
-}else{
+} else {
     console.log("错误位置:获得页面路径")
 }
 //2.页面路径 start ---------------------------------------->
@@ -135,18 +133,18 @@ const routLevelId = ref("");
 const articleChoice = ref(false);
 //4.5 获取详情
 async function getPageData() {
-    const mkdata =  await requestDataPromise('/web/selectWebsiteArticleInfo', {
+    const mkdata = await requestDataPromise('/web/selectWebsiteArticleInfo', {
         method: 'GET',
         query: {
             'articleid': articleId
         },
     });
-    if(mkdata.code==200){
+    if (mkdata.code == 200) {
         //判断是否显示投票
-        if(mkdata.data.is_survey==1){
+        if (mkdata.data.is_survey == 1) {
             console.log("本篇文章含有投票!")
             articleChoice.value = true;
-            
+
         }
         //获取内容
         newsDetail.value = mkdata.data;
@@ -161,7 +159,7 @@ async function getPageData() {
         } else {
             routeNewsTtitle.value = newsDetail.value.title
         }
-    }else{
+    } else {
         console.log("错误位置:获取详情内容")
     }
 }
@@ -170,8 +168,9 @@ getPageData();
 
 //5.广告 start ---------------------------------------->
 let adImg1 = ref([]);
+let adImg2 = ref([]);
 
-onMounted(async ()  => {
+onMounted(async () => {
     const { $webUrl, $CwebUrl } = useNuxtApp();
     //广告1
     let url = `${$webUrl}/web/getWebsiteAdvertisement?ad_tag=nmgw_detail_0001`
@@ -184,17 +183,29 @@ onMounted(async ()  => {
     });
     const resultAd1 = await responseAd1.json();
     adImg1.value = resultAd1.data[0];
+
+    //广告2
+    let url2 = `${$webUrl}/web/getWebsiteAdvertisement?ad_tag=nmgw_detail_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];
 })
 //5.广告 end ---------------------------------------->
 
 //6.设置seo信息 start---------------------------------------->
-const setData =  await requestDataPromise('/web/selectWebsiteArticleInfo', {
+const setData = await requestDataPromise('/web/selectWebsiteArticleInfo', {
     method: 'GET',
     query: {
         'articleid': articleId
     },
 });
-if(setData.code==200){
+if (setData.code == 200) {
     let seoTitle = setData.data.title;
     let seoDescription = setData.data.introduce;
     let seoKeywords = setData.data.keyword;
@@ -204,14 +215,14 @@ if(setData.code==200){
     useSeoMeta({
         title: seoTitle + "_" + seoName + "_" + seoSuffix,
         meta: [
-            { name: 'description', content: seoDescription + "_" + seoName + "_" + seoSuffix , tagPriority: 10 },
-            { name: 'keywords', content: seoKeywords + "_" + seoName + "_" + seoSuffix , tagPriority: 10 }
+            { name: 'description', content: seoDescription + "_" + seoName + "_" + seoSuffix, tagPriority: 10 },
+            { name: 'keywords', content: seoKeywords + "_" + seoName + "_" + seoSuffix, tagPriority: 10 }
         ]
     });
-}else{
+} else {
     console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
     console.log("错误位置:设置详情页面SEO数据")
-    console.log("后端错误反馈:",setData.message)
+    console.log("后端错误反馈:", setData.message)
     console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
 }
 //6.设置seo信息 end---------------------------------------->

+ 4 - 4
plugins/category.ts

@@ -4,14 +4,14 @@ const navMaster: number[] = [
     759,//1
     747,//2
     760,//3
-    689,//4
+    2039,//4 689
     690,//5
     759,//6
     762,//7
     691,//8
     692,//9
     686,//10
-    687,//11
+    18,//11 687
     // 固定的一级栏目
     768,//12
     771,//13
@@ -64,7 +64,7 @@ const navPre: number[] = [
 
 export default defineNuxtPlugin((nuxtApp) => {
     //master 环境
-    // nuxtApp.provide('pageNav', navMaster)
+    nuxtApp.provide('pageNav', navMaster)
     //pre 环境
-    nuxtApp.provide('pageNav', navPre)
+    // nuxtApp.provide('pageNav', navPre)
 })

+ 10 - 10
plugins/globals.ts

@@ -1,17 +1,17 @@
 export default defineNuxtPlugin((nuxtApp) => {
   //Pre环境
-  nuxtApp.provide('webUrl', 'http://apipre1.bjzxtw.org.cn:29501')
-  nuxtApp.provide('CwebUrl', 'http://pre.zgnmg.org.cn')
-  nuxtApp.provide('BwebUrl', 'http://adminpre.bjzxtw.org.cn')
-  nuxtApp.provide('LoginWebUrl', 'http://adminpre.bjzxtw.org.cn/adminapi')
-  nuxtApp.provide('userUrl', 'http://localhost:3000')
+  // nuxtApp.provide('webUrl', 'http://apipre1.bjzxtw.org.cn:29501')
+  // nuxtApp.provide('CwebUrl', 'http://pre.zgnmg.org.cn')
+  // nuxtApp.provide('BwebUrl', 'http://adminpre.bjzxtw.org.cn')
+  // nuxtApp.provide('LoginWebUrl', 'http://adminpre.bjzxtw.org.cn/adminapi')
+  // nuxtApp.provide('userUrl', 'http://localhost:3000')
 
   //正式环境
-  // nuxtApp.provide('webUrl', 'https://flzxw.bjzxtw.org.cn')
-  // nuxtApp.provide('CwebUrl', 'http://nw.zgnmg.org.cn')
-  // nuxtApp.provide('BwebUrl', 'https://admin.bjzxtw.org.cn')
-  // nuxtApp.provide('LoginWebUrl', 'http://admin.bjzxtw.org.cn/adminapi')
-  // nuxtApp.provide('userUrl', 'http://localhost:3000')
+  nuxtApp.provide('webUrl', 'https://flzxw.bjzxtw.org.cn')
+  nuxtApp.provide('CwebUrl', 'http://nw.zgnmg.org.cn')
+  nuxtApp.provide('BwebUrl', 'https://admin.bjzxtw.org.cn')
+  nuxtApp.provide('LoginWebUrl', 'http://admin.bjzxtw.org.cn/adminapi')
+  nuxtApp.provide('userUrl', 'http://localhost:3004')
   
   //乡村网
   // nuxtApp.provide('webUrl', 'http://apipre1.bjzxtw.org.cn:29501')

+ 4 - 4
plugins/request.ts

@@ -6,11 +6,11 @@ export default defineNuxtPlugin(() => {
 
     let Url = {
         //正式环境
-        // webUrl: 'https://flzxw.bjzxtw.org.cn', //接口地址
-        // CwebUrl: 'nw.zgnmg.org.cn' //页面地址
+        webUrl: 'https://flzxw.bjzxtw.org.cn', //接口地址
+        CwebUrl: 'nw.zgnmg.org.cn' //页面地址
         //pre环境
-        webUrl: 'http://apipre1.bjzxtw.org.cn:29501', //pre接口地址
-        CwebUrl: 'pre.zgnmg.org.cn' //页面地址
+        // webUrl: 'http://apipre1.bjzxtw.org.cn:29501', //pre接口地址
+        // CwebUrl: 'pre.zgnmg.org.cn' //页面地址
     }
 
     const service = axios.create({

Some files were not shown because too many files changed in this diff