// #ifdef MP-WEIXIN
wx.onAppRoute((res) => {
console.log('路由监听',res)
if (res.openType === 'switchTab') {
// #ifdef MP-WEIXIN
wx.hideTabBar()
// #endif
}
})
// #endif
The applet has an API that can listen for global route jumps.