Browse Source

完成页面优化

完成页面优化
dangyunlong 4 days ago
parent
commit
b22aac446f

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

@@ -29,7 +29,7 @@ export { onBeforeRouteLeave, onBeforeRouteUpdate, useLink } from 'vue-router';
 export { withCtx, withDirectives, withKeys, withMemo, withModifiers, withScopeId, onActivated, onBeforeMount, onBeforeUnmount, onBeforeUpdate, onDeactivated, onErrorCaptured, onMounted, onRenderTracked, onRenderTriggered, onServerPrefetch, onUnmounted, onUpdated, computed, customRef, isProxy, isReactive, isReadonly, isRef, markRaw, proxyRefs, reactive, readonly, ref, shallowReactive, shallowReadonly, shallowRef, toRaw, toRef, toRefs, triggerRef, unref, watch, watchEffect, watchPostEffect, watchSyncEffect, isShallow, effect, effectScope, getCurrentScope, onScopeDispose, defineComponent, defineAsyncComponent, resolveComponent, getCurrentInstance, h, inject, hasInjectionContext, nextTick, provide, mergeModels, toValue, useModel, useAttrs, useCssModule, useCssVars, useSlots, useTransitionState, useId, useTemplateRef, useShadowRoot, Component, ComponentPublicInstance, ComputedRef, DirectiveBinding, ExtractDefaultPropTypes, ExtractPropTypes, ExtractPublicPropTypes, InjectionKey, PropType, Ref, MaybeRef, MaybeRefOrGetter, VNode, WritableComputedRef } from 'vue';
 export { injectHead, useHead, useSeoMeta, useHeadSafe, useServerHead, useServerSeoMeta, useServerHeadSafe } from '@unhead/vue';
 export { requestData, requestDataPromise, requestDataWebUrl, requestHome } from '../composables/getData';
-export { getTime, getTitleLength } from '../composables/publicFunction';
+export { getTime, getTitleLength, getLinkPath, getLinkPathDetail, getRoutePath } from '../composables/publicFunction';
 export { seoSetup } from '../composables/useSeo';
 export { apiUse, asyncFetchData, fGET, fPOST, fPUT, fDELETE, GET, POST, PUT, DELETE } from '../utils/request';
 export { useNuxtDevTools } from '../node_modules/@nuxt/devtools/dist/runtime/use-nuxt-devtools';

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

@@ -1 +1 @@
-{"id":"dev","timestamp":1744589862929}
+{"id":"dev","timestamp":1744608806222}

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

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

+ 3 - 3
.nuxt/nitro.json

@@ -1,5 +1,5 @@
 {
-  "date": "2025-04-14T00:17:51.540Z",
+  "date": "2025-04-14T05:33:34.835Z",
   "preset": "nitro-dev",
   "framework": {
     "name": "nuxt",
@@ -9,9 +9,9 @@
     "nitro": "2.10.4"
   },
   "dev": {
-    "pid": 17380,
+    "pid": 8572,
     "workerAddress": {
-      "socketPath": "\\\\.\\pipe\\nitro\\worker-17380-1.sock"
+      "socketPath": "\\\\.\\pipe\\nitro\\worker-8572-1.sock"
     }
   }
 }

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

