Browse Source

修改bug

Jing 1 week ago
parent
commit
59f9681d80

+ 7 - 18
assets/css/index.less

@@ -405,7 +405,7 @@
                         border-radius: 4px;
                         position: absolute;
                         top: 9px;
-                        right: 6px;
+                        // right: 0px;
                     }
                 }
 
@@ -780,7 +780,7 @@
                         border-radius: 4px;
                         position: absolute;
                         top: 9px;
-                        right: 6px;
+                        right: 0px;
                     }
                 }
 
@@ -1132,7 +1132,7 @@
                         border-radius: 4px;
                         position: absolute;
                         top: 9px;
-                        right: 6px;
+                        right: 0px;
                     }
                 }
 
@@ -1338,7 +1338,7 @@
                     border-radius: 4px;
                     position: absolute;
                     top: 9px;
-                    right: 6px;
+                    right: 0px;
                 }
             }
 
@@ -1580,7 +1580,7 @@
                             border-radius: 4px;
                             position: absolute;
                             top: 9px;
-                            right: 6px;
+                            right: 0px;
                         }
                     }
 
@@ -1599,17 +1599,6 @@
                         a {
                             color: #999999;
                         }
-
-                        // em{
-                        //     display: inline-block;
-                        //     width: 8px;
-                        //     height: 8px;
-                        //     background-color: #a01c0e;
-                        //     border-radius: 4px;
-                        //     position: absolute;
-                        //     top: 9px;
-                        //     right: 6px;
-                        // }
                     }
                 }
 
@@ -1832,7 +1821,7 @@
                             border-radius: 4px;
                             position: absolute;
                             top: 9px;
-                            right: 6px;
+                            right: 0px;
                         }
                     }
 
@@ -2027,7 +2016,7 @@
                         border-radius: 4px;
                         position: absolute;
                         top: 9px;
-                        right: 6px;
+                        right: 0px;
                     }
                 }
 

+ 481 - 0
assets/css/search.less

@@ -0,0 +1,481 @@
+//导航条
+.breadcrumb {
+    width: 100%;
+    height: 22px;
+    margin-bottom: 30px;
+    font-family: Microsoft YaHei, Microsoft YaHei;
+    font-weight: 400;
+    font-size: 20px;
+    color: #666666;
+    line-height: 23px;
+    text-align: left;
+    font-style: normal;
+    text-transform: none;
+
+    :deep(.el-breadcrumb) {
+        display: inline-block;
+        vertical-align: -4px;
+    }
+
+    :deep(.el-breadcrumb__inner a),
+    :deep(.el-breadcrumb__inner.is-link) {
+        color: #666666;
+        font-weight: 400;
+        text-decoration: none;
+        transition: var(--el-transition-color);
+    }
+
+    span {
+        font-family: Microsoft YaHei, Microsoft YaHei;
+        font-weight: 400;
+        font-size: 20px;
+        color: #666666;
+        line-height: 23px;
+        text-align: left;
+        font-style: normal;
+        text-transform: none;
+    }
+
+    span:hover {
+        color: #666666;
+    }
+
+    .location {
+        margin-right: 20px;
+        width: 100px;
+        height: 22px;
+        font-family: Microsoft YaHei, Microsoft YaHei;
+        font-weight: 400;
+        font-size: 20px;
+        color: #666666;
+        line-height: 23px;
+        text-align: left;
+        font-style: normal;
+        text-transform: none;
+    }
+}
+
+.empty {
+    div {
+        display: flex;
+        justify-content: center;
+        align-items: center;
+        padding-top: 200px;
+    }
+
+    width: 100%;
+    height: 600px;
+    font-size: 26px;
+    color: #CCCCCC;
+
+    img {
+        display: inline-block;
+    }
+}
+
+// 资讯列表
+.newsList {
+    width: 1200px;
+    margin: 0 auto;
+    //height: 675px;
+    margin-bottom: 70px;
+
+    .inner {
+        width: 1200px;
+
+        .innerLeft {
+            width: 100%;
+        }
+
+        .innerLeft,
+        .innerRight {
+            border-top: 1px solid #CCCCCC;
+            clear: both;
+            float: none;
+        }
+
+        .innerLeft {
+            //height: 675px;
+
+            >.list {
+                //height: 570px;
+                margin-bottom: 70px;
+
+                >li {
+                    width: 1200px;
+                    height: 56px;
+                    white-space: nowrap;
+                    overflow: hidden;
+                    text-overflow: ellipsis;
+                    line-height: 56px;
+
+
+                    a {
+                        display: inline-block;
+                        width: 800px;
+                        height: 26px;
+                        font-family: Microsoft YaHei, Microsoft YaHei;
+                        font-weight: 400;
+                        font-size: 20px;
+                        color: #333333;
+                        line-height: 26px;
+                        text-align: left;
+                        font-style: normal;
+                        text-transform: none;
+                        white-space: nowrap;
+                        overflow: hidden;
+                        text-overflow: ellipsis;
+                    }
+
+                    .time {
+                        font-family: Microsoft YaHei, Microsoft YaHei;
+                        font-weight: 400;
+                        font-size: 18px;
+                        color: #333333;
+                    }
+
+                }
+
+                >li:hover>a {
+                    color: #a01c0e;
+                }
+
+                >li:nth-child(1)::after,
+                >li:nth-child(2)::after {
+                    content: "热";
+                    margin-left: 13px;
+                    background: #FF8A37;
+                    color: #fff;
+                    font-size: 14px;
+                    padding: 0px 2px;
+                }
+
+                >li:nth-child(5n) {
+                    border-bottom: 1px solid #D9D9D9;
+                }
+            }
+
+            >.pagination {
+                width: 100%;
+                height: 34px;
+                margin-left: 141px;
+                display: flex;
+                justify-content: center;
+                margin: 0;
+
+                // 鼠标移入后字体颜色
+                .el-pagination::v-deep :hover {
+                    color: #a01c0e;
+                }
+
+                .el-pagination.is-background::v-deep .btn-next,
+                .el-pagination.is-background::v-deep .btn-prev {
+                    width: 70px;
+                    height: 34px;
+                    margin: 0px 10px;
+                    border-radius: 4px;
+                }
+
+                .el-pagination.is-background::v-deep .el-pager li {
+                    margin: 0px 10px;
+                    width: 38px;
+                    height: 34px;
+                    border-radius: 4px;
+                }
+
+                .el-pagination.is-background::v-deep .btn-next.is-active,
+                .el-pagination.is-background::v-deep .btn-prev.is-active,
+                .el-pagination.is-background::v-deep .el-pager li.is-active {
+                    background-color: #a01c0e;
+                    color: #fff;
+                }
+
+
+            }
+        }
+
+        .innerRight {
+            width: 381px;
+            height: 605px;
+            clear: both;
+            overflow: hidden;
+        }
+    }
+}
+
+//资讯推荐
+.zixuntuijian {
+    width: 100%;
+    height: 290px;
+    margin-bottom: 70px;
+
+    .innerLeft {
+
+        // 左侧
+        .zixunLeft {
+            margin-right: 30px;
+        }
+
+        .zixunRight,
+        .zixunLeft {
+            float: left;
+            width: 380px;
+            height: 290px;
+
+            // 标题部分
+            >.title {
+                width: 380px;
+            }
+
+            >.title>h3 {
+                height: 36px;
+                font-family: Source Han Sans, Source Han Sans;
+                font-weight: bold;
+                font-size: 24px;
+                color: #000000;
+                line-height: 28px;
+                text-align: left;
+                font-style: normal;
+                text-transform: none;
+                border-bottom: 1px solid #a01c0e;
+
+            }
+
+            >.title>h3>span {
+                float: right;
+                width: 56px;
+                height: 20px;
+                line-height: 24px;
+                font-weight: 400;
+                font-size: 14px;
+                color: #999999;
+                font-style: normal;
+                text-transform: none;
+            }
+
+            .photo_text {
+
+                >li:first-child {
+                    width: 380px;
+                    height: 120px;
+                    margin-top: 20px;
+                    margin-bottom: 15px;
+                    position: relative;
+
+                    >img {
+                        float: left;
+                        width: 160px;
+                        height: 120px;
+                    }
+
+                    >div {
+                        float: left;
+                        width: 220px;
+                        height: 120px;
+                        padding-left: 15px;
+                        padding-top: 6px;
+                        box-sizing: border-box;
+                        background-color: #f6f6f6;
+
+
+                        >h5 {
+                            width: 200px;
+                            height: 54px;
+                            display: -webkit-box;
+                            -webkit-box-orient: vertical;
+                            -webkit-line-clamp: 2;
+                            overflow: hidden;
+                            text-overflow: ellipsis;
+                            word-break: break-all;
+                            font-family: Source Han Sans, Source Han Sans;
+                            font-weight: 500;
+                            font-size: 18px;
+                            color: #333333;
+                            line-height: 26px;
+                            text-align: left;
+                            font-style: normal;
+                            text-transform: none;
+                        }
+
+                        >p {
+                            width: 200px;
+                            height: 22px;
+                            line-height: 20px;
+                            position: absolute;
+                            bottom: 5px;
+                            right: 0;
+
+                            >span {
+                                display: inline-block;
+                                // width: 100px;
+                                height: 18px;
+                                font-family: Source Han Sans, Source Han Sans;
+                                font-weight: 400;
+                                font-size: 12px;
+                                color: #999999;
+                                text-align: left;
+                                line-height: 14px;
+                                font-style: normal;
+                                text-transform: none;
+                            }
+
+                            >span:last-child {
+                                // width: 90px;
+                                text-align: right;
+                                margin-left: 20px;
+                            }
+
+                        }
+                    }
+                }
+
+                >li {
+                    width: 380px;
+                    height: 25px;
+                    white-space: nowrap;
+                    overflow: hidden;
+                    text-overflow: ellipsis;
+                    font-family: PingFang SC, PingFang SC;
+                    font-weight: 500;
+                    font-size: 18px;
+                    color: #333333;
+                    line-height: 21px;
+                    text-align: left;
+                    font-style: normal;
+                    text-transform: none;
+                    margin-bottom: 10px;
+
+                    em {
+                        display: inline-block;
+                        width: 8px;
+                        height: 8px;
+                        border-radius: 8px;
+                        margin-right: 10px;
+                        background-color: #d9d9d9;
+                    }
+                }
+
+                >li:hover {
+                    color: #a01c0e;
+                }
+
+                >li:hover em {
+                    background-color: #a01c0e;
+                }
+            }
+        }
+    }
+
+    .innerRight {
+        width: 381px;
+        height: 290px;
+        background-color: #fbfbfb;
+
+        >.title {
+            width: 380px;
+            height: 40px;
+            line-height: 40px;
+            border-top: 1px solid #a01c0e;
+            border-bottom: 1px solid #e7e7e7;
+
+            >h4 {
+                font-family: Microsoft YaHei, Microsoft YaHei;
+                font-weight: 400;
+                margin-left: 20px;
+                font-size: 20px;
+                color: #000000;
+                text-align: left;
+                font-style: normal;
+                text-transform: none;
+
+                >span {
+                    float: right;
+                    font-family: Microsoft YaHei, Microsoft YaHei;
+                    font-weight: 400;
+                    font-size: 14px;
+                    margin-right: 10px;
+                    color: #999999;
+                    text-align: left;
+                    font-style: normal;
+                    text-transform: none;
+                }
+            }
+
+        }
+
+        .rightList {
+            height: 540px;
+            margin-top: 20px;
+
+            >li {
+                height: 100px;
+                margin-bottom: 10px;
+
+                >img {
+                    width: 150px;
+                    height: 100px;
+                }
+
+                >p {
+                    width: 219px;
+                    height: 100px;
+                    padding-left: 12px;
+                    font-family: PingFang SC, PingFang SC;
+                    font-weight: 400;
+                    font-size: 16px;
+                    color: #333333;
+                    line-height: 22px;
+                    text-align: left;
+                    font-style: normal;
+                    text-transform: none;
+
+                }
+
+                >p:hover {
+                    box-shadow: 0 0 16px 1px rgba(0, 0, 0, 0.1);
+                }
+            }
+        }
+
+    }
+}
+
+.searchBox {
+    text-align: center;
+    padding-bottom: 40px;
+}
+
+.search {
+    width: 100%;
+    height: 100px;
+    margin-top: 40px;
+
+    .inner {
+        width: 1200px;
+        height: 100px;
+        padding-top: 10px;
+        text-align: center;
+
+        input {
+            width: 582px;
+            height: 46px;
+            outline: none;
+            border: 1px solid #E6E6E6;
+            border-radius: 0;
+            padding-left: 20px;
+            vertical-align: 0px;
+            font-size: 16px;
+            color: #666666
+        }
+
+        button {
+            width: 120px;
+            height: 48px;
+            background-color: #a01c0e;
+            color: #fff;
+            border: none;
+            border-radius: 0;
+            cursor: pointer;
+        }
+    }
+}

+ 110 - 295
components/home/foot1.vue

@@ -1,333 +1,148 @@
 <template>
     <!-- <footer class="index_foot">
         <div class="foot_img_box">
-            <a :href="item.url" v-for="(item, index) in bottomLink" target="_blank">
-                <img :src="item.logo_url" alt="">
+            <a :href="item.url" v-for="(item, index) in bottomLink" :title="item.title" target="_blank">
+                <img :src="item.logo_url" :alt="item.title">
             </a>
         </div>
         <div class="foot_frind_box">
             <span>友情链接</span>
             <div>
-                <a :href="item.url" v-for="(item, index) in bottomText" :key="index" target="_blank">{{ item.title
-                    }}</a>
+                <a :href="item.url" v-for="(item, index) in bottomText" :key="index" :title="item.title"
+                    target="_blank">{{ item.title }}</a>
             </div>
         </div>
     </footer> -->
 
     <div class="call_us_box">
-        <div class="inner">
-            <span v-for="(item, index) in bottomMenu" :key="index">
-                <NuxtLink :to="{ path: `/specialList/${item.id}` }" target="_blank" v-if="item.type == 1">
-                    {{ item.name }}
-                </NuxtLink>
-                <NuxtLink :to="{ path: `/speciaArticle/${item.id}` }" target="_blank" v-if="item.type == 0">
-                    {{ item.name }}
-                </NuxtLink>
-            </span>
-        </div>
-
+        <span v-for="(item, index) in bottomMenu" :key="index">
+            <NuxtLink :to="{ path: `/specialList/${item.id}` }" v-if="item.type == 1" :title="item.name">
+                {{ item.name }}
+            </NuxtLink>
+            <NuxtLink :to="{ path: `/speciaArticle/${item.id}` }" v-if="item.type == 0" :title="item.name">
+                {{ item.name }}
+            </NuxtLink>
+        </span>
     </div>
     <footer class="index_foot">
