diff --git a/view/peko/modules/h5Income/chainBank.html b/view/peko/modules/h5Income/chainBank.html index 3d935fd..9759acb 100644 --- a/view/peko/modules/h5Income/chainBank.html +++ b/view/peko/modules/h5Income/chainBank.html @@ -101,4 +101,4 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/view/peko/modules/h5Income/js/chainBank.js b/view/peko/modules/h5Income/js/chainBank.js index 5a209dd..44fefb1 100644 --- a/view/peko/modules/h5Income/js/chainBank.js +++ b/view/peko/modules/h5Income/js/chainBank.js @@ -27,7 +27,7 @@ const toastMsg = (content = '操作完成', time = 2) => { skin: 'msg' }) } - +var photoBool = false; $(function () { setTimeout(function () { getInfoFromClient() @@ -35,6 +35,20 @@ $(function () { $('.back').hide(); } setTimeout(function () { + var info = JSON.parse(url.userInfo); + if (info) { + console.log(info); + $('.box1 div .name').val(info.name); + $('.box1 div .card').val(info.idCardNo); + $('.box2 div .bankCard').val(info.accountNo); + $('.box2 div .phone').val(info.contact); + $('.box2 div .alipay').val(info.thirdAccountNo); + $('.box2 div .address').val(info.address); + $('.box3 .idBox .z .documents').attr('src', info.frontPhoto) + $('.box3 .idBox .f .documents').attr('src', info.backPhoto) + $('.but').addClass('active') + photoBool = true; + } }, 100) }) }) @@ -101,16 +115,16 @@ function getUploadToken (type) { }) } // 确认绑定按钮 -$('.but').click(function () { - if (listenFun()) { - var filesList = document.querySelector('#frontImageUpload').files; - var backImageUpload = document.querySelector('#backImageUpload').files; - if (filesList.length == 0 || backImageUpload.length == 0) { - toastMsg('請上傳身份證照片') - return; - } - } -}) +// $('.but').click(function () { +// if (listenFun()) { +// var filesList = document.querySelector('#frontImageUpload').files; +// var backImageUpload = document.querySelector('#backImageUpload').files; +// if (filesList.length == 0 || backImageUpload.length == 0) { +// toastMsg('請上傳身份證照片') +// return; +// } +// } +// }) //监听是否完善信息 function listenFun () { var num1 = $(".box1 div .name").val(); @@ -133,19 +147,34 @@ $(".box1 div .name,.box1 div .card,.box2 div .bankCard,.box2 div .phone,.box2 di // // 保存绑定 function withdrawUserAccount (name, idCardNo, accountNo, contact, thirdAccountNo, address, frontPhoto, backPhoto) { - var obj = { - id: url.modifyId == undefined ? null : url.modifyId, - uid: pubInfo.uid, - accountType: url.accountType, - name, - idCardNo, - accountNo, - contact, - thirdAccountNo, - address, - frontPhoto, - backPhoto, - }; + if (url.modifyId == undefined) { + var obj = { + uid: pubInfo.uid, + accountType: url.accountType, + name, + idCardNo, + accountNo, + contact, + thirdAccountNo, + address, + frontPhoto, + backPhoto, + }; + } else { + var obj = { + id: url.modifyId, + uid: pubInfo.uid, + accountType: url.accountType, + name, + idCardNo, + accountNo, + contact, + thirdAccountNo, + address, + frontPhoto, + backPhoto, + }; + } showLoading() networkRequest({ type: 'POST', @@ -175,11 +204,13 @@ $('.but').click(function () { var frontImageUpload = document.querySelector('#frontImageUpload').files; var backImageUpload = document.querySelector('#backImageUpload').files; if (listenFun()) { - if (frontImageUpload.length == 0 || backImageUpload.length == 0) { + if (photoBool) { + $('.mainlandInfo').show(); + return; + } else if (frontImageUpload.length == 0 || backImageUpload.length == 0) { toastMsg('請上傳身份證'); return; } - $('.mainlandInfo').show(); } }) diff --git a/view/peko/modules/h5Income/js/withdrawal.js b/view/peko/modules/h5Income/js/withdrawal.js index c7929a1..635196a 100644 --- a/view/peko/modules/h5Income/js/withdrawal.js +++ b/view/peko/modules/h5Income/js/withdrawal.js @@ -33,6 +33,7 @@ var weekLimitCount;//本周剩余次数 var weekMaxValue;//本周剩余最大金额 var realName = false;//默认大陆未实名 var modifyId = null; +var userInfo = {}//账户信息暂存 $(function () { setTimeout(function () { getInfoFromClient() @@ -46,6 +47,7 @@ $(function () { }) // 提領配置接口接口 function getConfig () { + $('.withdrawal p').remove(); showLoading() networkRequest({ type: 'GET', @@ -132,6 +134,8 @@ function getUser () { }) } // 提領賬戶管理接口 +var isPrevBool = false; +var updateNums = 0; function getAccounts () { showLoading() networkRequest({ @@ -143,28 +147,40 @@ function getAccounts () { var str = ''; res.data.forEach((res) => { str += ` -