@@ -37,6 +37,9 @@ declare global {
   const getAppManifest: typeof import('../../node_modules/nuxt/dist/app/composables/manifest')['getAppManifest']
   const getCurrentInstance: typeof import('vue')['getCurrentInstance']
   const getCurrentScope: typeof import('vue')['getCurrentScope']
+  const getLinkPath: typeof import('../../composables/publicFunction')['getLinkPath']
+  const getLinkPathDetail: typeof import('../../composables/publicFunction')['getLinkPathDetail']
+  const getRoutePath: typeof import('../../composables/publicFunction')['getRoutePath']
   const getRouteRules: typeof import('../../node_modules/nuxt/dist/app/composables/manifest')['getRouteRules']
   const getTime: typeof import('../../composables/publicFunction')['getTime']
   const getTitleLength: typeof import('../../composables/publicFunction')['getTitleLength']
@@ -232,6 +235,9 @@ declare module 'vue' {
     readonly getAppManifest: UnwrapRef<typeof import('../../node_modules/nuxt/dist/app/composables/manifest')['getAppManifest']>
     readonly getCurrentInstance: UnwrapRef<typeof import('vue')['getCurrentInstance']>
     readonly getCurrentScope: UnwrapRef<typeof import('vue')['getCurrentScope']>
+    readonly getLinkPath: UnwrapRef<typeof import('../../composables/publicFunction')['getLinkPath']>
+    readonly getLinkPathDetail: UnwrapRef<typeof import('../../composables/publicFunction')['getLinkPathDetail']>
+    readonly getRoutePath: UnwrapRef<typeof import('../../composables/publicFunction')['getRoutePath']>
     readonly getRouteRules: UnwrapRef<typeof import('../../node_modules/nuxt/dist/app/composables/manifest')['getRouteRules']>
     readonly getTime: UnwrapRef<typeof import('../../composables/publicFunction')['getTime']>
     readonly getTitleLength: UnwrapRef<typeof import('../../composables/publicFunction')['getTitleLength']>

+ 2 - 24
404.vue

@@ -1,6 +1,6 @@
 <template>
   <div class="errorBox">
-    <img src="https://img.bjzxtw.org.cn/pre/public/error/404.png" alt="遇到了网络错误!">
+    <img src="@/public/error/404.png" alt="遇到了网络错误!">
     <div @click="goHome" class="goHome">
       返回网站首页
     </div>
@@ -18,27 +18,5 @@ const goHome = () => {
 </script>
 
 <style lang="less" scoped>
-  .errorBox {
-    width: 100%;
-    text-align: center;
-    padding-top: 150px;
-    img {
-      width: 532px;
-      height: 440px;
-      margin: 0 auto;
-    }
-    .goHome {
-      width: 152px;
-      height: 48px;
-      line-height: 48px;
-      font-size: 16px;
-      color: #fff;
-      text-align: center;
-      margin: 0 auto;
-      background: #028E21;
-      border-radius: 8px;
-      margin-top: 70px;
-      cursor: pointer;
-    }
-  }
+  @import '@/assets/css/error.less';
 </style>

+ 223 - 0
assets/css/about.less

@@ -0,0 +1,223 @@
+//导航条
+.breadcrumb {
+  width: 1200px;
+  margin: 0 auto;
+  height: 22px;
+  padding-bottom: 40px;
+  margin-top: 40px;
+  margin-bottom: 60px;
+  border-bottom: 1px solid #d9d9d9;
+  font-family: Microsoft YaHei, Microsoft YaHei;
+  font-weight: 400;
+  font-size: 20px;
+  color: #666666;
+  line-height: 23px;
+  text-align: left;
+  font-style: normal;
+  text-transform: none;
+
+  .el-breadcrumb::v-deep {
+      display: inline-block;
+      vertical-align: -4px;
+  }
+
+  /deep/.el-breadcrumb__inner a,
+  /deep/.el-breadcrumb__inner.is-link {
+      color: #666666;
+      font-weight: 400;
+      text-decoration: none;
+      transition: var(--el-transition-color);
+  }
+
+  span {
+      font-family: Microsoft YaHei, Microsoft YaHei;
+      font-weight: 400;
+      font-size: 20px;
+      color: #666666;
+      line-height: 23px;
+      text-align: left;
+      font-style: normal;
+      text-transform: none;
+  }
+
+  span:hover {
+      color: #666666;
+  }
+
+  .location {
+      margin-right: 20px;
+      width: 100px;
+      height: 22px;
+      font-family: Microsoft YaHei, Microsoft YaHei;
+      font-weight: 400;
+      font-size: 20px;
+      color: #666666;
+      line-height: 23px;
+      text-align: left;
+      font-style: normal;
+      text-transform: none;
+  }
+}
+
+// 资讯列表
+.newsDetail {
+  width: 100%;
+  // height: 1400px;
+  // margin-bottom: 70px;
+
+  .inner {
+      width: 1200px;
+      font-size: 16px;
+      position: relative;
+
+      .innerDetail {
+          width: 1080px;
+          margin: 0 auto;
+          margin-bottom: 60px;
+
+          .headImg {
+              width: 1086px;
+              height: 10px;
+              background: url("@/public/special/head11.png") no-repeat 100% 100%;
+          }
+
+          .footImg {
+              width: 1086px;
+              height: 7px;
+              background: url("@/public/special/foot01.png") no-repeat 100% 100%;
+          }
+
+          .innerDetail1 {
+              width: 1086px;
+              margin: 0 auto;
+              padding: 30px 50px 40px;
+              box-sizing: border-box;
+              border-left: 1px solid #DBBE9E;
+              background: url("@/public/special/mid01.png") repeat-y 100% 100%;
+          }
+
+         .leftBottom::v-deep {
+              font-size: 16px;
+              line-height: 40px;  
+         }
+      }
+
+
+
+      .innerLeft {
+          width: 279px;
+          position: absolute;
+          top: 3px;
+          left: -155px;
+
+          .rightMenuTitle {
+              width: 279px;
+              height: 69px;
+              font-size: 22px;
+              font-weight: bold;
+              line-height: 58px;
+              text-align: center;
+              color: #fff;
+              background: url("@/public/special/projectMoreTitle.png") no-repeat;
+              margin-bottom: 30px;
+          }
+
+          ul {
+              li {
+                  a {
+                      display: inline-block;
+                      width: 144px;
+                      height: 60px;
+                      line-height: 60px;
+                      text-align: center;
+                      background-color: #F4F4F4;
+                      border-top: 1px #fff solid;
+                      font-family: Microsoft YaHei, Microsoft YaHei;
+                      font-weight: 400;
+                      font-size: 16px;
+                      color: #000000;
+                  }
+              }
+
+              li:nth-child(1) {
+                  width: 144px;
+                  height: 60px;
+                  line-height: 60px;
+                  text-align: center;
+                  background-color: #F4F4F4;
+                  border-top: 1px #fff solid;
+                  font-family: Microsoft YaHei, Microsoft YaHei;
+                  font-weight: 400;
+                  font-size: 16px;
+                  color: #dd7d18;
+              }
+
+          }
+
+          .active {
+              background: #dd7d18;
+              color: #fff;
+          }
+      }
+  }
+}
+
+//本网招聘
+.projectMoreBox {
+    margin: 0 auto;
+    height: 520px;
+    //margin-top: 20px;
+    //background: url("http://img.bjzxtw.org.cn/master/bjzxtw/public/special/projectMoreBg.png") no-repeat;
+
+    .projectMoreTitle {
+        color: #dd7d18;
+        padding-top: 20px;
+        font-size: 26px;
+        //padding-left: 204px;
+    }
+
+    .projectMoreText {
+        padding: 40px;
+        font-size: 20px;
+        color: #333333;
+        text-indent: 2em;
+        line-height: 36px;
+    }
+}
+
+.innerTitle {
+    font-size: 24px;
+    border-bottom: 1px solid #dd7d18;
+    padding-bottom: 20px;
+}
+
+.list {
+        height: 570px;
+        margin-bottom: 70px;
+        padding-bottom: 10px;
+        margin-top: 10px;
+        >li {
+        width: 790px;
+        height: 60px;
+        white-space: nowrap;
+        overflow: hidden;
+        text-overflow: ellipsis;
+        line-height: 60px;
+        //border-bottom: 1px solid #D9D9D9;
+
+        >a {
+            width: 360px;
+            height: 26px;
+            cursor: pointer;
+            font-family: Microsoft YaHei, Microsoft YaHei;
+            font-weight: 400;
+            font-size: 20px;
+            color: #333333;
+            line-height: 26px;
+            text-align: left;
+            font-style: normal;
+            text-transform: none;
+        }
+
+    }
+}

+ 23 - 0
assets/css/error.less

@@ -0,0 +1,23 @@
+.errorBox {
+  width: 100%;
+  text-align: center;
+  padding-top: 150px;
+  img {
+    width: 532px;
+    height: 440px;
+    margin: 0 auto;
+  }
+  .goHome {
+    width: 152px;
+    height: 48px;
+    line-height: 48px;
+    font-size: 16px;
+    color: #fff;
+    text-align: center;
+    margin: 0 auto;
+    background: #DD7D18;
+    border-radius: 8px;
+    margin-top: 70px;
+    cursor: pointer;
+  }
+}

+ 7 - 7
assets/css/search.less

@@ -89,7 +89,7 @@
 
         .innerLeft,
         .innerRight {
-            border-top: 1px solid #139602;
+            border-top: 1px solid #D9D9D9;
             clear: both;
             float: none;
         }
@@ -126,14 +126,14 @@
                 }
 
                 >li:hover>a {
-                    color: #139602;
+                    color: #DD7D18;
                 }
 
                 >li:nth-child(1)::after,
                 >li:nth-child(2)::after {
                     content: "热";
                     margin-left: 13px;
-                    background: #FF8A37;
+                    background: #DD7D18;
                     color: #fff;
                     font-size: 14px;
                     padding: 0px 2px;
@@ -154,7 +154,7 @@
 
                 // 鼠标移入后字体颜色
                 .el-pagination::v-deep :hover {
-                    color: #139609;
+                    color: #DD7D18;
                 }
 
                 .el-pagination.is-background::v-deep .btn-next,
@@ -175,7 +175,7 @@
                 .el-pagination.is-background::v-deep .btn-next.is-active,
                 .el-pagination.is-background::v-deep .btn-prev.is-active,
                 .el-pagination.is-background::v-deep .el-pager li.is-active {
-                    background-color: #028e21;
+                    background-color: #DD7D18;
                     color: #fff;
                 }
 
@@ -226,7 +226,7 @@
                 text-align: left;
                 font-style: normal;
                 text-transform: none;
-                border-bottom: 1px solid #139602;
+                border-bottom: 1px solid #DD7D18;
 
             }
 
@@ -461,7 +461,7 @@
         button {
             width: 120px;
             height: 48px;
-            background-color: #139602;
+            background-color: #DD7D18;
             color: #fff;
             border: none;
             border-radius: 0;

+ 0 - 3
components/home/ListSecondaryHeading.vue

@@ -25,9 +25,6 @@ const route = useRoute();
 const fullPath = route.path;
 const segments = fullPath.split('/'); 
 const targetRoute = segments[1]; 
-
-console.log(999)
-console.log(targetRoute)
 //1.设置组件数据 end---------------------------------------->
 
 </script>

+ 46 - 3
composables/publicFunction.ts

@@ -1,4 +1,4 @@
-//1.格式化日期
+//1.格式化日期 start ---------------------------------------->
 //time 日期字符串 type 从什么时候开始返回 year = 返回年月日 month = 返回月日..
 //style 样式,比如 年-月-日 年.月.日
 const getTime = function(time:string,type:string,style:Number){
@@ -32,8 +32,9 @@ const getTime = function(time:string,type:string,style:Number){
     return `${day}`;
   }
 }
+//1.格式化日期 end ---------------------------------------->
 
-//2.格式化标题长度
+//2.格式化标题长度 start ---------------------------------------->
 //title 标题 length 长度
 const getTitleLength = function(title:string,length:number){
   if(title.length >= length){
@@ -42,5 +43,47 @@ const getTitleLength = function(title:string,length:number){
     return title;
   }
 }
+//2.格式化标题长度 start ---------------------------------------->
 
-export { getTime,getTitleLength };
+//3.格式化跳转路径 start ---------------------------------------->
+//3.1跳转到频道页面或者一级列表页
+const getLinkPath = (item:any) => {
+  if (item.children_count == 0) {
+      return `/${item.aLIas_pinyin}/list-1.html`;
+  } else {
+      return `/${item.aLIas_pinyin}/index.html`;
+  }
+}
+//3.2跳转到详情页
+const getLinkPathDetail = (item:any) => {
+  if (item.islink == 1) {
+      return `${item.linkurl}`;
+  } else {
+      return `/${item.pinyin}/${item.id}.html`;
+  }
+}
+//3.格式化跳转路径 end ---------------------------------------->
+
+
+//4.获得路由路径 start ---------------------------------------->
+const getRoutePath = (type:Number) => {
+  const route = useRoute();
+  //获得当前的完整路径
+  const fullPath = route.path;
+  //拆分,取出来中间这一段,然后提取数字部分
+  const segments = fullPath.split('/');
+  const targetSegmentOne = segments[1];
+  const targetSegmentTwo = segments[2];
+
+  if(type == 1){
+    return targetSegmentOne;
+  }
+  if(type == 2){
+    return targetSegmentTwo;
+  }
+}
+
+
+
+//4.获得路由路径 end ---------------------------------------->
+export { getTime,getTitleLength,getLinkPath,getLinkPathDetail,getRoutePath};

+ 2 - 24
error.vue

@@ -1,6 +1,6 @@
 <template>
   <div class="errorBox">
-    <img src="https://img.bjzxtw.org.cn/pre/public/error/404.png" alt="遇到了网络错误!">
+    <img src="@/public/error/404.png" alt="遇到了网络错误!">
     <div @click="goHome" class="goHome">
       返回网站首页
     </div>
@@ -18,27 +18,5 @@ const goHome = () => {
 </script>
 
 <style lang="less" scoped>
-  .errorBox {
-    width: 100%;
-    text-align: center;
-    padding-top: 150px;
-    img {
-      width: 532px;
-      height: 440px;
-      margin: 0 auto;
-    }
-    .goHome {
-      width: 152px;
-      height: 48px;
-      line-height: 48px;
-      font-size: 16px;
-      color: #fff;
-      text-align: center;
-      margin: 0 auto;
-      background: #028E21;
-      border-radius: 8px;
-      margin-top: 70px;
-      cursor: pointer;
-    }
-  }
+  @import '@/assets/css/error.less';
 </style>

+ 50 - 79
pages/[dir]/[dir]/[id].vue

@@ -5,28 +5,31 @@
     <HomePageNavigation1></HomePageNavigation1>
     <!-- 列表页广告一 -->
     <HomeTopTen :imgurl="adImg1" v-if="adImg1"></HomeTopTen>
-    <!-- 面包屑导航 -->
-    <div class="breadcrumb">
-        <div class="inner">
-            <span class="location">当前位置:</span>
-            <el-breadcrumb :separator-icon="ArrowRight">
-                <el-breadcrumb-item>
-                    <NuxtLink to="/">首页</NuxtLink>
-                </el-breadcrumb-item>
-                <el-breadcrumb-item>
-                    <NuxtLink :to="`/${parent_pinyin}/index.html`"> {{ parent_name }}</NuxtLink>
-                </el-breadcrumb-item>
-                <el-breadcrumb-item>
-                    <NuxtLink :to="`list-1.html`"> {{ routLevelTitle }}</NuxtLink>
-                </el-breadcrumb-item>
-                <el-breadcrumb-item>{{ routeNewsTtitle }}</el-breadcrumb-item>
-            </el-breadcrumb>
-        </div>
-    </div>
     <!-- 资讯列表 -->
     <div class="newsDetail">
         <div class="inner">
             <div class="innerLeft">
+                <!-- 面包屑导航 -->
+                <div class="breadcrumb">
+                    <div class="inner">
+                        <span class="location">当前位置:</span>
+                        <el-breadcrumb :separator-icon="ArrowRight">
+                            <el-breadcrumb-item>
+                                <NuxtLink to="/">首页</NuxtLink>
+                            </el-breadcrumb-item>
+                            <el-breadcrumb-item v-if="parent_children_count > 0">
+                                <NuxtLink :to="`/${parent_pinyin}/index.html`"> {{ parent_name }}</NuxtLink>
+                            </el-breadcrumb-item>
+                            <el-breadcrumb-item>
+                                <NuxtLink :to="`/${parent_pinyin}/list-1.html`"> {{ parent_name }}</NuxtLink>
+                            </el-breadcrumb-item>
+                            <el-breadcrumb-item>
+                                <NuxtLink :to="`list-1.html`"> {{ routLevelTitle }}</NuxtLink>
+                            </el-breadcrumb-item>
+                            <el-breadcrumb-item>{{ routeNewsTtitle }}</el-breadcrumb-item>
+                        </el-breadcrumb>
+                    </div>
+                </div>
                 <div class="LeftTop">
                     <h1>{{ newsDetail.title }}</h1>
                     <p>
@@ -34,9 +37,7 @@
                         作者: <span>{{ newsDetail.author }}</span>
                         发布时间: <span>{{ time }}</span>
                     </p>
-                    <!-- <img :src="newsDetail.imgurl" v-if="newsDetail.imgurl&&newsDetail.level==2||newsDetail.level==3"> -->
                 </div>
-                <!-- <div class="leftBottom" v-html="newsDetail.content" v-if="newsDetail.content"></div> -->
                 <div 
                     class="leftBottom" 
                     v-html="newsDetail.content" 
@@ -47,7 +48,7 @@
                     <img :src="selectedImage" alt="Preview">
                 </div>
                 <!-- 免责声明: -->
-                <div class="disclaimer" v-if="newsDetail.copyfrom!='本网'">
+                <div class="disclaimer" v-if="newsDetail.copyfrom == '本网'">
                     <p>原文链接:{{ newsDetail.fromurl }}</p>
                     <p>[免责声明]本文来源于网络转载,仅供学习交流使用,不构成商业目的。 版权归原作者所有,如涉及作品内容,版权和其他问题,请在30日与本网联系,我们将第一时间处理。</p>
                 </div>
@@ -146,23 +147,12 @@
 import { onMounted } from 'vue'
 import { ElBreadcrumb, ElBreadcrumbItem,ElRadio, ElRadioGroup,ElCheckbox,ElCheckboxGroup,ElMessage,ElInput } from 'element-plus'
 import { ArrowRight } from '@element-plus/icons-vue'
+//1.页面依赖 end ---------------------------------------->
 
-const nuxtApp = useNuxtApp();
-const axios = nuxtApp.$axios;
-
-//1.1 获得跳转过来的id
+//2.页面路径 start ---------------------------------------->
 const route = useRoute();
-const articleId = parseInt(route.params.id);  //获得该页面的id
-
-//1.2 获得父级栏目的名称、id
-//获得当前的完整路径
-const fullPath = route.path;
-//拆分,取出来中间这一段,然后提取数字部分
-const segments = fullPath.split('/'); 
-const targetSegment = segments[1]; 
-// const numberPart = targetSegment.match(/\d+$/)?.[0]; 
-// const routeId = numberPart;
-
+const articleId = parseInt(route.params.id);
+const targetSegment = getRoutePath(1);
 
 let routeId;
 //通过导航路径反向查询导航id
@@ -180,11 +170,13 @@ if(getRouteId.code == 200){
     console.log("后端错误反馈:",getRouteId.message)
     console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
 }
+//2.页面路径 end ---------------------------------------->
 
-//面包屑导航
+//3.面包屑 start ---------------------------------------->
 const parent_name = ref("");
 const parent_id = ref("");
 const parent_pinyin = ref("");
+
 let getParentNav = async () => {
     const listData = await requestDataPromise('/web/getOneWebsiteCategory', {
         method: 'GET',
@@ -207,20 +199,20 @@ let getParentNav = async () => {
 }
 //获得父级栏目详情
 getParentNav();
-//1.页面依赖 end ---------------------------------------->
+//3.面包屑 end ---------------------------------------->
 
-//2.页面数据 start ---------------------------------------->
-//2.1 资讯详情
+//4.新闻详情 start ---------------------------------------->
+//4.1 资讯详情
 const newsDetail = ref({})
 const routeNewsTtitle = ref("");
-//2.2 发布日期
+//4.2 发布日期
 const time = ref("");
-//2.3 路径
+//4.3 路径
 const routLevelTitle = ref("");
 const routLevelId = ref("");
-//是否展示投票
+//4.4 是否展示投票
 const articleChoice = ref(false);
-//2.4获取详情
+//4.5 获取详情
 async function getPageData() {
     const mkdata =  await requestDataPromise('/web/selectWebsiteArticleInfo', {
         method: 'GET',
@@ -256,27 +248,11 @@ async function getPageData() {
     }
 }
 getPageData();
+//4.新闻详情 end ---------------------------------------->
 
-//2.5 获得广告
-//广告列表
-let adImg1 = ref([]);
-// async function getAdData(){
-//     const adData = await requestDataPromise('/web/getWebsiteAdvertisement',{method:'GET',query:{'ad_tag':'DETAIL'}});
-//     if(adData.code==200){
-//         for(let item of adData.data){
-//             if(item.ad_tag == 'DETAIL_0001'){
-//                 adImg1.value = item;
-//             }
-//         }
-//     }else{
-//         console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
-//         console.log("错误位置:获取详情页广告列表")
-//         console.log("后端错误反馈:",adData.message)
-//         console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
-//     }
-// }
-// getAdData();
 
+//5.广告 start ---------------------------------------->
+let adImg1 = ref([]);
 onMounted(async ()  => {
     const { $webUrl, $CwebUrl } = useNuxtApp();
     //广告1
@@ -291,11 +267,9 @@ onMounted(async ()  => {
     const resultAd1 = await responseAd1.json();
     adImg1.value = resultAd1.data[0];
 })
+//5.广告 end ---------------------------------------->
 
-//2.页面数据 end ---------------------------------------->
-
-//3.设置seo信息 start---------------------------------------->
-//3.1 设置seo信息
+//6.设置seo信息 start---------------------------------------->
 const setData =  await requestDataPromise('/web/selectWebsiteArticleInfo', {
     method: 'GET',
     query: {
@@ -317,14 +291,11 @@ if(setData.code==200){
         ]
     });
 }else{
-    console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
-    console.log("错误位置:设置详情页面SEO数据")
-    console.log("后端错误反馈:",setData.message)
-    console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
+    console.log("获取广告数据失败!",setData.message)
 }
-//3.设置seo信息 end---------------------------------------->
+//6.设置seo信息 end---------------------------------------->
 
-//4.投票 start---------------------------------------->
+//7.投票 start---------------------------------------->
 const radio1 = ref(''); //单选
 const check1 = ref([]); //多选
 const isDisabled = ref(false);//是否禁用提交按钮
@@ -336,7 +307,7 @@ const userIsChoice = ref('');//用于判断其他选项目前是什么值
 const showUserChoice = ref(false);//是否显示其他输入框
 const websiteSurveyData = ref([]);//投票结果
 
-//3.2获得投票列表
+//7.1获得投票列表
 let voteList = ref([]);
 async function getVoteList(){
     const voteData = await requestHome('/web/getWebsiteSurvey',{method:'GET',query:{'art_id':articleId}});
@@ -372,7 +343,7 @@ async function getVoteList(){
 }
 
 
-//3.2当用户选择了选项,判断是否展示其他输入框
+//7.2当用户选择了选项,判断是否展示其他输入框
 const handleRadioChange = (value) => {
     if(value == userIsChoice.value){
         showUserChoice.value = true;
@@ -389,7 +360,7 @@ const handleCheckboxChange = (value) => {
     }
 }
 
-//3.2发起投票
+//7.3发起投票
 async function addWebsiteSurvey(){
     //判断当前是单选还是多选
     console.log(isRadio.value)
@@ -616,9 +587,9 @@ async function addWebsiteSurvey(){
         }
     }
 }
-//4.投票 end---------------------------------------->
+//7.投票 end---------------------------------------->
 
-//5.页面图片放大 start---------------------------------------->
+//8.页面图片放大 start---------------------------------------->
 const previewVisible = ref(false)
 const selectedImage = ref(' ')
 
@@ -631,7 +602,7 @@ const openPreview = (event) => {
 const closePreview = () => {
     previewVisible.value = false;
 }
-//5.页面图片放大 end---------------------------------------->
+//8.页面图片放大 end---------------------------------------->
 </script>
 
 <style lang="less" scoped>

+ 25 - 75
pages/[dir]/[dir]/list-[id].vue

@@ -8,7 +8,6 @@
         <HomeTopTen :imgurl="adImg1" v-if="adImg1"></HomeTopTen>
         <!-- 二级标题-->
         <HomeListSecondaryHeading v-if="parent_name != ''" :name="parent_name" :nav="secondNav"></HomeListSecondaryHeading>
-
         <!-- 资讯列表 -->
         <div class="newsList">
             <div class="inner">
@@ -70,39 +69,14 @@
 import { ElBreadcrumb, ElBreadcrumbItem, ElPagination } from 'element-plus'
 import { ArrowRight } from '@element-plus/icons-vue'
 import { ref, onMounted } from 'vue';
-//当前列表名称
-const name = ref('')
-const { $webUrl, $CwebUrl, $BwebUrl } = useNuxtApp()
-
-//格式化跳转路径
-const getLinkPathDetail = (item) => {
-    if (item.islink == 1) {
-        return `${item.linkurl}`;
-    } else {
-        //return `/${item.aLIas_pinyin}/${item.id}`;
-        //return `/newsDetail/${item.id}`
-        return `/${item.pinyin}/${item.id}.html`;
-    }
-}
 //1.页面必备依赖 end ---------------------------------------->
 
-//1.获得路由id start ---------------------------------------->
+//2.路径 start---------------------------------------->
+//当前列表名称
 const route = useRoute();
-let articleId = 0;//路由id
-let pageNum = ref(2);
-let total = ref(1);
-let pageSize = ref(20);
-
-//获得当前的完整路径
-const fullPath = route.path;
-//拆分,取出来中间这一段,然后提取数字部分
-const segments = fullPath.split('/'); 
-const targetSegment = segments[2]; 
-const targetRoute = segments[1]; 
-
-//const numberPart = targetSegment.match(/\d+$/)?.[0]; 
-//let routeId = 20 //排除路径错误可以打开这个
-//articleId = numberPart;
+let articleId = 0;//列表需要使用的导航id 
+const targetSegment = getRoutePath(2);//根据路由反向查询导航id
+let pageNum = ref(1);//获得路由里面的分页数据
 
 //通过导航路径反向查询导航id
 const getRouteId = await requestDataPromise('/web/getWebsiteRoute', {
@@ -114,23 +88,15 @@ const getRouteId = await requestDataPromise('/web/getWebsiteRoute', {
 if(getRouteId.code == 200){
     articleId = getRouteId.data.category_id
 }else{
-    console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
-    console.log("错误位置:通过url路径查询导航池id")
     console.log("后端错误反馈:",getRouteId.message)
-    console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
 }
-//获得html前的数字
-// const pageUrl = segments[3]; 
-// const pageNumber = pageUrl.split('.')[0];
-// console.log("当前URL中的页码:")
-// console.log(pageNumber)//2
-// pageNum.value = parseInt(pageNumber);
 pageNum.value = parseInt(route.params.id);
+//2.路径 end---------------------------------------->
 
-//1.获得路由id end ---------------------------------------->
+//3.列表 start ---------------------------------------->
+let total = ref(1);
+let pageSize = ref(20);
 
-//2.页面数据 start ---------------------------------------->
-//2.2新闻列表
 const newsList = ref([]);
 let newslists = async () => {
     const listData = await requestDataPromise('/web/getWebsiteArticleList', {
@@ -152,16 +118,19 @@ let newslists = async () => {
         console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
     }
 }
-//获得列表
 newslists();
 
-//分页事件
+//分页
 let changePage = (value) => {
     console.log("当前页码", value);
     navigateTo(`/${targetSegment}/${value}.html`)
 }
+//3.列表 end ---------------------------------------->
+
 
-//2.3获得页面名称
+//4.面包屑 start---------------------------------------->
+//3.1 获得页面名称
+const name = ref('')
 let getPageName = async () => {
     const pageName = await requestDataPromise('/web/getOneWebsiteCategory', {
         method: 'GET',
@@ -172,19 +141,12 @@ let getPageName = async () => {
     if (pageName.code == 200) {
         name.value = pageName.data.alias
     } else {
-        console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
         console.log("错误位置:设置页面标题")
-        console.log("后端错误反馈:", pageName.message)
-        console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
     }
 }
-//获得列表
 getPageName();
-//2.页面数据 end ---------------------------------------->
-
 
-//3.二级栏目 start ---------------------------------------->
-//3.1通过id获取父栏目
+//3.2 获得父级栏目
 const parent_name = ref([]);
 const parent_id = ref([]);
 const parent_pinyin = ref("");
@@ -202,17 +164,13 @@ let getParentNav = async () => {
         parent_id.value = listData.data.parent_id;
         parent_pinyin.value = listData.data.parent_pinyin;
     } else {
-        console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
-        console.log("错误位置:获取新闻列表")
-        console.log("后端错误反馈:", listData.message)
-        console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
+        console.log("错误位置:获取父级栏目")
     }
     getSecondNav();
 }
-//获得父级栏目详情
 getParentNav();
 
-// 3.2获取二级栏目
+// 3.3获取二级栏目
 const secondNav = ref([]);
 let getSecondNav = async () => {
     const listData = await requestDataPromise('/web/getWebsiteModelCategory', {
@@ -228,16 +186,13 @@ let getSecondNav = async () => {
     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 ---------->")
+        console.log("错误位置:获取二级栏目列表")
     }
 }
-//3.二级栏目 end ---------------------------------------->
+//4.面包屑 end ---------------------------------------->
 
-//4.设置seo信息 start---------------------------------------->
-//4.1 设置seo信息
+
+//5.设置seo信息 start---------------------------------------->
 const setData = await requestDataPromise('/web/getWebsiteCategoryHead', {
     method: 'GET',
     query: {
@@ -260,20 +215,15 @@ if (setData.code == 200) {
         ]
     });
 } else {
-    console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
     console.log("错误位置:设置列表页面SEO数据")
-    console.log("后端错误反馈:", setData.message)
-    console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
 }
-//4.设置seo信息 end---------------------------------------->
-
+//5.设置seo信息 end---------------------------------------->
 
-//5.广告 start---------------------------------------->
+//6.广告 start---------------------------------------->
 let adImg1 = ref({});
 let adImg2 = ref({});
 
 onMounted(async ()  => {
-
     //从客户端获取行政职能部门 加快打开速度
     const { $webUrl, $CwebUrl } = useNuxtApp();
     //广告1
@@ -301,7 +251,7 @@ onMounted(async ()  => {
     adImg2.value = resultAd2.data[0];
 
 })
-//5.广告 end---------------------------------------->
+//6.广告 end---------------------------------------->
 </script>
 
 <style lang="less" scoped>

+ 34 - 71
pages/[dir]/[id].vue

@@ -18,7 +18,10 @@
                             <el-breadcrumb-item>
                                 <NuxtLink to="/">首页</NuxtLink>
                             </el-breadcrumb-item>
-                            <el-breadcrumb-item>
+                            <el-breadcrumb-item v-if="parent_children_count > 0">
+                                <NuxtLink :to="`/${parent_pinyin}/index.html`"> {{ parent_name }}</NuxtLink>
+                            </el-breadcrumb-item>
+                            <el-breadcrumb-item v-else">
                                 <NuxtLink :to="`/${parent_pinyin}/list-1.html`"> {{ parent_name }}</NuxtLink>
                             </el-breadcrumb-item>
                             <el-breadcrumb-item>{{ routeNewsTtitle }}</el-breadcrumb-item>
@@ -142,23 +145,10 @@
 import { onMounted } from 'vue'
 import { ElBreadcrumb, ElBreadcrumbItem,ElRadio, ElRadioGroup,ElCheckbox,ElCheckboxGroup,ElMessage,ElInput } from 'element-plus'
 import { ArrowRight } from '@element-plus/icons-vue'
+//1.页面依赖 end ---------------------------------------->
 
-const nuxtApp = useNuxtApp();
-const axios = nuxtApp.$axios;
-
-//1.1 获得跳转过来的id
-const route = useRoute();
-//获得详情id
-const articleId = parseInt(route.params.id); //获得该页面的id
-
-//获得当前的完整路径
-const fullPath = route.path;
-//拆分,取出来中间这一段,然后提取数字部分
-const segments = fullPath.split('/'); 
-const targetSegment = segments[1]; 
-// const numberPart = targetSegment.match(/\d+$/)?.[0]; 
-// let routeId = 20 //排除路径错误可以打开这个
-// const routeId = numberPart;
+//2.页面路径 start ---------------------------------------->
+const targetSegment = getRoutePath(1);
 let routeId;
 //通过导航路径反向查询导航id
 const getRouteId = await requestDataPromise('/web/getWebsiteRoute', {
@@ -170,18 +160,19 @@ const getRouteId = await requestDataPromise('/web/getWebsiteRoute', {
 if(getRouteId.code == 200){
     routeId = getRouteId.data.category_id
 }else{
-    console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
-    console.log("错误位置:通过url路径查询导航池id")
-    console.log("后端错误反馈:",getRouteId.message)
-    console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
+    console.log("错误位置:获得页面路径")
 }
+//2.页面路径 start ---------------------------------------->
 
+//3.面包屑 start ---------------------------------------->
+const route = useRoute();
+const articleId = parseInt(route.params.id); //获得该页面的id
 
-//1.2 获得父级栏目的名称、id
+//3.1 获得父级栏目的名称、id
 const parent_name = ref([]);
 const parent_id = ref([]);
 const parent_pinyin = ref("");
-//const parent_children_count = ref(0)
+const parent_children_count = ref(0)
 let getParentNav = async () => {
     const listData = await requestDataPromise('/web/getOneWebsiteCategory', {
         method: 'GET',
@@ -189,37 +180,30 @@ let getParentNav = async () => {
             'catid': routeId
         },
     });
-    console.log("获取父级栏目数据")
-    console.log(listData)
     if (listData.code == 200) {
-        console.log(listData.data);
         parent_name.value = listData.data.alias;
         parent_id.value = listData.data.parent_id;
         parent_pinyin.value = listData.data.aLIas_pinyin;
-        //parent_children_count = listData.data.children_coun;
+        parent_children_count.value = listData.data.children_count;
     } else {
-        console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
         console.log("错误位置:获取面包屑导航")
-        console.log("后端错误反馈:", listData.message)
-        console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
     }
 }
-//获得父级栏目详情
 getParentNav();
-//1.页面依赖 end ---------------------------------------->
+//3.页面依赖 end ---------------------------------------->
 
-//2.页面数据 start ---------------------------------------->
-//2.1 资讯详情
+//4.页面数据 start ---------------------------------------->
+//4.1 资讯详情
 const newsDetail = ref({})
 const routeNewsTtitle = ref("");
-//2.2 发布日期
+//4.2 发布日期
 const time = ref("");
-//2.3 路径
+//4.3 路径
 const routLevelTitle = ref("");
 const routLevelId = ref("");
-//是否展示投票
+//4.4 是否展示投票
 const articleChoice = ref(false);
-//2.4获取详情
+//4.5 获取详情
 async function getPageData() {
     const mkdata =  await requestDataPromise('/web/selectWebsiteArticleInfo', {
         method: 'GET',
@@ -248,33 +232,14 @@ async function getPageData() {
             routeNewsTtitle.value = newsDetail.value.title
         }
     }else{
-        console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
         console.log("错误位置:获取详情内容")
-        console.log("后端错误反馈:",mkdata.message)
-        console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
     }
 }
 getPageData();
+//4.页面数据 end ---------------------------------------->
 
-//2.5 获得广告
-//广告列表
+//5.广告 start ---------------------------------------->
 let adImg1 = ref([]);
-// async function getAdData(){
-//     const adData = await requestDataPromise('/web/getWebsiteAdvertisement',{method:'GET',query:{'ad_tag':'DETAIL'}});
-//     if(adData.code==200){
-//         for(let item of adData.data){
-//             if(item.ad_tag == 'DETAIL_0001'){
-//                 adImg1.value = item;
-//             }
-//         }
-//     }else{
-//         console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
-//         console.log("错误位置:获取详情页广告列表")
-//         console.log("后端错误反馈:",adData.message)
-//         console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
-//     }
-// }
-// getAdData();
 
 onMounted(async ()  => {
     const { $webUrl, $CwebUrl } = useNuxtApp();
@@ -290,11 +255,9 @@ onMounted(async ()  => {
     const resultAd1 = await responseAd1.json();
     adImg1.value = resultAd1.data[0];
 })
+//5.广告 end ---------------------------------------->
 
-//2.页面数据 end ---------------------------------------->
-
-//3.设置seo信息 start---------------------------------------->
-//3.1 设置seo信息
+//6.设置seo信息 start---------------------------------------->
 const setData =  await requestDataPromise('/web/selectWebsiteArticleInfo', {
     method: 'GET',
     query: {
@@ -321,9 +284,9 @@ if(setData.code==200){
     console.log("后端错误反馈:",setData.message)
     console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
 }
-//3.设置seo信息 end---------------------------------------->
+//6.设置seo信息 end---------------------------------------->
 
-//4.投票 start---------------------------------------->
+//7.投票 start---------------------------------------->
 const radio1 = ref(''); //单选
 const check1 = ref([]); //多选
 const isDisabled = ref(false);//是否禁用提交按钮
@@ -335,7 +298,7 @@ const userIsChoice = ref('');//用于判断其他选项目前是什么值
 const showUserChoice = ref(false);//是否显示其他输入框
 const websiteSurveyData = ref([]);//投票结果
 
-//3.2获得投票列表
+//7.2获得投票列表
 let voteList = ref([]);
 async function getVoteList(){
     const voteData = await requestHome('/web/getWebsiteSurvey',{method:'GET',query:{'art_id':articleId}});
@@ -371,7 +334,7 @@ async function getVoteList(){
 }
 
 
-//3.2当用户选择了选项,判断是否展示其他输入框
+//7.3当用户选择了选项,判断是否展示其他输入框
 const handleRadioChange = (value) => {
     if(value == userIsChoice.value){
         showUserChoice.value = true;
@@ -388,7 +351,7 @@ const handleCheckboxChange = (value) => {
     }
 }
 
-//3.2发起投票
+//7.4发起投票
 async function addWebsiteSurvey(){
     //判断当前是单选还是多选
     console.log(isRadio.value)
@@ -615,9 +578,9 @@ async function addWebsiteSurvey(){
         }
     }
 }
-//4.投票 end---------------------------------------->
+//7.投票 end---------------------------------------->
 
-//5.页面图片放大 start---------------------------------------->
+//8.页面图片放大 start---------------------------------------->
 const previewVisible = ref(false)
 const selectedImage = ref(' ')
 
@@ -630,7 +593,7 @@ const openPreview = (event) => {
 const closePreview = () => {
     previewVisible.value = false;
 }
-//5.页面图片放大 end---------------------------------------->
+//8.页面图片放大 end---------------------------------------->
 </script>
 
 <style lang="less" scoped>

+ 14 - 54
pages/[dir]/index.html.vue

@@ -290,36 +290,11 @@
 //0.加载页面依赖 start ---------------------------------------->
 import { ref, onMounted } from 'vue';
 import { ElMessage } from 'element-plus';
-//格式化跳转路径 - 标题
-//首页分类栏目标题,不需要考虑外链
-const getLinkPath = (item) => {
-    //return `/${item.url}/1.html`;
-    //return `/newsList/${item.cid}?page=1`;
-    return `/${item.aLIas_pinyin}/list-1.html`;
-}
-//首页跳转到详情,这里需要考虑外链
-const getLinkPathDetail = (item) => {
-    if (item.islink == 1) {
-        return `${item.linkurl}`;
-    } else {
-        //return `/${item.aLIas_pinyin}/${item.id}`;
-        //return `/newsDetail/${item.id}`
-        return `/${item.pinyin}/${item.id}.html`;
-    }
-}
 //0.加载页面依赖 end ---------------------------------------->
 
 //1.获得路由id start ---------------------------------------->
-const route = useRoute();
-
-//获得当前的完整路径
-const fullPath = route.path;
-//拆分,取出来中间这一段,然后提取数字部分
-const segments = fullPath.split('/');
-const targetSegment = segments[1];
-//let routeId = 11 //排除路径错误可以打开这个
-//const numberPart = targetSegment.match(/\d+$/)?.[0]; 
-//let routeId = numberPart;
+const targetSegment = getRoutePath(1);
+//1.1 获得当前的路由id
 let routeId;
 //通过导航路径反向查询导航id
 const getRouteId = await requestDataPromise('/web/getWebsiteRoute', {
@@ -331,22 +306,19 @@ const getRouteId = await requestDataPromise('/web/getWebsiteRoute', {
 if (getRouteId.code == 200) {
     routeId = getRouteId.data.category_id
 } else {
-    console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
-    console.log("错误位置:通过url路径查询导航池id")
-    console.log("后端错误反馈:", getRouteId.message)
-    console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
+    console.log("获得路由id出错!", getRouteId.message)
 }
 //1.获得路由id end ---------------------------------------->
 
-//2.页面交互效果 start ---------------------------------------->
-//2.2 选项卡切换
+//2.选项卡 start ---------------------------------------->
 let showTabs = ref(1)
 let qhtabs = function (number) {
     console.log(number)
     showTabs.value = number
 }
+//2.选项卡 end ---------------------------------------->
 
-//2.3 展示广告
+//3.广告 start ---------------------------------------->
 let adImg1 = ref({})
 let adImg2 = ref({})
 let adImg3 = ref({})
@@ -401,12 +373,10 @@ onMounted(async () => {
     });
     const resultAd4 = await responseAd4.json();
     adImg4.value = resultAd4.data[0];
-
 })
-//2.页面交互效果 end ---------------------------------------->
+//3.广告 end ---------------------------------------->
 
-//3.渲染页面数据 start ---------------------------------------->
-//3.2 该页面上需要渲染的所有数据
+//4.页面数据 start ---------------------------------------->
 const pageData = ref([
     //示例:
     // {
@@ -429,9 +399,7 @@ const pageData = ref([
     // },
 ])
 
-const navSize = ref("");
-
-//3.3 获取所有导航
+//4.1 获取所有导航
 try {
     const navigateData = await requestDataPromise('/web/getWebsiteModelCategory', {
         method: 'GET',
@@ -482,7 +450,6 @@ try {
             //{ "parent": routeId + ",0,0", "child": pageData.value[6].cid + ",2,3" },//模块7农村建设
             //{ "parent": routeId + ",0,0", "child": pageData.value[7].cid + ",4,0" },//模块8高端资讯
         ]
-
         let jsonString = JSON.stringify(getJson);
         getPageAllData(jsonString);
 
@@ -493,10 +460,7 @@ try {
         console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
     }
 } catch (error) {
-    console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
-    console.log("错误位置:分类页导航渲染阶段")
-    console.log("错误:导航池渲染执行接口出错!请检查首页的14的模块的具体执行方法!")
-    console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
+    console.log("错误:导航池渲染执行接口出错!请检查频道页渲染的模块数据是否完整!")
 }
 
 
@@ -543,10 +507,9 @@ async function getPageAllData(jsonString) {
         ElMessage.error(mkdata.message)
     }
 }
-//3.渲染页面数据 end ---------------------------------------->
+//4.页面数据 end ---------------------------------------->
 
-//4.设置seo信息 start---------------------------------------->
-//4.1 设置seo信息
+//5.设置seo信息 start---------------------------------------->
 const setData = await requestDataPromise('/web/getWebsiteCategoryHead', {
     method: 'GET',
     query: {
@@ -569,12 +532,9 @@ if (setData.code == 200) {
         ]
     });
 } else {
-    console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
-    console.log("错误位置:设置分类页面SEO数据")
-    console.log("后端错误反馈:", setData.message)
-    console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
+    console.log("设置频道页SEO出错!",setData.message)
 }
-//4.设置seo信息 end---------------------------------------->
+//5.设置seo信息 end---------------------------------------->
 </script>
 
 <style lang="less" scoped>

+ 29 - 77
pages/[dir]/list-[id].vue

@@ -64,40 +64,16 @@
 
 <script setup>
 //1.页面必备依赖 start ---------------------------------------->
-import { ElBreadcrumb, ElBreadcrumbItem, ElPagination } from 'element-plus'
-import { ArrowRight } from '@element-plus/icons-vue'
+import { ElBreadcrumb, ElBreadcrumbItem, ElPagination } from 'element-plus';
+import { ArrowRight } from '@element-plus/icons-vue';
 import { ref, onMounted } from 'vue';
-//当前列表名称
-const name = ref('')
-const { $webUrl, $CwebUrl, $BwebUrl } = useNuxtApp()
-
-//格式化跳转路径
-const getLinkPathDetail = (item) => {
-    if (item.islink == 1) {
-        return `${item.linkurl}`;
-    } else {
-        //return `/${item.aLIas_pinyin}/${item.id}`;
-        //return `/newsDetail/${item.id}`
-        return `/${item.pinyin}/${item.id}.html`;
-    }
-}
 //1.页面必备依赖 end ---------------------------------------->
 
-//1.获得路由id start ---------------------------------------->
+//2.页面路径 start ---------------------------------------->
 const route = useRoute();
-let articleId = 0;//路由id
-let pageNum = ref(2);
-let total = ref(1);
-let pageSize = ref(20);
-
-//获得当前的完整路径
-const fullPath = route.path;
-//拆分,取出来中间这一段,然后提取数字部分
-const segments = fullPath.split('/'); 
-const targetSegment = segments[1]; 
-//const numberPart = targetSegment.match(/\d+$/)?.[0]; 
-//let routeId = 20 //排除路径错误可以打开这个
-
+let articleId = 0; //获取哪个导航下的列表
+//2.1 获得当前的完整路径
+const targetSegment = getRoutePath(1);
 //通过导航路径反向查询导航id
 const getRouteId = await requestDataPromise('/web/getWebsiteRoute', {
     method: 'GET',
@@ -108,24 +84,17 @@ const getRouteId = await requestDataPromise('/web/getWebsiteRoute', {
 if(getRouteId.code == 200){
     articleId = getRouteId.data.category_id
 }else{
-    console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
-    console.log("错误位置:通过url路径查询导航池id")
-    console.log("后端错误反馈:",getRouteId.message)
-    console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
+    console.log("错误位置:获得页面路径")
 }
+//2.页面路径 end ---------------------------------------->
 
-//获得html前的数字
-// const pageUrl = segments[2]; 
-// const pageNumber = pageUrl.split('.')[0];
-// console.log("当前URL中的页码:")
-// console.log(pageNumber)//2
-// pageNum.value = parseInt(pageNumber);
-pageNum.value = parseInt(route.params.id);
-
-//1.获得路由id end ---------------------------------------->
+//3.页面数据 start ---------------------------------------->
+let pageNum = ref(2); //当前页码
+pageNum.value = parseInt(route.params.id);//路由中传递的分页页码
+let total = ref(1); //总条数
+let pageSize = ref(20); //每页条数
 
-//2.页面数据 start ---------------------------------------->
-//2.2新闻列表
+//3.1 新闻列表
 const newsList = ref([]);
 let newslists = async () => {
     const listData = await requestDataPromise('/web/getWebsiteArticleList', {
@@ -141,22 +110,22 @@ let newslists = async () => {
         total.value = listData.data.count;
 
     } else {
-        console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
         console.log("错误位置:获取新闻列表")
-        console.log("后端错误反馈:", listData.message)
-        console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
     }
 }
 //获得列表
 newslists();
 
-//分页事件
+//3.2 分页事件
 let changePage = (value) => {
     console.log("当前页码", value);
     navigateTo(`/${targetSegment}/list-${value}.html`)
 }
+//3.页面数据 end ---------------------------------------->
 
-//2.3获得页面名称
+//4.面包屑 start ---------------------------------------->
+const name = ref('')
+//4.1 当前频道名称
 let getPageName = async () => {
     const pageName = await requestDataPromise('/web/getOneWebsiteCategory', {
         method: 'GET',
@@ -167,18 +136,12 @@ let getPageName = async () => {
     if (pageName.code == 200) {
         name.value = pageName.data.alias
     } else {
-        console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
-        console.log("错误位置:设置页面标题")
-        console.log("后端错误反馈:", pageName.message)
-        console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
+        console.log("错误位置:获取当前频道名称", pageName.message)
     }
 }
-//获得列表
 getPageName();
-//2.页面数据 end ---------------------------------------->
 
-//3.二级栏目 start ---------------------------------------->
-//3.1通过id获取父栏目
+//4.2 查询是否含有父级导航
 const parent_name = ref([]);
 const parent_id = ref([]);
 const parent_pinyin = ref("");
@@ -190,23 +153,17 @@ let getParentNav = async () => {
         },
     });
     if (listData.code == 200) {
-        console.log(111999)
-        console.log(listData.data);
         parent_name.value = listData.data.parent_name;
         parent_id.value = listData.data.parent_id;
         parent_pinyin.value = listData.data.parent_pinyin;
     } else {
-        console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
-        console.log("错误位置:获取新闻列表")
-        console.log("后端错误反馈:", listData.message)
-        console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
+        console.log("错误位置:查询父级导航信息")
     }
     getSecondNav();
 }
-//获得列表
 getParentNav();
 
-// 3.2获取二级栏目
+//4.3 获取二级栏目列表
 const secondNav = ref([]);
 let getSecondNav = async () => {
     const listData = await requestDataPromise('/web/getWebsiteModelCategory', {
@@ -222,16 +179,12 @@ let getSecondNav = async () => {
     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 ---------->")
+        console.log("错误位置:获得二级栏目列表")
     }
 }
-//3.二级栏目 end ---------------------------------------->
+//4.面包屑 end ---------------------------------------->
 
-//4.设置seo信息 start---------------------------------------->
-//4.1 设置seo信息
+//5.设置seo信息 start---------------------------------------->
 const setData = await requestDataPromise('/web/getWebsiteCategoryHead', {
     method: 'GET',
     query: {
@@ -259,10 +212,9 @@ if (setData.code == 200) {
     console.log("后端错误反馈:", setData.message)
     console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
 }
-//4.设置seo信息 end---------------------------------------->
-
+//5.设置seo信息 end---------------------------------------->
 
-//5.广告 start---------------------------------------->
+//6.广告 start---------------------------------------->
 let adImg1 = ref({});
 let adImg2 = ref({});
 
@@ -295,7 +247,7 @@ onMounted(async ()  => {
     adImg2.value = resultAd2.data[0];
 
 })
-//5.广告 end---------------------------------------->
+//6.广告 end---------------------------------------->
 </script>
 
 <style lang="less" scoped>

+ 14 - 191
pages/about/[dir]/[dir]/[id].vue

@@ -22,16 +22,21 @@
     <!-- 资讯列表 -->
     <div class="newsDetail">
         <div class="inner">
-            <div class="innerLeft">
-                <div class="leftBottomTitle">{{ newsDetail.con_title }}</div>
-                <div class="leftBottom" v-html="newsDetail.content" v-if="newsDetail.content"></div>
+            <div class="innerDetail">
+                <div class="headImg"></div>
+                <div class="innerDetail1">
+                    <div class="leftBottom" v-html="newsDetail.content"></div>
+                </div>
+                <div class="footImg"></div>
             </div>
-            <div class="innerRight">
-                <div class="rightMenuTitle">导航列表</div>
+            <div class="innerLeft">
                 <ul>
+                    <li>
+                        导航列表
+                    </li>
                     <li v-for="(item, index) in bottomMenu" :key="index">
                         <NuxtLink :to="`/about/${item.name_pinyin}/index.html`" :title="item.name"
-                            v-if="item.id == pageId && item.id != 7" class="active">
+                            v-if="item.id == pageId && item.id != 7">
                             {{ item.name }}
                         </NuxtLink>
                         <NuxtLink :to="`/about/${item.name_pinyin}/index.html`" :title="item.name"
@@ -39,10 +44,10 @@
                             {{ item.name }}
                         </NuxtLink>
                         <NuxtLink :to="`/about/${item.name_pinyin}/list-1.html`" :title="item.name"
-                            v-if="item.id == 7 && pageId == 7 " class="active">
+                            v-if="item.id == 7 && pageId == 7 && routeHref == '/specialList/7'">
                             {{item.name }}
                         </NuxtLink>
-                        <NuxtLink :to="`/about/${item.name_pinyin}/list-1.html`" :title="item.name" v-else-if="item.id == 7">
+                        <NuxtLink :to="`/about/${item.name_pinyin}/list-1.html`" class="active" :title="item.name" v-else-if="item.id == 7">
                             {{ item.name}}
                         </NuxtLink>
                     </li>
@@ -196,187 +201,5 @@ onMounted(async ()  => {
 </script>
 
 <style lang="less" scoped>
-//导航条
-.breadcrumb {
-    width: 100%;
-    height: 22px;
-    margin-bottom: 30px;
-    font-family: Microsoft YaHei, Microsoft YaHei;
-    font-weight: 400;
-    font-size: 20px;
-    color: #666666;
-    line-height: 23px;
-    text-align: left;
-    font-style: normal;
-    text-transform: none;
-
-    .el-breadcrumb::v-deep {
-        display: inline-block;
-        vertical-align: -4px;
-    }
-
-    /deep/.el-breadcrumb__inner a,
-    /deep/.el-breadcrumb__inner.is-link {
-        color: #666666;
-        font-weight: 400;
-        text-decoration: none;
-        transition: var(--el-transition-color);
-    }
-
-    span {
-        font-family: Microsoft YaHei, Microsoft YaHei;
-        font-weight: 400;
-        font-size: 20px;
-        color: #666666;
-        line-height: 23px;
-        text-align: left;
-        font-style: normal;
-        text-transform: none;
-    }
-
-    span:hover {
-        color: #666666;
-    }
-
-    .location {
-        margin-right: 20px;
-        width: 100px;
-        height: 22px;
-        font-family: Microsoft YaHei, Microsoft YaHei;
-        font-weight: 400;
-        font-size: 20px;
-        color: #666666;
-        line-height: 23px;
-        text-align: left;
-        font-style: normal;
-        text-transform: none;
-    }
-}
-
-// 资讯列表
-.newsDetail {
-    width: 100%;
-    //height: 1400px;
-    margin-bottom: 70px;
-
-    .inner {
-        width: 1200px;
-        //height: 1400px;
-        font-size: 16px;
-
-        .innerLeft {
-            //height: 1400px;
-
-            float: right;
-
-            .LeftTop {
-                //height: 522px;
-                margin-top: 50px;
-
-                >h1 {
-
-                    line-height: 40px;
-                    margin-bottom: 30px;
-                    font-family: Microsoft YaHei, Microsoft YaHei;
-                    font-weight: bold;
-                    font-size: 30px;
-                    color: #333333;
-                }
-
-                >p {
-                    height: 18px;
-                    line-height: 18px;
-                    font-family: Microsoft YaHei, Microsoft YaHei;
-                    font-weight: 400;
-                    font-size: 14px;
-                    color: #999999;
-
-                    span {
-                        margin-right: 40px;
-                    }
-                }
-
-                >img {
-                    width: 680px;
-                    height: 382px;
-                    padding: 50px 0px 60px 55px;
-                }
-            }
-
-            .leftBottomTitle {
-                color: #028E21;
-                font-size: 24px;
-                font-weight: bold;
-                height: 60px;
-                line-height: 60px;
-            }
-
-            .leftBottom {
-                width: 790px;
-                font-size: 20px;
-                border-top: 1px solid #139602;
-                padding-top: 40px;
-
-                >h3,
-                >p {
-                    text-indent: 2em;
-                    width: 790px;
-                    font-family: Microsoft YaHei, Microsoft YaHei;
-                    font-size: 20px;
-                    color: #333333;
-                    line-height: 23px;
-                    padding-bottom: 30px;
-                }
-
-                >h3 {
-                    font-weight: 600px;
-                }
-
-                >p {
-                    font-weight: 400;
-                }
-
-            }
-        }
-
-
-        .innerRight {
-            width: 279px;
-
-            .rightMenuTitle {
-                width: 279px;
-                height: 69px;
-                font-size: 22px;
-                font-weight: bold;
-                line-height: 58px;
-                text-align: center;
-                color: #fff;
-                background: url("http://img.bjzxtw.org.cn/master/bjzxtw/public/special/projectMoreTitle.png") no-repeat;
-                margin-bottom: 30px;
-            }
-
-            ul {
-                li {
-                    a {
-                        border-left: 5px solid #028E21;
-                        margin-bottom: 15px;
-                        font-size: 22px;
-                        display: block;
-                        height: 61px;
-                        line-height: 61px;
-                        color: #333333;
-                        text-align: center;
-                        background: #FBFBFB;
-                    }
-                }
-            }
-
-            .active {
-                border-left: 0;
-                border: 1px solid #028E21;
-                background: #fff;
-            }
-        }
-    }
-}
+@import '@/assets/css/about.less';
 </style>

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

@@ -19,16 +19,22 @@
             </el-breadcrumb>
         </div>
     </div>
+    
     <!-- 资讯列表 -->
     <div class="newsDetail">
         <div class="inner">
-            <div class="innerLeft">
-                <div class="leftBottomTitle">{{ newsDetail.con_title }}</div>
-                <div class="leftBottom" v-html="newsDetail.content" v-if="newsDetail.content"></div>
+            <div class="innerDetail">
+                <div class="headImg"></div>
+                <div class="innerDetail1">
+                    <div class="leftBottom" v-html="newsDetail.content"></div>
+                </div>
+                <div class="footImg"></div>
             </div>
-            <div class="innerRight">
-                <div class="rightMenuTitle">导航列表</div>
+            <div class="innerLeft">
                 <ul>
+                    <li>
+                        导航列表
+                    </li>
                     <li v-for="(item, index) in bottomMenu" :key="index">
                         <NuxtLink :to="`/about/${item.name_pinyin}/index.html`" :title="item.name"
                             v-if="item.id == pageId && item.id != 7" class="active">
@@ -196,187 +202,5 @@ onMounted(async ()  => {
 </script>
 
 <style lang="less" scoped>
-//导航条
-.breadcrumb {
-    width: 100%;
-    height: 22px;
-    margin-bottom: 30px;
-    font-family: Microsoft YaHei, Microsoft YaHei;
-    font-weight: 400;
-    font-size: 20px;
-    color: #666666;
-    line-height: 23px;
-    text-align: left;
-    font-style: normal;
-    text-transform: none;
-
-    .el-breadcrumb::v-deep {
-        display: inline-block;
-        vertical-align: -4px;
-    }
-
-    /deep/.el-breadcrumb__inner a,
-    /deep/.el-breadcrumb__inner.is-link {
-        color: #666666;
-        font-weight: 400;
-        text-decoration: none;
-        transition: var(--el-transition-color);
-    }
-
-    span {
-        font-family: Microsoft YaHei, Microsoft YaHei;
-        font-weight: 400;
-        font-size: 20px;
-        color: #666666;
-        line-height: 23px;
-        text-align: left;
-        font-style: normal;
-        text-transform: none;
-    }
-
-    span:hover {
-        color: #666666;
-    }
-
-    .location {
-        margin-right: 20px;
-        width: 100px;
-        height: 22px;
-        font-family: Microsoft YaHei, Microsoft YaHei;
-        font-weight: 400;
-        font-size: 20px;
-        color: #666666;
-        line-height: 23px;
-        text-align: left;
-        font-style: normal;
-        text-transform: none;
-    }
-}
-
-// 资讯列表
-.newsDetail {
-    width: 100%;
-    //height: 1400px;
-    margin-bottom: 70px;
-
-    .inner {
-        width: 1200px;
-        //height: 1400px;
-        font-size: 16px;
-
-        .innerLeft {
-            //height: 1400px;
-
-            float: right;
-
-            .LeftTop {
-                //height: 522px;
-                margin-top: 50px;
-
-                >h1 {
-
-                    line-height: 40px;
-                    margin-bottom: 30px;
-                    font-family: Microsoft YaHei, Microsoft YaHei;
-                    font-weight: bold;
-                    font-size: 30px;
-                    color: #333333;
-                }
-
-                >p {
-                    height: 18px;
-                    line-height: 18px;
-                    font-family: Microsoft YaHei, Microsoft YaHei;
-                    font-weight: 400;
-                    font-size: 14px;
-                    color: #999999;
-
-                    span {
-                        margin-right: 40px;
-                    }
-                }
-
-                >img {
-                    width: 680px;
-                    height: 382px;
-                    padding: 50px 0px 60px 55px;
-                }
-            }
-
-            .leftBottomTitle {
-                color: #028E21;
-                font-size: 24px;
-                font-weight: bold;
-                height: 60px;
-                line-height: 60px;
-            }
-
-            .leftBottom {
-                width: 790px;
-                font-size: 20px;
-                border-top: 1px solid #139602;
-                padding-top: 40px;
-
-                >h3,
-                >p {
-                    text-indent: 2em;
-                    width: 790px;
-                    font-family: Microsoft YaHei, Microsoft YaHei;
-                    font-size: 20px;
-                    color: #333333;
-                    line-height: 23px;
-                    padding-bottom: 30px;
-                }
-
-                >h3 {
-                    font-weight: 600px;
-                }
-
-                >p {
-                    font-weight: 400;
-                }
-
-            }
-        }
-
-
-        .innerRight {
-            width: 279px;
-
-            .rightMenuTitle {
-                width: 279px;
-                height: 69px;
-                font-size: 22px;
-                font-weight: bold;
-                line-height: 58px;
-                text-align: center;
-                color: #fff;
-                background: url("http://img.bjzxtw.org.cn/master/bjzxtw/public/special/projectMoreTitle.png") no-repeat;
-                margin-bottom: 30px;
-            }
-
-            ul {
-                li {
-                    a {
-                        border-left: 5px solid #028E21;
-                        margin-bottom: 15px;
-                        font-size: 22px;
-                        display: block;
-                        height: 61px;
-                        line-height: 61px;
-                        color: #333333;
-                        text-align: center;
-                        background: #FBFBFB;
-                    }
-                }
-            }
-
-            .active {
-                border-left: 0;
-                border: 1px solid #028E21;
-                background: #fff;
-            }
-        }
-    }
-}
+    @import '@/assets/css/about.less';
 </style>

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

@@ -18,9 +18,60 @@
                 </el-breadcrumb>
             </div>
         </div>
+
+        <div class="newsDetail">
+            <div class="inner">
+                
+                <div class="innerDetail">
+                    <div class="headImg"></div>
+                    <div class="innerDetail1">
+                        <!-- <div class="projectMoreBox">
+                            <div class="projectMoreTitle">社会保障在线网</div>
+                            <div class="projectMoreText">
+                                <p><b>政讯通·全国文化旅游项目</b>网络平台由<b>政讯通-全国政务信息一体化办公室</b>主管,联合30多家企事业单位组成,由北京政讯通文化传播有限公司对外牵头运营。</p>
+                                <p><b>政讯通·全国文化旅游项目</b>网络平台有政务、行业独立域名网站各<b>100</b>个和<b>4</b>个综合管理网站共<b>204</b>个网站,按照不同的行业和功能分类为用户提供大体系、广领域、全方位、全过程,有针对性的全国性文化旅游法制综合服务平台。</p>
+                                <p><b>政讯通·全国旅游资讯发布中心</b>是<b>政讯通·全国文化旅游项目</b>网络平台的4个综合管理网站之一,目前开设了栏目上千个,地市中心可全面覆盖我国334个地级市,<b>业务范围</b>涵盖旅游资讯、與情监测、法律咨询、旅游调研、法律宣传、群众监督、旅游安全等领域,日均会员访问量超过万次,累计完成文化旅游领域法制调研课题千余件,网络信息化会员遍布全国各地,实施<b>行业、区域</b>全覆盖,是我国具有广泛传播力、影响力的新型主流媒体。</p>
+                            </div>
+                        </div> -->
+                        <div class="innerTitle">本网招聘</div>
+                        <ul class="list">
+                            <li v-for="(item, index) in newsList" :key="index">
+                                <NuxtLink :to="{ path: `zhaopin/${item.id}.html` }" :title="item.con_title">{{item.con_title}}</NuxtLink>
+                            </li>
+                        </ul>
+                    </div>
+                    <div class="footImg"></div>
+                </div>
+                <div class="innerLeft">
+                    <ul>
+                        <li>
+                            导航列表
+                        </li>
+                        <li v-for="(item, index) in bottomMenu" :key="index">
+                            <NuxtLink :to="`/about/${item.name_pinyin}/index.html`" :title="item.name"
+                                v-if="item.id == pageId && item.id != 7" class="active">
+                                {{ item.name }}
+                            </NuxtLink>
+                            <NuxtLink :to="`/about/${item.name_pinyin}/index.html`" :title="item.name"
+                                v-else-if="item.id != pageId && item.id != 7">
+                                {{ item.name }}
+                            </NuxtLink>
+                            <NuxtLink :to="`/about/${item.name_pinyin}/list-1.html`" :title="item.name"
+                                v-if="item.id == 7 && pageId == 7" class="active">
+                                {{item.name }}
+                            </NuxtLink>
+                            <NuxtLink :to="`/about/${item.name_pinyin}/list-1.html`" :title="item.name" v-else-if="item.id == 7">
+                                {{ item.name}}
+                            </NuxtLink>
+                        </li>
+                    </ul>
+                </div>
+                <div style="clear: both;"></div>
+            </div>
+        </div>
         
         <!-- 资讯列表 -->
-        <div class="newsList">
+        <!-- <div class="newsList">
             <div class="inner">
                 <div class="innerLeft">
                     <div class="projectMoreBox">
@@ -62,7 +113,7 @@
                 </div>
                 <div style="clear: both;"></div>
             </div>
-        </div>
+        </div> -->
         <!-- 列表页广告二 -->
         <HomeTopTen :imgurl="adImg2" v-if="adImg2"></HomeTopTen>
         <!-- 页面底部 -->
@@ -206,473 +257,5 @@ useSeoMeta({
 </script>
 
 <style lang="less" scoped>
-//导航条
-.breadcrumb {
-    width: 100%;
-    height: 22px;
-    margin-bottom: 30px;
-    font-family: Microsoft YaHei, Microsoft YaHei;
-    font-weight: 400;
-    font-size: 20px;
-    color: #666666;
-    line-height: 23px;
-    text-align: left;
-    font-style: normal;
-    text-transform: none;
-
-    :deep(.el-breadcrumb) {
-        display: inline-block;
-        vertical-align: -4px;
-    }
-
-    :deep(.el-breadcrumb__inner a),
-    :deep(.el-breadcrumb__inner.is-link) {
-        color: #666666;
-        font-weight: 400;
-        text-decoration: none;
-        transition: var(--el-transition-color);
-    }
-
-    span {
-        font-family: Microsoft YaHei, Microsoft YaHei;
-        font-weight: 400;
-        font-size: 20px;
-        color: #666666;
-        line-height: 23px;
-        text-align: left;
-        font-style: normal;
-        text-transform: none;
-    }
-
-    span:hover {
-        color: #666666;
-    }
-
-    .location {
-        margin-right: 20px;
-        width: 100px;
-        height: 22px;
-        font-family: Microsoft YaHei, Microsoft YaHei;
-        font-weight: 400;
-        font-size: 20px;
-        color: #666666;
-        line-height: 23px;
-        text-align: left;
-        font-style: normal;
-        text-transform: none;
-    }
-}
-
-// 资讯列表
-.newsList {
-    width: 100%;
-    margin-bottom: 70px;
-
-    .inner {
-        width: 1200px;
-        height: 1300px;
-        .innerLeft {
-            height: 65px;
-            line-height: 65px;
-            font-size: 22px;
-            color: #028E21;
-            font-weight: bold;
-        }
-
-        .innerTitle {
-            font-size: 24px;
-        }
-
-
-        .innerLeft {
-            float: right;
-
-            >.list {
-                height: 570px;
-                margin-bottom: 70px;
-                border-top: 1px solid #139602;
-
-                >li {
-                    width: 790px;
-                    height: 60px;
-                    white-space: nowrap;
-                    overflow: hidden;
-                    text-overflow: ellipsis;
-                    line-height: 60px;
-                    //border-bottom: 1px solid #D9D9D9;
-
-                    >a {
-                        width: 360px;
-                        height: 26px;
-                        cursor: pointer;
-                        font-family: Microsoft YaHei, Microsoft YaHei;
-                        font-weight: 400;
-                        font-size: 20px;
-                        color: #333333;
-                        line-height: 26px;
-                        text-align: left;
-                        font-style: normal;
-                        text-transform: none;
-                    }
-
-                }
-
-                >li:hover>a {
-                    color: #139602;
-                }
-
-                >li:nth-child(1)::after,
-                >li:nth-child(2)::after {
-                    content: "热";
-                    margin-left: 13px;
-                    background: #FF8A37;
-                    color: #fff;
-                    font-size: 14px;
-                    padding: 0px 2px;
-                }
-
-                >li:nth-child(5n) {
-                    border-bottom: 1px solid #D9D9D9;
-                }
-
-            }
-
-            >.pagination {
-                width: 800px;
-                height: 34px;
-                margin-left: 141px;
-                display: flex;
-                justify-content: center;
-                margin: 0;
-
-                // 鼠标移入后字体颜色
-                .el-pagination::v-deep :hover {
-                    color: #139609;
-                }
-
-                .el-pagination.is-background::v-deep .btn-next,
-                .el-pagination.is-background::v-deep .btn-prev {
-                    width: 70px;
-                    height: 34px;
-                    margin: 0px 10px;
-                    border-radius: 4px;
-                }
-
-                .el-pagination.is-background::v-deep .el-pager li {
-                    margin: 0px 10px;
-                    width: 38px;
-                    height: 34px;
-                    border-radius: 4px;
-                }
-
-                .el-pagination.is-background::v-deep .btn-next.is-active,
-                .el-pagination.is-background::v-deep .btn-prev.is-active,
-                .el-pagination.is-background::v-deep .el-pager li.is-active {
-                    background-color: #028e21;
-                    color: #fff;
-                }
-
-
-            }
-        }
-
-        .innerRight {
-            width: 279px;
-
-            .rightMenuTitle {
-                width: 279px;
-                height: 69px;
-                font-size: 22px;
-                font-weight: bold;
-                line-height: 58px;
-                text-align: center;
-                color: #fff;
-                background: url("http://img.bjzxtw.org.cn/master/bjzxtw/public/special/projectMoreTitle.png") no-repeat;
-                margin-bottom: 30px;
-            }
-
-            ul {
-                li {
-                    a {
-                        border-left: 5px solid #028E21;
-                        margin-bottom: 15px;
-                        font-size: 22px;
-                        display: block;
-                        height: 61px;
-                        line-height: 61px;
-                        color: #333333;
-                        text-align: center;
-                        background: #FBFBFB;
-                    }
-                }
-            }
-
-            .active {
-                border-left: 0;
-                border: 1px solid #028E21;
-                background: #fff;
-            }
-        }
-    }
-}
-
-//资讯推荐
-.zixuntuijian {
-    width: 100%;
-    height: 290px;
-    margin-bottom: 70px;
-
-    .innerLeft {
-
-        // 左侧
-        .zixunLeft {
-            margin-right: 30px;
-        }
-
-        .zixunRight,
-        .zixunLeft {
-            float: left;
-            width: 380px;
-            height: 290px;
-
-            // 标题部分
-            >.title {
-                width: 380px;
-            }
-
-            >.title>h3 {
-                height: 36px;
-                font-family: Source Han Sans, Source Han Sans;
-                font-weight: bold;
-                font-size: 24px;
-                color: #000000;
-                line-height: 28px;
-                text-align: left;
-                font-style: normal;
-                text-transform: none;
-                border-bottom: 1px solid #139602;
-
-            }
-
-            >.title>h3>span {
-                float: right;
-                width: 56px;
-                height: 20px;
-                line-height: 24px;
-                font-weight: 400;
-                font-size: 14px;
-                color: #999999;
-                font-style: normal;
-                text-transform: none;
-            }
-
-            .photo_text {
-
-                >li:first-child {
-                    width: 380px;
-                    height: 120px;
-                    margin-top: 20px;
-                    margin-bottom: 15px;
-                    position: relative;
-
-                    >img {
-                        float: left;
-                        width: 160px;
-                        height: 120px;
-                    }
-
-                    >div {
-                        float: left;
-                        width: 220px;
-                        height: 120px;
-                        padding-left: 15px;
-                        padding-top: 6px;
-                        box-sizing: border-box;
-                        background-color: #f6f6f6;
-
-
-                        >h5 {
-                            width: 200px;
-                            height: 54px;
-                            display: -webkit-box;
-                            -webkit-box-orient: vertical;
-                            -webkit-line-clamp: 2;
-                            overflow: hidden;
-                            text-overflow: ellipsis;
-                            word-break: break-all;
-                            font-family: Source Han Sans, Source Han Sans;
-                            font-weight: 500;
-                            font-size: 18px;
-                            color: #333333;
-                            line-height: 26px;
-                            text-align: left;
-                            font-style: normal;
-                            text-transform: none;
-                        }
-
-                        >p {
-                            width: 200px;
-                            height: 22px;
-                            line-height: 20px;
-                            position: absolute;
-                            bottom: 5px;
-                            right: 0;
-
-                            >span {
-                                display: inline-block;
-                                // width: 100px;
-                                height: 18px;
-                                font-family: Source Han Sans, Source Han Sans;
-                                font-weight: 400;
-                                font-size: 12px;
-                                color: #999999;
-                                text-align: left;
-                                line-height: 14px;
-                                font-style: normal;
-                                text-transform: none;
-                            }
-
-                            >span:last-child {
-                                // width: 90px;
-                                text-align: right;
-                                margin-left: 20px;
-                            }
-
-                        }
-                    }
-                }
-
-                >li {
-                    width: 380px;
-                    height: 25px;
-                    white-space: nowrap;
-                    overflow: hidden;
-                    text-overflow: ellipsis;
-                    font-family: PingFang SC, PingFang SC;
-                    font-weight: 500;
-                    font-size: 18px;
-                    color: #333333;
-                    line-height: 21px;
-                    text-align: left;
-                    font-style: normal;
-                    text-transform: none;
-                    margin-bottom: 10px;
-
-                    em {
-                        display: inline-block;
-                        width: 8px;
-                        height: 8px;
-                        border-radius: 8px;
-                        margin-right: 10px;
-                        background-color: #d9d9d9;
-                    }
-                }
-
-                >li:hover {
-                    color: #139602;
-                }
-
-                >li:hover em {
-                    background-color: #139602;
-                }
-            }
-        }
-    }
-
-    .innerRight {
-        width: 381px;
-        height: 290px;
-        background-color: #fbfbfb;
-
-        >.title {
-            width: 380px;
-            height: 40px;
-            line-height: 40px;
-            border-top: 1px solid #139602;
-            border-bottom: 1px solid #e7e7e7;
-
-            >h4 {
-                font-family: Microsoft YaHei, Microsoft YaHei;
-                font-weight: 400;
-                margin-left: 20px;
-                font-size: 20px;
-                color: #000000;
-                text-align: left;
-                font-style: normal;
-                text-transform: none;
-
-                >span {
-                    float: right;
-                    font-family: Microsoft YaHei, Microsoft YaHei;
-                    font-weight: 400;
-                    font-size: 14px;
-                    margin-right: 10px;
-                    color: #999999;
-                    text-align: left;
-                    font-style: normal;
-                    text-transform: none;
-                }
-            }
-
-        }
-
-        .rightList {
-            height: 540px;
-            margin-top: 20px;
-
-            >li {
-                height: 100px;
-                margin-bottom: 10px;
-
-                >img {
-                    width: 150px;
-                    height: 100px;
-                }
-
-                >p {
-                    width: 219px;
-                    height: 100px;
-                    padding-left: 12px;
-                    font-family: PingFang SC, PingFang SC;
-                    font-weight: 400;
-                    font-size: 16px;
-                    color: #333333;
-                    line-height: 22px;
-                    text-align: left;
-                    font-style: normal;
-                    text-transform: none;
-
-                }
-
-                >p:hover {
-                    box-shadow: 0 0 16px 1px rgba(0, 0, 0, 0.1);
-                }
-            }
-        }
-
-    }
-}
-
-.projectMoreBox {
-    margin: 0 auto;
-    height: 540px;
-    margin-top: 20px;
-    background: url("http://img.bjzxtw.org.cn/master/bjzxtw/public/special/projectMoreBg.png") no-repeat;
-    margin-bottom: 40px;
-
-    .projectMoreTitle {
-        color: #028E21;
-        padding-top: 20px;
-        font-size: 26px;
-        padding-left: 204px;
-    }
-
-    .projectMoreText {
-        padding: 40px;
-        font-size: 20px;
-        color: #333333;
-        text-indent: 2em;
-        line-height: 36px;
-    }
-}
+    @import '@/assets/css/about.less';
 </style>

+ 14 - 50
pages/index.vue

@@ -5,7 +5,6 @@
         <HomeAdvertising :imgurl="adImg1"></HomeAdvertising>
         <!--头条-->
         <HomePageMessage></HomePageMessage>
-    
         <!-- 第一部分 -->
         <div class="part1">
             <div class="inner">
@@ -433,43 +432,19 @@
 </template>
 
 <script setup>
-//页面是否已经加载完毕
-const pageLoading = ref(false)
 //1.加载页面必备组件 start---------------------------------------->
 import { ref, onMounted } from 'vue';
 import { ElMessage } from 'element-plus';
-
-//格式化跳转路径 - 标题
-//首页分类栏目标题,不需要考虑外链
-const getLinkPath = (item) => {
-    if (item.children_count == 0) {
-        //return `/newsList/${item.cid}?page=1`;
-        return `/${item.aLIas_pinyin}/list-1.html`;
-    } else {
-        //return `/primaryNavigation/${item.cid}`;
-        return `/${item.aLIas_pinyin}/index.html`;
-    }
-}
-//首页跳转到详情,这里需要考虑外链
-const getLinkPathDetail = (item) => {
-    if (item.islink == 1) {
-        return `${item.linkurl}`;
-    } else {
-        return `/${item.pinyin}/${item.id}`;
-    }
-}
 //1.加载页面必备组件 end---------------------------------------->
 
-//2.交互方法 start---------------------------------------->
-//2.1 新闻图片切换
+//2.选项卡 start---------------------------------------->
 const hoverStatus = ref(1)
 const qhPic = function (num) {
     hoverStatus.value = num;
 }
-//2.交互方法 end---------------------------------------->
+//2.选项卡 end---------------------------------------->
 
-
-//4.广告 start---------------------------------------->
+//3.广告 start---------------------------------------->
 //获得所有广告
 let adImg1 = ref({})
 let adImg2 = ref({})
@@ -530,15 +505,14 @@ onMounted(async ()  => {
     adImg4.value = resultAd4.data[0];
 
 })
-//4.交互方法 end---------------------------------------->
+//3.广告 end---------------------------------------->
 
-//5.页面基本信息 start---------------------------------------->
-//5.1 导航信息
+//4.页面数据 start---------------------------------------->
+//4.1导航
 const pageData = ref([
-    // { cid: "", title: "", data: [] ,children_count:""},
+    //示例 { cid: "", title: "", data: [] ,children_count:""},
 ]);
-//5.2 模块数据
-//注意前置变量 在nuxt3的ssr模式中,并不存在变量提升。
+//4.2 模块数据
 //模块1
 const boxData1 = ref([])
 const boxData1data2 = ref([])
@@ -565,7 +539,6 @@ const boxData7 = ref([]);
 const boxData7data2 = ref([]);
 const boxData7data3 = ref([]);
 const boxData7data4 = ref([]);
-
 //模块8
 const boxData8 = ref([]);
 const boxData8data2 = ref([]);
@@ -576,7 +549,7 @@ const boxData9data2 = ref([]);
 const boxData10 = ref([]);
 const boxData10data2 = ref([]);
 
-//3.2获得导航数据
+//4.3获得导航数据
 try {
     const navigateData = await requestDataPromise('/web/getWebsiteModelCategory', {
         method: 'GET',
@@ -619,16 +592,10 @@ try {
             if(navigateData.data[index].category_id == 15){pageData.value[9]=data}
         }
     }else{
-        console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
-        console.log("错误位置:首页导航池")
-        console.log("后端错误反馈:",navigateData.message)
-        console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
+        console.log("获取导航池出错!",navigateData.message)
     }
 } catch (error) {
-    console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
-    console.log("错误位置:首页导航渲染阶段")
     console.log("错误:导航池渲染执行接口出错!请检查首页的14的模块的具体执行方法!")
-    console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
 }
 
 let getJson = [
@@ -721,9 +688,9 @@ async function getPageAllData(){
     }
 }
 getPageAllData();
-//5.页面基本信息 end---------------------------------------->
+//4.页面数据 end---------------------------------------->
 
-//6.设置seo数据 start---------------------------------------->
+//5.设置seo数据 start---------------------------------------->
 //获取seo数据
 const setData =  await requestDataPromise('/web/getWebsiteFootInfo', {
     method: 'GET',
@@ -744,12 +711,9 @@ if(setData.code == 200){
         ]
     });
 }else{
-    console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
-    console.log("错误位置:设置首页SEO数据")
-    console.log("后端错误反馈:",setData.message)
-    console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
+    console.log("设置首页SEO出错!",setData.message)
 }
-//6.设置seo数据 start---------------------------------------->
+//5.设置seo数据 start---------------------------------------->
 </script>
 
 <style lang="less" scoped>