diff --git a/src/platforms/h5/components/app/tabBar.vue b/src/platforms/h5/components/app/tabBar.vue index 5432af2ea9011a90b3e3f32e24adb9ae724c5790..c18fbf59b3052f0c498c07101bcffe366708511f 100644 --- a/src/platforms/h5/components/app/tabBar.vue +++ b/src/platforms/h5/components/app/tabBar.vue @@ -219,18 +219,17 @@ export default { let url = '/' + pagePath if (url === __uniRoutes[0].alias) { url = '/' - } + } + UniServiceJSBridge.emit('onTabItemTap', { + index, + text, + pagePath + }) if (this.$route.path !== url) { this.__path__ = this.$route.path uni.switchTab({ url }) - } else { - UniServiceJSBridge.emit('onTabItemTap', { - index, - text, - pagePath - }) } } }