diff --git a/view/mew/modules/logout/js/index.js b/view/mew/modules/logout/js/index.js index 1d14218..833f7ad 100644 --- a/view/mew/modules/logout/js/index.js +++ b/view/mew/modules/logout/js/index.js @@ -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) + // } + }) }) \ No newline at end of file