diff --git a/xuan-deduct-uniapp/src/components/custom-tabbar/custom-tabbar.vue b/xuan-deduct-uniapp/src/components/custom-tabbar/custom-tabbar.vue index 963b040..001a4fe 100644 --- a/xuan-deduct-uniapp/src/components/custom-tabbar/custom-tabbar.vue +++ b/xuan-deduct-uniapp/src/components/custom-tabbar/custom-tabbar.vue @@ -65,7 +65,13 @@ export default { this.currentIndex = index const path = this.tabList[index].pagePath uni.switchTab({ - url: path + url: path, + fail: (err) => { + console.log('switchTab fail:', err) + uni.redirectTo({ + url: path + }) + } }) } }