微信小程序监听页面跳转 2023-03-12 微信小程序 微信小程序 评论 在微信小程序中可以在 app.js -> onShow 生命周期函数监听页面跳转 1234567891011App({ // 页码显示 onShow() { // 监听页面跳转 wx.onAppRoute(res => { if (res.path !== 'pages/user/login/index') { console.log(123); } }) },}) 传送门:wx.onAppRoute