修复tabber
This commit is contained in:
@@ -16,7 +16,7 @@ export const PAGE = {
|
|||||||
BODY_TEST_COMPARE: '/pages/memberInfo/bodyTestCompare',
|
BODY_TEST_COMPARE: '/pages/memberInfo/bodyTestCompare',
|
||||||
BODY_TEST_SETTINGS: '/pages/memberInfo/bodyTestSettings',
|
BODY_TEST_SETTINGS: '/pages/memberInfo/bodyTestSettings',
|
||||||
BODY_TEST_TREND: '/pages/memberInfo/bodyTestTrend',
|
BODY_TEST_TREND: '/pages/memberInfo/bodyTestTrend',
|
||||||
COURSE_LIST: '/pages/memberInfo/courseList',
|
COURSE_LIST: '/pages/groupCourse/list',
|
||||||
COURSE_DETAIL: '/pages/memberInfo/courseDetail',
|
COURSE_DETAIL: '/pages/memberInfo/courseDetail',
|
||||||
COUPON_DETAIL: '/pages/memberInfo/couponDetail',
|
COUPON_DETAIL: '/pages/memberInfo/couponDetail',
|
||||||
COUPON_CENTER: '/pages/memberInfo/couponCenter',
|
COUPON_CENTER: '/pages/memberInfo/couponCenter',
|
||||||
@@ -87,17 +87,16 @@ export function switchToTab(url) {
|
|||||||
if (getCurrentRoutePath() === path || tabNavigating) return
|
if (getCurrentRoutePath() === path || tabNavigating) return
|
||||||
|
|
||||||
tabNavigating = true
|
tabNavigating = true
|
||||||
const done = () => {
|
uni.reLaunch({
|
||||||
setTimeout(() => {
|
|
||||||
tabNavigating = false
|
|
||||||
}, 320)
|
|
||||||
}
|
|
||||||
|
|
||||||
uni.switchTab({
|
|
||||||
url: path,
|
url: path,
|
||||||
complete: done,
|
complete: () => {
|
||||||
|
setTimeout(() => {
|
||||||
|
tabNavigating = false
|
||||||
|
}, 320)
|
||||||
|
},
|
||||||
fail: (err) => {
|
fail: (err) => {
|
||||||
console.warn('[switchTab]', path, err)
|
console.error('[reLaunch]', path, err)
|
||||||
|
tabNavigating = false
|
||||||
uni.showToast({ title: '页面跳转失败', icon: 'none' })
|
uni.showToast({ title: '页面跳转失败', icon: 'none' })
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -50,7 +50,7 @@
|
|||||||
"quickapp" : {},
|
"quickapp" : {},
|
||||||
/* 小程序特有相关 */
|
/* 小程序特有相关 */
|
||||||
"mp-weixin" : {
|
"mp-weixin" : {
|
||||||
"appid" : "wx8f0d644d1d8985f6",
|
"appid" : "touristappid",
|
||||||
"setting" : {
|
"setting" : {
|
||||||
"urlCheck" : false
|
"urlCheck" : false
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -226,44 +226,5 @@
|
|||||||
"navigationBarBackgroundColor": "#F8F8F8",
|
"navigationBarBackgroundColor": "#F8F8F8",
|
||||||
"backgroundColor": "#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": {}
|
"uniIdRouter": {}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user