Explorar o código

企业功能完成

Jing hai 18 horas
pai
achega
aab53dbc6a

+ 12 - 0
.nuxt/components.d.ts

@@ -4,6 +4,9 @@ type IslandComponent<T extends DefineComponent> = T & DefineComponent<{}, {refre
 interface _GlobalComponents {
       'AdvertisingBuyAD': typeof import("../components/advertising/BuyAD.vue")['default']
     'AdvertisingOrderList': typeof import("../components/advertising/OrderList.vue")['default']
+    'CompanyClass': typeof import("../components/company/class.vue")['default']
+    'CompanyDetail': typeof import("../components/company/detail.vue")['default']
+    'CompanyList': typeof import("../components/company/list.vue")['default']
     'DetailHotNews': typeof import("../components/detail/HotNews.vue")['default']
     'DetailHotNews2': typeof import("../components/detail/HotNews2.vue")['default']
     'GoodsSwiperSnscShopInfoCateg': typeof import("../components/goods/SwiperSnscShopInfoCateg.vue")['default']
@@ -58,6 +61,9 @@ interface _GlobalComponents {
     'NuxtRouteAnnouncer': IslandComponent<typeof import("../node_modules/nuxt/dist/app/components/server-placeholder")['default']>
       'LazyAdvertisingBuyAD': typeof import("../components/advertising/BuyAD.vue")['default']
     'LazyAdvertisingOrderList': typeof import("../components/advertising/OrderList.vue")['default']
+    'LazyCompanyClass': typeof import("../components/company/class.vue")['default']
+    'LazyCompanyDetail': typeof import("../components/company/detail.vue")['default']
+    'LazyCompanyList': typeof import("../components/company/list.vue")['default']
     'LazyDetailHotNews': typeof import("../components/detail/HotNews.vue")['default']
     'LazyDetailHotNews2': typeof import("../components/detail/HotNews2.vue")['default']
     'LazyGoodsSwiperSnscShopInfoCateg': typeof import("../components/goods/SwiperSnscShopInfoCateg.vue")['default']
@@ -118,6 +124,9 @@ declare module 'vue' {
 
 export const AdvertisingBuyAD: typeof import("../components/advertising/BuyAD.vue")['default']
 export const AdvertisingOrderList: typeof import("../components/advertising/OrderList.vue")['default']
+export const CompanyClass: typeof import("../components/company/class.vue")['default']
+export const CompanyDetail: typeof import("../components/company/detail.vue")['default']
+export const CompanyList: typeof import("../components/company/list.vue")['default']
 export const DetailHotNews: typeof import("../components/detail/HotNews.vue")['default']
 export const DetailHotNews2: typeof import("../components/detail/HotNews2.vue")['default']
 export const GoodsSwiperSnscShopInfoCateg: typeof import("../components/goods/SwiperSnscShopInfoCateg.vue")['default']
@@ -172,6 +181,9 @@ export const NuxtIsland: typeof import("../node_modules/nuxt/dist/app/components
 export const NuxtRouteAnnouncer: IslandComponent<typeof import("../node_modules/nuxt/dist/app/components/server-placeholder")['default']>
 export const LazyAdvertisingBuyAD: typeof import("../components/advertising/BuyAD.vue")['default']
 export const LazyAdvertisingOrderList: typeof import("../components/advertising/OrderList.vue")['default']
+export const LazyCompanyClass: typeof import("../components/company/class.vue")['default']
+export const LazyCompanyDetail: typeof import("../components/company/detail.vue")['default']
+export const LazyCompanyList: typeof import("../components/company/list.vue")['default']
 export const LazyDetailHotNews: typeof import("../components/detail/HotNews.vue")['default']
 export const LazyDetailHotNews2: typeof import("../components/detail/HotNews2.vue")['default']
 export const LazyGoodsSwiperSnscShopInfoCateg: typeof import("../components/goods/SwiperSnscShopInfoCateg.vue")['default']

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

@@ -1 +1 @@
-{"id":"fc76c4aa-cbfd-4273-8802-cf8812f9e6ac","timestamp":1752136157815}
+{"id":"54c9526e-38e1-4dd6-bfe1-46a6a29483b2","timestamp":1752569761416}

+ 1 - 0
.nuxt/manifest/meta/54c9526e-38e1-4dd6-bfe1-46a6a29483b2.json

@@ -0,0 +1 @@
+{"id":"54c9526e-38e1-4dd6-bfe1-46a6a29483b2","timestamp":1752569761416,"matcher":{"static":{},"wildcard":{},"dynamic":{}},"prerendered":[]}

+ 0 - 1
.nuxt/manifest/meta/fc76c4aa-cbfd-4273-8802-cf8812f9e6ac.json

@@ -1 +0,0 @@
-{"id":"fc76c4aa-cbfd-4273-8802-cf8812f9e6ac","timestamp":1752136157815,"matcher":{"static":{},"wildcard":{},"dynamic":{}},"prerendered":[]}

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

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

+ 1 - 1
.nuxt/tsconfig.json

@@ -102,7 +102,7 @@
         "./imports"
       ],
       "#app-manifest": [
-        "./manifest/meta/fc76c4aa-cbfd-4273-8802-cf8812f9e6ac.json"
+        "./manifest/meta/54c9526e-38e1-4dd6-bfe1-46a6a29483b2.json"
       ],
       "#components": [
         "./components"

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

@@ -15,7 +15,7 @@ type NuxtAppInjections =
   InjectionType<typeof import("../../node_modules/nuxt/dist/app/plugins/revive-payload.server.js")> &
   InjectionType<typeof import("../../node_modules/nuxt/dist/app/plugins/chunk-reload.client.js")> &
   InjectionType<typeof import("../../node_modules/nuxt/dist/pages/runtime/plugins/prefetch.client.js")> &
-  InjectionType<typeof import("../../plugins/element-plus")> &
+  InjectionType<typeof import("../../plugins/element-plus.js")> &
   InjectionType<typeof import("../../plugins/request")> &
   InjectionType<typeof import("../../plugins/category")> &
   InjectionType<typeof import("../../plugins/globals")> &

+ 391 - 0
assets/css/company/detail.less

@@ -0,0 +1,391 @@
+* {
+    font-family: "微软雅黑", "microsoft yahei";
+}
+
+ul,
+ol {
+    list-style: none;
+}
+
+a:active {
+    text-decoration: none;
+}
+
+a:hover {
+    text-decoration: none;
+}
+
+a:visited {
+    text-decoration: none;
+    color: #666;
+}
+
+a:link {
+    text-decoration: none;
+}
+
+a:focus {
+    text-decoration: none;
+}
+
+body {
+    position: relative;
+}
+
+.clearfix {
+    overflow: hidden;
+}
+
+.clearfix_2::after {
+    content: '';
+    display: block;
+    height: 0;
+    visibility: hidden;
+    clear: both;
+}
+
+.hiddenColor {
+    visibility: hidden;
+}
+
+.hand {
+    cursor: pointer;
+}
+
+.aTag_parent {
+    position: relative;
+}
+
+.aTag_parent>a,
+.aTag {
+    display: block;
+    width: 100%;
+    height: 100%;
+    position: absolute;
+    z-index: 99;
+    border: 0px;
+    top: 0px;
+    left: 0px;
+    background: rgba(0, 0, 0, 0);
+}
+
+.dot1 {
+    display: block;
+    word-break: keep-all;
+    white-space: nowrap;
+    overflow: hidden;
+    text-overflow: ellipsis;
+}
+
+.dot2 {
+    overflow: hidden;
+    display: -webkit-box;
+    -webkit-box-orient: vertical;
+    -webkit-line-clamp: 2;
+}
+
+input,
+img {
+    border: none;
+}
+
+.cover100 img {
+    display: block;
+    width: 100%;
+    height: 100%;
+    object-fit: cover;
+}
+
+.back100 {
+    background-size: 100% 100%;
+    background-repeat: no-repeat;
+}
+
+article,
+aside,
+footer,
+header,
+time,
+video,
+main,
+nav,
+h4,
+h3,
+section {
+    display: block;
+}
+
+.index_main {
+    margin: 0 auto;
+}
+
+//导航条
+.breadcrumb {
+    width: 100%;
+    height: 22px;
+    padding-bottom: 12px;
+    // border-bottom: 1px solid #e6e6e6;
+    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;
+    }
+}
+
+.slow_6 {
+    -webkit-transition: all .6s;
+    -moz-transition: all .6s;
+    -ms-transition: all .6s;
+    -o-transition: all .6s;
+    transition: all .6s;
+}
+
+.index_main {
+    width: 1200px;
+}
+
+.banner_1 {
+    height: 90px;
+    width: 1200px;
+    overflow: hidden;
+    margin: 30px auto 0px;
+
+    .banner_1_a {
+        height: 90px;
+        width: 1200px;
+        display: block;
+    }
+
+    .banner_1_img {
+        display: block;
+        width: 1200px;
+    }
+}
+
+.info_crumb_box {
+    height: 22px;
+    margin: 30px auto 20px;
+
+    .info_crumb_text {
+        display: inline-block;
+        height: 22px;
+        line-height: 22px;
+        color: #666;
+        font-size: 20px;
+        margin-right: 15px;
+    }
+
+    a.info_crumb_text:hover {
+        color: #255590;
+    }
+}
+
+.info_head_box {
+    border-bottom: solid 1px #D9D9D9;
+
+    .info_head_left {
+        float: left;
+    }
+
+    .info_head_a {
+        float: left;
+        height: 55px;
+        line-height: 55px;
+        color: #333;
+        font-weight: bold;
+        font-size: 22px;
+        border-bottom: solid 3px rgba(0, 0, 0, 0);
+        margin-right: 40px;
+    }
+
+    .info_head_only {
+        float: left;
+        height: 55px;
+        line-height: 55px;
+        color: #255590;
+        font-weight: bold;
+        font-size: 22px;
+        border-bottom: solid 3px #255590;
+    }
+}
+
+.index_2 {
+    margin-top: 30px;
+}
+
+.index_2_img {
+    float: left;
+    width: 330px;
+    height: 330px;
+}
+
+.index_2_right {
+    float: right;
+    width: 845px;
+}
+
+.index_2_h4 {
+    line-height: 29px;
+    color: #333;
+    font-size: 22px;
+}
+
+.index_2_title_box {}
+
+.index_2_title {
+    float: left;
+    height: 31px;
+    line-height: 31px;
+    color: #999;
+    font-size: 16px;
+    padding: 0px 10px;
+    margin: 14px 20px 0px 0px;
+    background: #F8F8F8;
+}
+
+.index_2_ul {
+    margin-top: 10px;
+    height: 265px;
+
+    .index_2_ul_left {
+        float: left;
+        width: 420px;
+    }
+
+    .index_2_li {
+        display: flex;
+        margin-bottom: 23px;
+    }
+
+    .index_2_li_label {
+        line-height: 21px;
+        color: #999;
+        font-size: 16px;
+        min-width: 64px;
+        margin-right: 15px;
+    }
+
+    .index_2_li_text {
+        line-height: 21px;
+        color: #333;
+        font-size: 16px;
+    }
+}
+
+.info_2_head_box {
+    border-bottom: solid 1px #D9D9D9;
+
+    .info_head_left {
+        float: left;
+    }
+
+    .info_2_head_a {
+        float: left;
+        height: 55px;
+        line-height: 55px;
+        color: #333;
+        font-weight: bold;
+        font-size: 22px;
+        border-bottom: solid 3px rgba(0, 0, 0, 0);
+        margin-right: 40px;
+    }
+
+    .info_2_head_only {
+        float: left;
+        height: 55px;
+        line-height: 55px;
+        color: #255590;
+        font-weight: bold;
+        font-size: 22px;
+        border-bottom: solid 3px #255590;
+    }
+}
+
+.info_img_ul {
+    margin-top: 30px;
+    display: flex;
+    justify-content: space-between;
+
+    .info_img_li {
+        width: 210px;
+        height: 210px;
+        margin-bottom: 20px;
+    }
+
+    .info_img_li_foto {
+        display: block;
+        width: 100%;
+        height: 100%;
+    }
+}
+
+.index_3 * {
+    font-size: 18px;
+    color: #333;
+    line-height: 35px;
+}
+
+.info_article {
+    margin-top: 11px;
+    min-height: 400px;
+}
+
+@media screen and (min-width:1200px) {
+    /*pc_1440*/
+    @media screen and (max-width:1440px) {
+        /*1200*/
+    }
+
+    .pc_none {
+        display: none;
+    }
+}
+
+@media screen and (max-width:599px) {}
+
+@media screen and (max-width:320px) {}

+ 503 - 0
components/company/class.vue

@@ -0,0 +1,503 @@
+<template>
+    <div class="company" v-if="routeType == 6">
+        <section class="index_1 clearfix">
+            <div class="shop_head_1 clearfix">
+                <div class="shop_head_1_name">{{ secNavTitle }}</div>
+            </div>
+            <div class="categ_color_box clearfix">
+                <div class="categ_color_name clearfix">直达:</div>
+                <div class="categ_color_in clearfix">
+                    <NuxtLink class="categ_color_a" :href="`/${item.aLIas_pinyin}/list-1.html`" title="item.title"
+                        v-for="(item, index) in companyData" :key="index">
+                        {{ item.alias }}
+                    </NuxtLink>
+                </div>
+            </div>
+        </section>
+        <!-- 三农市场网-商城-资讯列表2 -->
+        <section class=" ">
+            <!-- 面包屑导航 -->
+            <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_name != ''">
+                            <NuxtLink :to="`/${parent_pinyin}/index.html`"> {{ parent_name }}</NuxtLink>
+                        </el-breadcrumb-item>
+                        <el-breadcrumb-item>
+                            <NuxtLink :to="`list-1.html`"> {{ secNavTitle }}</NuxtLink>
+                        </el-breadcrumb-item>
+                    </el-breadcrumb>
+                </div>
+            </div>
+            <section class="index_2 clearfix" v-if="companyData.length > 0">
+                <div class="index_2_left" v-if="companyData[0].data">
+                    <GoodsSwiperSnscShopInfoCateg :data="companyData[0].data"></GoodsSwiperSnscShopInfoCateg>
+                </div>
+                <div class="index_2_right">
+                    <div class="shop_head_2 clearfix">
+                        <NuxtLink class="shop_head_2_name" :href="getLinkPath1(companyData[0])">
+                            {{ companyData[0].alias }}
+                        </NuxtLink>
+                    </div>
+                    <div class="shop_ul_1 clearfix" v-if="companyData[0].data2">
+                        <NuxtLink class="shop_li_1 dot1" :href="getLinkPathDetail(item)" title=""
+                            v-for="(item, index) in companyData[0].data2" :key="index">
+                            {{ item.title }}
+                        </NuxtLink>
+                    </div>
+                </div>
+            </section>
+            <section class="index_3 clearfix">
+                <div class="index_3_left clearfix" v-if="companyData.length > 1">
+                    <!-- 农产科教1 -->
+                    <div class="shop_head_2 clearfix">
+                        <NuxtLink class="shop_head_2_name" :href="getLinkPath1(companyData[1])">
+                            {{ companyData[1].alias }}
+                        </NuxtLink>
+                    </div>
+                    <div class=" clearfix" v-if="companyData.length > 1">
+                        <div class="index_3_in clearfix">
+                            <div class="shop_img_ul_1 clearfix" v-if="companyData[1].data">
+                                <div class="shop_img_li_1 clearfix">
+                                    <NuxtLink class="shop_img_li_1_a" :href="getLinkPathDetail(item)"
+                                        v-for="(item, index) in companyData[1].data" :key="index" :title="item.title">
+                                        <img class="shop_img_li_1_img" :src="item.imgurl" :title="item.title" alt="">
+                                        <div class="shop_img_li_1_rgba clearfix dot1">
+                                            {{ item.title }}
+                                        </div>
+                                    </NuxtLink>
+                                </div>
+                            </div>
+                        </div>
+                        <div class="index_3_in clearfix" v-if="companyData[1].data2">
+                            <div class="shop_ul_2 clearfix">
+                                <NuxtLink class="shop_li_2 clearfix dot1" :href="getLinkPathDetail(item)"
+                                    :title="item.title" v-for="(item, index) in companyData[1].data2" :key="index">
+                                    {{ item.title }}
+                                </NuxtLink>
+                            </div>
+                        </div>
+                    </div>
+                    <!-- 农产科教2 -->
+                    <!-- 农产商机1 -->
+                    <div class="shop_head_3 clearfix" v-if="companyData.length > 2">
+                        <NuxtLink class="shop_head_3_name" :href="getLinkPath1(companyData[2])">{{ companyData[2].alias }}
+                        </NuxtLink>
+                    </div>
+                    <div class=" clearfix">
+                        <div class="index_3_in_2 clearfix" v-if="companyData.length > 2">
+                            <div class="shop_img_ul_2 clearfix">
+                                <div class="shop_img_li_2 clearfix" v-if="companyData[2].data">
+                                    <NuxtLink class="shop_img_li_2_a" :href="getLinkPathDetail(item)"
+                                        v-for="(item, index) in companyData[2].data" :title="item.title">
+                                        <img class="shop_img_li_2_img" :src="item.imgurl" :title="item.title" alt="">
+                                        <div class="shop_img_li_2_rgba clearfix dot1">
+                                            {{ item.title }}
+                                        </div>
+                                    </NuxtLink>
+                                </div>
+                            </div>
+                        </div>
+                        <div class="index_3_in_2 clearfix">
+                            <div class="shop_ul_3 clearfix" v-if="companyData[2].data2">
+                                <NuxtLink class="shop_li_3 clearfix dot1" :href="getLinkPathDetail(item)"
+                                    :title="item.title" v-for="(item, index) in companyData[2].data2" :key="index">
+                                    {{ item.title }}
+                                </NuxtLink>
+                            </div>
+                        </div>
+                    </div>
+                    <!-- 农产商机2 -->
+                </div>
+                <!-- 农产会展1 -->
+                <div class="index_3_right" v-if="companyData.length > 3">
+                    <div class="shop_head_4 clearfix">
+                        <NuxtLink class="shop_head_4_name" :href="getLinkPath1(companyData[3])">
+                            {{ companyData[3].alias }}
+                        </NuxtLink>
+                    </div>
+                    <div class="shop_img_ul_3 clearfix">
+                        <div class="shop_img_li_3 clearfix" v-if="companyData[3].data">
+                            <NuxtLink class="shop_img_li_3_a" :href="getLinkPathDetail(item)"
+                                v-for="(item, index) in companyData[3].data" :key="index" :title="item.title">
+                                <img class="shop_img_li_3_img" :src="item.imgurl" :title="item.title" alt="">
+                                <div class="shop_img_li_3_rgba clearfix dot1">
+                                    {{ item.title }}
+                                </div>
+                            </NuxtLink>
+                        </div>
+                    </div>
+                    <div class="shop_ul_4 clearfix" v-if="companyData[2].data2">
+                        <NuxtLink class="shop_li_4 dot1" :href="getLinkPathDetail(item)" :title="item.title"
+                            v-for="(item, index) in companyData[3].data2" :key="index">
+                            <span class="shop_li_4_num">
+                                {{ index + 1 }}
+                            </span>
+                            {{ item.title }}
+                        </NuxtLink>
+                    </div>
+                </div>
+                <!-- 农产会展2 -->
+            </section>
+        </section>
+    </div>
+
+</template>
+
+<script setup>
+//0.加载页面依赖 start ---------------------------------------->
+import { ref, onMounted } from 'vue';
+import { ElMessage, ElBreadcrumb, ElBreadcrumbItem } from 'element-plus';
+import { ArrowRight } from '@element-plus/icons-vue'
+import { NuxtLink } from '#components';
+//0.加载页面依赖 end ---------------------------------------->
+
+//1.获得路由id start ---------------------------------------->
+const targetSegment = getRoutePath(2);
+const targetSegment1 = getRoutePath(1);
+//1.1 获得当前的路由id
+let routeId;
+let routeType;
+let secNavTitle = ref('')//二级导航标题
+//通过导航路径反向查询导航id
+const getRouteId = await requestDataPromise('/web/getWebsiteRoute', {
+    method: 'GET',
+    query: {
+        'pinyin': targetSegment,
+    },
+});
+console.log("getRouteId", getRouteId);
+
+if (getRouteId.code == 200) {
+    routeId = getRouteId.data.category_id
+    secNavTitle.value = getRouteId.data.alias
+    routeType = getRouteId.data.type
+} else {
+    console.log("获得路由id出错!", getRouteId.message)
+}
+//1.2 获得父级栏目
+let parent_name = ref('');//父级名称
+let parent_id = ref('');//父级id
+let parent_pinyin = ref('');//父级拼音
+const getRoutePName = await requestDataPromise('/web/getWebsiteRoute', {
+    method: 'GET',
+    query: {
+        'pinyin': targetSegment1,
+    },
+});
+// console.log("getRoutePName", getRoutePName);
+
+if (getRoutePName.code == 200) {
+    parent_id.value = getRoutePName.data.category_id
+    parent_name.value = getRoutePName.data.alias
+} else {
+    console.log("获得路由id出错!", getRoutePName.message)
+}
+const getParentId = await requestDataPromise('/web/getOneWebsiteCategory', {
+    method: 'GET',
+    query: {
+        'catid': parent_id.value,
+    },
+});
+// console.log("getParentId", getParentId);
+
+if (getParentId.code == 200) {
+    parent_pinyin.value = getParentId.data.aLIas_pinyin
+} else {
+    console.log("获得路由id出错!", getParentId.message)
+}
+//1.获得路由id end ---------------------------------------->
+
+//2.选项卡 start ---------------------------------------->
+let showTabs = ref(1)
+let qhtabs = function (number) {
+    console.log(number)
+    showTabs.value = number
+}
+//2.选项卡 end ---------------------------------------->
+
+//3.广告 start ---------------------------------------->
+let adImg1 = ref({})
+let adImg2 = ref({})
+let adImg3 = ref({})
+let adImg4 = ref({})
+onMounted(async () => {
+    //从客户端获取行政职能部门 加快打开速度
+    const { $webUrl, $CwebUrl } = useNuxtApp();
+    //广告1
+    let url = `${$webUrl}/web/getWebsiteAdvertisement?ad_tag=snzxw_category_0001`
+    const responseAd1 = await fetch(url, {
+        headers: {
+            'Content-Type': 'application/json',
+            'Userurl': $CwebUrl,
+            'Origin': $CwebUrl
+        }
+    });
+    const resultAd1 = await responseAd1.json();
+    adImg1.value = resultAd1.data[0];
+
+    //广告2
+    let url2 = `${$webUrl}/web/getWebsiteAdvertisement?ad_tag=snzxw_category_0002`
+    const responseAd2 = await fetch(url2, {
+        headers: {
+            'Content-Type': 'application/json',
+            'Userurl': $CwebUrl,
+            'Origin': $CwebUrl
+        }
+    });
+    const resultAd2 = await responseAd2.json();
+    adImg2.value = resultAd2.data[0];
+
+    //广告3
+    let url3 = `${$webUrl}/web/getWebsiteAdvertisement?ad_tag=snzxw_category_0003`
+    const responseAd3 = await fetch(url3, {
+        headers: {
+            'Content-Type': 'application/json',
+            'Userurl': $CwebUrl,
+            'Origin': $CwebUrl
+        }
+    });
+    const resultAd3 = await responseAd3.json();
+    adImg3.value = resultAd3.data[0];
+
+    //广告4
+    let url4 = `${$webUrl}/web/getWebsiteAdvertisement?ad_tag=snzxw_category_0004`
+    const responseAd4 = await fetch(url4, {
+        headers: {
+            'Content-Type': 'application/json',
+            'Userurl': $CwebUrl,
+            'Origin': $CwebUrl
+        }
+    });
+    const resultAd4 = await responseAd4.json();
+    adImg4.value = resultAd4.data[0];
+})
+//3.广告 end ---------------------------------------->
+
+//4.页面数据 start ---------------------------------------->
+const pageData = ref([
+    //示例:
+    // {
+    //     id: 1, 
+    //     title: "", //该导航的标题
+    //     data: [], //数据1
+    //     data1: [], //数据2
+    //     data2: [], //数据3
+    //     data3: [], //数据4
+    //     data4: [], //数据5
+    //     category_id1: "",  //子导航id1
+    //     category_id2: "", 
+    //     category_id3: "",
+    //     category_id4: "",
+    //     title1: "", //子导航标题1
+    //     title2: "",
+    //     title3: "",
+    //     title4: "",
+    //     cid: "" //该导航的id
+    // },
+])
+const companyData = ref([]) 
+
+//4.1 获取所有导航
+try {
+    const navigateData = await requestDataPromise('/web/getWebsiteModelCategory', {
+        method: 'GET',
+        query: {
+            'placeid': 1,
+            'pid': routeId,
+            'num': 8,
+            'type': 1
+        },
+    });
+    // console.log('获取三级导航1111111', navigateData);
+
+    if (navigateData.code == 200) {
+        // 遍历可用的导航池放到页面中
+        for (let index in navigateData.data) {
+            let data = {
+                title: navigateData.data[index].name,
+                cid: navigateData.data[index].category_id,
+                children_count: navigateData.data[index].children_count,
+                alias: navigateData.data[index].alias,
+                aLIas_pinyin: targetSegment1 + "/" + targetSegment + "/" + navigateData.data[index].aLIas_pinyin,
+                type: navigateData.data[index].type,
+                data: [],
+                data1: [],
+                data2: [],
+                data3: [],
+                data4: [],
+                category_id1: "",
+                category_id2: "",
+                category_id3: "",
+                category_id4: "",
+                title1: "",
+                title2: "",
+                title3: "",
+                title4: ""
+            };
+            if (navigateData.data[index].is_url == 1) {
+                // 处理 URL 的逻辑
+            } else {
+                if (navigateData.data[index].type == 6) {
+                    companyData.value.push(data);
+                }
+                //每个页面最多8个模块
+                pageData.value.push(data);
+            }
+        }
+        // console.log('获取三级导航pageData', pageData.value);
+        // console.log('获取三级导航company', companyData.value);
+
+        //导航池加载完毕,开始申请模块数据
+        let getJson = []
+        for (let i = 0; i < companyData.value.length; i++) {
+            if (i == 0) {
+                getJson.push({ "id": companyData.value[0].cid + ",3,9" })
+            } else if (i == 1) {
+                getJson.push({ "id": companyData.value[1].cid + ",1,2" })
+            } else if (i == 2) {
+                getJson.push({ "id": companyData.value[2].cid + ",1,6" })
+            } else if (i == 3) {
+                getJson.push({ "id": companyData.value[3].cid + ",2,4" })
+            }
+        }
+        if (companyData.value.length > 0) {
+            let jsonString = JSON.stringify(getJson);
+            getPageAllData(jsonString);
+        }
+
+
+    } else {
+        console.log("错误:渲染8个模块环节出错,请检查是否存在没有数据的模块!")
+    }
+} catch (error) {
+    console.log("错误:导航池渲染执行接口出错!请检查频道页渲染的模块数据是否完整!")
+}
+
+async function getPageAllData(jsonString) {
+    const mkdata = await requestDataPromise('/web/getWebsiteCompany', {
+        method: 'GET',
+        query: {
+            'id': jsonString
+        },
+    });
+    // console.log('获取模块数据', mkdata);
+
+    if (mkdata.code == 200) {
+        //模块1 顶部大图和列表
+        companyData.value[0].data = mkdata.data[0].img_num;
+        companyData.value[0].data2 = mkdata.data[0].text_num;
+        //模块2
+        companyData.value[1].data = mkdata.data[1].img_num;
+        companyData.value[1].data2 = mkdata.data[1].text_num;
+        //模块3
+        companyData.value[2].data = mkdata.data[2].img_num;
+        companyData.value[2].data2 = mkdata.data[2].text_num;
+        //模块4
+        companyData.value[3].data = mkdata.data[3].img_num;
+        companyData.value[3].data2 = mkdata.data[3].text_num;
+    } else {
+        ElMessage.error(mkdata.message)
+    }
+}
+//4.页面数据 end ---------------------------------------->
+
+//5.设置seo信息 start---------------------------------------->
+const setData = await requestDataPromise('/web/getWebsiteCategoryHead', {
+    method: 'GET',
+    query: {
+        'catid': routeId
+    },
+});
+
+if (setData.code == 200) {
+    let seoTitle = setData.data.seo_title;
+    let seoDescription = setData.data.seo_description;
+    let seoKeywords = setData.data.seo_keywords;
+    let seoSuffix = setData.data.suffix;
+    let seoName = setData.data.website_name;
+
+    useSeoMeta({
+        title: seoTitle + "_" + seoSuffix,
+        meta: [
+            { name: 'keywords', content: seoKeywords + "_" + seoName + "_" + seoSuffix, tagPriority: 10 },
+            { name: 'description', content: seoDescription + "_" + seoName + "_" + seoSuffix, tagPriority: 10 }
+        ]
+    });
+} else {
+    console.log("设置频道页SEO出错!", setData.message)
+}
+//5.设置seo信息 end---------------------------------------->
+</script>
+
+<style lang="less" scoped>
+@import url("@/assets/css/shop/newsClass.less");
+
+.company {
+    width: 1200px;
+    margin: 0 auto;
+}
+
+//导航条
+.breadcrumb {
+    width: 100%;
+    height: 22px;
+    padding-bottom: 30px;
+    border-bottom: 1px solid #ccc;
+    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;
+    margin-top: 40px;
+
+    :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;
+    }
+}
+</style>

+ 318 - 0
components/company/detail.vue

@@ -0,0 +1,318 @@
+<template>
+    <section class="index_main">
+        <!-- 面包屑导航 -->
+        <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_name != ''">
+                        <NuxtLink :to="`/${parent_pinyin}/index.html`"> {{ parent_name }}</NuxtLink>
+                    </el-breadcrumb-item>
+                    <el-breadcrumb-item v-if="routeName">
+                        <NuxtLink :to="`/${targetSegment}/${targetSegment1}/index.html`"> {{ routeName }}</NuxtLink>
+                    </el-breadcrumb-item>
+                    <el-breadcrumb-item v-if="routeName1">
+                        <NuxtLink :to="`list-1.html`"> {{ routeName1 }}</NuxtLink>
+                    </el-breadcrumb-item>
+                    <el-breadcrumb-item>{{ routeNewsTtitle }}</el-breadcrumb-item>
+                </el-breadcrumb>
+            </div>
+        </div>
+        <!-- 面包屑  end-->
+        <div class="info_head_box clearfix">
+            <div class="info_head_left">
+                <a class="info_head_a info_head_only" :title="公司信息">公司信息</a>
+            </div>
+        </div>
+        <section class="index_2 clearfix">
+            <img class="index_2_img" :src="detailImg[0]" :title="routeNewsTtitle" alt="">
+            <div class="index_2_right">
+                <h4 class="index_2_h4"> {{ routeNewsTtitle }}</h4>
+                <div class="index_2_title_box clearfix">
+                    <time class="index_2_title">
+                        成立日期:
+                        <span v-if="time"> {{ time }}</span>
+                    </time>
+                    <span class="index_2_title">
+                        所在城市:
+                        <span v-if="newsDetail.city_name">{{ newsDetail.city_name }}</span>
+                    </span>
+                </div>
+                <div class="index_2_ul clearfix">
+                    <div class="index_2_ul_left">
+                        <div class="index_2_li clearfix">
+                            <label class="index_2_li_label">机构性质</label>
+                            <span class="index_2_li_text " v-if="newsDetail.jobnature_name">
+                                {{ newsDetail.jobnature_name }}</span>
+                        </div>
+                        <div class="index_2_li clearfix">
+                            <label class="index_2_li_label">负 责 人</label>
+                            <span class="index_2_li_text" v-if="newsDetail.manager">
+                                {{ newsDetail.manager }}
+                            </span>
+                        </div>
+                        <div class="index_2_li clearfix">
+                            <label class="index_2_li_label">联 系 人</label>
+                            <span class="index_2_li_text " v-if="newsDetail.content_person">
+                                {{ newsDetail.content_person }}
+                            </span>
+                        </div>
+                        <div class="index_2_li clearfix">
+                            <label class="index_2_li_label">联系电话</label>
+                            <span class="index_2_li_text ">{{ newsDetail.telephone }}</span>
+                        </div>
+                        <div class="index_2_li clearfix">
+                            <label class="index_2_li_label">手 &nbsp;&nbsp;&nbsp;&nbsp; 机</label>
+                            <span class="index_2_li_text ">{{ newsDetail.mobile }}</span>
+                        </div>
+                        <div class="index_2_li clearfix">
+                            <label class="index_2_li_label">地 &nbsp;&nbsp;&nbsp;&nbsp; 址</label>
+                            <span class="index_2_li_text ">{{ newsDetail.adress }}</span>
+                        </div>
+                    </div>
+                    <div class="index_2_ul_left">
+                        <div class="index_2_li clearfix">
+                            <label class="index_2_li_label">所属行业</label>
+                            <span class="index_2_li_text ">{{ newsDetail.hy_name }}</span>
+                        </div>
+                        <div class="index_2_li clearfix">
+                            <label class="index_2_li_label">联系QQ</label>
+                            <span class="index_2_li_text ">{{ newsDetail.QQ }}</span>
+                        </div>
+                        <div class="index_2_li clearfix">
+                            <label class="index_2_li_label">网 &nbsp;&nbsp;&nbsp;&nbsp; 址</label>
+                            <span class="index_2_li_text ">{{ newsDetail.company_url }}</span>
+                        </div>
+                        <div class="index_2_li clearfix">
+                            <label class="index_2_li_label">邮政编码</label>
+                            <span class="index_2_li_text ">{{ newsDetail.post_code }}</span>
+                        </div>
+                        <div class="index_2_li clearfix">
+                            <label class="index_2_li_label">传 &nbsp;&nbsp;&nbsp;&nbsp; 真</label>
+                            <span class="index_2_li_text ">{{ newsDetail.fax }}</span>
+                        </div>
+                    </div>
+
+                </div>
+            </div>
+        </section>
+        <section class="index_3 clearfix">
+            <div class="info_2_head_box clearfix">
+                <div class="info_2_head_left">
+                    <a class="info_2_head_a info_2_head_only" title="">详情信息</a>
+                </div>
+            </div>
+            <div class="info_article" v-html="newsDetail.content"></div>
+        </section>
+    </section>
+</template>
+
+
+<script setup>
+import { ref } from 'vue'
+import { ElBreadcrumb, ElBreadcrumbItem } from 'element-plus'
+import { ArrowRight } from '@element-plus/icons-vue'
+//2.页面路径 start ---------------------------------------->
+const route = useRoute();
+const articleId = parseInt(route.params.id);
+const targetSegment = getRoutePath(1);
+const targetSegment1 = getRoutePath(2);
+const targetSegment2 = getRoutePath(3);
+
+// 2.1 查询一级栏目的id
+//通过导航路径反向查询导航id
+let routeId;
+const getRouteId = await requestDataPromise('/web/getWebsiteRoute', {
+    method: 'GET',
+    query: {
+        'pinyin': targetSegment,
+    },
+});
+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 ---------->")
+}
+// 2.2查询二级栏目的id及名称
+let routeName = ref('');
+let routeId1 = ref('');
+const getRoutePName = await requestDataPromise('/web/getWebsiteRoute', {
+    method: 'GET',
+    query: {
+        'pinyin': targetSegment1,
+    },
+});
+if (getRoutePName.code == 200) {
+    routeId1.value = getRoutePName.data.category_id;
+    routeName.value = getRoutePName.data.alias;
+} 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 ---------->")
+}
+
+// 2.3 查询三级栏目的id及名称
+let routeName1 = ref('');
+let routeId11 = ref('');
+const getRoutePName1 = await requestDataPromise('/web/getWebsiteRoute', {
+    method: 'GET',
+    query: {
+        'pinyin': targetSegment2,
+    },
+});
+if (getRoutePName1.code == 200) {
+    routeId11.value = getRoutePName1.data.category_id;
+    routeName1.value = getRoutePName1.data.alias;
+} 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 ---------->")
+}
+
+
+//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',
+        query: {
+            'catid': routeId
+        },
+    });
+
+    if (listData.code == 200) {
+        parent_name.value = listData.data.alias;
+        parent_id.value = listData.data.parent_id;
+        parent_pinyin.value = listData.data.aLIas_pinyin;
+
+    } else {
+        console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
+        console.log("错误位置:获取面包屑导航")
+        console.log("后端错误反馈:", listData.message)
+        console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
+    }
+}
+//获得父级栏目详情
+getParentNav();
+//3.面包屑 end ------------------------------------------->
+
+//4.新闻详情 start ---------------------------------------->
+//4.1 资讯详情
+const newsDetail = ref({})
+const routeNewsTtitle = ref("");
+//4.2 发布日期
+const time = ref("");
+//4.3 路径
+const routLevelTitle = ref("");
+const routLevelId = ref("");
+//4.4 是否展示投票
+let detailImg = ref('');
+let seoTitle;
+let seoDescription;
+let seoKeywords;
+//4.5 获取详情
+const mkdata = await requestDataPromise('/web/getWebsiteCompanyInfo', {
+    method: 'GET',
+    query: {
+        'id': articleId
+    },
+});
+if (mkdata.code == 200) {
+    //获取内容
+    newsDetail.value = mkdata.data;
+    detailImg.value = JSON.parse(mkdata.data.imgurl);
+    //修正标题长度
+    if (newsDetail.value.title.length >= 20) {
+        routeNewsTtitle.value = newsDetail.value.title.substr(0, 20) + "...";
+    } else {
+        routeNewsTtitle.value = newsDetail.value.title
+    }
+    //获取发布时间
+    if (newsDetail.value.data) {
+        time.value = newsDetail.value.data.split(' ')[0];
+    }
+    seoTitle = newsDetail.value.title;
+    seoDescription = newsDetail.value.description;
+    seoKeywords = newsDetail.value.keyword;
+} else {
+    console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
+    console.log("错误位置:获取详情内容")
+    console.log("后端错误反馈:", mkdata.message)
+    console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
+}
+//4.新闻详情 end ---------------------------------------->
+
+//5.设置seo信息 start---------------------------------------->
+
+const setData = await requestDataPromise('/web/getWebsiteCategoryHead', {
+    method: 'GET',
+    query: {
+        'catid': routeId1.value
+    },
+});
+
+if (setData.code == 200) {
+    let seoSuffix = setData.data.suffix;
+    let seoName = setData.data.website_name;
+
+    useSeoMeta({
+        title: seoTitle + "_" + seoName + "_" + seoSuffix,
+        meta: [
+            { name: 'keywords', content: seoKeywords + "_" + seoName + "_" + seoSuffix, tagPriority: 10 },
+            { name: 'description', content: seoDescription + "_" + seoName + "_" + seoSuffix, tagPriority: 10 }
+        ]
+    });
+} else {
+    console.log("设置频道页SEO出错!", setData.message)
+}
+//5.设置seo信息 end---------------------------------------->
+
+//6.广告 start ---------------------------------------->
+let adImg1 = ref([]);
+let adImg2 = ref([]);
+onMounted(async () => {
+    const { $webUrl, $CwebUrl } = useNuxtApp();
+    //广告1
+    let url = `${$webUrl}/web/getWebsiteAdvertisement?ad_tag=nzgxw_detail_0001`
+    const responseAd1 = await fetch(url, {
+        headers: {
+            'Content-Type': 'application/json',
+            'Userurl': $CwebUrl,
+            'Origin': $CwebUrl
+        }
+    });
+    const resultAd1 = await responseAd1.json();
+    adImg1.value = resultAd1.data[0];
+
+    //广告2
+    let url2 = `${$webUrl}/web/getWebsiteAdvertisement?ad_tag=nzgxw_detail_0002`
+
+    const responseAd2 = await fetch(url2, {
+        headers: {
+            'Content-Type': 'application/json',
+            'Userurl': $CwebUrl,
+            'Origin': $CwebUrl
+        }
+    });
+    const resultAd2 = await responseAd2.json();
+    adImg2.value = resultAd2.data[0];
+})
+//6.广告 end ---------------------------------------->
+</script>
+
+<style lang="less" scoped>
+@import url(@/assets/css/company/detail.less);
+</style>

