修复tabber

This commit is contained in:
时舟年
2026-06-04 16:47:31 +08:00
committed by liwentao
parent c658aacf0a
commit 2a6409daa9
3 changed files with 10 additions and 50 deletions
+7 -8
View File
@@ -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 = () => {
uni.reLaunch({
url: path,
complete: () => {
setTimeout(() => {
tabNavigating = false
}, 320)
}
uni.switchTab({
url: path,
complete: done,
},
fail: (err) => {
console.warn('[switchTab]', path, err)
console.error('[reLaunch]', path, err)
tabNavigating = false
uni.showToast({ title: '页面跳转失败', icon: 'none' })
}
})
+1 -1
View File
@@ -50,7 +50,7 @@
"quickapp" : {},
/* */
"mp-weixin" : {
"appid" : "wx8f0d644d1d8985f6",
"appid" : "touristappid",
"setting" : {
"urlCheck" : false
},
-39
View File
@@ -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": {}
}