浏览代码

提交代码

Jing 1 天之前
父节点
当前提交
55e4a708b7
共有 6 个文件被更改,包括 91 次插入78 次删除
  1. 二进制
      .output.zip
  2. 4 1
      components/home/pageHead.vue
  3. 46 51
      pages/topic/[id].vue
  4. 22 11
      pages/topic/index.vue
  5. 12 12
      plugins/globals.js
  6. 7 3
      plugins/request.js

二进制
.output.zip


+ 4 - 1
components/home/pageHead.vue

@@ -210,7 +210,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');
@@ -221,6 +221,9 @@ let goAdvertising = () => {
 
 //点击商圈
 let goTopic = () => {
+    //本地启动
+    // window.open('/topic', '_blank');
+    //线上启动
     if (getToken()) {
         window.open($CwebUrl + '/topic', '_blank');
     } else {

+ 46 - 51
pages/topic/[id].vue

@@ -2,7 +2,7 @@
     <div>
         <!-- 页面头部 -->
         <HomePageHead></HomePageHead>
-        <HomePageNavigation1></HomePageNavigation1>
+        <HomePageNavigation></HomePageNavigation>
 
         <!-- 商圈详情 -->
         <div class="topicInfoBox">
@@ -14,9 +14,10 @@
                         <div class="userInfo left">
                             <el-badge value="楼主" class="item" type="warning">
                                 <img v-if='dataInfo.avatar' :src="dataInfo.avatar" alt="">
-                                <img v-else src='http://img.bjzxtw.org.cn/master/bjzxtw/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.author }}</span>
+                            <span>{{ dataInfo.nickname }}</span>
                         </div>
                         <div class="headContent left">
                             <h2>{{ dataInfo.title }}</h2>
@@ -30,7 +31,7 @@
                     <div class="right">
                         <div class="one">
                             <span v-for="item in typeList" :key="index">
-                                <span v-if="dataInfo.type == item.value" class="one">{{item.label}}</span> 
+                                <span v-if="dataInfo.type == item.value" class="one">{{ item.label }}</span>
                             </span>
                         </div>
                         <p>{{ dataInfo.updated_at }}</p>
@@ -54,10 +55,10 @@
 
                     <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-if='item.avatar' :src="item.avatar" alt="">
                             <img v-else src='http://img.bjzxtw.org.cn/master/bjzxtw/public/topic/Rectangle.png' alt="">
-                            <span class="name">{{ item.author }} : </span>
-                            
+                            <span class="name">{{ item.nickname }} : </span>
+
                         </div>
                         <div class="center">
                             <span class="context">{{ item.content }}</span>
@@ -121,7 +122,7 @@ const seoData = ref({
 });
 
 // 在 onMounted 钩子中获取数据
-onMounted(()=>{
+onMounted(() => {
     seoData.value.title = '商圈';
     seoData.value.description = '默认描述';
     seoData.value.keywords = '默认关键词';
@@ -235,7 +236,8 @@ const joinGroup = () => {
                     type: 'success',
                 })
                 setTimeout(() => {
-                    window.open($BwebUrl + '/#/hall?userurl=' + $webUrl, '_blank');
+                    // window.open($BwebUrl + '/#/hall?userurl=' + $webUrl, '_blank');
+                    window.open($BwebUrl + '/#/businessDistrict?userurl=' + $webUrl, '_blank');
                     //window.open('http://admindev.bjzxtw.org.cn/#/hall', '_blank');
                 }, 1000)
             } else if (res.code == 200) {
@@ -244,7 +246,8 @@ const joinGroup = () => {
                     type: 'success',
                 })
                 setTimeout(() => {
-                    window.open($BwebUrl + '/#/hall?userurl=' + $webUrl, '_blank');
+                    // window.open($BwebUrl + '/#/hall?userurl=' + $webUrl, '_blank');
+                    window.open($BwebUrl + '/#/businessDistrict?userurl=' + $webUrl, '_blank');
                     //window.open('http://admindev.bjzxtw.org.cn/#/hall', '_blank');
                 }, 1000)
             }
@@ -281,7 +284,14 @@ const addReply = () => {
 }
 
 //3.获取商圈详情 end ---------------------------------------->
-
+//seo
+useSeoMeta({
+    title: "商圈" + "_" + "三农资讯网_全国政务信息一体化应用平台",
+    meta: [
+        { name: 'description', content: "三农资讯网以服务于党和国家各级职能部门三农政务资讯发布及政务公开信息公示为基点,为全国县级以上各级党政机关及其职能部门配置各自公开独立网络发布平台。主要频道有:三农政务资讯,农科资讯,农资购销,农产购销,农贸资讯,三农致富信息,农村文化生活,三农政策法规,三农之窗,三农调查,三农服务,三农知识,农民工,打假维权等。三农资讯网打造最具影响力的三农信息发布平台,并成为最具权威的三农资讯网。_三农资讯网-测试专用_全国政务信息一体化应用平台", tagPriority: 10 },
+        { name: 'keywords', content: "三农资讯,农业,三农,三农在线,农业新闻,三农资讯网_三农资讯网-测试专用_全国政务信息一体化应用平台", tagPriority: 10 }
+    ]
+});
 </script>
 
 <style lang="less" scoped>
@@ -415,22 +425,28 @@ const addReply = () => {
 
         // 有详情信息
         .infoContent {
-            width:1196px;
+            width: 1196px;
             overflow: hidden;
-            padding: 40px 46px;
+            padding: 30px 46px;
             font-family: Microsoft YaHei, Microsoft YaHei;
             font-size: 20px;
             line-height: 40px;
             box-sizing: border-box;
-            div{
-                word-wrap: break-word;       /* 强制长单词或 URL 换行 */
-                overflow-wrap: break-word;   /* 现代推荐用法,等同于 word-wrap */
-                white-space: pre-wrap;       /* 保留空白字符并允许自动换行 */
-                word-break: break-all;       /* 强制在任意字符处换行 */
+
+            div {
+                word-wrap: break-word;
+                /* 强制长单词或 URL 换行 */
+                overflow-wrap: break-word;
+                /* 现代推荐用法,等同于 word-wrap */
+                white-space: pre-wrap;
+                /* 保留空白字符并允许自动换行 */
+                word-break: break-all;
+                /* 强制在任意字符处换行 */
             }
         }
-        .leftBottom::v-deep p{
-            width:1200px;
+
+        .leftBottom::v-deep p {
+            width: 1200px;
             white-space: pre-wrap;
         }
 
@@ -473,7 +489,6 @@ const addReply = () => {
             }
 
             .commentList {
-                // height: 112px;
                 border: 1px solid #E1E1E1;
                 background-color: #fafafa;
                 margin-top: 20px;
@@ -484,34 +499,32 @@ const addReply = () => {
                 justify-content: space-between;
 
                 .left {
-                    width:400px;
-                    margin-right: 40px;
-                    // overflow: hidden;
+                    width: 400px;
+                    margin-right: 30px;
                     display: flex;
                     justify-content: space-between;
+
                     img {
-                        // float: left;
                         width: 52px;
                         height: 52px;
                         border-radius: 50%;
                         vertical-align: middle;
                         margin-right: 15px;
                     }
-                    span{
-                        // float: left;
+
+                    span {
                         height: 52px;
                         line-height: 22px;
                         padding-top: 10px;
                     }
 
                     .name {
-                        width: 100px;
+                        width: 120px;
                         font-family: Microsoft YaHei, Microsoft YaHei;
                         font-weight: 400;
                         font-size: 16px;
                         color: #333333;
-                        margin-right: 30px;
-                        width: 100px;
+                        margin-right: 15px;
                         white-space: nowrap;
                         overflow: hidden;
                         text-overflow: ellipsis;
@@ -519,7 +532,7 @@ const addReply = () => {
 
                     }
 
-                    
+
                 }
 
                 .center {
@@ -559,25 +572,7 @@ const addReply = () => {
                 }
             }
 
-            // .comment_empty {
-            //     height: 200px;
-            //     line-height: 200px;
-            //     text-align: center;
-
-            //     img {
-            //         width: 78px;
-            //         height: 78px;
-            //         vertical-align: -25px;
-            //         margin-right: 20px;
-            //     }
-
-            //     span {
-            //         font-family: Microsoft YaHei, Microsoft YaHei;
-            //         font-weight: bold;
-            //         font-size: 26px;
-            //         color: #CCCCCC;
-            //     }
-            // }
+
         }
     }
 }
@@ -585,7 +580,7 @@ const addReply = () => {
 //评论回复
 .message {
     width: 1200px;
-    margin: 0 auto;
+    margin: 0 auto 20px;
     padding: 0px 25px;
     box-sizing: border-box;
     height: 145px;

+ 22 - 11
pages/topic/index.vue

@@ -14,7 +14,7 @@
                                 <div class="listHead">
                                     <div class="left">
                                         <span v-for="i in typeList" :key="index">
-                                            <span v-if="item.type == i.value" class="one">{{i.label}}</span> 
+                                            <span v-if="item.type == i.value" class="one">{{ i.label }}</span>
                                         </span>
                                     </div>
                                     <div class="right">{{ item.created_at }}</div>
@@ -24,9 +24,12 @@
                                         <h2>{{ item.title }}</h2>
                                         <p>
                                             <img v-if='item.avatar' :src="item.avatar" 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="">
+                                            <img v-else
+                                                src='http://img.bjzxtw.org.cn/master/bjzxtw/public/topic/Rectangle.png'
+                                                alt="">
+                                            <span> {{ item.nickname }}</span>
+                                            <img src="http://img.bjzxtw.org.cn/master/bjzxtw/public/topic/Chat.png"
+                                                alt="">
                                             <span> {{ item.num ? item.num : 0 }}</span>
                                         </p>
                                     </div>
@@ -44,12 +47,12 @@
                     </el-tab-pane>
                     <el-tab-pane :label="item.label" :name="item.value" v-for="item in typeList">
                         <!-- 列表 -->
-                        <NuxtLink :to="`/topic/${item.id}`" target="_blank" v-for="item in listData">
+                        <NuxtLink :to="`/topic/${item.id}`" v-for="item in listData">
                             <div class="topicList">
                                 <div class="listHead">
                                     <div class="left">
                                         <span v-for="i in typeList" :key="index">
-                                            <span v-if="item.type == i.value" class="one">{{i.label}}</span> 
+                                            <span v-if="item.type == i.value" class="one">{{ i.label }}</span>
                                         </span>
                                     </div>
                                     <div class="right">{{ item.created_at }}</div>
@@ -60,8 +63,9 @@
                                         <p>
                                             <img :src="item.avatar" 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.nickname }}</span>
+                                            <img src="http://img.bjzxtw.org.cn/master/bjzxtw/public/topic/Chat.png"
+                                                alt="">
                                             <span> {{ item.num ? item.num : 0 }}</span>
                                         </p>
                                     </div>
@@ -80,7 +84,7 @@
                 </el-tabs>
 
                 <!-- 分页 -->
-                <div class="paginationBox"  v-show="currentPage">
+                <div class="paginationBox" v-show="currentPage">
                     <el-pagination background layout="prev, pager, next" :total="currentPage" prev-text="上一页"
                         next-text="下一页" @change="pageChage" />
                 </div>
@@ -116,7 +120,7 @@ const seoData = ref({
 });
 
 // 在 onMounted 钩子中获取数据
-onMounted(()=>{
+onMounted(() => {
     seoData.value.title = '商圈';
     seoData.value.description = '默认描述';
     seoData.value.keywords = '默认关键词';
@@ -206,7 +210,14 @@ onMounted(() => {
 
 //5.获取分类和状态 end ---------------------------------------->
 
-
+//seo
+useSeoMeta({
+    title: "商圈" + "_" + "三农资讯网_全国政务信息一体化应用平台",
+    meta: [
+        { name: 'description', content: "三农资讯网以服务于党和国家各级职能部门三农政务资讯发布及政务公开信息公示为基点,为全国县级以上各级党政机关及其职能部门配置各自公开独立网络发布平台。主要频道有:三农政务资讯,农科资讯,农资购销,农产购销,农贸资讯,三农致富信息,农村文化生活,三农政策法规,三农之窗,三农调查,三农服务,三农知识,农民工,打假维权等。三农资讯网打造最具影响力的三农信息发布平台,并成为最具权威的三农资讯网。_三农资讯网-测试专用_全国政务信息一体化应用平台", tagPriority: 10 },
+        { name: 'keywords', content: "三农资讯,农业,三农,三农在线,农业新闻,三农资讯网_三农资讯网-测试专用_全国政务信息一体化应用平台", tagPriority: 10 }
+    ]
+});
 </script>
 
 <style lang="less" scoped>

+ 12 - 12
plugins/globals.js

@@ -2,26 +2,26 @@ import categoryPlugin from './category'
 
 export default defineNuxtPlugin((nuxtApp) => {
   //乡村网pre环境
-  // 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('LoginWebUrl', 'http://adminpre.bjzxtw.org.cn/adminapi')
-  // nuxtApp.provide('userUrl', 'http://localhost:3000')
+  nuxtApp.provide('webUrl', 'https://apipre1.bjzxtw.org.cn')
+  nuxtApp.provide('CwebUrl', 'http://pre.china-village.com.cn')
+  nuxtApp.provide('BwebUrl', 'https://adminpre.bjzxtw.org.cn')
+  nuxtApp.provide('LoginWebUrl', 'https://adminpre.bjzxtw.org.cn/adminapi')
+  nuxtApp.provide('userUrl', 'http://localhost:3000') 
   //Dev环境
   // nuxtApp.provide('webUrl', 'http://apidev.bjzxtw.org.cn')
   // nuxtApp.provide('CwebUrl', 'http://nwdev.bjzxtw.org.cn')
   // nuxtApp.provide('BwebUrl', 'http://admindev.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('LoginWebUrl', 'http://admin.bjzxtw.org.cn/adminapi')
-  nuxtApp.provide('userUrl', 'http://localhost:3001')
+  // 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('LoginWebUrl', 'http://admin.bjzxtw.org.cn/adminapi')
+  // nuxtApp.provide('userUrl', 'http://localhost:3001')
 
   // 动态provide pageNav
-  const navName = 'navMaster' // 可根据需要切换为'navPre'
-  // const navName = 'navPre' // 可根据需要切换为'navPre'
+  // const navName = 'navMaster' // 可根据需要切换为'navPre'
+  const navName = 'navPre' // 可根据需要切换为'navPre'
   const navArr = categoryPlugin[navName] || []
   nuxtApp.provide('pageNav', navArr)
 })

+ 7 - 3
plugins/request.js

@@ -4,8 +4,12 @@ import { getToken } from '@/store/useCookieStore'
 
 export default defineNuxtPlugin(nuxtApp => {
     let Url = {
-        webUrl: nuxtApp.$webUrl, //pre接口地址
-        CwebUrl: nuxtApp.$CwebUrl //页面地址
+        //正式环境
+        // webUrl: 'https://flzxw.bjzxtw.org.cn', //接口地址
+        // CwebUrl: 'nw.china-village.com.cn' //页面地址
+        //pre环境
+        webUrl: 'https://apipre1.bjzxtw.org.cn', //pre接口地址
+        CwebUrl: 'pre.china-village.com.cn' //页面地址
     }
 
     const service = axios.create({
@@ -17,7 +21,7 @@ export default defineNuxtPlugin(nuxtApp => {
         // console.log("请求拦截器",config);
         // 从cookie中获取数据
         const token = getToken()
-        // const token = "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJwaHBlcjY2Ni9qd3QiLCJ1aWQiOjY0OCwidXNlcl9uYW1lIjoiMTM5MzA4OTg4ODgiLCJtb2JpbGUiOiIiLCJlbWFpbCI6IiIsImxldmVsX2lkIjowLCJ0eXBlX2lkIjoxMDAwMCwiand0X3NjZW5lIjoiZGVmYXVsdCIsImp0aSI6ImRlZmF1bHRfNjdmMzlmNWUzZjY2MjMuODM0ODQ2NTciLCJpYXQiOjE3NDQwMTkyOTQsIm5iZiI6MTc0NDAxOTI5NCwiZXhwIjoxNzQ0MTA1Njk0fQ.rzEcEy8hNn43P3bE3PTOS4nGeG_Zg1mmac40VNjx6mU"
+        // const token = "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJwaHBlcjY2Ni9qd3QiLCJ1aWQiOjc5LCJ1c2VyX25hbWUiOiIxMzkzMDg5NjY0MyIsIm1vYmlsZSI6IjEzOTMwODk2NjQzIiwiZW1haWwiOiIiLCJsZXZlbF9pZCI6MCwidHlwZV9pZCI6MTAwMDAsImp3dF9zY2VuZSI6ImRlZmF1bHQiLCJqdGkiOiJkZWZhdWx0XzY4ODMyMWJiMGViMGYzLjM1NDg5Njc3IiwiaWF0IjoxNzUzNDI0MzE1LCJuYmYiOjE3NTM0MjQzMTUsImV4cCI6MTc1MzUxMDcxNX0.wd1L0uYRZdM2usa3lxDIqNeRa36WeosvHxH5nU0WA0c"
         if (token) {
             config.headers.token = token;
         }