瀏覽代碼

修改bug

Jing 1 月之前
父節點
當前提交
7d1c9ba74e

+ 41 - 41
.nuxt/dev/index.mjs

@@ -3,30 +3,30 @@ import { Server } from 'node:http';
 import { tmpdir } from 'node:os';
 import { join } from 'node:path';
 import { parentPort, threadId } from 'node:worker_threads';
-import { getRequestHeader, splitCookiesString, setResponseStatus, setResponseHeader, send, getRequestHeaders, defineEventHandler, handleCacheHeaders, createEvent, fetchWithEvent, isEvent, eventHandler, setHeaders, sendRedirect, proxyRequest, createApp, createRouter as createRouter$1, toNodeListener, lazyEventHandler, getResponseStatus, setResponseHeaders, createError, getRouterParam, getQuery as getQuery$1, readBody, getResponseStatusText } from 'file://D:/MyProject/gogs/sannongzixunwang_web_ssr/sannongzixunwang_web/node_modules/h3/dist/index.mjs';
-import { getRequestDependencies, getPreloadLinks, getPrefetchLinks, createRenderer } from 'file://D:/MyProject/gogs/sannongzixunwang_web_ssr/sannongzixunwang_web/node_modules/vue-bundle-renderer/dist/runtime.mjs';
-import { stringify, uneval } from 'file://D:/MyProject/gogs/sannongzixunwang_web_ssr/sannongzixunwang_web/node_modules/devalue/index.js';
-import destr from 'file://D:/MyProject/gogs/sannongzixunwang_web_ssr/sannongzixunwang_web/node_modules/destr/dist/index.mjs';
-import { withQuery, joinURL, withTrailingSlash, parseURL, withoutBase, getQuery, joinRelativeURL } from 'file://D:/MyProject/gogs/sannongzixunwang_web_ssr/sannongzixunwang_web/node_modules/ufo/dist/index.mjs';
-import { renderToString } from 'file://D:/MyProject/gogs/sannongzixunwang_web_ssr/sannongzixunwang_web/node_modules/vue/server-renderer/index.mjs';
-import { propsToString, renderSSRHead } from 'file://D:/MyProject/gogs/sannongzixunwang_web_ssr/sannongzixunwang_web/node_modules/@unhead/ssr/dist/index.mjs';
-import { createServerHead as createServerHead$1, CapoPlugin } from 'file://D:/MyProject/gogs/sannongzixunwang_web_ssr/sannongzixunwang_web/node_modules/unhead/dist/index.mjs';
-import { klona } from 'file://D:/MyProject/gogs/sannongzixunwang_web_ssr/sannongzixunwang_web/node_modules/klona/dist/index.mjs';
-import defu, { defuFn } from 'file://D:/MyProject/gogs/sannongzixunwang_web_ssr/sannongzixunwang_web/node_modules/defu/dist/defu.mjs';
-import { snakeCase } from 'file://D:/MyProject/gogs/sannongzixunwang_web_ssr/sannongzixunwang_web/node_modules/scule/dist/index.mjs';
-import { createHooks } from 'file://D:/MyProject/gogs/sannongzixunwang_web_ssr/sannongzixunwang_web/node_modules/hookable/dist/index.mjs';
-import { createFetch as createFetch$1, Headers as Headers$1 } from 'file://D:/MyProject/gogs/sannongzixunwang_web_ssr/sannongzixunwang_web/node_modules/ofetch/dist/node.mjs';
-import { createCall, createFetch } from 'file://D:/MyProject/gogs/sannongzixunwang_web_ssr/sannongzixunwang_web/node_modules/unenv/runtime/fetch/index.mjs';
+import { getRequestHeader, splitCookiesString, setResponseStatus, setResponseHeader, send, getRequestHeaders, defineEventHandler, handleCacheHeaders, createEvent, fetchWithEvent, isEvent, eventHandler, setHeaders, sendRedirect, proxyRequest, createApp, createRouter as createRouter$1, toNodeListener, lazyEventHandler, getResponseStatus, setResponseHeaders, createError, getRouterParam, getQuery as getQuery$1, readBody, getResponseStatusText } from 'file://D:/01_AA_ssr_pre/sannongzixunwang_web/node_modules/h3/dist/index.mjs';
+import { getRequestDependencies, getPreloadLinks, getPrefetchLinks, createRenderer } from 'file://D:/01_AA_ssr_pre/sannongzixunwang_web/node_modules/vue-bundle-renderer/dist/runtime.mjs';
+import { stringify, uneval } from 'file://D:/01_AA_ssr_pre/sannongzixunwang_web/node_modules/devalue/index.js';
+import destr from 'file://D:/01_AA_ssr_pre/sannongzixunwang_web/node_modules/destr/dist/index.mjs';
+import { withQuery, joinURL, withTrailingSlash, parseURL, withoutBase, getQuery, joinRelativeURL } from 'file://D:/01_AA_ssr_pre/sannongzixunwang_web/node_modules/ufo/dist/index.mjs';
+import { renderToString } from 'file://D:/01_AA_ssr_pre/sannongzixunwang_web/node_modules/vue/server-renderer/index.mjs';
+import { propsToString, renderSSRHead } from 'file://D:/01_AA_ssr_pre/sannongzixunwang_web/node_modules/@unhead/ssr/dist/index.mjs';
+import { createServerHead as createServerHead$1, CapoPlugin } from 'file://D:/01_AA_ssr_pre/sannongzixunwang_web/node_modules/unhead/dist/index.mjs';
+import { klona } from 'file://D:/01_AA_ssr_pre/sannongzixunwang_web/node_modules/klona/dist/index.mjs';
+import defu, { defuFn } from 'file://D:/01_AA_ssr_pre/sannongzixunwang_web/node_modules/defu/dist/defu.mjs';
+import { snakeCase } from 'file://D:/01_AA_ssr_pre/sannongzixunwang_web/node_modules/scule/dist/index.mjs';
+import { createHooks } from 'file://D:/01_AA_ssr_pre/sannongzixunwang_web/node_modules/hookable/dist/index.mjs';
+import { createFetch as createFetch$1, Headers as Headers$1 } from 'file://D:/01_AA_ssr_pre/sannongzixunwang_web/node_modules/ofetch/dist/node.mjs';
+import { createCall, createFetch } from 'file://D:/01_AA_ssr_pre/sannongzixunwang_web/node_modules/unenv/runtime/fetch/index.mjs';
 import { AsyncLocalStorage } from 'node:async_hooks';
