// #ifdef MP-WEIXIN
wx.onAppRoute((res) => {
console.log('路由监听',res)
if (res.openType === 'switchTab') {
// #ifdef MP-WEIXIN
wx.hideTabBar()
// #endif
}
})
// #endif
小程序有一个API可以侦听全局路由跳转,
// #ifdef MP-WEIXIN
wx.onAppRoute((res) => {
console.log('路由监听',res)
if (res.openType === 'switchTab') {
// #ifdef MP-WEIXIN
wx.hideTabBar()
// #endif
}
})
// #endif
小程序有一个API可以侦听全局路由跳转,