+ 356 - 0
components/company/list.vue

@@ -0,0 +1,356 @@
+<template>
+    <!-- 企业列表 company -->
+    <main class="index_main" v-if="routeType == 6">
+        <!-- 三农市场网-商城-资讯分类页 1-->
+        <section class="index_1 clearfix">
+            <div class="shop_head_1 clearfix">
+                <div class="shop_head_1_name">{{ parent_name }}</div>
+            </div>
+            <div class="categ_color_box clearfix">
+                <div class="categ_color_name clearfix">直达:</div>
+                <div class="categ_color_in clearfix">
+                    <NuxtLink class="categ_color_a" :href="`/${item.aLIas_pinyin}/list-1.html`" :title="item.title"
+                        v-for="(item, index) in companyData" :key="index"
+                        :class="{ categ_color_a_only: navCid == item.cid }">
+                        {{ item.alias }}
+                    </NuxtLink>
+                </div>
+            </div>
+        </section>
+        <!-- 三农市场网-商城-资讯分类页2 -->
+        <!-- 三农市场网-商城-资讯列表 1-->
+        <section class="clearfix">
+            <div class="info_1_left">
+                <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="p_parent_name != ''">
+                                <NuxtLink :to="`/${targetSegment}/index.html`"> {{ p_parent_name }}</NuxtLink>
+                            </el-breadcrumb-item>
+                            <el-breadcrumb-item v-if="parent_name != ''">
+                                <NuxtLink :to="`/${targetSegment}/${targetSegment1}/index.html`"> {{ parent_name }}
+                                </NuxtLink>
+                            </el-breadcrumb-item>
+                            <el-breadcrumb-item>{{ navTitle }}</el-breadcrumb-item>
+                        </el-breadcrumb>
+                    </div>
+                </div>
+                <div class="info_ul_1 clearfix">
+                    <div class="info_li_1 clearfix" v-for="(item, index) in newsList" :key="index">
+                        <NuxtLink class="info_li_1_a dot1" :href="`/${item.pinyin}/${item.id}.html`" title="">
+                            {{ item.title }}
+                        </NuxtLink>
+                        <time class="info_li_1_time">{{ getTime(item.updated_at, 'month', 1) }}</time>
+                    </div>
+                    <div class="empty" v-if="newsList == false">
+                        <img src="@/public/topic/empty.png" alt="" class="empty_img">
+                        <span class="empty_text">当前暂无数据</span>
+                    </div>
+                </div>
+                <!-- 分页器 -->
+                <div class="pagination" v-if="newstotal">
+                    <el-pagination background layout="prev, pager, next" :total="newstotal" :page-size="pageSize_news"
+                        prev-text="上一页" next-text="下一页" @current-change="changePage" />
+                </div>
+            </div>
+            <aside class="info_1_aside">
+                <DetailHotNews></DetailHotNews>
+                <DetailHotNews2></DetailHotNews2>
+            </aside>
+        </section>
+    </main>
+</template>
+
+<script setup>
+//0.加载页面依赖 start ---------------------------------------->
+import { ref, onMounted } from 'vue';
+import { ElMessage, ElBreadcrumb, ElBreadcrumbItem, ElPagination } from 'element-plus';
+import { ArrowRight } from '@element-plus/icons-vue'
+import { NuxtLink } from '#components';
+//0.加载页面依赖 end ---------------------------------------->
+
+//1.获得路由id start ---------------------------------------->
+const targetSegment = getRoutePath(1);
+const targetSegment1 = getRoutePath(2);
+const targetSegment2 = getRoutePath(3);
+//1.1 获得当前的路由id
+let routeId;
+let routeType;
+let navTitle = ref('')//二级导航标题
+let navCid = ref('')//二级导航id
+//通过导航路径反向查询导航id
+const getRouteId = await requestDataPromise('/web/getWebsiteRoute', {
+    method: 'GET',
+    query: {
+        'pinyin': targetSegment2,
+    },
+});
+console.log("getRouteId", getRouteId);
+
+if (getRouteId.code == 200) {
+    navTitle.value = getRouteId.data.alias
+    navCid.value = getRouteId.data.category_id
+} else {
+    console.log("获得路由id出错!", getRouteId.message)
+}
+//1.2 获取二级栏目
+let parent_name = ref('');//父级名称
+let parent_id = ref('');//父级id
+let parent_pinyin = ref('');//父级拼音
+const getRoutePName = await requestDataPromise('/web/getWebsiteRoute', {
+    method: 'GET',
+    query: {
+        'pinyin': targetSegment1,
+    },
+});
+console.log("getRoutePName", getRoutePName);
+
+if (getRoutePName.code == 200) {
+    routeId = getRoutePName.data.category_id
+    parent_id.value = getRoutePName.data.category_id
+    parent_name.value = getRoutePName.data.alias
+    routeType = getRoutePName.data.type
+} else {
+    console.log("获得路由id出错!", getRoutePName.message)
+}
+//1.3 获取一级栏目
+let p_parent_name = ref('');//父级名称
+let p_parent_id = ref('');//父级id
+let p_parent_pinyin = ref('');//父级拼音
+const getRoutePName_parent = await requestDataPromise('/web/getWebsiteRoute', {
+    method: 'GET',
+    query: {
+        'pinyin': targetSegment,
+    },
+});
+console.log("getRoutePName_parent", getRoutePName_parent);
+
+if (getRoutePName_parent.code == 200) {
+    p_parent_id.value = getRoutePName_parent.data.category_id
+    p_parent_name.value = getRoutePName_parent.data.alias
+    // p_parent_pinyin.value = getRoutePName_parent.data.aLIas_pinyin
+} else {
+    console.log("获得路由id出错!", getRoutePName_parent.message)
+}
+//1.4 获取某个栏目
+const getParentId = await requestDataPromise('/web/getOneWebsiteCategory', {
+    method: 'GET',
+    query: {
+        'catid': parent_id.value,
+    },
+});
+console.log("getParentId", getParentId);
+
+if (getParentId.code == 200) {
+    parent_pinyin.value = getParentId.data.aLIas_pinyin
+} else {
+    console.log("获得路由id出错!", getParentId.message)
+}
+//1.获得路由id end ---------------------------------------->
+
+//2.选项卡 start ---------------------------------------->
+let showTabs = ref(1)
+let qhtabs = function (number) {
+    console.log(number)
+    showTabs.value = number
+}
+//2.选项卡 end ---------------------------------------->
+
+//3.广告 start ---------------------------------------->
+let adImg1 = ref({})
+let adImg2 = ref({})
+onMounted(async () => {
+    //从客户端获取行政职能部门 加快打开速度
+    const { $webUrl, $CwebUrl } = useNuxtApp();
+    //广告1
+    let url = `${$webUrl}/web/getWebsiteAdvertisement?ad_tag=snscw_list_0001`
+    const responseAd1 = await fetch(url, {
+        headers: {
+            'Content-Type': 'application/json',
+            'Userurl': $CwebUrl,
+            'Origin': $CwebUrl
+        }
+    });
+    const resultAd1 = await responseAd1.json();
+    adImg1.value = resultAd1.data[0];
+
+    //广告2
+    let url2 = `${$webUrl}/web/getWebsiteAdvertisement?ad_tag=snscw_list_0002`
+    const responseAd2 = await fetch(url2, {
+        headers: {
+            'Content-Type': 'application/json',
+            'Userurl': $CwebUrl,
+            'Origin': $CwebUrl
+        }
+    });
+    const resultAd2 = await responseAd2.json();
+    adImg2.value = resultAd2.data[0];
+})
+//3.广告 end ---------------------------------------->
+
+//4.页面数据 start ---------------------------------------->
+const pageData = ref([
+    //示例:
+    // {
+    //     id: 1, 
+    //     title: "", //该导航的标题
+    //     data: [], //数据1
+    //     data1: [], //数据2
+    //     data2: [], //数据3
+    //     data3: [], //数据4
+    //     data4: [], //数据5
+    //     category_id1: "",  //子导航id1
+    //     category_id2: "", 
+    //     category_id3: "",
+    //     category_id4: "",
+    //     title1: "", //子导航标题1
+    //     title2: "",
+    //     title3: "",
+    //     title4: "",
+    //     cid: "" //该导航的id
+    // },
+])
+const companyData = ref([])
+
+
+//4.1 获取所有导航
+try {
+    const navigateData = await requestDataPromise('/web/getWebsiteModelCategory', {
+        method: 'GET',
+        query: {
+            'placeid': 1,
+            'pid': routeId,
+            'num': 8,
+            'type': 1
+        },
+    });
+    // console.log('获取三级导航1111111', navigateData);
+
+    if (navigateData.code == 200) {
+        // 遍历可用的导航池放到页面中
+        for (let index in navigateData.data) {
+            let data = {
+                title: navigateData.data[index].name,
+                cid: navigateData.data[index].category_id,
+                children_count: navigateData.data[index].children_count,
+                alias: navigateData.data[index].alias,
+                aLIas_pinyin: targetSegment + "/" + targetSegment1 + "/" + navigateData.data[index].aLIas_pinyin,
+                type: navigateData.data[index].type,
+                // data: [],
+                // data1: [],
+                // data2: [],
+                // data3: [],
+                // data4: [],
+                // category_id1: "",
+                // category_id2: "",
+                // category_id3: "",
+                // category_id4: "",
+                // title1: "",
+                // title2: "",
+                // title3: "",
+                // title4: ""
+            };
+            if (navigateData.data[index].is_url == 1) {
+                // 处理 URL 的逻辑
+            } else {
+                if (navigateData.data[index].type == 6) {
+                    companyData.value.push(data);
+                } 
+                //每个页面最多8个模块
+                pageData.value.push(data);
+            }
+        }
+        // console.log('获取三级导航pageData', pageData.value);
+        // console.log('获取三级导航company', companyData.value);
+
+    } else {
+        console.log("错误:渲染8个模块环节出错,请检查是否存在没有数据的模块!")
+    }
+} catch (error) {
+    console.log("错误:导航池渲染执行接口出错!请检查频道页渲染的模块数据是否完整!")
+}
+// 获取企业数据列表 start--------------------------------------->
+const newsList = ref()
+const page_news = ref(1)
+const pageSize_news = ref(20)
+const newstotal = ref('')
+const getNewsList = await requestDataPromise('/web/getWebsiteCompanyList', {
+    method: 'GET',
+    query: {
+        'page': page_news.value,
+        'pageSize': pageSize_news.value,
+        'category_id': navCid.value,
+    },
+});
+console.log("获取企业列表company", getNewsList.data);
+
+if (getNewsList.code == 200) {
+    newsList.value = getNewsList.data.data
+    newstotal.value = getNewsList.data.count
+}
+// 获取企业数据 end----------------------------------------->
+
+//4.页面数据 end ---------------------------------------->
+
+//5.设置seo信息 start---------------------------------------->
+const setData = await requestDataPromise('/web/getWebsiteCategoryHead', {
+    method: 'GET',
+    query: {
+        'catid': navCid.value
+    },
+});
+
+if (setData.code == 200) {
+    let seoTitle = setData.data.seo_title;
+    let seoDescription = setData.data.seo_description;
+    let seoKeywords = setData.data.seo_keywords;
+    let seoSuffix = setData.data.suffix;
+    let seoName = setData.data.website_name;
+
+    useSeoMeta({
+        title: seoTitle + "_" + seoSuffix,
+        meta: [
+            { name: 'keywords', content: seoKeywords + "_" + seoName + "_" + seoSuffix, tagPriority: 10 },
+            { name: 'description', content: seoDescription + "_" + seoName + "_" + seoSuffix, tagPriority: 10 }
+        ]
+    });
+} else {
+    console.log("设置频道页SEO出错!", setData.message)
+}
+//5.设置seo信息 end---------------------------------------->
+</script>
+<style lang="less" scoped>
+@import url("@/assets/css/shop/newsList.less");
+@import url("@/assets/css/shop/goodsList.less");
+
+.empty {
+    width: 100%;
+    height: 300px;
+    line-height: 300px;
+    text-align: center;
+}
+
+.empty_img {
+    vertical-align: -30px;
+    margin-right: 20px;
+}
+
+.empty_text {
+    font-size: 26px;
+    color: #999;
+}
+
+.pagination {
+    height: 100px;
+    margin-top: 20px;
+}
+
+.pagination1 {
+    height: 100px;
+    margin-top: 20px;
+}
+</style>

