微信小程序是否可以实现从A页面跳转到B页面时,当用户返回上一页的时候,加一确认弹窗,提示用户是否保存并退出,然后根据用户的选择来判断是否返回上一页
微信小程序返回上一个页面时是否可以加提示框,然后根据用户的选择判断是返回还是留在当前页面?Is it possible to add a prompt box when the WeChat Mini Program returns to the previous page, and then determine whether to return or stay on the current page according to the user's choice?
微信小程序返回上一个页面时是否可以加提示框,然后根据用户的选择判断是返回还是留在当前页面?微信小程序是否可以实现从A页面跳转到B页面时,当用户返回上一页的时候,加一确认弹窗,提示用户是否保存并退出,然后根据用户的选择来判断是否返回上一页
When the wechat applet can jump from page a to page B, when the user returns to the previous page, a confirmation pop-up will be added to prompt the user whether to save and exit, and then judge whether to return to the previous page according to the user's choice
回答:
onUnload,页面卸载,看看能不能用上
wx.showModal({ title: '提示', content: '是否需要保存', success (res) { if (res.confirm) { console.log('用户点击确定') } else if (res.cancel) { console.log('用户点击取消') } }})
参考文档https://developers.weixin.qq.com/miniprogram/dev/api/ui/interaction/wx.showModal.html
借楼,我想问下定时群发有些时间是灰的不能选为什么?