-        <div class="foot_text_box">
-            <!-- <p>{{ bottomBase.statistics_onetext }} <a :href="'http://' + bottomBase.statistics_twourl">中农兴业</a> {{ bottomBase.statistics_twotext }}</p> -->
-            <p>{{ bottomBase.statistics_onetext }} <a :href="bottomBase.record_number_url" target="_blank">中农兴业</a> {{
-                bottomBase.statistics_twotext }}</p>
-            <p>{{ bottomBase.organizer }} <a :href="currentDomain" target="_blank">三农资讯网</a> {{ currentDomainUrl }}
-                版权所有。</p>
-            <!-- <p><img :src="bottomBase.icp_number_img"><a :href="'http://' + bottomBase.statistics_twourl">{{ bottomBase.record_number }}</a> <a :href="'http://' + bottomBase.icp_number_url">{{ bottomBase.icp_number }}</a> </p> -->
-            <p><a :href="bottomBase.record_number_url" target="_blank">{{ bottomBase.record_number }}</a> &nbsp;&nbsp;
-                <img :src="bottomBase.icp_number_img"><a :href="bottomBase.icp_number_url" target="_blank">{{
-                    bottomBase.icp_number }}</a>
-            </p>
-            <p>{{ bottomBase.email }}</p>
-            <p>{{ bottomBase.company_address }}</p>
-            <p>{{ bottomBase.contact_number }}</p>
+        <div class="foot_text_box" v-if="bottomBase">
+            <p v-html="bottomBase.statement" class="foot_text_html_css"></p>
+            <p v-html="bottomBase.organizer" class="foot_text_html_css"></p>
+            <p v-html="bottomBase.copyright_information" class="foot_text_html_css"></p>
+            <p><span v-html="bottomBase.icp_number" class="foot_text_html_css"></span><span
+                    v-html="bottomBase.record_number" class="foot_text_html_css"></span></p>
+            <p v-html="bottomBase.email" class="foot_text_html_css"></p>
+            <p v-html="bottomBase.company_address" class="foot_text_html_css"></p>
+            <p v-html="bottomBase.contact_number" class="foot_text_html_css"></p>
         </div>
-        <div class="foot_logo_out">
-            <a :href="'http://' + bottomBase.company_url" :title="bottomBase.company_name" target="_blank">
-                <img :src="bottomBase.project_logo" class="floatLogoLeft" :alt="bottomBase.company_name">
+        <div class="foot_logo_out" v-if="bottomBase">
+            <a :href="'http://' + bottomBase.project_url" :title="bottomBase.project_name"
+                v-if="bottomBase.project_logo != '' && bottomBase.project_url != ''">
+                <img :src="bottomBase.project_logo" class="floatLogoRight" :alt="bottomBase.project_name">
+            </a>
+            <span v-else-if="bottomBase.project_logo != '' && bottomBase.project_url == ''">
+                <img :src="bottomBase.project_logo" class="floatLogoRight" :alt="bottomBase.project_name">
+            </span>
+            <a :href="'http://' + bottomBase.company_url" :title="bottomBase.company_name"
+                v-if="bottomBase.company_logo != '' && bottomBase.company_url != ''">
+                <img :src="bottomBase.company_logo" class="floatLogoLeft" :alt="bottomBase.company_name">
             </a>
-            <!-- <a :href="'http://' + bottomBase.project_url" :title="bottomBase.project_name" target="_blank">
-                <img :src="bottomBase.company_logo" class="floatLogoRight" :alt="bottomBase.project_name">
-            </a> -->
+            <span v-else-if="bottomBase.company_logo != '' && bottomBase.company_url == ''">
+                <img :src="bottomBase.company_logo" class="floatLogoLeft" :alt="bottomBase.company_name">
+            </span>
         </div>
         <div class="foot_last_img_box">
-            <a :href="item.url" v-for="(item, index) in bottomphoto" target="_blank">
-                <img :src="item.logo_url" alt="">
+            <a :href="item.url" v-for="(item, index) in bottomphoto" :title="item.title">
+                <img :src="item.logo_url" :alt="item.title">
             </a>
         </div>
+
+        <!--在线客服-->
+        <!-- <div class="kefu">
+            <div class="kefu_itemKf">
+                <a :href="bottomBase.online_service" target="_blank">
+                    <img src="https://img.bjzxtw.org.cn/pre/public/image/online1.png">
+                    <p>在线客服</p>
+                </a>
+            </div>
+            <div class="kefu_itemQQ">
+                <img src="https://img.bjzxtw.org.cn/pre/public/image/qq1.png">
+                <p>QQ客服</p>
+                <div class="kefu_item_content_QQ">
+                    <div @click="addQQFriend(qq1)" class="qqadd">
+                        <img src="https://img.bjzxtw.org.cn/pre/public/index/tubiao1.png" width="100">
+                        <div class="qqfs">{{ bottomBase.customer_service_qq }}</div>
+                    </div>
+                    <div @click="addQQFriend(qq2)" class="qqadd">
+                        <img src="https://img.bjzxtw.org.cn/pre/public/index/tubiao2.png" width="100">
+                        <div class="qqfs">{{ bottomBase.communications }}</div>
+                    </div>
+                    <div class="arrow"></div>
+                </div>
+            </div>
+            <div class="kefu_itemPhone">
+                <img src="https://img.bjzxtw.org.cn/pre/public/image/dianhua1.png">
+                <p>电话客服</p>
+                <div class="kefu_item_content_phone">
+                    <div class="kefu_item_content_phone_title">联系电话:</div>
+                    <div>{{ bottomBase.customer_service }}</div>
+                    <div class="arrow"></div>
+                </div>
+            </div>
+        </div> -->
     </footer>
 </template>
 
 <script setup>
-import { onMounted } from 'vue';
-const nuxtApp = useNuxtApp();
-const axios = nuxtApp.$axios;
-
-// const props = defineProps({
-//     bottomLink: Array,
-//     bottomMenu: Array,
-//     bottomBase: Object
-// });
+//0.添加网站客服 start---------------------------------------->
+//添加网站客服
+function addQQFriend(qqNumber) {
+    // 使用tencent协议唤起QQ客户端并添加好友
+    window.location.href = `tencent://message/?uin=${qqNumber}&Site=&Menu=yes`;
+}
+//0.添加网站客服 end---------------------------------------->
 
-//获得友情链接 图片
+//获得底部基本信息 start---------------------------------------->
+//1.获得全部友情链接与底部图片
 const bottomLink = ref([])
-const getBottomLink = async () => {
-    const response = await axios.get(`/web/selectWebsiteLinks?&type=${1}&num=${7}`);
-    bottomLink.value = response.data;
-    console.log(bottomLink.value)
-}
-//文字
 const bottomText = ref([])
-const getBottomLink2 = async () => {
-    const response = await axios.get(`/web/selectWebsiteLinks?&type=${2}&num=${8}`);
-    bottomText.value = response.data;
-    console.log(bottomLink.value)
-}
-//底部
 const bottomphoto = ref([])
-const getBottomLink1 = async () => {
-    const response = await axios.get(`/web/selectWebsiteLinks?&type=${3}&num=${4}`);
-    bottomphoto.value = response.data;
-    console.log(bottomphoto.value)
-}
-
-//获得底部导航
 const bottomMenu = ref([])
-const getBottomMenu = async () => {
-    const response = await axios.get(`/web/getWebsiteFooterCategory`);
-    bottomMenu.value = response.data;
-    console.log(bottomMenu.value)
-}
-
-//获得底部基本信息
 const bottomBase = ref({})
-const getBottomBase = async () => {
-    const response = await axios.get(`/web/getWebsiteFootInfo`);
-    bottomBase.value = response.data.website_foot;
-    console.log(7777777)
-    console.log('bottomBase', bottomBase.value)
-}
-
 