+ 2 - 0
pages/[dir]/[dir]/[dir]/[id].vue

@@ -6,6 +6,8 @@
     <NewsDetail v-if="routeType == 1"></NewsDetail>
     <!-- goods -->
     <GoodsDetail v-if="routeType == 2"></GoodsDetail>
+    <!-- company -->
+    <CompanyDetail v-if="routeType == 6"></CompanyDetail>
     
     <HomeAdvertising :imgurl="adImg2"></HomeAdvertising>
     <HomeFoot></HomeFoot>

+ 2 - 0
pages/[dir]/[dir]/[dir]/list-[id].vue

@@ -141,6 +141,8 @@
         </section>
         <!-- 三农市场网-商城-商品列表 2-->
     </main>
+
+    <CompanyList v-if="routeType == 6"></CompanyList>
     <HomeAdvertising :imgurl="adImg2"></HomeAdvertising>
     <HomeFoot></HomeFoot>
 </template>

+ 2 - 0
pages/[dir]/[dir]/index.html.vue

@@ -341,6 +341,8 @@
             </div>
         </section>
     </div>
+
+    <CompanyClass v-if="routeType == 6"></CompanyClass>
     <HomeFoot></HomeFoot>
 </template>
 

+ 2 - 2
plugins/category.ts

@@ -44,7 +44,7 @@ const navPre: number[] = [
 
 export default defineNuxtPlugin((nuxtApp) => {
     //master 环境
-    // nuxtApp.provide('pageNav', navMaster)
+    nuxtApp.provide('pageNav', navMaster)
     //pre 环境
-    nuxtApp.provide('pageNav', navPre)
+    // nuxtApp.provide('pageNav', navPre)
 })

+ 10 - 10
plugins/globals.ts

@@ -1,15 +1,15 @@
 export default defineNuxtPlugin((nuxtApp) => {
   // 三农市场网pre环境
-  nuxtApp.provide('webUrl', 'http://apipre1.bjzxtw.org.cn:29501')
-  nuxtApp.provide('CwebUrl', 'http://pre.snscw.org.cn')
-  nuxtApp.provide('BwebUrl', 'http://adminpre.bjzxtw.org.cn')
-  nuxtApp.provide('LoginWebUrl', 'http://adminpre.bjzxtw.org.cn/adminapi')
-  nuxtApp.provide('userUrl', 'http://localhost:3000')
+  // nuxtApp.provide('webUrl', 'http://apipre1.bjzxtw.org.cn:29501')
+  // nuxtApp.provide('CwebUrl', 'http://pre.snscw.org.cn')
+  // nuxtApp.provide('BwebUrl', 'http://adminpre.bjzxtw.org.cn')
+  // nuxtApp.provide('LoginWebUrl', 'http://adminpre.bjzxtw.org.cn/adminapi')
+  // nuxtApp.provide('userUrl', 'http://localhost:3000')
 
   //正式环境
-  // nuxtApp.provide('webUrl', 'https://flzxw.bjzxtw.org.cn')
-  // nuxtApp.provide('CwebUrl', 'http://nw.snscw.org.cn')
-  // nuxtApp.provide('BwebUrl', 'https://admin.bjzxtw.org.cn')
-  // nuxtApp.provide('LoginWebUrl', 'http://admin.bjzxtw.org.cn/adminapi')
-  // nuxtApp.provide('userUrl', 'http://localhost:3000')
+  nuxtApp.provide('webUrl', 'https://flzxw.bjzxtw.org.cn')
+  nuxtApp.provide('CwebUrl', 'http://nw.snscw.org.cn')
+  nuxtApp.provide('BwebUrl', 'https://admin.bjzxtw.org.cn')
+  nuxtApp.provide('LoginWebUrl', 'http://admin.bjzxtw.org.cn/adminapi')
+  nuxtApp.provide('userUrl', 'http://localhost:3000')
 })

+ 4 - 4
plugins/request.ts

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