修复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
+9 -10
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 = () => {
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' })
}
})