-import { consola } from 'file://D:/MyProject/gogs/sannongzixunwang_web_ssr/sannongzixunwang_web/node_modules/consola/dist/index.mjs';
-import { getContext } from 'file://D:/MyProject/gogs/sannongzixunwang_web_ssr/sannongzixunwang_web/node_modules/unctx/dist/index.mjs';
-import { captureRawStackTrace, parseRawStackTrace } from 'file://D:/MyProject/gogs/sannongzixunwang_web_ssr/sannongzixunwang_web/node_modules/errx/dist/index.js';
-import { isVNode, version, unref } from 'file://D:/MyProject/gogs/sannongzixunwang_web_ssr/sannongzixunwang_web/node_modules/vue/index.mjs';
-import { hash } from 'file://D:/MyProject/gogs/sannongzixunwang_web_ssr/sannongzixunwang_web/node_modules/ohash/dist/index.mjs';
-import { createStorage, prefixStorage } from 'file://D:/MyProject/gogs/sannongzixunwang_web_ssr/sannongzixunwang_web/node_modules/unstorage/dist/index.mjs';
-import unstorage_47drivers_47fs from 'file://D:/MyProject/gogs/sannongzixunwang_web_ssr/sannongzixunwang_web/node_modules/unstorage/drivers/fs.mjs';
-import { toRouteMatcher, createRouter } from 'file://D:/MyProject/gogs/sannongzixunwang_web_ssr/sannongzixunwang_web/node_modules/radix3/dist/index.mjs';
-import { defineHeadPlugin } from 'file://D:/MyProject/gogs/sannongzixunwang_web_ssr/sannongzixunwang_web/node_modules/@unhead/shared/dist/index.mjs';
+import { consola } from 'file://D:/01_AA_ssr_pre/sannongzixunwang_web/node_modules/consola/dist/index.mjs';
+import { getContext } from 'file://D:/01_AA_ssr_pre/sannongzixunwang_web/node_modules/unctx/dist/index.mjs';
+import { captureRawStackTrace, parseRawStackTrace } from 'file://D:/01_AA_ssr_pre/sannongzixunwang_web/node_modules/errx/dist/index.js';
+import { isVNode, version, unref } from 'file://D:/01_AA_ssr_pre/sannongzixunwang_web/node_modules/vue/index.mjs';
+import { hash } from 'file://D:/01_AA_ssr_pre/sannongzixunwang_web/node_modules/ohash/dist/index.mjs';
+import { createStorage, prefixStorage } from 'file://D:/01_AA_ssr_pre/sannongzixunwang_web/node_modules/unstorage/dist/index.mjs';
+import unstorage_47drivers_47fs from 'file://D:/01_AA_ssr_pre/sannongzixunwang_web/node_modules/unstorage/drivers/fs.mjs';
+import { toRouteMatcher, createRouter } from 'file://D:/01_AA_ssr_pre/sannongzixunwang_web/node_modules/radix3/dist/index.mjs';
+import { defineHeadPlugin } from 'file://D:/01_AA_ssr_pre/sannongzixunwang_web/node_modules/@unhead/shared/dist/index.mjs';
 
 function hasReqHeader(event, name, includes) {
   const value = getRequestHeader(event, name);
@@ -172,13 +172,13 @@ if (!window.__NUXT_DEVTOOLS_TIME_METRIC__) {
 window.__NUXT_DEVTOOLS_TIME_METRIC__.appInit = Date.now()
 `;
 
-const _RyJtz6y3Rh = (function(nitro) {
+const _7cXBnH5t1y = (function(nitro) {
   nitro.hooks.hook("render:html", (htmlContext) => {
     htmlContext.head.push(`<script>${script}<\/script>`);
   });
 });
 
-const rootDir = "D:/MyProject/gogs/sannongzixunwang_web_ssr/sannongzixunwang_web";
+const rootDir = "D:/01_AA_ssr_pre/sannongzixunwang_web";
 
 const appHead = {"meta":[{"name":"viewport","content":"width=device-width, initial-scale=1"},{"charset":"utf-8"},{"name":"description","content":""},{"name":"keywords","content":""}],"link":[],"style":[],"script":[],"noscript":[],"title":""};
 
@@ -197,7 +197,7 @@ const devReducers = {
   URL: (data) => data instanceof URL ? data.toString() : undefined
 };
 const asyncContext = getContext("nuxt-dev", { asyncContext: true, AsyncLocalStorage });
-const _KSNIWfahZC = (nitroApp) => {
+const _Xh6VaM7zBC = (nitroApp) => {
   const handler = nitroApp.h3App.handler;
   nitroApp.h3App.handler = (event) => {
     return asyncContext.callAsync({ logs: [], event }, () => handler(event));
@@ -267,20 +267,20 @@ function onConsoleLog(callback) {
 }
 
 const plugins = [
-  _RyJtz6y3Rh,
-_KSNIWfahZC
+  _7cXBnH5t1y,
+_Xh6VaM7zBC
 ];
 
-const _lazy_QP9jGu = () => Promise.resolve().then(function () { return index; });
-const _lazy_wi8B8p = () => Promise.resolve().then(function () { return renderer$1; });
+const _lazy_ejWgYH = () => Promise.resolve().then(function () { return index; });
+const _lazy_HdUhQM = () => Promise.resolve().then(function () { return renderer$1; });
 
 const handlers = [
-  { route: '/api', handler: _lazy_QP9jGu, lazy: true, middleware: false, method: undefined },
-  { route: '/__nuxt_error', handler: _lazy_wi8B8p, lazy: true, middleware: false, method: undefined },
-  { route: '/**', handler: _lazy_wi8B8p, lazy: true, middleware: false, method: undefined }
+  { route: '/api', handler: _lazy_ejWgYH, lazy: true, middleware: false, method: undefined },
+  { route: '/__nuxt_error', handler: _lazy_HdUhQM, lazy: true, middleware: false, method: undefined },
+  { route: '/**', handler: _lazy_HdUhQM, lazy: true, middleware: false, method: undefined }
 ];
 
-const serverAssets = [{"baseName":"server","dir":"D:/MyProject/gogs/sannongzixunwang_web_ssr/sannongzixunwang_web/server/assets"}];
+const serverAssets = [{"baseName":"server","dir":"D:/01_AA_ssr_pre/sannongzixunwang_web/server/assets"}];
 
 const assets = createStorage();
 
@@ -292,11 +292,11 @@ const storage = createStorage({});
 
 storage.mount('/assets', assets);
 
-storage.mount('root', unstorage_47drivers_47fs({"driver":"fs","readOnly":true,"base":"D:\\MyProject\\gogs\\sannongzixunwang_web_ssr\\sannongzixunwang_web","ignore":["**/node_modules/**","**/.git/**"]}));
-storage.mount('src', unstorage_47drivers_47fs({"driver":"fs","readOnly":true,"base":"D:\\MyProject\\gogs\\sannongzixunwang_web_ssr\\sannongzixunwang_web\\server","ignore":["**/node_modules/**","**/.git/**"]}));
-storage.mount('build', unstorage_47drivers_47fs({"driver":"fs","readOnly":false,"base":"D:\\MyProject\\gogs\\sannongzixunwang_web_ssr\\sannongzixunwang_web\\.nuxt","ignore":["**/node_modules/**","**/.git/**"]}));
-storage.mount('cache', unstorage_47drivers_47fs({"driver":"fs","readOnly":false,"base":"D:\\MyProject\\gogs\\sannongzixunwang_web_ssr\\sannongzixunwang_web\\.nuxt\\cache","ignore":["**/node_modules/**","**/.git/**"]}));
-storage.mount('data', unstorage_47drivers_47fs({"driver":"fs","base":"D:\\MyProject\\gogs\\sannongzixunwang_web_ssr\\sannongzixunwang_web\\.data\\kv","ignore":["**/node_modules/**","**/.git/**"]}));
+storage.mount('root', unstorage_47drivers_47fs({"driver":"fs","readOnly":true,"base":"D:\\01_AA_ssr_pre\\sannongzixunwang_web","ignore":["**/node_modules/**","**/.git/**"]}));
+storage.mount('src', unstorage_47drivers_47fs({"driver":"fs","readOnly":true,"base":"D:\\01_AA_ssr_pre\\sannongzixunwang_web\\server","ignore":["**/node_modules/**","**/.git/**"]}));
+storage.mount('build', unstorage_47drivers_47fs({"driver":"fs","readOnly":false,"base":"D:\\01_AA_ssr_pre\\sannongzixunwang_web\\.nuxt","ignore":["**/node_modules/**","**/.git/**"]}));
+storage.mount('cache', unstorage_47drivers_47fs({"driver":"fs","readOnly":false,"base":"D:\\01_AA_ssr_pre\\sannongzixunwang_web\\.nuxt\\cache","ignore":["**/node_modules/**","**/.git/**"]}));
+storage.mount('data', unstorage_47drivers_47fs({"driver":"fs","base":"D:\\01_AA_ssr_pre\\sannongzixunwang_web\\.data\\kv","ignore":["**/node_modules/**","**/.git/**"]}));
 
 function useStorage(base = "") {
   return base ? prefixStorage(storage, base) : storage;
@@ -1167,8 +1167,8 @@ function publicAssetsURL(...path) {
 
 globalThis.__buildAssetsURL = buildAssetsURL;
 globalThis.__publicAssetsURL = publicAssetsURL;
-const getClientManifest = () => import('file://D:/MyProject/gogs/sannongzixunwang_web_ssr/sannongzixunwang_web/.nuxt/dist/server/client.manifest.mjs').then((r) => r.default || r).then((r) => typeof r === "function" ? r() : r);
-const getServerEntry = () => import('file://D:/MyProject/gogs/sannongzixunwang_web_ssr/sannongzixunwang_web/.nuxt/dist/server/server.mjs').then((r) => r.default || r);
+const getClientManifest = () => import('file://D:/01_AA_ssr_pre/sannongzixunwang_web/.nuxt/dist/server/client.manifest.mjs').then((r) => r.default || r).then((r) => typeof r === "function" ? r() : r);
+const getServerEntry = () => import('file://D:/01_AA_ssr_pre/sannongzixunwang_web/.nuxt/dist/server/server.mjs').then((r) => r.default || r);
 const getSSRStyles = lazyCachedFunction(() => Promise.resolve().then(function () { return styles$1; }).then((r) => r.default || r));
 const getSSRRenderer = lazyCachedFunction(async () => {
   const manifest = await getClientManifest();

文件差異過大導致無法顯示
+ 0 - 0
.nuxt/dev/index.mjs.map


+ 2 - 2
.nuxt/dist/server/client.manifest.json

@@ -7,12 +7,12 @@
     "module": true,
     "resourceType": "script"
   },
-  "D:/MyProject/gogs/sannongzixunwang_web_ssr/sannongzixunwang_web/node_modules/nuxt/dist/app/entry.js": {
+  "D:/01_AA_ssr_pre/sannongzixunwang_web/node_modules/nuxt/dist/app/entry.js": {
     "resourceType": "script",
     "module": true,
     "prefetch": true,
     "preload": true,
     "isEntry": true,
-    "file": "D:/MyProject/gogs/sannongzixunwang_web_ssr/sannongzixunwang_web/node_modules/nuxt/dist/app/entry.js"
+    "file": "D:/01_AA_ssr_pre/sannongzixunwang_web/node_modules/nuxt/dist/app/entry.js"
   }
 }

+ 1 - 1
.nuxt/dist/server/client.manifest.mjs

@@ -1 +1 @@
-export { default } from "file:///D:/MyProject/gogs/sannongzixunwang_web_ssr/sannongzixunwang_web/node_modules/@nuxt/vite-builder/dist/runtime/client.manifest.mjs"
+export { default } from "file:///D:/01_AA_ssr_pre/sannongzixunwang_web/node_modules/@nuxt/vite-builder/dist/runtime/client.manifest.mjs"

+ 1 - 1
.nuxt/dist/server/server.mjs

@@ -1 +1 @@
-export { default } from "file:///D:/MyProject/gogs/sannongzixunwang_web_ssr/sannongzixunwang_web/node_modules/@nuxt/vite-builder/dist/runtime/vite-node.mjs"
+export { default } from "file:///D:/01_AA_ssr_pre/sannongzixunwang_web/node_modules/@nuxt/vite-builder/dist/runtime/vite-node.mjs"

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

@@ -1 +1 @@
-{"id":"dev","timestamp":1742465298966}
+{"id":"dev","timestamp":1742520715386}

+ 0 - 1
.nuxt/manifest/meta/3c5ef6c8-88e8-4e5c-880e-ea44e58eb694.json

@@ -1 +0,0 @@
-{"id":"3c5ef6c8-88e8-4e5c-880e-ea44e58eb694","timestamp":1742465144795,"matcher":{"static":{},"wildcard":{},"dynamic":{}},"prerendered":[]}

+ 1 - 0
.nuxt/manifest/meta/a3ac4d52-dba8-4dd3-8736-8417734fe6be.json

@@ -0,0 +1 @@
+{}

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

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

+ 3 - 3
.nuxt/nitro.json

@@ -1,5 +1,5 @@
 {
-  "date": "2025-03-20T10:08:22.118Z",
+  "date": "2025-03-21T01:32:05.701Z",
   "preset": "nitro-dev",
   "framework": {
     "name": "nuxt",
@@ -9,9 +9,9 @@
     "nitro": "2.10.4"
   },
   "dev": {
-    "pid": 3424,
+    "pid": 8832,
     "workerAddress": {
-      "socketPath": "\\\\.\\pipe\\nitro\\worker-3424-1.sock"
+      "socketPath": "\\\\.\\pipe\\nitro\\worker-8832-1.sock"
     }
   }
 }

+ 2 - 2
.nuxt/nuxt.json

@@ -1,7 +1,7 @@
 {
-  "_hash": "1rNbmyQyEO",
+  "_hash": "12ZOucNUoJ",
   "project": {
-    "rootDir": "D:/MyProject/gogs/sannongzixunwang_web_ssr/sannongzixunwang_web"
+    "rootDir": "D:/01_AA_ssr_pre/sannongzixunwang_web"
   },
   "versions": {
     "nuxt": "3.15.2"

+ 119 - 0
assets/css/list.less

@@ -2,11 +2,130 @@
     width: 100%;
     overflow: hidden;
 }
+//二级栏目
+.sannongzhichuang {
+    margin: 30px 0 40px;
+
+    .inner {
+        width: 1200px;
+        height: 67px;
+        position: relative;
+    }
+
+    h2 {
+        display: inline-block;
+        //background-image: url("../../public/image/bg1.png");
+        background: #139602;
+        width: 156px;
+        height: 43px;
+        padding: 14px 31px 10px 25px;
+        font-family: STXingkai, STXingkai;
+        font-weight: 400;
+        font-size: 39px;
+        color: #FFFFFF;
+        line-height: 46px;
+        text-align: center;
+        font-style: normal;
+        text-transform: none;
+        -webkit-text-stroke: 0.3px #3C6C47;
+        position: absolute;
+        top: 0;
+        left: 0;
+        z-index: 99;
+
+        em {
+            position: absolute;
+            top: -16px;
+            right: -12px;
+            color: #185410;
+            display: inline-block;
+            width: 13px;
+            height: 13px;
+        }
+
+        a {
+            font-family: STXingkai, STXingkai;
+            font-weight: 400;
+            font-size: 39px;
+            color: #FFFFFF;
+            line-height: 46px;
+            text-align: center;
+            -webkit-text-stroke: 0.3px #3C6C47;
+        }
+    }
+
+    p.introduction {
+        display: inline-block;
+        width: 1003px;
+        height: 56px;
+        line-height: 56px;
+        background-color: #fafafa;
+        position: absolute;
+        bottom: 0;
+        right: 0;
+        display: flex;
+
+        >strong:first-child {
+            margin-left: 40px;
+            display: inline-block;
+            vertical-align: middle;
+            width: 32px;
+            height: 36px;
+            padding: 3px 7px;
+            border: 0.5px solid #129502;
+            font-family: Microsoft YaHei, Microsoft YaHei;
+            font-weight: bold;
+            font-size: 14px;
+            color: #139602;
+            line-height: 18px;
+            text-align: center;
+            font-style: normal;
+            text-transform: none;
+
+        }
+
+        div {
+            overflow: hidden;
+            text-overflow: ellipsis;
+            white-space: nowrap;
+
+            >span {
+                width: 64px;
+                height: 21px;
+                font-family: Microsoft YaHei, Microsoft YaHei;
+                font-weight: 400;
+                font-size: 16px;
+                color: #000000;
+                line-height: 21px;
+                text-align: left;
+                font-style: normal;
+                text-transform: none;
+                margin-top: 17px;
+                padding: 0 24px;
+                border-right: 1px solid #ccc;
+
+                a {
+                    color: #000;
+                }
+            }
+
+            >span:hover a {
+                color: #139602;
+            }
+
+            >span:last-child {
+                border: none;
+            }
+        }
+
+    }
+}
 
 //导航条
 .breadcrumb {
     width: 100%;
     height: 22px;
+    margin-top: 30px;
     margin-bottom: 30px;
     font-family: Microsoft YaHei, Microsoft YaHei;
     font-weight: 400;

+ 2 - 2
components/detail/HotNews.vue

@@ -2,7 +2,7 @@
     <div class="hotList">
         <div class="title">
             <h4>
-                今日热点
+                最新资讯
             </h4>
         </div>
         <ul class="messageList">
@@ -30,7 +30,7 @@ async function getPageData() {
         hotNewsList.value = mkdata.data;
     }else{
         console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
-        console.log("错误位置:获取今日热点")
+        console.log("错误位置:获取最新资讯")
         console.log("后端错误反馈:",mkdata.message)
         console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
     }

+ 1 - 1
components/detail/HotNews2.vue

@@ -80,7 +80,7 @@ getPageData();
 
 .rightList {
     height: 654px;
-    padding-top: 20px;
+    // padding-top: 20px;
     background-color: #fbfbfb;
 
     >li {

+ 1 - 1
components/home/PageMessage.vue

@@ -88,7 +88,7 @@ async function getModelData3() {
         method: 'GET',
         query: {
             'pageSize': 8,
-            'level': 4,
+            'level': 6,
             'placeid': 0
         },
     });

+ 98 - 23
pages/newsList/[id].vue

@@ -9,6 +9,25 @@
         <!-- 列表页广告一 -->
         <HomeTopTen :imgurl="adImg1" v-if="adImg1"></HomeTopTen>
 
+        <!-- 二级标题-->
+        <div class="sannongzhichuang" v-if="parent_name != ''">
+            <div class="inner">
+                <h2>
+                    <NuxtLink :to="`/primaryNavigation/${parent_id}`"> {{ parent_name }}</NuxtLink>
+                    <em class="iconfont icon-xingzhuang-zhijiaosanjiaoxing-copy"></em>
+                </h2>
+                <p class="introduction">
+                    <strong>频道介绍</strong>
+                <div v-for="(item, index) in secondNav" :key="index">
+                    <span v-if="index <= 7">
+                        <NuxtLink :to="{ path: `/newsList/${item.category_id}` }">{{ item.alias }}</NuxtLink>
+                    </span>
+                    <b v-else></b>
+                </div>
+                </p>
+            </div>
+        </div>
+
         <!-- 面包屑导航 -->
         <div class="breadcrumb">
             <div class="inner">
@@ -17,6 +36,9 @@
                     <el-breadcrumb-item>
                         <NuxtLink to="/">首页</NuxtLink>
                     </el-breadcrumb-item>
+                    <el-breadcrumb-item v-if="parent_name != ''">
+                        <NuxtLink :to="`/primaryNavigation/${parent_id}`"> {{ parent_name }}</NuxtLink>
+                    </el-breadcrumb-item>
                     <el-breadcrumb-item>{{ name }}</el-breadcrumb-item>
                 </el-breadcrumb>
             </div>
@@ -27,8 +49,10 @@
                 <div class="innerLeft">
                     <ul class="list">
                         <li v-for="(item, index) in newsList" :key="index">
-                            <NuxtLink :to="item.linkurl" v-show="item.islink==1" :title="item.title">{{ item.title }}</NuxtLink>
-                            <NuxtLink :to="`/newsDetail/${item.id}`" v-if="item.islink==0" :title="item.title">{{ item.title }}</NuxtLink>
+                            <NuxtLink :to="item.linkurl" v-show="item.islink == 1" :title="item.title">{{ item.title }}
+                            </NuxtLink>
+                            <NuxtLink :to="`/newsDetail/${item.id}`" v-if="item.islink == 0" :title="item.title">{{
+                                item.title }}</NuxtLink>
                         </li>
                     </ul>
                     <!-- 分页器 -->
@@ -79,21 +103,21 @@ id.value = route.query.id;
 //广告列表
 let adImg1 = ref({});
 let adImg2 = ref({});
-async function getAdData(){
-    const adData = await requestDataPromise('/web/getWebsiteAdvertisement',{method:'GET',query:{'ad_tag':'LIST'}});
-    if(adData.code==200){
-        for(let item of adData.data){
-            if(item.ad_tag == 'LIST_0001'){
+async function getAdData() {
+    const adData = await requestDataPromise('/web/getWebsiteAdvertisement', { method: 'GET', query: { 'ad_tag': 'LIST' } });
+    if (adData.code == 200) {
+        for (let item of adData.data) {
+            if (item.ad_tag == 'LIST_0001') {
                 adImg1.value = item;
             }
-            if(item.ad_tag == 'LIST_0002'){
+            if (item.ad_tag == 'LIST_0002') {
                 adImg2.value = item;
             }
         }
-    }else{
+    } else {
         console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
         console.log("错误位置:获取广告列表")
-        console.log("后端错误反馈:",adData.message)
+        console.log("后端错误反馈:", adData.message)
         console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
     }
 }
@@ -102,21 +126,21 @@ getAdData();
 //2.2新闻列表
 const newsList = ref([]);
 let newslists = async () => {
-    const listData =  await requestDataPromise('/web/getWebsiteArticleList', {
+    const listData = await requestDataPromise('/web/getWebsiteArticleList', {
         method: 'GET',
         query: {
             'page': page.value,
             'pageSize': pageSize.value,
-            'catid':articleId
+            'catid': articleId
         },
     });
-    if(listData.code==200){
+    if (listData.code == 200) {
         newsList.value = listData.data.rows;
         total.value = listData.data.count;
-    }else{
+    } else {
         console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
         console.log("错误位置:获取新闻列表")
-        console.log("后端错误反馈:",listData.message)
+        console.log("后端错误反馈:", listData.message)
         console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
     }
 }
@@ -133,18 +157,18 @@ let changePage = (value) => {
 
 //2.3获得页面名称
 let getPageName = async () => {
-    const pageName =  await requestDataPromise('/web/getOneWebsiteCategory', {
+    const pageName = await requestDataPromise('/web/getOneWebsiteCategory', {
         method: 'GET',
         query: {
             'catid': articleId
         },
     });
-    if(pageName.code==200){
+    if (pageName.code == 200) {
         name.value = pageName.data.alias
-    }else{
+    } else {
         console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
         console.log("错误位置:设置页面标题")
-        console.log("后端错误反馈:",pageName.message)
+        console.log("后端错误反馈:", pageName.message)
         console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
     }
 }
@@ -153,16 +177,67 @@ getPageName();
 
 //2.页面数据 end ---------------------------------------->
 
+
+//3.二级栏目 start ---------------------------------------->
+//3.1通过id获取父栏目
+const parent_name = ref([]);
+const parent_id = ref([]);
+let getParentNav = async () => {
+    const listData = await requestDataPromise('/web/getOneWebsiteCategory', {
+        method: 'GET',
+        query: {
+            'catid': articleId
+        },
+    });
+    if (listData.code == 200) {
+        console.log(listData.data);
+        parent_name.value = listData.data.parent_name;
+        parent_id.value = listData.data.parent_id;
+    } else {
+        console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
+        console.log("错误位置:获取新闻列表")
+        console.log("后端错误反馈:", listData.message)
+        console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
+    }
+    getSecondNav();
+}
+//获得列表
+getParentNav();
+
+// 3.2获取二级栏目
+const secondNav = ref([]);
+let getSecondNav = async () => {
+    const listData = await requestDataPromise('/web/getWebsiteModelCategory', {
+        method: 'GET',
+        query: {
+            'placeid': 1,
+            'pid': parent_id.value,
+            'num': 8,
+        },
+    });
+    console.log('listData', listData);
+
+    if (listData.code == 200) {
+        secondNav.value = listData.data;
+    } else {
+        console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
+        console.log("错误位置:获取新闻列表")
+        console.log("后端错误反馈:", listData.message)
+        console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
+    }
+}
+//3.二级栏目 end ---------------------------------------->
+
 //4.设置seo信息 start---------------------------------------->
 //4.1 设置seo信息
-const setData =  await requestDataPromise('/web/getWebsiteCategoryHead', {
+const setData = await requestDataPromise('/web/getWebsiteCategoryHead', {
     method: 'GET',
     query: {
         'catid': articleId
     },
 });
 
-if(setData.code == 200){
+if (setData.code == 200) {
     let seoTitle = setData.data.seo_title;
     let seoDescription = setData.data.seo_description;
     let seoKeywords = setData.data.seo_keywords;
@@ -176,10 +251,10 @@ if(setData.code == 200){
             { name: 'keywords', content: seoKeywords + "_" + seoName + "_" + seoSuffix }
         ]
     });
-}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 ---------->")
 }
 

二進制
public/favicon.ico


部分文件因文件數量過多而無法顯示