Browse Source

修改bug

Jing 1 month ago
parent
commit
af1a2fa165

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

@@ -29,6 +29,6 @@ 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 { 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 { injectHead, useHead, useSeoMeta, useHeadSafe, useServerHead, useServerSeoMeta, useServerHeadSafe } from '@unhead/vue';
 export { requestData, requestDataPromise, requestDataWebUrl, requestHome } from '../composables/getData';
 export { requestData, requestDataPromise, requestDataWebUrl, requestHome } from '../composables/getData';
-export { getTime, getTitleLength, getLinkPath, getLinkPathDetail, getRoutePath } from '../composables/publicFunction';
+export { getTime, getTitleLength, getLinkPath, getLinkPath1, getLinkPathDetail, getLinkPathDetail1, getRoutePath } from '../composables/publicFunction';
 export { seoSetup } from '../composables/useSeo';
 export { seoSetup } from '../composables/useSeo';
 export { definePageMeta } from '../node_modules/nuxt/dist/pages/runtime/composables';
 export { definePageMeta } from '../node_modules/nuxt/dist/pages/runtime/composables';

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

@@ -1 +1 @@
-{"id":"78098e6e-641f-4928-948d-5f793b981144","timestamp":1745743814490}
+{"id":"fac450b1-8b0c-4c27-bd09-d51837baf20e","timestamp":1746781732724}

+ 0 - 1
.nuxt/manifest/meta/78098e6e-641f-4928-948d-5f793b981144.json

@@ -1 +0,0 @@
-{"id":"78098e6e-641f-4928-948d-5f793b981144","timestamp":1745743814490,"matcher":{"static":{},"wildcard":{},"dynamic":{}},"prerendered":[]}

+ 1 - 0
.nuxt/manifest/meta/fac450b1-8b0c-4c27-bd09-d51837baf20e.json

@@ -0,0 +1 @@
+{"id":"fac450b1-8b0c-4c27-bd09-d51837baf20e","timestamp":1746781732724,"matcher":{"static":{},"wildcard":{},"dynamic":{}},"prerendered":[]}

+ 1 - 1
.nuxt/tsconfig.json

@@ -102,7 +102,7 @@
         "./imports"
         "./imports"
       ],
       ],
       "#app-manifest": [
       "#app-manifest": [
-        "./manifest/meta/78098e6e-641f-4928-948d-5f793b981144.json"
+        "./manifest/meta/fac450b1-8b0c-4c27-bd09-d51837baf20e.json"
       ],
       ],
       "#components": [
       "#components": [
         "./components"
         "./components"

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

@@ -27,7 +27,9 @@ declare global {
   const getAppManifest: typeof import('../../node_modules/nuxt/dist/app/composables/manifest')['getAppManifest']
   const getAppManifest: typeof import('../../node_modules/nuxt/dist/app/composables/manifest')['getAppManifest']
   const getCurrentInstance: typeof import('vue')['getCurrentInstance']
   const getCurrentInstance: typeof import('vue')['getCurrentInstance']
   const getCurrentScope: typeof import('vue')['getCurrentScope']
   const getCurrentScope: typeof import('vue')['getCurrentScope']
+  const getLinkPath1: typeof import('../../composables/publicFunction')['getLinkPath1']
   const getLinkPath: typeof import('../../composables/publicFunction')['getLinkPath']
   const getLinkPath: typeof import('../../composables/publicFunction')['getLinkPath']
+  const getLinkPathDetail1: typeof import('../../composables/publicFunction')['getLinkPathDetail1']
   const getLinkPathDetail: typeof import('../../composables/publicFunction')['getLinkPathDetail']
   const getLinkPathDetail: typeof import('../../composables/publicFunction')['getLinkPathDetail']
   const getRoutePath: typeof import('../../composables/publicFunction')['getRoutePath']
   const getRoutePath: typeof import('../../composables/publicFunction')['getRoutePath']
   const getRouteRules: typeof import('../../node_modules/nuxt/dist/app/composables/manifest')['getRouteRules']
   const getRouteRules: typeof import('../../node_modules/nuxt/dist/app/composables/manifest')['getRouteRules']
@@ -214,7 +216,9 @@ declare module 'vue' {
     readonly getAppManifest: UnwrapRef<typeof import('../../node_modules/nuxt/dist/app/composables/manifest')['getAppManifest']>
     readonly getAppManifest: UnwrapRef<typeof import('../../node_modules/nuxt/dist/app/composables/manifest')['getAppManifest']>
     readonly getCurrentInstance: UnwrapRef<typeof import('vue')['getCurrentInstance']>
     readonly getCurrentInstance: UnwrapRef<typeof import('vue')['getCurrentInstance']>
     readonly getCurrentScope: UnwrapRef<typeof import('vue')['getCurrentScope']>
     readonly getCurrentScope: UnwrapRef<typeof import('vue')['getCurrentScope']>
+    readonly getLinkPath1: UnwrapRef<typeof import('../../composables/publicFunction')['getLinkPath1']>
     readonly getLinkPath: UnwrapRef<typeof import('../../composables/publicFunction')['getLinkPath']>
     readonly getLinkPath: UnwrapRef<typeof import('../../composables/publicFunction')['getLinkPath']>
+    readonly getLinkPathDetail1: UnwrapRef<typeof import('../../composables/publicFunction')['getLinkPathDetail1']>
     readonly getLinkPathDetail: UnwrapRef<typeof import('../../composables/publicFunction')['getLinkPathDetail']>
     readonly getLinkPathDetail: UnwrapRef<typeof import('../../composables/publicFunction')['getLinkPathDetail']>
     readonly getRoutePath: UnwrapRef<typeof import('../../composables/publicFunction')['getRoutePath']>
     readonly getRoutePath: UnwrapRef<typeof import('../../composables/publicFunction')['getRoutePath']>
     readonly getRouteRules: UnwrapRef<typeof import('../../node_modules/nuxt/dist/app/composables/manifest')['getRouteRules']>
     readonly getRouteRules: UnwrapRef<typeof import('../../node_modules/nuxt/dist/app/composables/manifest')['getRouteRules']>

+ 1 - 1
assets/css/list.less

@@ -93,7 +93,7 @@
                     .listTitle {
                     .listTitle {
                         // float: left;
                         // float: left;
                         display: inline-block;
                         display: inline-block;
-                        width: 486px;
+                        width: 800px;
                         white-space: nowrap;
                         white-space: nowrap;
                         overflow: hidden;
                         overflow: hidden;
                         text-overflow: ellipsis;
                         text-overflow: ellipsis;

+ 7 - 5
components/home/ListSecondaryHeading.vue

@@ -1,8 +1,8 @@
 <template>
 <template>
-    <nav class="channel_nav_box">
-        <a class="channel_nav_a" href="javascript:(void)" title="name">{{ name }}</a>
+     <nav class="channel_nav_box">
+        <a class="channel_nav_head" :href="`/${pinyin}/index.html`" title="title">{{ name }}</a>
         <div class="channel_nav_a_box clearfix">
         <div class="channel_nav_a_box clearfix">
-            <NuxtLink :to="{ path: `/${targetRoute}/${item.aLIas_pinyin}/list-1.html`}" class="channel_nav_a" v-for="item in nav">{{ item.alias }}</NuxtLink>
+            <NuxtLink :to="{ path: `/${item.aLIas_pinyin}/list-1.html`}" class="channel_nav_a" v-for="item in nav">{{ item.alias }}</NuxtLink>
         </div>
         </div>
     </nav>
     </nav>
 </template>
 </template>
@@ -12,7 +12,8 @@
 //子导航
 //子导航
 const props = defineProps({
 const props = defineProps({
     name:String,
     name:String,
-    nav:Array
+    nav:Array,
+    pinyin:String
 });
 });
 
 
 //获取当前url路径
 //获取当前url路径
@@ -34,7 +35,8 @@ const targetRoute = segments[1];
     background-size:100% auto;   
     background-size:100% auto;   
     margin-top: 40px;
     margin-top: 40px;
     .channel_nav_head {
     .channel_nav_head {
-        width: 100px;
+        width: 122px;
+        text-align: center;
         height: 60px;
         height: 60px;
         line-height: 60px; 
         line-height: 60px; 
         color: #fff;
         color: #fff;

+ 2 - 1
components/home/SecondaryHeading.vue

@@ -54,7 +54,8 @@ getPageData();
     background-size:100% auto;   
     background-size:100% auto;   
     margin-top: 40px;
     margin-top: 40px;
     .channel_nav_head {
     .channel_nav_head {
-        width: 100px;
+        width: 122px;
+        text-align: center;
         height: 60px;
         height: 60px;
         line-height: 60px; 
         line-height: 60px; 
         color: #fff;
         color: #fff;

+ 19 - 11
composables/publicFunction.ts

@@ -48,17 +48,21 @@ const getTitleLength = function (title: string, length: number) {
 //3.格式化跳转路径 start ---------------------------------------->
 //3.格式化跳转路径 start ---------------------------------------->
 //3.1跳转到频道页面或者一级列表页
 //3.1跳转到频道页面或者一级列表页
 const getLinkPath = (item: any) => {
 const getLinkPath = (item: any) => {
-    if(item.is_url==1){
-        return `${item.web_url}`;
-    }else if(item.children_count == 0){
-        //return `/newsList/${item.category_id}?page=1`;
-        return `/${item.aLIas_pinyin}/list-1.html`;
-    }else{
-        //return `/primaryNavigation/${item.aLIas_pinyin}/`;
-        return `/${item.aLIas_pinyin}/index.html`;
-    }
+  if (item.is_url == 1) {
+    return `${item.web_url}`;
+  } else if (item.children_count == 0) {
+    //return `/newsList/${item.category_id}?page=1`;
+    return `/${item.aLIas_pinyin}/list-1.html`;
+  } else {
+    //return `/primaryNavigation/${item.aLIas_pinyin}/`;
+    return `/${item.aLIas_pinyin}/index.html`;
+  }
 }
 }
-//3.2跳转到详情页
+//3.2跳转到频道页
+const getLinkPath1 = (item: any) => {
+  return `/${item.aLIas_pinyin}/list-1.html`;
+}
+//3.3跳转到详情页
 const getLinkPathDetail = (item: any) => {
 const getLinkPathDetail = (item: any) => {
   if (item.islink == 1) {
   if (item.islink == 1) {
     return `${item.linkurl}`;
     return `${item.linkurl}`;
@@ -66,6 +70,10 @@ const getLinkPathDetail = (item: any) => {
     return `/${item.pinyin}/${item.id}.html`;
     return `/${item.pinyin}/${item.id}.html`;
   }
   }
 }
 }
+//3.4特殊跳转到详情页
+const getLinkPathDetail1 = (item: any) => {
+  return `/${item.aLIas_pinyin}/${item.id}.html`;
+}
 //3.格式化跳转路径 end ---------------------------------------->
 //3.格式化跳转路径 end ---------------------------------------->
 
 
 
 
@@ -90,4 +98,4 @@ const getRoutePath = (type: Number) => {
 
 
 
 
 //4.获得路由路径 end ---------------------------------------->
 //4.获得路由路径 end ---------------------------------------->
-export { getTime, getTitleLength, getLinkPath, getLinkPathDetail, getRoutePath };
+export { getTime, getTitleLength, getLinkPath, getLinkPath1, getLinkPathDetail, getLinkPathDetail1, getRoutePath };

+ 19 - 26
pages/[dir]/[dir]/[id].vue

@@ -17,12 +17,9 @@
                             <el-breadcrumb-item>
                             <el-breadcrumb-item>
                                 <NuxtLink to="/">首页</NuxtLink>
                                 <NuxtLink to="/">首页</NuxtLink>
                             </el-breadcrumb-item>
                             </el-breadcrumb-item>
-                            <el-breadcrumb-item v-if="parent_children_count > 0">
+                            <el-breadcrumb-item v-if="parent_name != ''">
                                 <NuxtLink :to="`/${parent_pinyin}/index.html`"> {{ parent_name }}</NuxtLink>
                                 <NuxtLink :to="`/${parent_pinyin}/index.html`"> {{ parent_name }}</NuxtLink>
                             </el-breadcrumb-item>
                             </el-breadcrumb-item>
-                            <el-breadcrumb-item v-if="parent_children_count == 0">
-                                <NuxtLink :to="`/${parent_pinyin}/list-1.html`"> {{ parent_name }}</NuxtLink>
-                            </el-breadcrumb-item>
                             <el-breadcrumb-item>
                             <el-breadcrumb-item>
                                 <NuxtLink :to="`list-1.html`"> {{ routLevelTitle }}</NuxtLink>
                                 <NuxtLink :to="`list-1.html`"> {{ routLevelTitle }}</NuxtLink>
                             </el-breadcrumb-item>
                             </el-breadcrumb-item>
@@ -38,11 +35,7 @@
                         发布时间: <span>{{ time }}</span>
                         发布时间: <span>{{ time }}</span>
                     </p>
                     </p>
                 </div>
                 </div>
-                <div 
-                    class="leftBottom" 
-                    v-html="newsDetail.content" 
-                    v-if="newsDetail.content" 
-                    @click="openPreview">
+                <div class="leftBottom" v-html="newsDetail.content" v-if="newsDetail.content" @click="openPreview">
                 </div>
                 </div>
                 <div v-if="previewVisible" class="preview-modal" @click="closePreview">
                 <div v-if="previewVisible" class="preview-modal" @click="closePreview">
                     <img :src="selectedImage" alt="Preview">
                     <img :src="selectedImage" alt="Preview">
@@ -75,7 +68,7 @@
 <script setup>
 <script setup>
 //1.页面依赖 start ---------------------------------------->
 //1.页面依赖 start ---------------------------------------->
 import { onMounted } from 'vue'
 import { onMounted } from 'vue'
-import { ElBreadcrumb, ElBreadcrumbItem,ElRadio, ElRadioGroup,ElCheckbox,ElCheckboxGroup,ElMessage,ElInput } from 'element-plus'
+import { ElBreadcrumb, ElBreadcrumbItem, ElRadio, ElRadioGroup, ElCheckbox, ElCheckboxGroup, ElMessage, ElInput } from 'element-plus'
 import { ArrowRight } from '@element-plus/icons-vue'
 import { ArrowRight } from '@element-plus/icons-vue'
 //1.页面依赖 end ---------------------------------------->
 //1.页面依赖 end ---------------------------------------->
 
 
@@ -92,12 +85,12 @@ const getRouteId = await requestDataPromise('/web/getWebsiteRoute', {
         'pinyin': targetSegment,
         'pinyin': targetSegment,
     },
     },
 });
 });
-if(getRouteId.code == 200){
+if (getRouteId.code == 200) {
     routeId = getRouteId.data.category_id
     routeId = getRouteId.data.category_id
-}else{
+} else {
     console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
     console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
     console.log("错误位置:通过url路径查询导航池id")
     console.log("错误位置:通过url路径查询导航池id")
-    console.log("后端错误反馈:",getRouteId.message)
+    console.log("后端错误反馈:", getRouteId.message)
     console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
     console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
 }
 }
 //2.页面路径 end ---------------------------------------->
 //2.页面路径 end ---------------------------------------->
@@ -114,7 +107,7 @@ let getParentNav = async () => {
             'catid': routeId
             'catid': routeId
         },
         },
     });
     });
-    
+
     if (listData.code == 200) {
     if (listData.code == 200) {
         parent_name.value = listData.data.alias;
         parent_name.value = listData.data.alias;
         parent_id.value = listData.data.parent_id;
         parent_id.value = listData.data.parent_id;
@@ -144,15 +137,15 @@ const routLevelId = ref("");
 const articleChoice = ref(false);
 const articleChoice = ref(false);
 //4.5 获取详情
 //4.5 获取详情
 async function getPageData() {
 async function getPageData() {
-    const mkdata =  await requestDataPromise('/web/selectWebsiteArticleInfo', {
+    const mkdata = await requestDataPromise('/web/selectWebsiteArticleInfo', {
         method: 'GET',
         method: 'GET',
         query: {
         query: {
             'articleid': articleId
             'articleid': articleId
         },
         },
     });
     });
-    if(mkdata.code==200){
+    if (mkdata.code == 200) {
         //判断是否显示投票
         //判断是否显示投票
-        if(mkdata.data.is_survey==1){
+        if (mkdata.data.is_survey == 1) {
             console.log("本篇文章含有投票!")
             console.log("本篇文章含有投票!")
             articleChoice.value = true;
             articleChoice.value = true;
         }
         }
@@ -169,10 +162,10 @@ async function getPageData() {
         } else {
         } else {
             routeNewsTtitle.value = newsDetail.value.title
             routeNewsTtitle.value = newsDetail.value.title
         }
         }
-    }else{
+    } else {
         console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
         console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
         console.log("错误位置:获取详情内容")
         console.log("错误位置:获取详情内容")
-        console.log("后端错误反馈:",mkdata.message)
+        console.log("后端错误反馈:", mkdata.message)
         console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
         console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
     }
     }
 }
 }
@@ -182,7 +175,7 @@ getPageData();
 
 
 //5.广告 start ---------------------------------------->
 //5.广告 start ---------------------------------------->
 let adImg1 = ref([]);
 let adImg1 = ref([]);
-onMounted(async ()  => {
+onMounted(async () => {
     const { $webUrl, $CwebUrl } = useNuxtApp();
     const { $webUrl, $CwebUrl } = useNuxtApp();
     //广告1
     //广告1
     let url = `${$webUrl}/web/getWebsiteAdvertisement?ad_tag=snscw_detail_0001`
     let url = `${$webUrl}/web/getWebsiteAdvertisement?ad_tag=snscw_detail_0001`
@@ -199,13 +192,13 @@ onMounted(async ()  => {
 //5.广告 end ---------------------------------------->
 //5.广告 end ---------------------------------------->
 
 
 //6.设置seo信息 start---------------------------------------->
 //6.设置seo信息 start---------------------------------------->
-const setData =  await requestDataPromise('/web/selectWebsiteArticleInfo', {
+const setData = await requestDataPromise('/web/selectWebsiteArticleInfo', {
     method: 'GET',
     method: 'GET',
     query: {
     query: {
         'articleid': articleId
         'articleid': articleId
     },
     },
 });
 });
-if(setData.code==200){
+if (setData.code == 200) {
     let seoTitle = setData.data.title;
     let seoTitle = setData.data.title;
     let seoDescription = setData.data.introduce;
     let seoDescription = setData.data.introduce;
     let seoKeywords = setData.data.keyword;
     let seoKeywords = setData.data.keyword;
@@ -215,12 +208,12 @@ if(setData.code==200){
     useSeoMeta({
     useSeoMeta({
         title: seoTitle + "_" + seoName + "_" + seoSuffix,
         title: seoTitle + "_" + seoName + "_" + seoSuffix,
         meta: [
         meta: [
-            { name: 'description', content: seoDescription + "_" + seoName + "_" + seoSuffix , tagPriority: 10 },
-            { name: 'keywords', content: seoKeywords + "_" + seoName + "_" + seoSuffix , tagPriority: 10 }
+            { name: 'description', content: seoDescription + "_" + seoName + "_" + seoSuffix, tagPriority: 10 },
+            { name: 'keywords', content: seoKeywords + "_" + seoName + "_" + seoSuffix, tagPriority: 10 }
         ]
         ]
     });
     });
-}else{
-    console.log("获取广告数据失败!",setData.message)
+} else {
+    console.log("获取广告数据失败!", setData.message)
 }
 }
 //6.设置seo信息 end---------------------------------------->
 //6.设置seo信息 end---------------------------------------->
 
 

+ 13 - 21
pages/[dir]/[dir]/list-[id].vue

@@ -7,7 +7,8 @@
         <!-- 列表页广告一 -->
         <!-- 列表页广告一 -->
         <HomeTopTen :imgurl="adImg1" v-if="adImg1"></HomeTopTen>
         <HomeTopTen :imgurl="adImg1" v-if="adImg1"></HomeTopTen>
         <!-- 二级标题-->
         <!-- 二级标题-->
-        <HomeListSecondaryHeading v-if="parent_name != ''" :name="parent_name" :nav="secondNav"></HomeListSecondaryHeading>
+        <HomeListSecondaryHeading v-if="parent_name != ''" :name="parent_name" :nav="secondNav" :pinyin="parent_pinyin">
+        </HomeListSecondaryHeading>
         <!-- 资讯列表 -->
         <!-- 资讯列表 -->
         <div class="newsList">
         <div class="newsList">
             <div class="inner">
             <div class="inner">
@@ -20,7 +21,7 @@
                                 <el-breadcrumb-item>
                                 <el-breadcrumb-item>
                                     <NuxtLink to="/">首页</NuxtLink>
                                     <NuxtLink to="/">首页</NuxtLink>
                                 </el-breadcrumb-item>
                                 </el-breadcrumb-item>
-                                <el-breadcrumb-item v-if="parent_name !=''">
+                                <el-breadcrumb-item v-if="parent_name != ''">
                                     <NuxtLink :to="`/${parent_pinyin}/index.html`"> {{ parent_name }}</NuxtLink>
                                     <NuxtLink :to="`/${parent_pinyin}/index.html`"> {{ parent_name }}</NuxtLink>
                                 </el-breadcrumb-item>
                                 </el-breadcrumb-item>
                                 <el-breadcrumb-item>{{ name }}</el-breadcrumb-item>
                                 <el-breadcrumb-item>{{ name }}</el-breadcrumb-item>
@@ -37,18 +38,9 @@
                     </ul>
                     </ul>
                     <!-- 分页器 -->
                     <!-- 分页器 -->
                     <div class="pagination" v-if="total > 0">
                     <div class="pagination" v-if="total > 0">
-                        <el-pagination 
-                            size="small" 
-                            background 
-                            layout="prev, pager, next" 
-                            :total="total" 
-                            class="mt-4"
-                            :page-size="pageSize" 
-                            :current-page="pageNum"
-                            prev-text="上一页" 
-                            next-text="下一页" 
-                            @current-change="changePage" 
-                        />
+                        <el-pagination size="small" background layout="prev, pager, next" :total="total" class="mt-4"
+                            :page-size="pageSize" :current-page="pageNum" prev-text="上一页" next-text="下一页"
+                            @current-change="changePage" />
                     </div>
                     </div>
                 </div>
                 </div>
                 <div class="innerRight">
                 <div class="innerRight">
@@ -85,10 +77,10 @@ const getRouteId = await requestDataPromise('/web/getWebsiteRoute', {
         'pinyin': targetSegment,
         'pinyin': targetSegment,
     },
     },
 });
 });
-if(getRouteId.code == 200){
+if (getRouteId.code == 200) {
     articleId = getRouteId.data.category_id
     articleId = getRouteId.data.category_id
-}else{
-    console.log("后端错误反馈:",getRouteId.message)
+} else {
+    console.log("后端错误反馈:", getRouteId.message)
 }
 }
 pageNum.value = parseInt(route.params.id);
 pageNum.value = parseInt(route.params.id);
 //2.路径 end---------------------------------------->
 //2.路径 end---------------------------------------->
@@ -210,8 +202,8 @@ if (setData.code == 200) {
     useSeoMeta({
     useSeoMeta({
         title: seoTitle + "_" + seoName + "_" + seoSuffix,
         title: seoTitle + "_" + seoName + "_" + seoSuffix,
         meta: [
         meta: [
-            { name: 'description', content: seoDescription + "_" + seoName + "_" + seoSuffix , tagPriority: 10 },
-            { name: 'keywords', content: seoKeywords + "_" + seoName + "_" + seoSuffix , tagPriority: 10 }
+            { name: 'description', content: seoDescription + "_" + seoName + "_" + seoSuffix, tagPriority: 10 },
+            { name: 'keywords', content: seoKeywords + "_" + seoName + "_" + seoSuffix, tagPriority: 10 }
         ]
         ]
     });
     });
 } else {
 } else {
@@ -223,7 +215,7 @@ if (setData.code == 200) {
 let adImg1 = ref({});
 let adImg1 = ref({});
 let adImg2 = ref({});
 let adImg2 = ref({});
 
 
-onMounted(async ()  => {
+onMounted(async () => {
     //从客户端获取行政职能部门 加快打开速度
     //从客户端获取行政职能部门 加快打开速度
     const { $webUrl, $CwebUrl } = useNuxtApp();
     const { $webUrl, $CwebUrl } = useNuxtApp();
     //广告1
     //广告1
@@ -237,7 +229,7 @@ onMounted(async ()  => {
     });
     });
     const resultAd1 = await responseAd1.json();
     const resultAd1 = await responseAd1.json();
     adImg1.value = resultAd1.data[0];
     adImg1.value = resultAd1.data[0];
-    
+
     //广告2
     //广告2
     let url2 = `${$webUrl}/web/getWebsiteAdvertisement?ad_tag=snscw_list_0002`
     let url2 = `${$webUrl}/web/getWebsiteAdvertisement?ad_tag=snscw_list_0002`
     const responseAd2 = await fetch(url2, {
     const responseAd2 = await fetch(url2, {

+ 20 - 24
pages/[dir]/[id].vue

@@ -5,7 +5,7 @@
     <HomePageNavigation></HomePageNavigation>
     <HomePageNavigation></HomePageNavigation>
     <!-- 列表页广告一 -->
     <!-- 列表页广告一 -->
     <HomeTopTen :imgurl="adImg1" v-if="adImg1"></HomeTopTen>
     <HomeTopTen :imgurl="adImg1" v-if="adImg1"></HomeTopTen>
-    
+
     <!-- 资讯列表 -->
     <!-- 资讯列表 -->
     <div class="newsDetail">
     <div class="newsDetail">
         <div class="inner">
         <div class="inner">
@@ -18,11 +18,11 @@
                             <el-breadcrumb-item>
                             <el-breadcrumb-item>
                                 <NuxtLink to="/">首页</NuxtLink>
                                 <NuxtLink to="/">首页</NuxtLink>
                             </el-breadcrumb-item>
                             </el-breadcrumb-item>
-                            <el-breadcrumb-item v-if="parent_children_count > 0">
+                            <el-breadcrumb-item v-if="parent_name != ''">
                                 <NuxtLink :to="`/${parent_pinyin}/index.html`"> {{ parent_name }}</NuxtLink>
                                 <NuxtLink :to="`/${parent_pinyin}/index.html`"> {{ parent_name }}</NuxtLink>
                             </el-breadcrumb-item>
                             </el-breadcrumb-item>
-                            <el-breadcrumb-item v-else">
-                                <NuxtLink :to="`/${parent_pinyin}/list-1.html`"> {{ parent_name }}</NuxtLink>
+                            <el-breadcrumb-item>
+                                <NuxtLink :to="`list-1.html`"> {{ routLevelTitle }}</NuxtLink>
                             </el-breadcrumb-item>
                             </el-breadcrumb-item>
                             <el-breadcrumb-item>{{ routeNewsTtitle }}</el-breadcrumb-item>
                             <el-breadcrumb-item>{{ routeNewsTtitle }}</el-breadcrumb-item>
                         </el-breadcrumb>
                         </el-breadcrumb>
@@ -36,11 +36,7 @@
                         发布时间: <span>{{ time }}</span>
                         发布时间: <span>{{ time }}</span>
                     </p>
                     </p>
                 </div>
                 </div>
-                <div 
-                    class="leftBottom" 
-                    v-html="newsDetail.content" 
-                    v-if="newsDetail.content" 
-                    @click="openPreview">
+                <div class="leftBottom" v-html="newsDetail.content" v-if="newsDetail.content" @click="openPreview">
                 </div>
                 </div>
                 <div v-if="previewVisible" class="preview-modal" @click="closePreview">
                 <div v-if="previewVisible" class="preview-modal" @click="closePreview">
                     <img :src="selectedImage" alt="Preview">
                     <img :src="selectedImage" alt="Preview">
@@ -73,7 +69,7 @@
 <script setup>
 <script setup>
 //1.页面依赖 start ---------------------------------------->
 //1.页面依赖 start ---------------------------------------->
 import { onMounted } from 'vue'
 import { onMounted } from 'vue'
-import { ElBreadcrumb, ElBreadcrumbItem} from 'element-plus'
+import { ElBreadcrumb, ElBreadcrumbItem } from 'element-plus'
 import { ArrowRight } from '@element-plus/icons-vue'
 import { ArrowRight } from '@element-plus/icons-vue'
 //1.页面依赖 end ---------------------------------------->
 //1.页面依赖 end ---------------------------------------->
 
 
@@ -87,9 +83,9 @@ const getRouteId = await requestDataPromise('/web/getWebsiteRoute', {
         'pinyin': targetSegment,
         'pinyin': targetSegment,
     },
     },
 });
 });
-if(getRouteId.code == 200){
+if (getRouteId.code == 200) {
     routeId = getRouteId.data.category_id
     routeId = getRouteId.data.category_id
-}else{
+} else {
     console.log("错误位置:获得页面路径")
     console.log("错误位置:获得页面路径")
 }
 }
 //2.页面路径 start ---------------------------------------->
 //2.页面路径 start ---------------------------------------->
@@ -135,18 +131,18 @@ const routLevelId = ref("");
 const articleChoice = ref(false);
 const articleChoice = ref(false);
 //4.5 获取详情
 //4.5 获取详情
 async function getPageData() {
 async function getPageData() {
-    const mkdata =  await requestDataPromise('/web/selectWebsiteArticleInfo', {
+    const mkdata = await requestDataPromise('/web/selectWebsiteArticleInfo', {
         method: 'GET',
         method: 'GET',
         query: {
         query: {
             'articleid': articleId
             'articleid': articleId
         },
         },
     });
     });
-    if(mkdata.code==200){
+    if (mkdata.code == 200) {
         //判断是否显示投票
         //判断是否显示投票
-        if(mkdata.data.is_survey==1){
+        if (mkdata.data.is_survey == 1) {
             console.log("本篇文章含有投票!")
             console.log("本篇文章含有投票!")
             articleChoice.value = true;
             articleChoice.value = true;
-            
+
         }
         }
         //获取内容
         //获取内容
         newsDetail.value = mkdata.data;
         newsDetail.value = mkdata.data;
@@ -161,7 +157,7 @@ async function getPageData() {
         } else {
         } else {
             routeNewsTtitle.value = newsDetail.value.title
             routeNewsTtitle.value = newsDetail.value.title
         }
         }
-    }else{
+    } else {
         console.log("错误位置:获取详情内容")
         console.log("错误位置:获取详情内容")
     }
     }
 }
 }
@@ -171,7 +167,7 @@ getPageData();
 //5.广告 start ---------------------------------------->
 //5.广告 start ---------------------------------------->
 let adImg1 = ref([]);
 let adImg1 = ref([]);
 
 
-onMounted(async ()  => {
+onMounted(async () => {
     const { $webUrl, $CwebUrl } = useNuxtApp();
     const { $webUrl, $CwebUrl } = useNuxtApp();
     //广告1
     //广告1
     let url = `${$webUrl}/web/getWebsiteAdvertisement?ad_tag=snscw_detail_0001`
     let url = `${$webUrl}/web/getWebsiteAdvertisement?ad_tag=snscw_detail_0001`
@@ -188,13 +184,13 @@ onMounted(async ()  => {
 //5.广告 end ---------------------------------------->
 //5.广告 end ---------------------------------------->
 
 
 //6.设置seo信息 start---------------------------------------->
 //6.设置seo信息 start---------------------------------------->
-const setData =  await requestDataPromise('/web/selectWebsiteArticleInfo', {
+const setData = await requestDataPromise('/web/selectWebsiteArticleInfo', {
     method: 'GET',
     method: 'GET',
     query: {
     query: {
         'articleid': articleId
         'articleid': articleId
     },
     },
 });
 });
-if(setData.code==200){
+if (setData.code == 200) {
     let seoTitle = setData.data.title;
     let seoTitle = setData.data.title;
     let seoDescription = setData.data.introduce;
     let seoDescription = setData.data.introduce;
     let seoKeywords = setData.data.keyword;
     let seoKeywords = setData.data.keyword;
@@ -204,14 +200,14 @@ if(setData.code==200){
     useSeoMeta({
     useSeoMeta({
         title: seoTitle + "_" + seoName + "_" + seoSuffix,
         title: seoTitle + "_" + seoName + "_" + seoSuffix,
         meta: [
         meta: [
-            { name: 'description', content: seoDescription + "_" + seoName + "_" + seoSuffix , tagPriority: 10 },
-            { name: 'keywords', content: seoKeywords + "_" + seoName + "_" + seoSuffix , tagPriority: 10 }
+            { name: 'description', content: seoDescription + "_" + seoName + "_" + seoSuffix, tagPriority: 10 },
+            { name: 'keywords', content: seoKeywords + "_" + seoName + "_" + seoSuffix, tagPriority: 10 }
         ]
         ]
     });
     });
-}else{
+} else {
     console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
     console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
     console.log("错误位置:设置详情页面SEO数据")
     console.log("错误位置:设置详情页面SEO数据")
-    console.log("后端错误反馈:",setData.message)
+    console.log("后端错误反馈:", setData.message)
     console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
     console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
 }
 }
 //6.设置seo信息 end---------------------------------------->
 //6.设置seo信息 end---------------------------------------->

+ 13 - 19
pages/[dir]/list-[id].vue

@@ -6,6 +6,9 @@
         <HomePageNavigation></HomePageNavigation>
         <HomePageNavigation></HomePageNavigation>
         <!-- 列表页广告一 -->
         <!-- 列表页广告一 -->
         <HomeTopTen :imgurl="adImg1" v-if="adImg1"></HomeTopTen>
         <HomeTopTen :imgurl="adImg1" v-if="adImg1"></HomeTopTen>
+        <!-- 二级标题-->
+        <HomeListSecondaryHeading v-if="parent_name != ''" :name="parent_name" :nav="secondNav" :pinyin="parent_pinyin">
+        </HomeListSecondaryHeading>
         <!-- 资讯列表 -->
         <!-- 资讯列表 -->
         <div class="newsList">
         <div class="newsList">
             <div class="inner">
             <div class="inner">
@@ -18,7 +21,7 @@
                                 <el-breadcrumb-item>
                                 <el-breadcrumb-item>
                                     <NuxtLink to="/">首页</NuxtLink>
                                     <NuxtLink to="/">首页</NuxtLink>
                                 </el-breadcrumb-item>
                                 </el-breadcrumb-item>
-                                <el-breadcrumb-item v-if="parent_name !=''">
+                                <el-breadcrumb-item v-if="parent_name != ''">
                                     <NuxtLink :to="`/${parent_pinyin}/index.html`"> {{ parent_name }}</NuxtLink>
                                     <NuxtLink :to="`/${parent_pinyin}/index.html`"> {{ parent_name }}</NuxtLink>
                                 </el-breadcrumb-item>
                                 </el-breadcrumb-item>
                                 <el-breadcrumb-item class="nameBox">{{ name }}</el-breadcrumb-item>
                                 <el-breadcrumb-item class="nameBox">{{ name }}</el-breadcrumb-item>
@@ -35,18 +38,9 @@
                     </ul>
                     </ul>
                     <!-- 分页器 -->
                     <!-- 分页器 -->
                     <div class="pagination" v-if="total > 0">
                     <div class="pagination" v-if="total > 0">
-                        <el-pagination 
-                            size="small" 
-                            background 
-                            layout="prev, pager, next" 
-                            :total="total" 
-                            class="mt-4"
-                            :page-size="pageSize" 
-                            :current-page="pageNum"
-                            prev-text="上一页" 
-                            next-text="下一页" 
-                            @current-change="changePage" 
-                        />
+                        <el-pagination size="small" background layout="prev, pager, next" :total="total" class="mt-4"
+                            :page-size="pageSize" :current-page="pageNum" prev-text="上一页" next-text="下一页"
+                            @current-change="changePage" />
                     </div>
                     </div>
                 </div>
                 </div>
                 <div class="innerRight">
                 <div class="innerRight">
@@ -81,9 +75,9 @@ const getRouteId = await requestDataPromise('/web/getWebsiteRoute', {
         'pinyin': targetSegment,
         'pinyin': targetSegment,
     },
     },
 });
 });
-if(getRouteId.code == 200){
+if (getRouteId.code == 200) {
     articleId = getRouteId.data.category_id
     articleId = getRouteId.data.category_id
-}else{
+} else {
     console.log("错误位置:获得页面路径")
     console.log("错误位置:获得页面路径")
 }
 }
 //2.页面路径 end ---------------------------------------->
 //2.页面路径 end ---------------------------------------->
@@ -202,8 +196,8 @@ if (setData.code == 200) {
     useSeoMeta({
     useSeoMeta({
         title: seoTitle + "_" + seoName + "_" + seoSuffix,
         title: seoTitle + "_" + seoName + "_" + seoSuffix,
         meta: [
         meta: [
-            { name: 'keywords', content: seoKeywords + "_" + seoName + "_" + seoSuffix , tagPriority: 10 },
-            { name: 'description', content: seoDescription + "_" + seoName + "_" + seoSuffix , tagPriority: 10 }
+            { name: 'keywords', content: seoKeywords + "_" + seoName + "_" + seoSuffix, tagPriority: 10 },
+            { name: 'description', content: seoDescription + "_" + seoName + "_" + seoSuffix, tagPriority: 10 }
         ]
         ]
     });
     });
 } else {
 } else {
@@ -218,7 +212,7 @@ if (setData.code == 200) {
 let adImg1 = ref({});
 let adImg1 = ref({});
 let adImg2 = ref({});
 let adImg2 = ref({});
 
 
-onMounted(async ()  => {
+onMounted(async () => {
 
 
     //从客户端获取行政职能部门 加快打开速度
     //从客户端获取行政职能部门 加快打开速度
     const { $webUrl, $CwebUrl } = useNuxtApp();
     const { $webUrl, $CwebUrl } = useNuxtApp();
@@ -233,7 +227,7 @@ onMounted(async ()  => {
     });
     });
     const resultAd1 = await responseAd1.json();
     const resultAd1 = await responseAd1.json();
     adImg1.value = resultAd1.data[0];
     adImg1.value = resultAd1.data[0];
-    
+
     //广告2
     //广告2
     let url2 = `${$webUrl}/web/getWebsiteAdvertisement?ad_tag=snscw_list_0002`
     let url2 = `${$webUrl}/web/getWebsiteAdvertisement?ad_tag=snscw_list_0002`
     const responseAd2 = await fetch(url2, {
     const responseAd2 = await fetch(url2, {

+ 4 - 4
pages/index.vue

@@ -528,13 +528,13 @@
                     </div>
                     </div>
                     <div class="index_name_ul">
                     <div class="index_name_ul">
                         <div class="index_name_ul_li" v-for="item in boxData14data2">
                         <div class="index_name_ul_li" v-for="item in boxData14data2">
-                            <NuxtLink class="index_name_ul_li_tag" :href="getLinkPathDetail(item)" :title="item.title"
+                            <NuxtLink class="index_name_ul_li_tag" :href="getLinkPath1(item)" :title="item.title"
                                 :target="item.islink == 1 ? '_blank' : '_self'">
                                 :target="item.islink == 1 ? '_blank' : '_self'">
                                 <div class="index_img_ul_7_li_dot1 dot1">
                                 <div class="index_img_ul_7_li_dot1 dot1">
                                     {{ item.alias }}
                                     {{ item.alias }}
                                 </div>
                                 </div>
                             </NuxtLink>
                             </NuxtLink>
-                            <NuxtLink class="index_name_ul_li_dot1 dot1" :href="getLinkPathDetail(item)"
+                            <NuxtLink class="index_name_ul_li_dot1 dot1" :href="getLinkPathDetail1(item)"
                                 :title="item.title" :target="item.islink == 1 ? '_blank' : '_self'">
                                 :title="item.title" :target="item.islink == 1 ? '_blank' : '_self'">
                                 <div class="index_img_ul_7_li_dot1 dot1">
                                 <div class="index_img_ul_7_li_dot1 dot1">
                                     {{ item.title }}
                                     {{ item.title }}
@@ -897,9 +897,9 @@ async function getPageData() {
             'id': jsonString1
             'id': jsonString1
         },
         },
     });
     });
-    console.log("成功获取模块数据2222!", mkdata);
+    // console.log("成功获取模块数据2222!", mkdata);
     if (mkdata.code == 200) {
     if (mkdata.code == 200) {
-        // console.log("成功获取模块数据2222!", mkdata);
+        console.log("成功获取模块数据2222!", mkdata);
         //模块14 三农人才市场477
         //模块14 三农人才市场477
         boxData14data2.value = mkdata.data[0].textnum;
         boxData14data2.value = mkdata.data[0].textnum;
     }
     }