diff --git a/App.vue b/App.vue index a001e45..caa39d9 100644 --- a/App.vue +++ b/App.vue @@ -182,10 +182,11 @@ // socket() }); onLaunch(() => { - // 隐藏原生导航栏 使用自定义底部导航 - // uni.hideTabBar({ - // fail: () => {}, - // }); + try { + uni.hideTabBar({ + fail: () => {}, + }); + } catch (e) {} // globalData.value.statusBarHeight = uni.getSystemInfoSync()?.statusBarHeight; // globalData.value.windowHeight = uni.getSystemInfoSync()?.windowHeight; // 获取微信胶囊的位置信息 width,height,top,right,left,bottom @@ -208,6 +209,11 @@ }); onShow(() => { + try { + uni.hideTabBar({ + fail: () => {}, + }); + } catch (e) {} // #ifdef APP-PLUS // 获取urlSchemes参数 const args = diff --git a/components/card_navbar/card_navbar.vue b/components/card_navbar/card_navbar.vue index c6525fa..55266e5 100644 --- a/components/card_navbar/card_navbar.vue +++ b/components/card_navbar/card_navbar.vue @@ -1,5 +1,5 @@ - \ No newline at end of file + diff --git a/uni_modules/uni-list/components/uni-list-item/uni-list-item.vue b/uni_modules/uni-list/components/uni-list-item/uni-list-item.vue index fa2ab6f..8a65384 100644 --- a/uni_modules/uni-list/components/uni-list-item/uni-list-item.vue +++ b/uni_modules/uni-list/components/uni-list-item/uni-list-item.vue @@ -271,7 +271,11 @@ export default { uni.reLaunch(callback); break; case 'switchTab': - uni.switchTab(callback); + uni.switchTab(Object.assign({}, callback, { + fail: () => { + uni.reLaunch(callback); + } + })); break; default: uni.navigateTo(callback);