Browse Source

修改首页乡村商城跳转问题

Jing 1 week ago
parent
commit
d6ae3fea82
6 changed files with 28 additions and 26 deletions
  1. 2 1
      pages/[dir]/[dir]/list-[id].vue
  2. 2 1
      pages/[dir]/list-[id].vue
  3. 8 8
      pages/index.vue
  4. 2 2
      plugins/category.ts
  5. 10 10
      plugins/globals.js
  6. 4 4
      plugins/request.js

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

@@ -15,7 +15,8 @@
                     <NuxtLink :to="`/${parent_pinyin}/index.html`"> {{ parent_name }}</NuxtLink>
                 </li>
                 <li class="titleList" v-for="(item, index) in secondNav" :key="index">
-                    <NuxtLink :to="{ path: `/${targetRoute}/${item.aLIas_pinyin}/list-1.html` }">
+                    <NuxtLink :href="getLinkPath(item)" :title="item.alias"
+                        :target="item.is_url == 1 ? '_blank' : '_self'">
                         <span class="nav2_title">{{ item.alias }}</span>
                     </NuxtLink>
                 </li>

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

@@ -15,7 +15,8 @@
                     <NuxtLink :to="`/${parent_pinyin}/index.html`"> {{ parent_name }}</NuxtLink>
                 </li>
                 <li class="titleList" v-for="(item, index) in secondNav" :key="index">
-                    <NuxtLink :to="{ path: `/${item.aLIas_pinyin}/list-1.html` }">
+                    <NuxtLink :href="getLinkPath(item)" :title="item.alias"
+                        :target="item.is_url == 1 ? '_blank' : '_self'">
                         <span class="nav2_title">{{ item.alias }}</span>
                     </NuxtLink>
                 </li>

+ 8 - 8
pages/index.vue

@@ -982,8 +982,8 @@
                         <ul class="part6_left_content111">
                             <li class="part6_left_content_list">
                                 <span class="jiantou">></span>
-                                <NuxtLink href="/" v-for="(item, index) in boxData21menu1" :key="index"
-                                    :title="item.alias">
+                                <NuxtLink :href="`/xiangcunshangcheng/${item.aLIas_pinyin}/index.html`"
+                                    v-for="(item, index) in boxData21menu1" :key="index" :title="item.alias">
                                     <span class="fenlei">
                                         {{ item.alias }}
                                     </span>
@@ -991,8 +991,8 @@
                             </li>
                             <li class="part6_left_content_list">
                                 <span class="jiantou">></span>
-                                <NuxtLink href="/" v-for="(item, index) in boxData21menu2" :key="index"
-                                    :title="item.alias">
+                                <NuxtLink :href="`/xiangcunshangcheng/${item.aLIas_pinyin}/index.html`"
+                                    v-for="(item, index) in boxData21menu2" :key="index" :title="item.alias">
                                     <span class="fenlei">
                                         {{ item.alias }}
                                     </span>
@@ -1000,8 +1000,8 @@
                             </li>
                             <li class="part6_left_content_list">
                                 <span class="jiantou">></span>
-                                <NuxtLink href="/" v-for="(item, index) in boxData21menu3" :key="index"
-                                    :title="item.alias">
+                                <NuxtLink :href="`/xiangcunshangcheng/${item.aLIas_pinyin}/index.html`"
+                                    v-for="(item, index) in boxData21menu3" :key="index" :title="item.alias">
                                     <span class="fenlei">
                                         {{ item.alias }}
                                     </span>
@@ -1009,8 +1009,8 @@
                             </li>
                             <li class="part6_left_content_list">
                                 <span class="jiantou">></span>
-                                <NuxtLink href="/" v-for="(item, index) in boxData21menu4" :key="index"
-                                    :title="item.alias">
+                                <NuxtLink :href="`/xiangcunshangcheng/${item.aLIas_pinyin}/index.html`"
+                                    v-for="(item, index) in boxData21menu4" :key="index" :title="item.alias">
                                     <span class="fenlei">
                                         {{ item.alias }}
                                     </span>

+ 2 - 2
plugins/category.ts

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

+ 10 - 10
plugins/globals.js

@@ -1,19 +1,19 @@
 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', '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')
   //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')
 })

+ 4 - 4
plugins/request.js

@@ -5,11 +5,11 @@ import { getToken } from '@/store/useCookieStore'
 export default defineNuxtPlugin(nuxtApp => {
     let Url = {
         //正式环境
-        webUrl: 'https://flzxw.bjzxtw.org.cn', //接口地址
-        CwebUrl: 'nw.china-village.com.cn' //页面地址
+        // webUrl: 'https://flzxw.bjzxtw.org.cn', //接口地址
+        // CwebUrl: 'nw.china-village.com.cn' //页面地址
         //pre环境
-        // webUrl: 'http://apipre1.bjzxtw.org.cn:29501', //pre接口地址
-        // CwebUrl: 'pre.china-village.com.cn' //页面地址
+        webUrl: 'http://apipre1.bjzxtw.org.cn:29501', //pre接口地址
+        CwebUrl: 'pre.china-village.com.cn' //页面地址
     }
 
     const service = axios.create({