소스 검색

修改bug

Jing 3 주 전
부모
커밋
6809f42fa0
3개의 변경된 파일18개의 추가작업 그리고 11개의 파일을 삭제
  1. 2 0
      composables/publicFunction.ts
  2. 11 6
      pages/[dir]/index.html.vue
  3. 5 5
      plugins/globals.js

+ 2 - 0
composables/publicFunction.ts

@@ -48,6 +48,8 @@ const getTitleLength = function (title: string, length: number) {
 //3.格式化跳转路径 start ---------------------------------------->
 //3.1跳转到频道页面或者一级列表页
 const getLinkPath = (item: any) => {
+  console.log("111111111item", item);
+  
   if (item.is_url == 1) {
     return `${item.web_url}`;
   } else if (item.children_count == 0) {

+ 11 - 6
pages/[dir]/index.html.vue

@@ -532,6 +532,7 @@ try {
             'num': 8
         },
     });
+    console.log('1111111111111二级导航',navigateData)
     if (navigateData.code == 200) {
         // 遍历可用的导航池放到页面中
         for (let index in navigateData.data) {
@@ -541,6 +542,8 @@ try {
                 children_count: navigateData.data[index].children_count,
                 alias: navigateData.data[index].alias,
                 aLIas_pinyin: targetSegment + "/" + navigateData.data[index].aLIas_pinyin,
+                is_url: navigateData.data[index].is_url,
+                web_url: navigateData.data[index].web_url,
                 data: [],
                 data1: [],
                 data2: [],
@@ -555,12 +558,14 @@ try {
                 title3: "",
                 title4: ""
             };
-            if (navigateData.data[index].is_url == 1) {
-                // 处理 URL 的逻辑
-            } else {
-                //每个页面最多8个模块
-                pageData.value.push(data);
-            }
+            pageData.value.push(data);
+
+            // if (navigateData.data[index].is_url == 1) {
+            //     // 处理 URL 的逻辑
+            // } else {
+            //     //每个页面最多8个模块
+            //     pageData.value.push(data);
+            // }
         }
         //导航池加载完毕,开始申请模块数据
         // await getPageData1();

+ 5 - 5
plugins/globals.js

@@ -1,10 +1,10 @@
 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')