ページ ルーティングの変更を監視するための WeChat アプレットの API

// #ifdef MP-WEIXIN
			wx.onAppRoute((res) => {
			     console.log('路由监听',res)   
				if (res.openType === 'switchTab') {
					// #ifdef MP-WEIXIN
					wx.hideTabBar()
					// #endif
				}
			})
			// #endif

アプレットには、グローバル ルート ジャンプをリッスンできる API があります。

おすすめ

転載: blog.csdn.net/cwb_2120/article/details/132919920