修改跳转方法
This commit is contained in:
@@ -8,7 +8,7 @@ const showLoading = (content = '加载中...') => {
|
||||
type: 2,
|
||||
shadeClose: false,
|
||||
content,
|
||||
success(e) {
|
||||
success (e) {
|
||||
layerIndex = $(e).attr('index')
|
||||
}
|
||||
})
|
||||
@@ -24,7 +24,7 @@ const toastMsg = (content = '操作完成', time = 2) => {
|
||||
})
|
||||
}
|
||||
|
||||
$(function(){
|
||||
$(function () {
|
||||
getInfoFromClient()
|
||||
|
||||
$('.back').click(() => {
|
||||
@@ -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)
|
||||
// }
|
||||
|
||||
})
|
||||
})
|
Reference in New Issue
Block a user