//发起请求获取数据后开启提示
wx.enableAlertBeforeUnload({
message: "当前测评未答完,确认退出?",
complete: (e) => {
console.log(e);
}
})
//
//页面离开时判断是否完成
onUnload() {
var that = this
if (that.submitState) {
wx.disableAlertBeforeUnload({
complete: (e) => {
console.log(e);
//这里返回disableAlertBeforeUnload:ok 但是还是有弹窗提示
}
})
}
},
0 个回复