Răsfoiți Sursa

fix: 修复个人中心及tab问题

liangan 3 săptămâni în urmă
părinte
comite
fdf8c08c6f
4 a modificat fișierele cu 57 adăugiri și 30 ștergeri
  1. 27 27
      pages.config.ts
  2. 2 2
      src/layouts/fg-tabbar/tabbarList.ts
  3. 27 0
      src/pages.json
  4. 1 1
      src/pages/mine/myProfile.vue

+ 27 - 27
pages.config.ts

@@ -30,31 +30,31 @@ export default defineUniPages({
    *
    * 温馨提示:本文件的任何代码更改了之后,都需要重新运行,否则 pages.json 还是旧的,导致不是预期效果。
    */
-  // tabBar: {
-  //   color: '#999999',
-  //   selectedColor: '#e61b28',
-  //   backgroundColor: '#ffffff',
-  //   borderStyle: '#c1c1c1',
-  //   height: '50px',
-  //   fontSize: '10px',
-  //   iconWidth: '24px',
-  //   spacing: '3px',
-  //   list: [
-  //     {
-  //       iconPath: 'static/tabbar/home.png',
-  //       selectedIconPath: 'static/tabbar/homeHL.png',
-  //       pagePath: 'pages/index/index',
-  //     },
-  //     {
-  //       iconPath: 'static/tabbar/income.png',
-  //       selectedIconPath: 'static/tabbar/incomeHL.png',
-  //       pagePath: 'pages/income/income',
-  //     },
-  //     {
-  //       iconPath: 'static/tabbar/mine.png',
-  //       selectedIconPath: 'static/tabbar/mineHL.png',
-  //       pagePath: 'pages/mine/mine',
-  //     },
-  //   ],
-  // },
+  tabBar: {
+    color: '#999999',
+    selectedColor: '#e61b28',
+    backgroundColor: '#ffffff',
+    borderStyle: '#c1c1c1',
+    height: '50px',
+    fontSize: '10px',
+    iconWidth: '24px',
+    spacing: '3px',
+    list: [
+      {
+        iconPath: 'static/tabbar/home.png',
+        selectedIconPath: 'static/tabbar/homeHL.png',
+        pagePath: 'pages/index/index',
+      },
+      {
+        iconPath: 'static/tabbar/income.png',
+        selectedIconPath: 'static/tabbar/incomeHL.png',
+        pagePath: 'pages/income/income',
+      },
+      {
+        iconPath: 'static/tabbar/mine.png',
+        selectedIconPath: 'static/tabbar/mineHL.png',
+        pagePath: 'pages/mine/mine',
+      },
+    ],
+  },
 })

+ 2 - 2
src/layouts/fg-tabbar/tabbarList.ts

@@ -9,10 +9,10 @@
 
 // TODO:是否开启自定义tabbar,默认不开启
 // 不开启表示使用原生tabbar,开启表示使用自定义tabbar
-export const CUSTOM_TABBAR_ENABLE = true
+export const CUSTOM_TABBAR_ENABLE = false
 // TODO: 是否开启自定义tabbar的无缓存模式,默认不开启
 // 开启表示使用自定义tabbar的无缓存模式,并且需要把 `pages.config.ts` 里面的 tabBar 配置删除
-export const CUSTOM_TABBAR_NO_CACHE = true
+export const CUSTOM_TABBAR_NO_CACHE = false
 
 /**
  * 根据您选择的UI框架,配置相应的字段信息

+ 27 - 0
src/pages.json

@@ -17,6 +17,33 @@
       "^(?!z-paging-refresh|z-paging-load-more)z-paging(.*)": "z-paging/components/z-paging$1/z-paging$1.vue"
     }
   },
+  "tabBar": {
+    "color": "#999999",
+    "selectedColor": "#e61b28",
+    "backgroundColor": "#ffffff",
+    "borderStyle": "#c1c1c1",
+    "height": "50px",
+    "fontSize": "10px",
+    "iconWidth": "24px",
+    "spacing": "3px",
+    "list": [
+      {
+        "iconPath": "static/tabbar/home.png",
+        "selectedIconPath": "static/tabbar/homeHL.png",
+        "pagePath": "pages/index/index"
+      },
+      {
+        "iconPath": "static/tabbar/income.png",
+        "selectedIconPath": "static/tabbar/incomeHL.png",
+        "pagePath": "pages/income/income"
+      },
+      {
+        "iconPath": "static/tabbar/mine.png",
+        "selectedIconPath": "static/tabbar/mineHL.png",
+        "pagePath": "pages/mine/mine"
+      }
+    ]
+  },
   "pages": [
     {
       "path": "pages/index/index",

+ 1 - 1
src/pages/mine/myProfile.vue

@@ -77,7 +77,7 @@ async function updateAvatar() {
       throw new Error(uploadData.message)
     }
 
-    const avatarUrl = uploadData.data.url
+    const avatarUrl = uploadData.data
     // 调用更新用户信息接口
     await updateInfo({
       headPic: avatarUrl,