window.history.pushState(null, '', document.URL)
window.addEventListener('popstate', ()=>{
wx.miniProgram.redirectTo({
url:'/pages/result'
})
},)
window.addEventListener('beforeunload', ()=>{
wx.miniProgram.redirectTo({
url:'/pages/result'
})
},)
window.addEventListener('unload', ()=>{
wx.miniProgram.redirectTo({
url:'/pages/result'
})
},)
用户点击返回h5监听不到这三个事件
在微信的聊天窗口打开试试有问题吗?