From fc5f094f8cb872cd81e8d81bd961c6df7a5d2b55 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=97=B6=E8=88=9F=E5=B9=B4?= <3147056268@qq.com> Date: Thu, 4 Jun 2026 16:47:31 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dtabber?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- gym-manage-uniapp/common/constants/routes.js | 19 +++++----- gym-manage-uniapp/manifest.json | 2 +- gym-manage-uniapp/pages.json | 39 -------------------- 3 files changed, 10 insertions(+), 50 deletions(-) diff --git a/gym-manage-uniapp/common/constants/routes.js b/gym-manage-uniapp/common/constants/routes.js index 7320f12..dada154 100644 --- a/gym-manage-uniapp/common/constants/routes.js +++ b/gym-manage-uniapp/common/constants/routes.js @@ -16,7 +16,7 @@ export const PAGE = { BODY_TEST_COMPARE: '/pages/memberInfo/bodyTestCompare', BODY_TEST_SETTINGS: '/pages/memberInfo/bodyTestSettings', BODY_TEST_TREND: '/pages/memberInfo/bodyTestTrend', - COURSE_LIST: '/pages/memberInfo/courseList', + COURSE_LIST: '/pages/groupCourse/list', COURSE_DETAIL: '/pages/memberInfo/courseDetail', COUPON_DETAIL: '/pages/memberInfo/couponDetail', COUPON_CENTER: '/pages/memberInfo/couponCenter', @@ -87,17 +87,16 @@ export function switchToTab(url) { if (getCurrentRoutePath() === path || tabNavigating) return tabNavigating = true - const done = () => { - setTimeout(() => { - tabNavigating = false - }, 320) - } - - uni.switchTab({ + uni.reLaunch({ url: path, - complete: done, + complete: () => { + setTimeout(() => { + tabNavigating = false + }, 320) + }, fail: (err) => { - console.warn('[switchTab]', path, err) + console.error('[reLaunch]', path, err) + tabNavigating = false uni.showToast({ title: '页面跳转失败', icon: 'none' }) } }) diff --git a/gym-manage-uniapp/manifest.json b/gym-manage-uniapp/manifest.json index f6e57db..33287b1 100644 --- a/gym-manage-uniapp/manifest.json +++ b/gym-manage-uniapp/manifest.json @@ -50,7 +50,7 @@ "quickapp" : {}, /* 小程序特有相关 */ "mp-weixin" : { - "appid" : "wx8f0d644d1d8985f6", + "appid" : "touristappid", "setting" : { "urlCheck" : false }, diff --git a/gym-manage-uniapp/pages.json b/gym-manage-uniapp/pages.json index 12c78c1..5c75061 100644 --- a/gym-manage-uniapp/pages.json +++ b/gym-manage-uniapp/pages.json @@ -226,44 +226,5 @@ "navigationBarBackgroundColor": "#F8F8F8", "backgroundColor": "#F8F8F8" }, - "tabBar": { - "custom": true, - "color": "#94a3b8", - "selectedColor": "#f97316", - "backgroundColor": "#1A4A6F", - "borderStyle": "white", - "list": [ - { - "pagePath": "pages/index/index", - "text": "首页", - "iconPath": "static/images/home.png", - "selectedIconPath": "static/images/home.png" - }, - { - "pagePath": "pages/course/index", - "text": "课程", - "iconPath": "static/images/bookmark.png", - "selectedIconPath": "static/images/bookmark.png" - }, - { - "pagePath": "pages/train/index", - "text": "训练", - "iconPath": "static/images/dumbbell.png", - "selectedIconPath": "static/images/dumbbell.png" - }, - { - "pagePath": "pages/discover/index", - "text": "发现", - "iconPath": "static/images/activity.png", - "selectedIconPath": "static/images/activity.png" - }, - { - "pagePath": "pages/memberInfo/memberInfo", - "text": "我的", - "iconPath": "static/images/user.png", - "selectedIconPath": "static/images/user.png" - } - ] - }, "uniIdRouter": {} }