修改跳转方法

This commit is contained in:
Dragon
2023-11-27 14:23:11 +08:00
parent 9738a953ba
commit 1bcf0c5d6e

View File

@@ -35,27 +35,32 @@ $(function(){
}
})
$('.next').click(() => {
showLoading()
networkRequest({
type: 'GET',
url: urlPrefix + '/user/cancel/check',
success(res) {
hideLoading(layerIndex)
if (res.code === 200) {
console.log(res.data);
if (res.data.length) {
window.location.href = './fail.html'
} else {
window.location.href = './confirm.html'
}
} else {
toastMsg(res.message)
}
},
error(err) {
hideLoading(layerIndex)
toastMsg('网络错误')
}
})
// if (browser.android) {
// showLoading()
// networkRequest({
// type: 'GET',
// url: urlPrefix + '/user/cancel/check',
// success (res) {
// hideLoading(layerIndex)
// if (res.code === 200) {
// console.log(res.data);
// if (res.data.length) {
// window.location.href = './fail.html'
// } else {
// window.location.href = './confirm.html'
// }
// } else {
// toastMsg(res.message)
// }
// },
// error (err) {
// hideLoading(layerIndex)
// toastMsg('网络错误')
// }
// })
// } else {
window.webkit.messageHandlers.cancelAccount.postMessage(null)
// }
})
})