-onMounted(() => {
-    getBottomLink();
-    getBottomLink1();
-    getBottomLink2();
-    getBottomMenu();
-    getBottomBase();
-    //获取域名
-    getDomain()
-})
-
-//获取当前域名
-const currentDomain = ref('')
-const currentDomainUrl = ref('')
-
-const getDomain = () => {
-    if (process.client) {
-        const url = new URL(window.location.href)
-        currentDomainUrl.value = url.hostname // 获取域名
-        currentDomain.value = url.origin //协议和域名
+const qq1 = ref("")
+const qq2 = ref("")
+
+async function getModelDataAll() {
+    const mkdata = await requestDataPromise('/web/getWebsiteFootAll', {
+        method: 'GET',
+        query: {
+            'link_textnum': 8,
+            'link_imgnum': 12,
+            'link_footnum': 4
+        },
+    });
+    if (mkdata.code == 200) {
+        bottomLink.value = mkdata.data.link_img;
+        bottomText.value = mkdata.data.link_text;
+        bottomphoto.value = mkdata.data.link_foot;
+        bottomMenu.value = mkdata.data.foot_cate;
+        bottomBase.value = mkdata.data.foot_info;
+        //获取qq号数字部分
+        qq1.value = bottomBase.value.customer_service_qq.match(/\d+/g);
+        qq2.value = bottomBase.value.communications.match(/\d+/g);
+
+    } else {
+        console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
+        console.log("错误位置:获取友情链接图片")
+        console.log("后端错误反馈:", mkdata.message)
+        console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
     }
 }
+getModelDataAll();
+//获得底部基本信息 end---------------------------------------->
 </script>
 
 <style lang="less" scoped>
-.index_foot {
-    box-sizing: border-box;
-    width: 1200px;
-    margin: 0 auto;
-}
-
-.index_foot_name_box {
-    margin: 40px auto 0px;
-    text-align: center;
-    font-size: 0px;
-}
-
-.index_foot_name {
-    display: inline-block;
-    height: 67px;
-    line-height: 67px;
-    color: #f2f9f4;
-    font-size: 51px;
-    font-weight: bold;
-    overflow: hidden;
-}
-
-.index_foot_name:nth-of-type(even) {
-    color: #333;
-    font-size: 32px;
-}
-
-.foot_img_box {
-    overflow: hidden;
-    display: block;
-    margin: 60px auto 0;
-    width: 100%;
-    display: flex;
-    justify-content: space-between;
-}
-
-.foot_img_box>* {
-    float: left;
-    width: 170px;
-    height: 57px;
-    overflow: hidden;
-    box-sizing: border-box;
-    border: solid 1px #D7EDD4;
-    // margin: 0px 25px 10px 0px;
-}
-
-.foot_img_box>* * {
-    display: block;
-    width: 100%;
-    height: 100%;
-}
-
-.foot_img_box>*:nth-of-type(7n) {
-    margin-right: 0px;
-}
-
-.foot_frind_box {
-    display: block;
-    margin: 60px auto;
-    overflow: hidden;
-    display: flex;
-    width: 100%;
-}
-
-.foot_frind_box span {
-    word-break: keep-all;
-    white-space: nowrap;
-    line-height: 22px;
-    font-size: 16px;
-    color: #333;
-    font-weight: bold;
-}
-
-.foot_frind_box div {
-    width: 100%;
-    overflow: hidden;
-}
-
-.foot_frind_box div * {
-    float: left;
-    line-height: 22px;
-    height: 22px;
-    color: #333;
-    font-size: 16px;
-    margin: 0 30px;
-}
-
-.call_us_box {
-    display: block;
-    width: 100%;
-    margin: 40px auto 0;
-    overflow: hidden;
-    text-align: center;
-    font-size: 0px;
-    background: #a01c0e;
-
-    a {
-        color: #fff;
-    }
-}
-
-.inner {
-    width: 1200px;
-    margin: 0 auto;
-}
-
-.inner>* {
-    height: 12px;
-    line-height: 12px;
-    color: #fff;
-    font-size: 14px;
-    display: inline-block;
-    box-sizing: border-box;
-    padding: 0 19px;
-    font-weight: bold;
-    border-left: solid 1px #7e1c11;
-    margin: 18px 0;
-}
-
-.inner>*:nth-of-type(1) {
-    border-left: 0px;
-}
-
-.foot_text_box {
-    margin: 40px auto 0px;
-    text-align: center;
-    color: #333;
-    font-size: 14px;
-    line-height: 25px;
-
-    p {
-        a {
-            color: #333;
-            font-size: 14px;
-        }
-    }
-}
-
-.foot_text_box_green {
-    color: #40663B;
-}
-
-.foot_text_box img {
-    display: inline-block;
-    height: 20px;
-    vertical-align: middle;
-}
-
-.foot_logo_out {
-    position: relative;
-    margin: 0px auto;
-    width: 100%;
-    height: 0px;
-}
-
-.foot_logo_out * {
-    width: 120px;
-    display: block;
-}
-
-.foot_logo_out>* {
-    position: absolute;
-    top: -100px;
-}
-
-.foot_logo_out>*:nth-of-type(1) {
-    left: 0px;
-}
-
-.foot_logo_out>*:nth-of-type(2) {
-    right: 0px;
-}
-
-.foot_last_img_box {
-    margin: 40px auto 10px;
-    text-align: center;
-    overflow: hidden;
-    width: 100%;
-    font-size: 0px;
-    padding-bottom: 40px;
-}
-
-.foot_last_img_box>* {
-    height: 50px;
-    width: 150px;
-    margin: 0px 12px;
-    display: inline-block;
-    overflow: hidden;
-}
-
-.foot_last_img_box>* * {
-    display: block;
-    height: 100%;
-    width: 100%;
-    overflow: hidden;
-}
+@import '@/assets/css/foot.less';
 </style>

+ 2 - 2
components/home/pageHead.vue

@@ -216,7 +216,7 @@ let goSearch = () => {
 // 点击广告服务
 let goAdvertising = () => {
     //本地启动广告服务
-    //window.open('/advertising?activeName=1', '_blank');
+    // window.open('/advertising?activeName=1', '_blank');
     //线上启动
     if (getToken()) {
         window.open($CwebUrl + '/advertising?activeName=1', '_blank');
@@ -227,8 +227,8 @@ let goAdvertising = () => {
 
 //点击商圈
 let goTopic = () => {
+    // window.open('/topic', '_blank');
     if (getToken()) {
-        //window.open('http://nwpre.bjzxtw.org.cn/topic', '_blank');
         window.open($CwebUrl + '/topic', '_blank');
     } else {
         goLogin()

+ 10 - 13
components/home/pageNavigation.vue

@@ -129,7 +129,7 @@ async function getNavigation2() {
         query: {
             'pid': 0,
             'num': 2,
-            'placeid': 20
+            'placeid': 21
         },
     });
     navigation2.value = mkdata.data;
@@ -146,7 +146,7 @@ async function getNavigation4() {
         query: {
             'pid': 0,
             'num': 10,
-            'placeid': 22
+            'placeid': 23
         },
     });
     for (let i in mkdata.data) {
@@ -167,8 +167,8 @@ async function getNavigation3() {
         method: 'GET',
         query: {
             'pid': 0,
-            'num': 5,
-            'placeid': 28
+            'num': 6,
+            'placeid': 33
         },
     });
     navigation3.value = mkdata.data;
@@ -268,9 +268,6 @@ let goToSearch = () => {
 
         .active {
             color: #F8ECD2;
-            // display: inline-block;
-            // height: 50px;
-            // border-bottom: 2px solid #139602
         }
     }
 
@@ -279,7 +276,7 @@ let goToSearch = () => {
         height: 75px;
         font-size: 16px;
         margin-top: 30px;
-        background: url(/_nuxt/public/index/nav_bg.png) no-repeat;
+        background: url(https://img.bjzxtw.org.cn/master/www/xcw/nav_bg.png) no-repeat;
 
         .nav111 {
             width: 98px;
@@ -330,14 +327,14 @@ let goToSearch = () => {
             display: flex;
             justify-content: flex-start;
             width: 633px;
-            padding-left: 40px;
-            padding-right: 40px;
+            padding-left: 30px;
+            padding-right: 30px;
 
             .titleList {
                 font-size: 16px;
                 font-family: PingFang SC, PingFang SC;
                 font-weight: 400;
-                margin-right: 40px;
+                margin-right: 25px;
 
                 a {
                     color: #333333;
@@ -395,8 +392,8 @@ let goToSearch = () => {
 
         img {
             width: 138px;
-            height: 38px;
-            margin-top: 22px;
+            height: 28px;
+            margin-top: 30px;
             margin-left: 25px;
         }
 

+ 7 - 3
pages/advertising/adDetail.vue

@@ -2,7 +2,9 @@
     <!-- 广告服务 -->
     <div>
         <!-- 广告页面头部 -->
-        <AdvertisingHead></AdvertisingHead>
+        <HomePageHead></HomePageHead>
+        <HomePageNavigation1></HomePageNavigation1>
+
         <div class="adDetail">
             <div class="inner">
                 <!-- 标题 -->
@@ -81,7 +83,7 @@
 
         </div>
         <!-- 广告页面底部 -->
-        <AdvertisingFoot></AdvertisingFoot>
+        <HomeFoot1></HomeFoot1>
     </div>
 </template>
 
@@ -91,6 +93,7 @@ import { ElTable, ElTableColumn } from 'element-plus'
 import { useStatusStore } from "@/store/status.js"
 
 const statusStore = useStatusStore()
+const { $webUrl, $CwebUrl, $BwebUrl } = useNuxtApp()
 
 // axios请求
 const nuxtApp = useNuxtApp();
@@ -168,7 +171,8 @@ const getOrderDetail = async () => {
 let goReapply = () => {
     // ad.value = 1
     // window.location.href = (`http://localhost:3000/advertising?activeName=${'1'}`)
-    window.location.href = (`http://nwdev.bjzxtw.org.cn/advertising?activeName=${'1'}`)
+    let url = $CwebUrl + '/advertising?activeName=1';
+    window.location.href = url;
 }
 
 onMounted(() => {

+ 198 - 51
pages/advertising/index.vue

@@ -2,7 +2,10 @@
     <!-- 广告服务 -->
     <div>
         <!-- 广告页面头部 -->
-        <AdvertisingHead></AdvertisingHead>
+        <!-- <AdvertisingHead></AdvertisingHead> -->
+        <HomePageHead></HomePageHead>
+        <HomePageNavigation></HomePageNavigation>
+
         <div class="adtips">
             <div class="inner">
                 <p v-if="activeName == '1'">注意:广告购买需提交信息,用户与商务人员进行线下金额交易,交易成功后由商务人员后台审核。审核通过,即广告投放成功。</p>
@@ -30,10 +33,19 @@
                                             </el-form-item>
                                             <el-form-item label="广告持续时间:" required>
                                                 <el-config-provider :locale="zhCn">
-                                                    <el-date-picker v-model="ruleForm.time" type="daterange"
+                                                    <!-- <el-date-picker v-model="ruleForm.time" type="daterange"
+                                                        range-separator="至" start-placeholder="请选择开始时间"
+                                                        end-placeholder="请选择结束时间" :size="size" @change="changeStartTime"
+                                                        :disabled-date="disabledStartTime" /> -->
+                                                    <el-date-picker v-model="ruleForm.time" type="datetimerange"
+                                                        format="YYYY-MM-DD HH:mm"
+                                                        value-format="YYYY-MM-DD HH:00:00"
                                                         range-separator="至" start-placeholder="请选择开始时间"
                                                         end-placeholder="请选择结束时间" :size="size" @change="changeStartTime"
-                                                        :disabled-date="disabledStartTime" />
+                                                        :disabled-date="disabledStartTime"
+                                                        :disabledMinutes="disabledMinutes">
+                                                    </el-date-picker>
+
                                                 </el-config-provider>
                                             </el-form-item>
                                             <el-form-item label="广告尺寸:" prop="adSize">
@@ -52,7 +64,7 @@
 
                                             <!-- 表格部分 -->
                                             <div class="pageTable">
-                                                <el-table :data="tableData" border ref="multipleTable" empty-text="暂无数据"
+                                                <el-table :data="tableData" border ref="multipleTable" empty-text="请先选择广告持续时间"
                                                     @selection-change="handleSelectionChange" style="width: 100%"
                                                     :header-row-style="{ height: '60px' }"
                                                     :row-style="{ height: '74px' }"
@@ -67,15 +79,15 @@
                                                         </template>
                                                     </el-table-column>
                                                     <el-table-column prop="website_name" label="网站" width="220" />
-                                                    <el-table-column prop="name" label="广告位名称" width="220" />
-                                                    <el-table-column prop="size" label="广告尺寸" width="220" />
-                                                    <el-table-column prop="price" label="金额 (元) / 天" width="220" />
+                                                    <el-table-column prop="name" label="广告位名称" width="320" />
+                                                    <el-table-column prop="size" label="广告尺寸" width="180" />
+                                                    <el-table-column prop="price" label="金额 (元) / 天" width="160" />
                                                 </el-table>
                                             </div>
                                             <el-form-item label="广告图:" prop="adImg">
                                                 <el-upload class="avatar-uploader" action="#" :show-file-list="false"
                                                     :on-success="handleAvatarSuccess"
-                                                    :before-upload="beforeAvatarUpload">
+                                                    :before-upload="beforeAvatarUpload" accept=".jpg,.jpeg,.png">
                                                     <img v-if="imageUrl" :src="imageUrl" class="avatar" />
                                                     <div v-else>
                                                         <el-icon class="avatar-uploader-icon">
@@ -89,7 +101,7 @@
 
 
                                         <!-- 示意图弹框 -->
-                                        <el-dialog v-model="dialogTableVisible" :show-close="false" width="60%"
+                                        <el-dialog v-model="dialogTableVisible" :show-close="false" width="1280px"
                                             :close-on-click-modal="false">
                                             <template #header="{ close, titleId, titleClass }">
                                                 <div class="my-header">
@@ -102,20 +114,16 @@
                                                     </el-button>
                                                 </div>
                                             </template>
-                                            <ul class="graph">
-                                                <li>
-                                                    <span>广告尺寸图A: 1200x90</span>
-                                                    <img src="../../public/ad/01.png" alt="">
-                                                </li>
-                                                <li>
-                                                    <span>广告尺寸图B: 600x150</span>
-                                                    <img src="../../public/ad/02.png" alt="">
-                                                </li>
-                                                <li>
-                                                    <span>广告尺寸图C: 300x150</span>
-                                                    <img src="../../public//ad/03.png" alt="">
-                                                </li>
-                                            </ul>
+                                            <div class="block text-center dialogPicBox" m="t-4">
+                                                <el-carousel trigger="click" height="680px" autoplay="">
+                                                    <el-carousel-item>
+                                                       <img src="http://img.bjzxtw.org.cn/master/bjzxtw/public/ad/new1.png" alt="">
+                                                    </el-carousel-item>
+                                                    <el-carousel-item>
+                                                        <img src="http://img.bjzxtw.org.cn/master/bjzxtw/public/ad/new2.png" alt="">
+                                                    </el-carousel-item>
+                                                </el-carousel>
+                                            </div>
                                         </el-dialog>
                                     </div>
 
@@ -162,19 +170,21 @@
             </div>
         </div>
         <!-- 广告页面底部 -->
-        <AdvertisingFoot></AdvertisingFoot>
+        <HomeFoot1></HomeFoot1>
+
     </div>
 </template>
 
 <script setup>
 import { ref, onMounted, watch, reactive } from 'vue'
 // import { ElCheckbox, ElRadio, ElRadioGroup, ElDatePicker, ElInput, ElUpload, ElPagination, ElIcon, ElSelect, ElOption, ElTabs, ElTabPane, ElTable, ElTableColumn, ElMessage, ElForm, ElFormItem, ElCol, valueEquals } from 'element-plus'
-import { ElCheckbox, ElRadio, ElRadioGroup, ElDatePicker, ElInput, ElUpload, ElPagination, ElIcon, ElSelect, ElOption, ElTabs, ElTabPane, ElTable, ElTableColumn, ElMessage, ElForm, ElFormItem, ElCol, valueEquals, ElConfigProvider } from 'element-plus'
+import { ElCheckbox, ElRadio, ElRadioGroup, ElDatePicker, ElInput, ElUpload, ElPagination, ElIcon, ElSelect, ElOption, ElTabs, ElTabPane, ElTable, ElTableColumn, ElMessage, ElForm, ElFormItem, ElCol, valueEquals, ElConfigProvider,ElCarousel, ElCarouselItem } from 'element-plus'
 import { ElButton, ElDialog } from 'element-plus'
 import { CircleCloseFilled } from '@element-plus/icons-vue'
 import { Plus, DArrowRight, Edit, Picture, UploadFilled } from '@element-plus/icons-vue'
 import zhCn from 'element-plus/dist/locale/zh-cn.mjs';
 import { getToken, setToken, removeToken } from '@/store/useCookieStore'
+const { $webUrl, $CwebUrl, $BwebUrl } = useNuxtApp()
 
 
 import { useRoute } from 'vue-router'
@@ -228,7 +238,7 @@ const seoData = ref({
 });
 
 // 在 onMounted 钩子中获取数据
-onMounted(()=>{
+onMounted(() => {
     seoData.value.title = '广告服务';
     seoData.value.description = '默认描述';
     seoData.value.keywords = '默认关键词';
@@ -246,8 +256,9 @@ let goAD = () => {
 }
 let goLogin = () => {
     token.value = getToken()
-    // window.location.href = ("http://admindev.bjzxtw.org.cn/#/login?backurl=http%3a%2f%2fnwdev.bjzxtw.org.cn%2f")
-    window.location.href = ("http://admindev.bjzxtw.org.cn/auth/login.php?backurl=http://nwdev.bjzxtw.org.cn")
+    // window.location.href = ("http://adminpre.bjzxtw.org.cn/#/login?backurl=http%3a%2f%2fnwdev.bjzxtw.org.cn%2f")
+    let url = $BwebUrl + '/auth/login.php?backurl=' + $CwebUrl;
+    window.location.href = url;
     token.value = getToken()
 }
 let goReg = () => {
@@ -289,26 +300,137 @@ const rules = reactive({
 
 const tabPosition = ref('left')
 
+
+
+//禁用分钟
+const disabledMinutes = () => {
+    return Array.from({ length: 60 }, (_, i) => i).filter(minute => minute !== 0);
+}
+
 // 获取开始时间
 let changeStartTime = (val) => {
-    console.log(val);
-    ruleForm.startTime = `${val[0].getFullYear()}-${val[0].getMonth() + 1}-${val[0].getDate()}`
-    ruleForm.endTime = `${val[1].getFullYear()}-${val[1].getMonth() + 1}-${val[1].getDate()}`
-    console.log(ruleForm.startTime);
-    console.log(ruleForm.endTime);
+    //第一步,获取用户选择的时间跟当前时间进行对比
+    let setTime = new Date(new Date(val[0])).getTime();
+    let localtime = new Date().getTime();
+
+    if(setTime < localtime){
+        //第二步,将时间戳转换为本地时间
+        ElMessage.error('时间选择错误,已为您自动重设!');
+        //获取当前小时之后的整数小时0分0秒
+        let time1 = new Date(new Date(val[0]).setMinutes(0, 0, 0) + 60 * 60 * 1000).getTime();
+        let time2 = new Date(new Date(val[1]).setMinutes(0, 0, 0) + 60 * 60 * 1000).getTime();
+        //同样的道理,获取当前时间的下一个整数小时0分0秒
+        let currentTimestamp = new Date(new Date().setMinutes(0, 0, 0) + 60 * 60 * 1000).getTime();
+
+        let localTime = new Date(currentTimestamp).toLocaleString('zh-CN', {
+            year: 'numeric',
+            month: '2-digit',
+            day: '2-digit',
+            hour: '2-digit',
+            minute: '2-digit'
+        }).replace(/\//g, '-');
+        //第三步,将当前时间加24小时
+        let twoHoursLocalTime = new Date(currentTimestamp + 24 * 60 * 60 * 1000).toLocaleString('zh-CN', {
+            year: 'numeric', 
+            month: '2-digit',
+            day: '2-digit',
+            hour: '2-digit',
+            minute: '2-digit'
+        }).replace(/\//g, '-');
+
+        //第四步,将当前时间赋值给ruleForm.time[0]
+        ruleForm.time[0] = localTime;
+        ruleForm.time[1] = twoHoursLocalTime;
+        ruleForm.startTime = localTime;
+        ruleForm.endTime = twoHoursLocalTime;
+
+        //获取广告尺寸
+        getAdSize()
+        //创建购物车
+        axios.post("/order/addShoppingCart").then(response => {
+            // console.log("创建购物车", response.data);
+            shopCode.value = response.data
+            console.log('shopCode', shopCode.value);
+        })
+
+    }else{
+        //获取当前小时之后的整数小时0分0秒
+        let time1 = new Date(new Date(val[0]).setMinutes(0, 0, 0) + 60 * 60 * 1000).getTime();
+        let time2 = new Date(new Date(val[1]).setMinutes(0, 0, 0) + 60 * 60 * 1000).getTime();
+        //同样的道理,获取当前时间的下一个整数小时0分0秒
+        let currentTimestamp = new Date(new Date().setMinutes(0, 0, 0) + 60 * 60 * 1000).getTime();
+
+        //第二种情况,传入的时间戳大于当前时间
+        //但是时间间隔小于2小时
+        if(time2 - time1 < 24 * 60 * 60 * 1000){
+            ElMessage.error('广告持续时间不得低于24小时,已为您自动重设!');
+            //第一步,将时间戳转换为本地时间
+            let localTime = new Date(currentTimestamp).toLocaleString('zh-CN', {
+                year: 'numeric',
+                month: '2-digit',
+                day: '2-digit',
+                hour: '2-digit',
+                minute: '2-digit'
+            }).replace(/\//g, '-');
+            //第二步,将当前时间加2小时
+            let twoHoursLocalTime = new Date(currentTimestamp + 24 * 60 * 60 * 1000).toLocaleString('zh-CN', {
+                year: 'numeric', 
+                month: '2-digit',
+                day: '2-digit',
+                hour: '2-digit',
+                minute: '2-digit'
+            }).replace(/\//g, '-');
+
+        
+            //第三步,将当前时间赋值给ruleForm.time[0]
+            ruleForm.time[0] = localTime;
+            ruleForm.time[1] = twoHoursLocalTime;
+            ruleForm.startTime = localTime;
+            ruleForm.endTime = twoHoursLocalTime;
+
+            
+            //获取广告尺寸
+            getAdSize()
+            //创建购物车
+            axios.post("/order/addShoppingCart").then(response => {
+                // console.log("创建购物车", response.data);
+                shopCode.value = response.data
+                console.log('shopCode', shopCode.value);
+            })
+
+        }else{
+            //第三种情况,用户时间选择正确,无需操作
+            ruleForm.startTime = val[0]
+            ruleForm.endTime = val[1]
+            //获取广告尺寸
+            getAdSize()
+            //创建购物车
+            axios.post("/order/addShoppingCart").then(response => {
+                // console.log("创建购物车", response.data);
+                shopCode.value = response.data
+                console.log('shopCode', shopCode.value);
+            })
+        }
+    }
 
-    getAdSize()
-    //创建购物车
-    axios.post("/order/addShoppingCart").then(response => {
-        // console.log("创建购物车", response.data);
-        shopCode.value = response.data
-        console.log('shopCode', shopCode.value);
-    })
+
+    //第四种情况,使广告立即生效,请注释上面的if 直接使用下面这一段
+    // ruleForm.startTime = val[0]
+    // ruleForm.endTime = val[1]
+    // //获取广告尺寸
+    // getAdSize()
+    // //创建购物车
+    // axios.post("/order/addShoppingCart").then(response => {
+    //     // console.log("创建购物车", response.data);
+    //     shopCode.value = response.data
+    //     console.log('shopCode', shopCode.value);
+    // })
 
 }
 //禁止选择的时间区域
 let disabledStartTime = (time) => {
-    return time.getTime() <= (Date.now() + 3600 * 1000 * 24);
+    // console.log("time", time);
+    return time.getTime() <= (Date.now() - 3600 * 1000 * 24);
 }
 
 const imageUrl = ref('');
@@ -435,7 +557,7 @@ onMounted(() => {
 let adSizeList = () => {
     // 搜索按钮接口
     axios.post("/order/getAD").then(response => {
-        console.log("response", response);
+        console.log("response111", response);
         options.value = response.data
         for (let item of options.value) {
             console.log(item);
@@ -451,14 +573,16 @@ let lookOrder = () => {
     activeName.value = '2'
     sessionStorage.setItem('activeName', JSON.stringify('2'));
     // window.location.href = (`http://localhost:3000/advertising?activeName=${'2'}`)
-    window.location.href = (`http://nwdev.bjzxtw.org.cn/advertising?activeName=${'2'}`)
+    let url = $CwebUrl + '/advertising?activeName=2';
+    window.location.href = url;
 }
 
 //再次申请
 let reapply = () => {
     ad.value = 1
     // window.location.href = ('http://localhost:3000/advertising')
-    window.location.href = ('http://nwdev.bjzxtw.org.cn/advertising')
+    let url = $CwebUrl + '/advertising';
+    window.location.href = url;
 }
 
 //获取总金额
@@ -645,7 +769,8 @@ let goOrderList = (item) => {
 
     if (item == 2 && (route.query.activeName == '1' || route.query.activeName == '2')) {
         // window.location.href = ('http://localhost:3000/advertising')
-        window.location.href = ('http://nwdev.bjzxtw.org.cn/advertising')
+        let url = $CwebUrl + '/advertising';
+        window.location.href = url;
     }
 }
 
@@ -740,23 +865,23 @@ watch(ad, (newval) => {
         }
 
         .topic {
-            background: url("../../public/ad/shopping-mall.png") no-repeat;
+            background: url("http://img.bjzxtw.org.cn/master/bjzxtw/public/ad/shopping-mall.png") no-repeat;
         }
 
         .ad {
-            background: url("../../public/ad/ad-product.png") no-repeat;
+            background: url("http://img.bjzxtw.org.cn/master/bjzxtw/public/ad/ad-product.png") no-repeat;
         }
 
         .login {
-            background: url("../../public/ad/user.png") no-repeat;
+            background: url("http://img.bjzxtw.org.cn/master/bjzxtw/public/ad/user.png") no-repeat;
         }
 
         .reg {
-            background: url("../../public/ad/write.png") no-repeat;
+            background: url("http://img.bjzxtw.org.cn/master/bjzxtw/public/ad/write.png") no-repeat;
         }
 
         .user {
-            background: url("../../public/ad/user.png") no-repeat;
+            background: url("http://img.bjzxtw.org.cn/master/bjzxtw/public/ad/user.png") no-repeat;
         }
     }
 
@@ -938,6 +1063,7 @@ watch(ad, (newval) => {
                             text-align: left;
                             font-style: normal;
                             text-transform: none;
+                            cursor: pointer;
                         }
 
                         //示意图
@@ -1488,9 +1614,12 @@ watch(ad, (newval) => {
 
     //广告页面底部部分
     .bottom {
-        width: 100%;
+        width: 1200px;
         height: 145px;
         background-color: #ecf5ee;
+        padding: 0px 30px;
+        margin: 0 auto;
+        box-sizing: border-box;
         // display: none;
 
         .inner {
@@ -1525,6 +1654,7 @@ watch(ad, (newval) => {
 
             .btn {
                 float: right;
+                margin-right: 60px;
 
                 .btn1 {
                     width: 115px;
@@ -1553,4 +1683,21 @@ watch(ad, (newval) => {
         }
     }
 }
+.dialogPicBox {
+    img {
+        width: 1200px;
+        
+    }
+}
+
+/deep/.el-carousel__indicators .el-carousel__indicator button {
+  width: 12px; /* 宽度 */
+  height: 12px; /* 高度 */
+  border-radius: 50%; /* 圆形 */
+  background-color: #999;
+}
+/* 可选:更改当前项指示器的颜色 */
+/deep/.el-carousel__indicators .el-carousel__indicator.is-active button {
+  background-color: #028e21; /* 当前项颜色 */
+}
 </style>

+ 58 - 45
pages/index.vue

@@ -8,7 +8,7 @@
         <HomeAdvertising :imgurl="adImg1"></HomeAdvertising>
         <!-- 新闻头条部分 -->
         <div class="topNewsPart">
-            <div class="inner" v-if="headlinelist">
+            <div class="inner">
                 <div class="toutiao" v-if="tabsData == 1">
                     <div class="xwtt">
                         <span class="ttlogo">新闻头条</span>
@@ -251,14 +251,16 @@
                     </div>
                     <div class="part1_content">
                         <div class="context_left">
-                            <div class="top" v-for="(item, index) in boxData4data1" :key="index">
-                                <NuxtLink :to="item.linkurl" v-if="item.islink == 1" :title="item.title">
-                                    <img :src="item.imgurl" alt="">
-                                    <span class="title1">{{ item.title }}</span>
+                            <div class="top" v-if="boxData4data1.length > 0">
+                                <NuxtLink :to="boxData4data1[0].linkurl" v-if="boxData4data1[0].islink == 1"
+                                    :title="boxData4data1[0].title">
+                                    <img :src="boxData4data1[0].imgurl" alt="">
+                                    <span class="title1">{{ boxData4data1[0].title }}</span>
                                 </NuxtLink>
-                                <NuxtLink :to="`/newsDetail/${item.id}`" v-if="item.islink == 0" :title="item.title">
-                                    <img :src="item.imgurl" alt="item.title">
-                                    <span class="title1">{{ item.title }}</span>
+                                <NuxtLink :to="`/newsDetail/${boxData4data1[0].id}`" v-if="boxData4data1[0].islink == 0"
+                                    :title="boxData4data1[0].title">
+                                    <img :src="boxData4data1[0].imgurl" alt="item.title">
+                                    <span class="title1">{{ boxData4data1[0].title }}</span>
                                 </NuxtLink>
                             </div>
                             <div class="bottom_context">
@@ -434,14 +436,16 @@
                             </ul>
                         </div>
                         <div class="part2_content_right">
-                            <div class="right_top" v-for="(item, index) in boxData8data1" :key="index">
-                                <NuxtLink :to="item.linkurl" v-if="item.islink == 1" :title="item.title">
-                                    <img :src="item.imgurl" :alt="item.title">
-                                    <span class="title11">{{ item.title }}</span>
+                            <div class="right_top" v-if="boxData8data1.length > 0">
+                                <NuxtLink :to="boxData8data1[0].linkurl" v-if="boxData8data1[0].islink == 1"
+                                    :title="boxData8data1[0].title">
+                                    <img :src="boxData8data1[0].imgurl" alt="">
+                                    <span class="title11">{{ boxData8data1[0].title }}</span>
                                 </NuxtLink>
-                                <NuxtLink :to="`/newsDetail/${item.id}`" v-if="item.islink == 0" :title="item.title">
-                                    <img :src="item.imgurl" :alt="item.title">
-                                    <span class="title11">{{ item.title }}</span>
+                                <NuxtLink :to="`/newsDetail/${boxData8data1[0].id}`" v-if="boxData8data1[0].islink == 0"
+                                    :title="boxData8data1[0].title">
+                                    <img :src="boxData8data1[0].imgurl" alt="item.title">
+                                    <span class="title11">{{ boxData4data1[0].title }}</span>
                                 </NuxtLink>
                             </div>
                             <div class="right_bottom">
@@ -896,15 +900,16 @@
                         </div>
                         <div class="part5_left_content1" v-if="tabsData4 == 1">
                             <div class="content_bottom_left">
-                                <div class="content_top" v-for="(item, index) in boxData17data1" :key="index">
-                                    <NuxtLink :to="item.linkurl" v-if="item.islink == 1" :title="item.title">
-                                        <img :src="item.imgurl" alt="">
-                                        <span class="part5_text">{{ item.title }}</span>
+                                <div class="content_top" v-if="boxData17data1.length > 0">
+                                    <NuxtLink :to="boxData17data1[0].linkurl" v-if="boxData17data1[0].islink == 1"
+                                        :title="boxData17data1[0].title">
+                                        <img :src="boxData17data1[0].imgurl" alt="">
+                                        <span class="part5_text">{{ boxData17data1[0].title }}</span>
                                     </NuxtLink>
-                                    <NuxtLink :to="`/newsDetail/${item.id}`" v-if="item.islink == 0"
-                                        :title="item.title">
-                                        <img :src="item.imgurl" alt="">
-                                        <span class="part5_text">{{ item.title }}</span>
+                                    <NuxtLink :to="`/newsDetail/${boxData17data1[0].id}`"
+                                        v-if="boxData17data1[0].islink == 0" :title="boxData17data1[0].title">
+                                        <img :src="boxData17data1[0].imgurl" alt="item.title">
+                                        <span class="part5_text">{{ boxData17data1[0].title }}</span>
                                     </NuxtLink>
                                 </div>
                                 <div class="content_bottom">
@@ -937,15 +942,16 @@
                         </div>
                         <div class="part5_left_content1" v-if="tabsData4 == 2">
                             <div class="content_bottom_left">
-                                <div class="content_top" v-for="(item, index) in boxData18data1" :key="index">
-                                    <NuxtLink :to="item.linkurl" v-if="item.islink == 1" :title="item.title">
-                                        <img :src="item.imgurl" alt="">
-                                        <span class="part5_text">{{ item.title }}</span>
+                                <div class="content_top" v-if="boxData18data1.length > 0">
+                                    <NuxtLink :to="boxData18data1[0].linkurl" v-if="boxData18data1[0].islink == 1"
+                                        :title="boxData18data1[0].title">
+                                        <img :src="boxData18data1[0].imgurl" alt="">
+                                        <span class="part5_text">{{ boxData18data1[0].title }}</span>
                                     </NuxtLink>
-                                    <NuxtLink :to="`/newsDetail/${item.id}`" v-if="item.islink == 0"
-                                        :title="item.title">
-                                        <img :src="item.imgurl" alt="">
-                                        <span class="part5_text">{{ item.title }}</span>
+                                    <NuxtLink :to="`/newsDetail/${boxData18data1[0].id}`"
+                                        v-if="boxData18data1[0].islink == 0" :title="boxData18data1[0].title">
+                                        <img :src="boxData18data1[0].imgurl" alt="item.title">
+                                        <span class="part5_text">{{ boxData17data1[0].title }}</span>
                                     </NuxtLink>
                                 </div>
                                 <div class="content_bottom">
@@ -1322,6 +1328,7 @@ async function getModelData1() {
             'id': 0
         },
     });
+    console.log("mkdata", mkdata);
     if (mkdata.code == 200) {
         headlinelist.value = mkdata.data;
         console.log("成功获取头条信息!", headlinelist.value);
@@ -1360,9 +1367,9 @@ try {
             };
             //主体渲染 
             //第一层
-            //三农资讯328
+            //三农资讯445
             // if (navigateData.data[index].category_id == 11) { pageData.value[0] = data }
-            if (navigateData.data[index].category_id == 328) { pageData.value[0] = data }
+            if (navigateData.data[index].category_id == 445) { pageData.value[0] = data }
             //三农服务27
             // if (navigateData.data[index].category_id == 317) { pageData.value[1] = data }
             if (navigateData.data[index].category_id == 27) { pageData.value[1] = data }
@@ -1383,9 +1390,10 @@ try {
             // if (navigateData.data[index].category_id == 13) { pageData.value[6] = data }
             if (navigateData.data[index].category_id == 321) { pageData.value[6] = data }
             //第三层
-            //三农投资408
+            //三农投资408 12
             // if (navigateData.data[index].category_id == 24) { pageData.value[7] = data }
-            if (navigateData.data[index].category_id == 408) { pageData.value[7] = data }
+            if (navigateData.data[index].category_id == 12) { pageData.value[7] = data }
+            // if (navigateData.data[index].category_id ==408) { pageData.value[7] = data }
             //乡村生活322
             // if (navigateData.data[index].category_id == 14) { pageData.value[8] = data }
             if (navigateData.data[index].category_id == 322) { pageData.value[8] = data }
@@ -1462,14 +1470,15 @@ let getJson = [
     // { "parent": "26,2,7", "child": "" },//模块20 招工求职344
 
     // 乡村网
-    { "parent": "328,0,20", "child": "328,0,0" },//模块1 三农资讯328
+    { "parent": "445,0,20", "child": "445,0,0" },//模块1 三农资讯328
     { "parent": "27,0,4", "child": "" },//模块2 三农服务27
     { "parent": "410,0,4", "child": "" },//模块3 网站公告410
     { "parent": "325,3,10", "child": "325,0,0" },//模块4 乡村招商325
     { "parent": "320,2,0", "child": "" },//模块5 乡村建设320
     { "parent": "319,2,0", "child": "" },//模块6 乡村管理319
     { "parent": "321,2,0", "child": "" },//模块7 乡村文化321
-    { "parent": "408,3,10", "child": "408,0,0" },//模块8 三农投资408
+    // { "parent": "408,3,10", "child": "408,0,0" },//模块8 三农投资408
+    { "parent": "12,3,10", "child": "12,0,0" },//模块8 三农投资1 12
     { "parent": "322,2,0", "child": "" },//模块9 乡村生活322
     { "parent": "323,2,0", "child": "" },//模块10 乡村经济323
     { "parent": "318,2,0", "child": "" },//模块11 乡村风采318
@@ -1501,7 +1510,9 @@ async function getPageAllData() {
 
         //模块1 三农资讯
         boxData1.value = mkdata.data[0].textnum;
-        boxData1menu.value = mkdata.data[0].child.all_childcat;
+        if (mkdata.data[0].child) {
+            boxData1menu.value = mkdata.data[0].child.all_childcat; 
+        }
         //模块2 三农服务
         boxData2.value = mkdata.data[1].textnum;
 
@@ -1517,7 +1528,9 @@ async function getPageAllData() {
                 boxData4data2.value.push(data44[i]);
             }
         }
-        boxData4menu.value = mkdata.data[3].child.all_childcat;
+        if (mkdata.data[3].child) {
+            boxData4menu.value = mkdata.data[3].child.all_childcat;
+        }
         //模块5 乡村建设
         boxData5.value = mkdata.data[4].imgnum;
 
@@ -1535,11 +1548,9 @@ async function getPageAllData() {
                 boxData8data2.value.push(data1[i]);
             }
         }
-        console.log("成功获取模块数据11115555!", mkdata.data[7].imgnum);
-        console.log("成功获取模块数据11115555!", boxData8data1.value);
-        console.log("成功获取模块数据11115555!", boxData8data2.value);
-
-        boxData8menu.value = mkdata.data[7].child.all_childcat;
+        if (mkdata.data[7].child) {
+            boxData8menu.value = mkdata.data[7].child.all_childcat;
+        }
         //模块9 乡村生活
         boxData9.value = mkdata.data[8].imgnum;
         //模块10 乡村经济
@@ -1563,7 +1574,9 @@ async function getPageAllData() {
                 boxData14data2.value.push(data14[i]);
             }
         }
-        // boxData14menu.value = mkdata.data[13].child.all_childcat;
+        if (mkdata.data[13].child) {
+            boxData14menu.value = mkdata.data[13].child.all_childcat;
+        }
         //模块15 三农人物 
         boxData15.value = mkdata.data[14].imgnum;
         let data15 = mkdata.data[14].textnum;

+ 1 - 1
pages/newsDetail/[id].vue

@@ -62,7 +62,7 @@
     </div>
 
     <!-- 页面底部 -->
-    <HomeFoot></HomeFoot>
+    <HomeFoot1></HomeFoot1>
 </template>
 
 <script setup>

+ 5 - 5
pages/newsList/[id].vue

@@ -8,20 +8,20 @@
         <HomeAdvertising :imgurl="adImg1"></HomeAdvertising>
 
         <!-- 当前页面中的一级标题 -->
-        <div class="nav1" v-if="parent_name != ''">
+        <!-- <div class="nav1" v-if="parent_name != ''">
             <div class="inner">
                 <h2 class="nav1_title">
                     <NuxtLink :to="`/primaryNavigation/${parent_id}`"> {{ parent_name }}</NuxtLink>
                 </h2>
             </div>
-        </div>
+        </div> -->
 
         <!-- 二级导航列表 -->
         <div class="nav2top" v-if="parent_name != ''"></div>
         <div class="nav2" v-if="parent_name != ''">
             <ul class="inner">
                 <li class="home">
-                    <a href="/">网站首页</a>
+                    <a :href="`/primaryNavigation/${parent_id}`">{{ parent_name }}</a>
                 </li>
                 <li class="titleList" v-for="(item, index) in secondNav" :key="index">
                     <NuxtLink :to="{ path: `/newsList/${item.category_id}` }">
@@ -80,7 +80,7 @@
         <HomeAdvertising :imgurl="adImg2"></HomeAdvertising>
 
         <!-- 页面底部 -->
-        <HomeFoot></HomeFoot>
+        <HomeFoot1></HomeFoot1>
     </div>
 </template>
 
@@ -370,7 +370,7 @@ onMounted(async () => {
         margin: 0 auto;
         box-sizing: border-box;
         display: flex;
-        justify-content: space-between;
+        // justify-content: space-between;
 
         .titleList {
             font-family: Microsoft YaHei, Microsoft YaHei;

+ 23 - 27
pages/primaryNavigation/[id].vue

@@ -8,18 +8,18 @@
         <HomeAdvertising :imgurl="adImg1"></HomeAdvertising>
 
         <!-- 当前页面中的一级标题 -->
-        <div class="nav1">
+        <!-- <div class="nav1">
             <div class="inner">
                 <h2 class="nav1_title">{{ title }}</h2>
             </div>
-        </div>
+        </div> -->
 
         <!-- 二级导航列表 -->
         <div class="nav2top"></div>
         <div class="nav2">
             <ul class="inner">
                 <li class="home">
-                    <a href="/">网站首页</a>
+                    {{ title }}
                 </li>
                 <li class="titleList" v-for="(item, index) in pageData" :key="index">
                     <NuxtLink :href="getLinkPath(item)" :title="item.alias">
@@ -34,7 +34,7 @@
         <!-- 第一部分 -->
         <div class="part1">
             <div class="inner">
-                <div class="part1_left">
+                <div class="part1_left" v-if="pageData[0]">
                     <div class="part1_title">
                         <h2 class="nav_part1_left">
                             <NuxtLink :href="getLinkPath(pageData[0])" v-if="pageData[0]" :title="pageData[0].alias">
@@ -71,7 +71,7 @@
                         </div>
                     </div>
                 </div>
-                <div class="part1_right">
+                <div class="part1_right" v-if="pageData[1]">
                     <div class="part1_right_title">
                         <h2 class="part1_right_title1_active">
                             <NuxtLink :href="getLinkPath(pageData[1])" v-if="pageData[1]" :title="pageData[1].alias">
@@ -101,7 +101,7 @@
         <!-- 第二部分 -->
         <div class="part2">
             <div class="inner">
-                <div class="part2_left">
+                <div class="part2_left" v-if="pageData[2]">
                     <div class="part2_title">
                         <h2 class="nav_part2_left">
                             <NuxtLink :href="getLinkPath(pageData[2])" v-if="pageData[2]" :title="pageData[2].alias">
@@ -138,7 +138,7 @@
                         </div>
                     </div>
                 </div>
-                <div class="part2_right">
+                <div class="part2_right" v-if="pageData[3]">
                     <div class="part2_right_title">
                         <h2 class="part2_right_title1_active">
                             <NuxtLink :href="getLinkPath(pageData[3])" v-if="pageData[3]" :title="pageData[3].alias">
@@ -170,10 +170,10 @@
         <HomeAdvertising :imgurl="adImg2"></HomeAdvertising>
 
         <!-- 第二层 -->
-        <div class="part3">
+        <div class="part3" v-if="pageData[4]">
             <div class="inner">
                 <div class="part3_left">
-                    <div class="part3_left_top">
+                    <div class="part3_left_top" v-if="pageData[4]">
                         <div class="part3_leftTitle">
                             <h2 class="part3_left_title">
                                 <NuxtLink :href="getLinkPath(pageData[4])" v-if="pageData[4]"
@@ -183,7 +183,7 @@
                                 <em></em>
                             </h2>
                         </div>
-                        <div class="part3_left_content">
+                        <div class="part3_left_content" v-if="pageData[4]">
                             <div class="part3_left_content_top">
                                 <div class="content_top_left">
                                     <div class="part3_photo_text" v-for="(item, index) in pageData[4].data"
@@ -223,7 +223,7 @@
                             </div>
                         </div>
                     </div>
-                    <div class="part3_left_bottom">
+                    <div class="part3_left_bottom" v-if="pageData[5] || pageData[6]">
                         <div class="part3_leftTitle1">
                             <h2 class="part3_left_title" v-if="pageData[5]" @mouseenter="tabsData = 1"
                                 :class="{ part3_left_title_active: tabsData == 1 }">
@@ -271,7 +271,7 @@
                                 </ul>
                             </div>
                         </div>
-                        <div class="part3_left_content1" v-if="tabsData == 2">
+                        <div class="part3_left_content1" v-if="tabsData == 2 && pageData[6].alias">
                             <div class="content_bottom_left">
                                 <div class="content_top" v-for="(item, index) in pageData[6].data" :key="index">
                                     <NuxtLink :href="getLinkPathDetail(item)" :title="item.title">
@@ -302,7 +302,7 @@
                         </div>
                     </div>
                 </div>
-                <div class="part3_right">
+                <div class="part3_right" v-if="pageData[7]">
                     <div class="part3_rightTitle">
                         <h2 class="part3_right_title">
                             <NuxtLink :href="getLinkPath(pageData[7])" v-if="pageData[7]" :title="pageData[7].alias">
@@ -314,7 +314,7 @@
                             <NuxtLink to="#">更多》</NuxtLink>
                         </div>
                     </div>
-                    <ul class="part3_right_content_top">
+                    <ul class="part3_right_content_top" v-if="pageData[7].data1.length > 0">
                         <li class="part3_right_contentlist_top" v-for="(item, index) in pageData[7].data1" :key="index">
                             <NuxtLink :href="getLinkPathDetail(item)" :title="item.title">
                                 <span class="numStyle">{{ index + 1 }}</span>
@@ -322,20 +322,20 @@
                             </NuxtLink>
                         </li>
                     </ul>
-                    <div class="part3_photo_text_right">
+                    <div class="part3_photo_text_right" v-if="pageData[7].data[0]">
                         <NuxtLink :href="getLinkPathDetail(pageData[7].data[0])" :title="pageData[7].data[0].title">
                             <span class="part3_text11">{{ pageData[7].data[0].title }}</span>
                             <img :src="pageData[7].data[0].imgurl" :alt="pageData[7].data[0].title">
                         </NuxtLink>
                     </div>
-                    <ul class="part3_right_content_11">
+                    <ul class="part3_right_content_11" v-if="pageData[7].data2.length > 0">
                         <li class="part3_right_contentlist_11" v-for="(item, index) in pageData[7].data2" :key="index">
                             <NuxtLink :href="getLinkPathDetail(item)" :title="item.title">
                                 {{ item.title }}
                             </NuxtLink>
                         </li>
                     </ul>
-                    <div class="part3_photo_text_right">
+                    <div class="part3_photo_text_right" v-if="pageData[7].data[1]">
                         <NuxtLink :href="getLinkPathDetail(pageData[7].data[1])" :title="pageData[7].data[1].title">
                             <span class="part3_text11">{{ pageData[7].data[1].title }}</span>
                             <img :src="pageData[7].data[1].imgurl" :alt="pageData[7].data[1].title">
@@ -348,7 +348,7 @@
                             </NuxtLink>
                         </li>
                     </ul>
-                    <div class="part3_photo_text_right">
+                    <div class="part3_photo_text_right" v-if="pageData[7].data[2]">
                         <NuxtLink :href="getLinkPathDetail(pageData[7].data[2])" :title="pageData[7].data[2].title">
                             <span class="part3_text11">{{ pageData[7].data[2].title }}</span>
                             <img :src="pageData[7].data[2].imgurl" :alt="pageData[7].data[2].title">
@@ -831,7 +831,7 @@ function getTime(date, part, digits) {
         margin: 0 auto;
         box-sizing: border-box;
         display: flex;
-        justify-content: space-between;
+        // justify-content: space-between;
 
         .titleList {
             font-family: Microsoft YaHei, Microsoft YaHei;
@@ -880,11 +880,6 @@ function getTime(date, part, digits) {
             font-weight: bold;
             font-size: 14px;
             color: #F8ECD2;
-
-            a {
-                color: #F8ECD2;
-                margin-right: 39px;
-            }
         }
     }
 }
@@ -1203,7 +1198,7 @@ function getTime(date, part, digits) {
 .part2 {
     width: 100%;
     overflow: hidden;
-    margin-bottom: 40px;
+    // margin-bottom: 40px;
 
     .inner {
         width: 1200px;
@@ -1297,7 +1292,7 @@ function getTime(date, part, digits) {
                 .part2_content_right {
                     float: right;
                     width: 350px;
-                    height: 440px;
+                    height: 480px;
 
                     .right_top {
                         width: 350px;
@@ -1514,7 +1509,8 @@ function getTime(date, part, digits) {
 //第三部分
 .part3 {
     width: 100%;
-    height: 1200px;
+    overflow: hidden;
+    // height: 1200px;
     margin-top: 35px;
     margin-bottom: 40px;
 

+ 215 - 738
pages/search/search.vue

@@ -2,28 +2,28 @@
     <div id="newsList">
         <!-- 页面头部 -->
         <HomePageHead></HomePageHead>
-
-        <HomePageNavigation></HomePageNavigation>
-
+        <!-- 导航栏 -->
+        <HomePageNavigation1></HomePageNavigation1>
+        <!-- 列表页广告一 -->
+        <HomeTopTen :imgurl="adImg1" v-if="adImg1"></HomeTopTen>
         <!-- 搜索框 -->
         <div class="search">
             <div class="inner">
-                <input v-model="keywordInput" type="text" placeholder="请输入搜索内容" @keydown.enter.prevent="goSearch">
+                <input v-model="keywordInput" type="text" placeholder="请输入搜索内容">
                 <button @click="goSearch">搜索</button>
             </div>
         </div>
-
-        <!-- 面包屑导航 -->
         <div class="breadcrumb">
             <div class="inner">
                 <span class="location">当前位置:</span>
                 <el-breadcrumb :separator-icon="ArrowRight">
-                    <el-breadcrumb-item :to="{ path: '/' }">首页</el-breadcrumb-item>
-                    <el-breadcrumb-item :to="{ path: '/search/search' }">搜索</el-breadcrumb-item>
+                    <el-breadcrumb-item>
+                        <NuxtLink to="/">首页</NuxtLink>
+                    </el-breadcrumb-item>
+                    <el-breadcrumb-item>搜索</el-breadcrumb-item>
                 </el-breadcrumb>
             </div>
         </div>
-        <!-- 资讯列表 -->
         <div class="newsList">
             <div class="inner">
                 <div class="innerLeft">
@@ -47,780 +47,257 @@
                     <div class="pagination">
                         <el-pagination size="small" background layout="prev, pager, next" :total="total" class="mt-4"
                             v-model:page-size="pageSize" prev-text="上一页" next-text="下一页" @change="changePage" />
-                        <!-- <HomePagination @sendData="handleData"></HomePagination> -->
                     </div>
                 </div>
-                <!-- <div class="innerRight">
-                    <DetailHotNews></DetailHotNews>
-                </div> -->
             </div>
         </div>
-
-        <!-- 列表页广告 -->
-        <HomeTopTenTitle :imgurl="adList[1]" v-if="adList[1]"></HomeTopTenTitle>
-
+        <!-- 列表页广告二 -->
+        <HomeTopTen :imgurl="adImg2" v-if="adImg2"></HomeTopTen>
         <!-- 页面底部 -->
         <HomeFoot1></HomeFoot1>
     </div>
 </template>
 
 <script setup>
-import { onMounted } from 'vue';
+//1.页面依赖 start ---------------------------------------->
 import { ElBreadcrumb, ElBreadcrumbItem, ElPagination } from 'element-plus'
 import { ArrowRight } from '@element-plus/icons-vue'
+import { ref, onMounted } from 'vue';
 
-const nuxtApp = useNuxtApp();
-const axios = nuxtApp.$axios;
-
-//获得跳转过来的id
 const route = useRoute();
-const articleId = route.params.id; //获得该页面的id
-const category_id = route.query.category_id; //获得该页面的id
-const name = route.query.name; //获得该页面的id
-const searchKey = route.query.keyword
-console.log(name);
+//const pageCatids = route.query.catids;
+const pageCatids = route.params.id
+const pageDepartment_id = route.query.department_id;
 
-//从地区跳转
-const catids = ref([]);
+//const category_id = route.query.category_id; //获得该页面的id
+// const searchKey = route.query.keyword
+// const catids = ref([]);
 
 //关键词
-let keyWord = useState("keyWord", () => "")
-let id = useState("id", () => "")
 let total = useState("total", () => 0)
 let page = useState("page", () => 1)
 let pageSize = useState("pageSize", () => 20)
+//1.页面依赖 end ---------------------------------------->
+
+//2.页面数据 start ---------------------------------------->
+//2.1 广告
+let adImg1 = ref([]);
+let adImg2 = ref([]);
+// async function getAdData(){
+//     const mkdata = await requestDataPromise('/web/getWebsiteAdvertisement',{
+//         method:'GET',
+//         query:{
+//             'ad_tag':'SEARCH'
+//         }
+//     });
+//     if(adData.code==200){
+//         for(let item of adData.data){
+//             if(item.ad_tag == 'SEARCH_0001'){
+//                 adImg1.value = item;
+//             }
+//             if(item.ad_tag == 'SEARCH_0002'){
+//                 adImg2.value = item;
+//             }
+//         }
+//     }else{
+//         console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
+//         console.log("错误位置:获取搜索页广告列表")
+//         console.log("后端错误反馈:",adData.message)
+//         console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
+//     }
+// }
+// getAdData();
+onMounted(async ()  => {
+    //从客户端获取行政职能部门 加快打开速度
+    const { $webUrl, $CwebUrl } = useNuxtApp();
+    //广告1
+    let url = `${$webUrl}/web/getWebsiteAdvertisement?ad_tag=snzxw_search_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_search_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];
+})
 
 
-let keywordInput = ref("")
+// 新闻列表
+const newsList = ref([]);
+let keywordInput = ref("");
 
-//获得广告
-const adList = ref("");
-const aa = 'SEARCH'
-const getadList = async () => {
-    try {
-        const response = await axios.get(`/web/getWebsiteAdvertisement?ad_tag=${aa}`);
-        adList.value = response.data;
-    } catch (error) {
-        console.error(error);
+//搜索
+let goSearch = async () => {
+    console.log(111222)
+    console.log(page.value)
+    console.log(pageSize.value)
+    console.log(keywordInput.value)
+    console.log(pageCatids)
+    console.log(pageDepartment_id)
+    const listData =  await requestDataPromise('/web/selectWebsiteCategory', {
+        method: 'GET',
+        query: {
+            'page': page.value,
+            'pageSize': pageSize.value,
+            'keyword':keywordInput.value,
+            'cityid':pageCatids,
+            'department_id':pageDepartment_id
+        },
+    });
+    if(listData.data.rows){
+        console.log(listData)
+        newsList.value = listData.data.rows;
+        total.value = listData.data.count;
     }
+   
 }
-onMounted(() => {
-    getadList()
-})
 
-// 定义响应式数据
-const seoData = ref({
-    title: '搜索',
-    description: '默认描述',
-    keywords: '默认关键词',
-    image: 'https://example.com/default-image.jpg'
-});
+goSearch();
+//基于导航池搜索
+// let goSearchFont = async (font) => {
+//     const listData =  await requestDataPromise('/web/getWebsiteArticleList', {
+//         method: 'GET',
+//         query: {
+//             'page': page.value,
+//             'pageSize': pageSize.value,
+//             'catid': font
+//         },
+//     });
+//     newsList.value = listData.data.rows;
+//     total.value = listData.data.count;
+// }
 
-// 在 onMounted 钩子中获取数据
-onMounted(() => {
-    seoData.value.title = '搜索';
-    seoData.value.description = '默认描述';
-    seoData.value.keywords = '默认关键词';
-})
+// //基于导航池与关键词搜索
+// let goSearchFontandCid = async (font) => {
+//     const listData =  await requestDataPromise('/web/getWebsiteArticleList', {
+//         method: 'GET',
+//         query: {
+//             'page': page.value,
+//             'pageSize': pageSize.value,
+//             'catid': category_id,
+//             'keyword':searchKey
+//         },
+//     });
+//     newsList.value = listData.data.rows;
+//     total.value = listData.data.count;
+// }
 
-// 在 onMounted 钩子中获取数据
-// onMounted(async () => {
-//     try {
-//         const response = await axios.get(`/web/getWebsiteCategoryHead?catid=${articleId}`);
-//         const data = response.data.website_head; // 假设接口返回的数据在 data 字段中
-//         console.log(seoData.value.title)
-//         // 更新 seoData
-//         seoData.value = {
-//             title: data.seo_title,
-//             description: data.seo_description,
-//             keywords: data.seo_keywords,
-//             image: data.seo_image
-//         };
-//         console.log(seoData.value.title)
 
+//直接查新闻
+// const newslists = async () => {
+//     try {
+//         // 从地区跳转
+//         if (route.query.catids && route.query.catids.length > 0) {
+//             // 将字符串转换回数组,并过滤掉可能的空值
+//             catids.value = route.query.catids.split(',').filter(id => id);
+
+//             if (catids.value.length > 0) {
+//                 // 有效的 catids 数组,可以进行后续操作
+//                 console.log('接收到的分类ID数组:', catids.value);
+//                 let font = catids.value.join(",")
+//                 font = "[" + font + "]"
+
+//                 goSearchFont(font);
+//             } else {
+//                 // 处理空数组情况
+//                 console.log('未接收到有效的分类ID');
+//             }
+//         } else {
+//             if (category_id == undefined) {
+//                 //直接搜索 默认进来没有导航池的话 不执行搜索
+//                 goSearch();
+//             } else {
+//                 goSearchFontandCid();
+//             }
+//         }
 //     } catch (error) {
-//         console.error('获取 SEO 数据失败:', error);
-//         // 设置默认值
-//         seoData.value = {
-//             title: '三农资讯网',
-//             description: '默认描述',
-//             keywords: '默认关键词',
-//             image: 'https://example.com/default-image.jpg'
-//         };
-//     }
-// });
-
-// 监听 seoData 的变化,动态设置 SEO 字段
-// watch(seoData, (newVal) => {
-//     if (newVal.title) { // 确保 title 有值
-//         useSeoMeta({
-//             title: newVal.title, // 使用动态值
-//             description: newVal.description,
-//             ogTitle: newVal.title,
-//             ogDescription: newVal.description,
-//             ogImage: newVal.image,
-//             twitterTitle: newVal.title,
-//             twitterDescription: newVal.description,
-//             twitterImage: newVal.image,
-//             keywords: newVal.keywords
-//         });
+//         console.error(error);
 //     }
-// }, { immediate: true });
-
-//点击搜索按钮
-let goSearch = async () => {
-    const response = await axios.get(`/web/getWebsiteArticleList?page=${page.value}&pageSize=${pageSize.value}&catid=${category_id}&keyword=${keywordInput.value}`);
-    // console.log(response.data.rows);
-    newsList.value = response.data.rows;
-    total.value = response.data.count;
-}
-
-
-onMounted(() => {
-    id.value = route.query.id;
-    console.log('id', id.value);
-})
+// }
+// newslists();
 
-// 页码
-// //页面组件传递数据的时间驱动函数
-// const handleData = (data) => {
-//     console.log(data.value)
-//     page.value = data.value
 
-//     //在页码发生变化时去请求响应页面的新闻数据
-//     axios.get(`/web/getWebsiteArticlesList?page=${page.value}&pageSize=${10}&catid=${14}&keyword=${keyWord.value}`).then(response => {
-//         // console.log(response.data.rows);
-//         newsList.value = response.data.rows;
-//     }).catch(error => {
+// 查询导航池的方法
+// const newslists = async () => {
+//     try {
+//         // 从地区跳转
+//         if (route.query.catids && route.query.catids.length > 0) {
+//             // 将字符串转换回数组,并过滤掉可能的空值
+//             catids.value = route.query.catids.split(',').filter(id => id);
+
+//             if (catids.value.length > 0) {
+//                 // 有效的 catids 数组,可以进行后续操作
+//                 console.log('接收到的分类ID数组:', catids.value);
+//                 let font = catids.value.join(",")
+//                 font = "[" + font + "]"
+
+//                 goSearchFont(font);
+//             } else {
+//                 // 处理空数组情况
+//                 console.log('未接收到有效的分类ID');
+//             }
+//         } else {
+//             if (category_id == undefined) {
+//                 //直接搜索 默认进来没有导航池的话 不执行搜索
+//                 goSearch();
+//             } else {
+//                 goSearchFontandCid();
+//             }
+//         }
+//     } catch (error) {
 //         console.error(error);
-//     })
+//     }
 // }
 
+// newslists();
+
+//分页事件
 let changePage = (value) => {
     console.log("当前页码", value);
     page.value = value
     console.log(page.value);
-    newslists()
-}
-
-// 新闻列表
-const newsList = useState("newsList", () => '');
-const newslists = async () => {
-    try {
-
-        // const response = await axios.get(`/web/getWebsiteArticleList?page=${page.value}&pageSize=${pageSize.value}&keyword=${searchKey}`);
-        // // console.log(response.data.rows);
-        // newsList.value = response.data.rows;
-        // total.value = response.data.count;
-
-        // 从地区跳转
-        if (route.query.catids && route.query.catids.length > 0) {
-            // 将字符串转换回数组,并过滤掉可能的空值
-            catids.value = route.query.catids.split(',').filter(id => id);
-
-            if (catids.value.length > 0) {
-                // 有效的 catids 数组,可以进行后续操作
-                console.log('接收到的分类ID数组:', catids.value);
-                let font = catids.value.join(",")
-                font = "[" + font + "]"
-                //console.log(font);
-
-                const response = await axios.get(`/web/getWebsiteArticleList?page=${page.value}&pageSize=${pageSize.value}&catid=${font}`);
-                console.log(response.data.rows);
-                newsList.value = response.data.rows;
-                total.value = response.data.count;
-
-            } else {
-                // 处理空数组情况
-                console.log('未接收到有效的分类ID');
-            }
-        } else {
-
-            if (category_id == undefined) {
-                const response = await axios.get(`/web/getWebsiteArticleList?page=${page.value}&pageSize=${pageSize.value}&keyword=${searchKey}`);
-                // console.log(response.data.rows);
-                newsList.value = response.data.rows;
-                total.value = response.data.count;
-
-            } else {
-                const response = await axios.get(`/web/getWebsiteArticleList?page=${page.value}&pageSize=${pageSize.value}&catid=${category_id}&keyword=${searchKey}`);
-                // console.log(response.data.rows);
-                newsList.value = response.data.rows;
-                total.value = response.data.count;
-            }
-        }
-
-    } catch (error) {
-        console.error(error);
-    }
+    goSearch()
 }
-
-//热点资讯
-const hotlistall = useState("hotlistall", () => "");
-const hotlist = async () => {
-    try {
-        const response = await axios.get(`/web/getWebsiteArticlett?pageSize=${2}&level=${4}&placeid=${1}`);
-        console.log('热点资讯', response.data);
-        for (let item of response.data) {
-            console.log(item);
-            item.count = 1;
-        }
-        hotlistall.value = response.data;
-    } catch (error) {
-        console.error(error);
-    }
-}
-
-//资讯推荐1
-const news1 = useState("news1", () => "");
-const newslist1 = async () => {
-    try {
-        const response = await axios.get(`/web/getWebsiteArticlett?pageSize=${1}&level=${5}&placeid=${1}`);
-        console.log('热点资讯', response.data);
-        news1.value = response.data;
-    } catch (error) {
-        console.error(error);
-    }
-}
-const news11 = useState("news11", () => "");
-const newslist11 = async () => {
-    try {
-        const response = await axios.get(`/web/getWebsiteArticlett?pageSize=${3}&level=${5}&placeid=${1}`);
-        console.log('热点资讯', response.data);
-        news11.value = response.data;
-    } catch (error) {
-        console.error(error);
-    }
-}
-//资讯推荐2
-const news2 = useState("news2", () => "");
-const newslist2 = async () => {
-    try {
-        const response = await axios.get(`/web/getWebsiteArticlett?pageSize=${1}&level=${5}&placeid=${1}`);
-        console.log('热点资讯', response.data);
-        news2.value = response.data;
-    } catch (error) {
-        console.error(error);
-    }
-}
-const news22 = useState("news22", () => "");
-const newslist22 = async () => {
-    try {
-        const response = await axios.get(`/web/getWebsiteArticlett?pageSize=${3}&level=${5}&placeid=${1}`);
-        console.log('热点资讯', response.data);
-        news22.value = response.data;
-    } catch (error) {
-        console.error(error);
-    }
-}
-
-
+//2.页面数据 end ---------------------------------------->
 
 
-//挂载成功钩子函数
-onMounted(() => {
-
-    // 资讯推荐
-    newslists()
-    // 热点资讯
-    hotlist()
-    // 资讯推荐
-    newslist1()
-    newslist2()
-    // 热点资讯
-    newslist11()
-    newslist22()
-})
-
-//路由中间件
-definePageMeta({
-    middleware: 'auth'
-})
+//4.设置seo信息 start---------------------------------------->
+//4.1 设置seo信息
+const setData =  await requestDataPromise('/web/getWebsiteFootInfo', {
+    method: 'GET',
+    query: {},
+});
 
+let seoTitle = setData.data.website_head.title;
+let seoDescription = setData.data.website_head.description;
+let seoKeywords = setData.data.website_head.keywords;
+let seoSuffix = setData.data.website_head.suffix;
+let seoName = setData.data.website_head.website_name;
+
+useSeoMeta({
+    title: seoTitle + "_" + seoSuffix,
+    meta: [
+        { name: 'description', content: seoDescription + "_" + seoName + "_" + seoSuffix , tagPriority: 10 },
+        { name: 'keywords', content: seoKeywords + "_" + seoName + "_" + seoSuffix , tagPriority: 10 }
+    ]
+});
+//4.设置seo信息 end---------------------------------------->
 </script>
 
 <style lang="less" scoped>
-//导航条
-.breadcrumb {
-    width: 100%;
-    height: 22px;
-    margin-bottom: 30px;
-    font-family: Microsoft YaHei, Microsoft YaHei;
-    font-weight: 400;
-    font-size: 20px;
-    color: #666666;
-    line-height: 23px;
-    text-align: left;
-    font-style: normal;
-    text-transform: none;
-
-    :deep(.el-breadcrumb) {
-        display: inline-block;
-        vertical-align: -4px;
-    }
-
-    :deep(.el-breadcrumb__inner a),
-    :deep(.el-breadcrumb__inner.is-link) {
-        color: #666666;
-        font-weight: 400;
-        text-decoration: none;
-        transition: var(--el-transition-color);
-    }
-
-    span {
-        font-family: Microsoft YaHei, Microsoft YaHei;
-        font-weight: 400;
-        font-size: 20px;
-        color: #666666;
-        line-height: 23px;
-        text-align: left;
-        font-style: normal;
-        text-transform: none;
-    }
-
-    span:hover {
-        color: #666666;
-    }
-
-    .location {
-        margin-right: 20px;
-        width: 100px;
-        height: 22px;
-        font-family: Microsoft YaHei, Microsoft YaHei;
-        font-weight: 400;
-        font-size: 20px;
-        color: #666666;
-        line-height: 23px;
-        text-align: left;
-        font-style: normal;
-        text-transform: none;
-    }
-}
-
-.empty {
-    div {
-        display: flex;
-        justify-content: center;
-        align-items: center;
-        padding-top: 200px;
-    }
-
-    width: 100%;
-    height: 600px;
-    font-size: 26px;
-    color: #CCCCCC;
-
-    img {
-        display: inline-block;
-    }
-}
-
-// 资讯列表
-.newsList {
-    width: 1200px;
-    margin: 0 auto;
-    //height: 675px;
-    margin-bottom: 70px;
-
-    .inner {
-        width: 1200px;
-
-        .innerLeft {
-            width: 100%;
-        }
-
-        .innerLeft,
-        .innerRight {
-            border-top: 1px solid #CCCCCC;
-            clear: both;
-            float: none;
-        }
-
-        .innerLeft {
-            //height: 675px;
-
-            >.list {
-                //height: 570px;
-                margin-bottom: 70px;
-
-                >li {
-                    width: 1200px;
-                    height: 56px;
-                    white-space: nowrap;
-                    overflow: hidden;
-                    text-overflow: ellipsis;
-                    line-height: 56px;
-
-
-                    a {
-                        display: inline-block;
-                        width: 800px;
-                        height: 26px;
-                        font-family: Microsoft YaHei, Microsoft YaHei;
-                        font-weight: 400;
-                        font-size: 20px;
-                        color: #333333;
-                        line-height: 26px;
-                        text-align: left;
-                        font-style: normal;
-                        text-transform: none;
-                        white-space: nowrap;
-                        overflow: hidden;
-                        text-overflow: ellipsis;
-                    }
-
-                    .time {
-                        font-family: Microsoft YaHei, Microsoft YaHei;
-                        font-weight: 400;
-                        font-size: 18px;
-                        color: #333333;
-                    }
-
-                }
-
-                >li:hover>a {
-                    color: #a01c0e;
-                }
-
-                >li:nth-child(1)::after,
-                >li:nth-child(2)::after {
-                    content: "热";
-                    margin-left: 13px;
-                    background: #FF8A37;
-                    color: #fff;
-                    font-size: 14px;
-                    padding: 0px 2px;
-                }
-
-                >li:nth-child(5n) {
-                    border-bottom: 1px solid #D9D9D9;
-                }
-            }
-
-            >.pagination {
-                width: 100%;
-                height: 34px;
-                margin-left: 141px;
-                display: flex;
-                justify-content: center;
-                margin: 0;
-
-                // 鼠标移入后字体颜色
-                .el-pagination::v-deep :hover {
-                    color: #a01c0e;
-                }
-
-                .el-pagination.is-background::v-deep .btn-next,
-                .el-pagination.is-background::v-deep .btn-prev {
-                    width: 70px;
-                    height: 34px;
-                    margin: 0px 10px;
-                    border-radius: 4px;
-                }
-
-                .el-pagination.is-background::v-deep .el-pager li {
-                    margin: 0px 10px;
-                    width: 38px;
-                    height: 34px;
-                    border-radius: 4px;
-                }
-
-                .el-pagination.is-background::v-deep .btn-next.is-active,
-                .el-pagination.is-background::v-deep .btn-prev.is-active,
-                .el-pagination.is-background::v-deep .el-pager li.is-active {
-                    background-color: #a01c0e;
-                    color: #fff;
-                }
-
-
-            }
-        }
-
-        .innerRight {
-            width: 381px;
-            height: 605px;
-            clear: both;
-            overflow: hidden;
-        }
-    }
-}
-
-//资讯推荐
-.zixuntuijian {
-    width: 100%;
-    height: 290px;
-    margin-bottom: 70px;
-
-    .innerLeft {
-
-        // 左侧
-        .zixunLeft {
-            margin-right: 30px;
-        }
-
-        .zixunRight,
-        .zixunLeft {
-            float: left;
-            width: 380px;
-            height: 290px;
-
-            // 标题部分
-            >.title {
-                width: 380px;
-            }
-
-            >.title>h3 {
-                height: 36px;
-                font-family: Source Han Sans, Source Han Sans;
-                font-weight: bold;
-                font-size: 24px;
-                color: #000000;
-                line-height: 28px;
-                text-align: left;
-                font-style: normal;
-                text-transform: none;
-                border-bottom: 1px solid #a01c0e;
-
-            }
-
-            >.title>h3>span {
-                float: right;
-                width: 56px;
-                height: 20px;
-                line-height: 24px;
-                font-weight: 400;
-                font-size: 14px;
-                color: #999999;
-                font-style: normal;
-                text-transform: none;
-            }
-
-            .photo_text {
-
-                >li:first-child {
-                    width: 380px;
-                    height: 120px;
-                    margin-top: 20px;
-                    margin-bottom: 15px;
-                    position: relative;
-
-                    >img {
-                        float: left;
-                        width: 160px;
-                        height: 120px;
-                    }
-
-                    >div {
-                        float: left;
-                        width: 220px;
-                        height: 120px;
-                        padding-left: 15px;
-                        padding-top: 6px;
-                        box-sizing: border-box;
-                        background-color: #f6f6f6;
-
-
-                        >h5 {
-                            width: 200px;
-                            height: 54px;
-                            display: -webkit-box;
-                            -webkit-box-orient: vertical;
-                            -webkit-line-clamp: 2;
-                            overflow: hidden;
-                            text-overflow: ellipsis;
-                            word-break: break-all;
-                            font-family: Source Han Sans, Source Han Sans;
-                            font-weight: 500;
-                            font-size: 18px;
-                            color: #333333;
-                            line-height: 26px;
-                            text-align: left;
-                            font-style: normal;
-                            text-transform: none;
-                        }
-
-                        >p {
-                            width: 200px;
-                            height: 22px;
-                            line-height: 20px;
-                            position: absolute;
-                            bottom: 5px;
-                            right: 0;
-
-                            >span {
-                                display: inline-block;
-                                // width: 100px;
-                                height: 18px;
-                                font-family: Source Han Sans, Source Han Sans;
-                                font-weight: 400;
-                                font-size: 12px;
-                                color: #999999;
-                                text-align: left;
-                                line-height: 14px;
-                                font-style: normal;
-                                text-transform: none;
-                            }
-
-                            >span:last-child {
-                                // width: 90px;
-                                text-align: right;
-                                margin-left: 20px;
-                            }
-
-                        }
-                    }
-                }
-
-                >li {
-                    width: 380px;
-                    height: 25px;
-                    white-space: nowrap;
-                    overflow: hidden;
-                    text-overflow: ellipsis;
-                    font-family: PingFang SC, PingFang SC;
-                    font-weight: 500;
-                    font-size: 18px;
-                    color: #333333;
-                    line-height: 21px;
-                    text-align: left;
-                    font-style: normal;
-                    text-transform: none;
-                    margin-bottom: 10px;
-
-                    em {
-                        display: inline-block;
-                        width: 8px;
-                        height: 8px;
-                        border-radius: 8px;
-                        margin-right: 10px;
-                        background-color: #d9d9d9;
-                    }
-                }
-
-                >li:hover {
-                    color: #a01c0e;
-                }
-
-                >li:hover em {
-                    background-color: #a01c0e;
-                }
-            }
-        }
-    }
-
-    .innerRight {
-        width: 381px;
-        height: 290px;
-        background-color: #fbfbfb;
-
-        >.title {
-            width: 380px;
-            height: 40px;
-            line-height: 40px;
-            border-top: 1px solid #a01c0e;
-            border-bottom: 1px solid #e7e7e7;
-
-            >h4 {
-                font-family: Microsoft YaHei, Microsoft YaHei;
-                font-weight: 400;
-                margin-left: 20px;
-                font-size: 20px;
-                color: #000000;
-                text-align: left;
-                font-style: normal;
-                text-transform: none;
-
-                >span {
-                    float: right;
-                    font-family: Microsoft YaHei, Microsoft YaHei;
-                    font-weight: 400;
-                    font-size: 14px;
-                    margin-right: 10px;
-                    color: #999999;
-                    text-align: left;
-                    font-style: normal;
-                    text-transform: none;
-                }
-            }
-
-        }
-
-        .rightList {
-            height: 540px;
-            margin-top: 20px;
-
-            >li {
-                height: 100px;
-                margin-bottom: 10px;
-
-                >img {
-                    width: 150px;
-                    height: 100px;
-                }
-
-                >p {
-                    width: 219px;
-                    height: 100px;
-                    padding-left: 12px;
-                    font-family: PingFang SC, PingFang SC;
-                    font-weight: 400;
-                    font-size: 16px;
-                    color: #333333;
-                    line-height: 22px;
-                    text-align: left;
-                    font-style: normal;
-                    text-transform: none;
-
-                }
-
-                >p:hover {
-                    box-shadow: 0 0 16px 1px rgba(0, 0, 0, 0.1);
-                }
-            }
-        }
-
-    }
-}
-
-.searchBox {
-    text-align: center;
-    padding-bottom: 40px;
-}
-
-.search {
-    width: 100%;
-    height: 100px;
-    margin-top: 40px;
-    // background-color: #f5f5f5;
-
-    .inner {
-        width: 1200px;
-        height: 100px;
-        // line-height: 100px;
-        padding-top: 10px;
-        text-align: center;
-
-        input {
-            width: 582px;
-            height: 46px;
-            outline: none;
-            border: 1px solid #E6E6E6;
-            border-radius: 0;
-            padding-left: 20px;
-            vertical-align: 0px;
-            font-size: 16px;
-            color: #666666
-        }
-
-        button {
-            width: 120px;
-            height: 48px;
-            background-color: #a01c0e;
-            color: #fff;
-            border: none;
-            border-radius: 0;
-            cursor: pointer;
-        }
-    }
-}
+@import url('@/assets/css/search.less');
 </style>

+ 6 - 1
pages/speciaArticle/[id].vue

@@ -107,10 +107,15 @@ async function getPageData() {
     const mkdata =  await requestDataPromise('/web/getWebsiteFooterCategoryInfo', {
         method: 'GET',
         query: {
-            'fcat_id': articleId
+            'fcat_id': articleId,
+            'type':'0'
         },
     });
+    console.log('newsDetail.value', mkdata.data);
+
     newsDetail.value = mkdata.data;
+    console.log('newsDetail.value', newsDetail.value);
+    
 }
 getPageData();
 

+ 78 - 25
pages/topic/[id].vue

@@ -1,7 +1,9 @@
 <template>
     <div>
         <!-- 页面头部 -->
-        <TopicHead></TopicHead>
+        <HomePageHead></HomePageHead>
+        <HomePageNavigation1></HomePageNavigation1>
+
         <!-- 商圈详情 -->
         <div class="topicInfoBox">
             <div class="inner">
@@ -12,9 +14,9 @@
                         <div class="userInfo left">
                             <el-badge value="楼主" class="item" type="warning">
                                 <img v-if='dataInfo.avatar' :src="dataInfo.avatar" alt="">
-                                <img v-else src='../../public/topic/Rectangle.png' alt="">
+                                <img v-else src='http://img.bjzxtw.org.cn/master/bjzxtw/public/topic/Rectangle.png' alt="">
                             </el-badge>
-                            <span>{{ dataInfo.nickname }}</span>
+                            <span>{{ dataInfo.author }}</span>
                         </div>
                         <div class="headContent left">
                             <h2>{{ dataInfo.title }}</h2>
@@ -26,10 +28,11 @@
                         </div>
                     </div>
                     <div class="right">
-                        <div class="one" v-if="dataInfo.type == 1">科研</div>
-                        <div class="two" v-else-if="dataInfo.type == 2">维权</div>
-                        <div class="three" v-else-if="dataInfo.type == 3">讨论</div>
-
+                        <div class="one">
+                            <span v-for="item in typeList" :key="index">
+                                <span v-if="dataInfo.type == item.value" class="one">{{item.label}}</span> 
+                            </span>
+                        </div>
                         <p>{{ dataInfo.updated_at }}</p>
                     </div>
                 </div>
@@ -40,18 +43,23 @@
                 </div>
 
                 <div class="infoContent1" v-show="!dataInfo.content">
-                    <img src="../../public/topic/Document_empty.png" alt="">
+                    <img src="http://img.bjzxtw.org.cn/master/bjzxtw/public/topic/Document_empty.png" alt="">
                     <span>可以看看大家的互动哦~</span>
                 </div>
 
                 <!-- 详情页评论 -->
                 <div class="comment">
                     <h3>评论</h3>
+
+
                     <div class="commentList" v-for="item in replyList" v-show="page_total != 0">
                         <div class="left">
                             <img v-if='item.avatar' :src="item.avatar" alt="" >
-                            <img v-else src='../../public/topic/Rectangle.png' alt="">
-                            <span class="name">{{ item.nickname }} : </span>
+                            <img v-else src='http://img.bjzxtw.org.cn/master/bjzxtw/public/topic/Rectangle.png' alt="">
+                            <span class="name">{{ item.author }} : </span>
+                            
+                        </div>
+                        <div class="center">
                             <span class="context">{{ item.content }}</span>
                         </div>
                         <div class="right">
@@ -59,6 +67,9 @@
                             <!-- <span>回复</span> -->
                         </div>
                     </div>
+
+
+
                     <div class="comment_empty" v-show="page_total == 0">
                         <img src="../../public/topic/message_empty.png" alt="">
                         <span>暂无评论</span>
@@ -79,8 +90,8 @@
             </div>
         </div>
         <!-- 页面底部 -->
-        <!-- <HomeFoot></HomeFoot> -->
-        <AdvertisingFoot></AdvertisingFoot>
+        <HomeFoot1></HomeFoot1>
+
     </div>
 </template>
 
@@ -98,6 +109,7 @@ import { ElPagination, ElBadge, ElInput, ElMessage, ElMessageBox } from 'element
 const nuxtApp = useNuxtApp();
 const axios = nuxtApp.$axios;
 
+const { $webUrl, $CwebUrl, $BwebUrl } = useNuxtApp()
 //1.引用模块 end ---------------------------------------->
 
 // 定义响应式数据
@@ -172,11 +184,30 @@ const getTopicReply = () => {
 }
 
 
+//5.获取分类和状态 start ---------------------------------------->
+const listData = useState("listData", () => [])//商圈列表
+const typeList = useState("typeList", () => [])//商圈分类
+const topicType = () => {
+    axios.post('/chat/topicType').then(response => {
+        console.log(111222333)
+        console.log(response.data);
+        // console.log(1);
+        typeList.value = response.data;
+    })
+}
+
+const topicStatus = () => {
+    axios.post('chat/topicStatus').then(response => {
+        console.log(response);
+    })
+}
+
 
 onMounted(() => {
     getTopicInfo();   //商圈信息
     getTopicReply();  //回复商圈列表
-
+    topicType();
+    topicStatus();
 })
 
 //加入群聊
@@ -204,7 +235,8 @@ const joinGroup = () => {
                     type: 'success',
                 })
                 setTimeout(() => {
-                    window.open('http://admindev.bjzxtw.org.cn/#/hall', '_blank');
+                    window.open($BwebUrl + '/#/hall?userurl=' + $webUrl, '_blank');
+                    //window.open('http://admindev.bjzxtw.org.cn/#/hall', '_blank');
                 }, 1000)
             } else if (res.code == 200) {
                 ElMessage({
@@ -212,7 +244,8 @@ const joinGroup = () => {
                     type: 'success',
                 })
                 setTimeout(() => {
-                    window.open('http://admindev.bjzxtw.org.cn/#/hall', '_blank');
+                    window.open($BwebUrl + '/#/hall?userurl=' + $webUrl, '_blank');
+                    //window.open('http://admindev.bjzxtw.org.cn/#/hall', '_blank');
                 }, 1000)
             }
 
@@ -440,18 +473,24 @@ const addReply = () => {
             }
 
             .commentList {
-                height: 112px;
+                // height: 112px;
                 border: 1px solid #E1E1E1;
                 background-color: #fafafa;
                 margin-top: 20px;
                 padding: 30px 30px;
                 box-sizing: border-box;
+                display: flex;
+                align-items: flex-start;
+                justify-content: space-between;
 
                 .left {
-                    width:920px;
+                    width:400px;
+                    margin-right: 40px;
                     // overflow: hidden;
+                    display: flex;
+                    justify-content: space-between;
                     img {
-                        float: left;
+                        // float: left;
                         width: 52px;
                         height: 52px;
                         border-radius: 50%;
@@ -459,23 +498,34 @@ const addReply = () => {
                         margin-right: 15px;
                     }
                     span{
-                        float: left;
+                        // float: left;
                         height: 52px;
                         line-height: 22px;
                         padding-top: 10px;
                     }
 
                     .name {
-                        
+                        width: 100px;
                         font-family: Microsoft YaHei, Microsoft YaHei;
                         font-weight: 400;
                         font-size: 16px;
                         color: #333333;
                         margin-right: 30px;
+                        width: 100px;
+                        white-space: nowrap;
+                        overflow: hidden;
+                        text-overflow: ellipsis;
+                        display: block;
+
                     }
 
+                    
+                }
+
+                .center {
                     .context {
-                        width:760px;
+                        width: 700px;
+                        margin-right: 40px;
                         display: -webkit-box;
                         -webkit-box-orient: vertical;
                         -webkit-line-clamp: 2;
@@ -490,9 +540,9 @@ const addReply = () => {
                 }
 
                 .right {
-                    padding: 14px 0;
-
                     .time {
+                        display: block;
+                        width: 200px;
                         font-family: Microsoft YaHei, Microsoft YaHei;
                         font-weight: 400;
                         font-size: 16px;
@@ -534,14 +584,17 @@ const addReply = () => {
 
 //评论回复
 .message {
-    width: 100%;
+    width: 1200px;
+    margin: 0 auto;
+    padding: 0px 25px;
+    box-sizing: border-box;
     height: 145px;
     line-height: 145px;
     background-color: #ecf5ee;
 
     .inner {
         .messageInput {
-            width: 1049px;
+            width: 1000px;
             height: 67px;
             outline: none;
             border: 1px solid #E1E1E1;

+ 26 - 19
pages/topic/index.vue

@@ -1,7 +1,9 @@
 <template>
     <div>
         <!-- 页面头部 -->
-        <TopicHead></TopicHead>
+        <HomePageHead></HomePageHead>
+        <HomePageNavigation></HomePageNavigation>
+
         <div class="topicBox">
             <div class="inner">
                 <el-tabs v-model="activeName" class="demo-tabs" @tab-change="getTopicsList">
@@ -11,9 +13,9 @@
                             <div class="topicList">
                                 <div class="listHead">
                                     <div class="left">
-                                        <div class="one" v-if="item.type == 1">科研</div>
-                                        <div class="two" v-else-if="item.type == 2">维权</div>
-                                        <div class="three" v-else-if="item.type == 3">讨论</div>
+                                        <span v-for="i in typeList" :key="index">
+                                            <span v-if="item.type == i.value" class="one">{{i.label}}</span> 
+                                        </span>
                                     </div>
                                     <div class="right">{{ item.created_at }}</div>
                                 </div>
@@ -22,21 +24,21 @@
                                         <h2>{{ item.title }}</h2>
                                         <p>
                                             <img v-if='item.avatar' :src="item.avatar" alt="">
-                                            <img v-else src='../../public/topic/Rectangle.png' alt="">
-                                            <span> {{ item.nickname }}</span>
-                                            <img src="../../public/topic/Chat.png" alt="">
+                                            <img v-else src='http://img.bjzxtw.org.cn/master/bjzxtw/public/topic/Rectangle.png' alt="">
+                                            <span> {{ item.author }}</span>
+                                            <img src="http://img.bjzxtw.org.cn/master/bjzxtw/public/topic/Chat.png" alt="">
                                             <span> {{ item.num ? item.num : 0 }}</span>
                                         </p>
                                     </div>
                                     <div class="right" v-show="item.group_name">
-                                        <img src="../../public/topic/Chat1.png" alt="">
+                                        <img src="http://img.bjzxtw.org.cn/master/bjzxtw/public/topic/Chat1.png" alt="">
                                         <span>{{ item.group_name }}</span>
                                     </div>
                                 </div>
                             </div>
                         </NuxtLink>
                         <div class="adEmpty" v-show="!currentPage">
-                            <img src="../../public/topic/Blogs_empty.png" alt="">
+                            <img src="http://img.bjzxtw.org.cn/master/bjzxtw/public/topic/Blogs_empty.png" alt="">
                             <span>暂无商圈列表~</span>
                         </div>
                     </el-tab-pane>
@@ -46,9 +48,9 @@
                             <div class="topicList">
                                 <div class="listHead">
                                     <div class="left">
-                                        <div class="one" v-if="item.type == 1">科研</div>
-                                        <div class="two" v-else-if="item.type == 2">维权</div>
-                                        <div class="three" v-else-if="item.type == 3">讨论</div>
+                                        <span v-for="i in typeList" :key="index">
+                                            <span v-if="item.type == i.value" class="one">{{i.label}}</span> 
+                                        </span>
                                     </div>
                                     <div class="right">{{ item.created_at }}</div>
                                 </div>
@@ -57,21 +59,21 @@
                                         <h2>{{ item.title }}</h2>
                                         <p>
                                             <img :src="item.avatar" alt="">
-                                            <!-- <img v-else src='../../public/topic/Rectangle.png' alt=""> -->
-                                            <span> {{ item.nickname }}</span>
-                                            <img src="../../public/topic/Chat.png" alt="">
+                                            <!-- <img v-else src='../../static/topic/Rectangle.png' alt=""> -->
+                                            <span> {{ item.author }}</span>
+                                            <img src="http://img.bjzxtw.org.cn/master/bjzxtw/public/topic/Chat.png" alt="">
                                             <span> {{ item.num ? item.num : 0 }}</span>
                                         </p>
                                     </div>
                                     <div class="right" v-show="item.group_name">
-                                        <img src="../../public/topic/Chat1.png" alt="">
+                                        <img src="http://img.bjzxtw.org.cn/master/bjzxtw/public/topic/Chat1.png" alt="">
                                         <span>{{ item.group_name }}</span>
                                     </div>
                                 </div>
                             </div>
                         </NuxtLink>
                         <div class="adEmpty" v-show="!currentPage">
-                            <img src="../../public/topic/Blogs_empty.png" alt="">
+                            <img src="http://img.bjzxtw.org.cn/master/bjzxtw/public/topic/Blogs_empty.png" alt="">
                             <span>暂无商圈列表~</span>
                         </div>
                     </el-tab-pane>
@@ -85,7 +87,8 @@
             </div>
         </div>
         <!-- 页面底部 -->
-        <AdvertisingFoot></AdvertisingFoot>
+        <HomeFoot1></HomeFoot1>
+
     </div>
 </template>
 
@@ -149,6 +152,7 @@ const getTopicsList = () => {
     data.append('type', activeName.value)
 
     axios.post('chat/getTopicsList', data).then(response => {
+        console.log(8899)
         console.log("response", response);
         listData.value = response.data.data;
         currentPage.value = response.data.total;
@@ -180,7 +184,8 @@ onMounted(() => {
 //5.获取分类和状态 start ---------------------------------------->
 const topicType = () => {
     axios.post('/chat/topicType').then(response => {
-        // console.log(response.data);
+        console.log(111222333)
+        console.log(response.data);
         // console.log(1);
         typeList.value = response.data;
     })
@@ -293,6 +298,8 @@ onMounted(() => {
                 .one {
                     color: #FFAA33;
                     background-color: #fbebd5;
+                    display: block;
+                    padding: 5px 17px;
                 }
 
                 .two {

+ 8 - 8
plugins/globals.js

@@ -5,10 +5,10 @@ export default defineNuxtPlugin((nuxtApp) => {
   // nuxtApp.provide('BwebUrl', 'http://adminpre.bjzxtw.org.cn')
   // nuxtApp.provide('userUrl', 'http://localhost:3000')
   //乡村网
-  nuxtApp.provide('webUrl', 'http://apipre1.bjzxtw.org.cn:29501')
-  nuxtApp.provide('CwebUrl', 'http://pre.china-village.com.cn')
-  nuxtApp.provide('BwebUrl', 'http://adminpre.bjzxtw.org.cn')
-  nuxtApp.provide('userUrl', 'http://localhost:3000')
+  // nuxtApp.provide('webUrl', 'http://apipre1.bjzxtw.org.cn:29501')
+  // nuxtApp.provide('CwebUrl', 'http://pre.china-village.com.cn')
+  // nuxtApp.provide('BwebUrl', 'http://adminpre.bjzxtw.org.cn')
+  // nuxtApp.provide('userUrl', 'http://localhost:3000')
   //Dev环境
   // nuxtApp.provide('webUrl', 'http://apidev.bjzxtw.org.cn')
   // nuxtApp.provide('CwebUrl', 'http://nwdev.bjzxtw.org.cn')
@@ -16,8 +16,8 @@ export default defineNuxtPlugin((nuxtApp) => {
   // nuxtApp.provide('userUrl', 'http://localhost:3000')
   // 正式环境
   //正式环境
-  // nuxtApp.provide('webUrl', 'https://flzxw.bjzxtw.org.cn')
-  // nuxtApp.provide('CwebUrl', 'http://nw.china-village.com.cn')
-  // nuxtApp.provide('BwebUrl', 'https://admin.bjzxtw.org.cn')
-  // nuxtApp.provide('userUrl', 'http://localhost:3000')
+  nuxtApp.provide('webUrl', 'https://flzxw.bjzxtw.org.cn')
+  nuxtApp.provide('CwebUrl', 'http://nw.china-village.com.cn')
+  nuxtApp.provide('BwebUrl', 'https://admin.bjzxtw.org.cn')
+  nuxtApp.provide('userUrl', 'http://localhost:3001')
 })

+ 7 - 9
plugins/request.js

@@ -4,10 +4,10 @@ import { getToken } from '@/store/useCookieStore'
 
 export default defineNuxtPlugin(nuxtApp => {
     const service = axios.create({
-        // baseURL: 'http://183.131.25.186:9501' //测试服务器地址 
-        baseURL: 'http://admindev.bjzxtw.org.cn:9501' //测试服务器地址 
-        // baseURL: 'http://192.168.1.234:9501' //pre服务器地址
-        // baseURL: 'http://192.168.1.113:9501'  //冯蕊的服务器地址 
+        //baseURL: 'http://apidev.bjzxtw.org.cn' //测试服务器地址
+        // baseURL: 'http://apipre1.bjzxtw.org.cn:29501' //pre服务器地址
+        baseURL: 'https://flzxw.bjzxtw.org.cn' //正式环境服务器地址
+        // baseURL: 'http://192.168.1.117:9501'  //冯蕊的服务器地址
         // baseURL: 'http://192.168.1.201:9501'  //刘佳伟的服务器地址
     });
 
@@ -16,12 +16,11 @@ export default defineNuxtPlugin(nuxtApp => {
         // console.log("请求拦截器",config);
         // 从cookie中获取数据
         const token = getToken()
-        // const token = "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJwaHBlcjY2Ni9qd3QiLCJ1aWQiOjc5LCJ1c2VyX25hbWUiOiIxMzkzMDg5NjY0MyIsIm1vYmlsZSI6IjEzOTMwODk2NjQzIiwiZW1haWwiOiIiLCJsZXZlbF9pZCI6MCwidHlwZV9pZCI6MTAwMDAsImp3dF9zY2VuZSI6ImRlZmF1bHQiLCJqdGkiOiJkZWZhdWx0XzY3YjdkOWQzMzMwYjQ3LjUzNTM5NDUxIiwiaWF0IjoxNzQwMTAyMDk5LCJuYmYiOjE3NDAxMDIwOTksImV4cCI6MTc0MDE4ODQ5OX0.lTYD-x1hEOfcprnZmF4xm_VKuQIBo-W4Dq3uB6rQ6vM"
+        // const token = "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJwaHBlcjY2Ni9qd3QiLCJ1aWQiOjY0OCwidXNlcl9uYW1lIjoiMTM5MzA4OTg4ODgiLCJtb2JpbGUiOiIiLCJlbWFpbCI6IiIsImxldmVsX2lkIjowLCJ0eXBlX2lkIjoxMDAwMCwiand0X3NjZW5lIjoiZGVmYXVsdCIsImp0aSI6ImRlZmF1bHRfNjdmMzlmNWUzZjY2MjMuODM0ODQ2NTciLCJpYXQiOjE3NDQwMTkyOTQsIm5iZiI6MTc0NDAxOTI5NCwiZXhwIjoxNzQ0MTA1Njk0fQ.rzEcEy8hNn43P3bE3PTOS4nGeG_Zg1mmac40VNjx6mU"
         if (token) {
             config.headers.token = token;
         }
-        config.headers.Userurl = 'nwdev.bjzxtw.org.cn';
-
+        config.headers.userurl = "nw.china-village.com.cn";
         return config;
     }, error => {
         console.log(error)
@@ -46,8 +45,7 @@ export default defineNuxtPlugin(nuxtApp => {
     return {
         provide: {
             axios: service
-        },
-
+        }
     }
 });