修改bug
This commit is contained in:
@@ -101,4 +101,4 @@
|
||||
<script src="../../common/js/route-constant.js"></script>
|
||||
<script src="../../common/js/svga.min.js"></script>
|
||||
<script src="./js/qiniu.min.js"></script>
|
||||
<script src="./js/chainBank.js?v=1.2"></script>
|
||||
<script src="./js/chainBank.js?v=1.5"></script>
|
@@ -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();
|
||||
}
|
||||
})
|
||||
|
@@ -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 += `
|
||||
<li id=${res.id} accountTypesText=${res.accountName} accountType=${res.accountType} isBind=${res.isBind}>${res.accountName}${res.isBind == 0 ? "(未綁定)" : ''}<i>${res.accountType == 2 ? '修改 >' : ''}</i></li>
|
||||
<li backPhoto=${res.backPhoto} frontPhoto=${res.frontPhoto} address=${res.address} thirdAccountNo=${res.thirdAccountNo} contact=${res.contact} accountNo=${res.accountNo} idCardNo=${res.idCardNo} name=${res.name} id=${res.id} accountTypesText=${res.accountName} accountType=${res.accountType} isBind=${res.isBind}>${res.accountName}${res.isBind == 0 ? "(未綁定)" : ''}<i>${res.accountType == 2 ? '修改 >' : ''}</i></li>
|
||||
`
|
||||
|
||||
// if (res.isPrev == 1) {
|
||||
// isPrevBool = true;
|
||||
// accountType = res.accountType
|
||||
// $('.account span').text(res.accountName);
|
||||
// $('.account span').addClass('active');
|
||||
// } else {
|
||||
// if (res.isBind == 1 && isPrevBool == false) {
|
||||
// accountType = res.accountType
|
||||
// $('.account span').text(res.accountName);
|
||||
// $('.account span').addClass('active');
|
||||
// }
|
||||
// }
|
||||
// if (res.isPrev == 1) {
|
||||
// isPrevBool = true;
|
||||
// accountType = res.accountType
|
||||
// $('.account span').text(res.accountName);
|
||||
// $('.account span').addClass('active');
|
||||
// }
|
||||
if (res.isPrev == 1) {
|
||||
isPrevBool = true;
|
||||
accountType = res.accountType
|
||||
$('.account span').text(res.accountName);
|
||||
$('.account span').addClass('active');
|
||||
} else {
|
||||
if (res.isBind == 1) {
|
||||
accountType = res.accountType
|
||||
$('.account span').text(res.accountName);
|
||||
$('.account span').addClass('active');
|
||||
}
|
||||
}
|
||||
if (accountType == 2) {
|
||||
$('.authentication').show();
|
||||
// 判断是否展示修改
|
||||
if (res.updateNum >= 1) {
|
||||
$('.mainlandInfo .mainlandInfo_in p span').text(res.updateNum + '次');
|
||||
$('.accountPub .accountPub_in ul li i').show();
|
||||
} else {
|
||||
$('.accountPub .accountPub_in ul li i').hide();
|
||||
}
|
||||
if (res.isBind == 1 && isPrevBool == false) {
|
||||
accountType = res.accountType
|
||||
$('.account span').text(res.accountName);
|
||||
$('.account span').addClass('active');
|
||||
}
|
||||
if (res.accountType == 2) {
|
||||
updateNums = res.updateNum;
|
||||
// 判断是否认证
|
||||
if (res.isRealCertify == 0) {
|
||||
$('.withdrawal input').attr('placeholder', '請先進行實名認證');
|
||||
@@ -175,14 +191,33 @@ function getAccounts () {
|
||||
$('.withdrawal input').attr('placeholder', '請先選擇提領賬戶');
|
||||
$('.authentication span').text('已實名');
|
||||
}
|
||||
}
|
||||
if (accountType == 2) {
|
||||
$('.authentication').show();
|
||||
} else {
|
||||
$('.authentication').hide();
|
||||
}
|
||||
});
|
||||
$('.accountPub .accountPub_in ul').append(str);
|
||||
// 判断是否展示修改
|
||||
if (updateNums >= 1) {
|
||||
$('.mainlandInfo .mainlandInfo_in p span').text(updateNums + '次');
|
||||
$('.accountPub .accountPub_in ul li i').show();
|
||||
} else {
|
||||
console.log('次数');
|
||||
$('.accountPub .accountPub_in ul li i').hide();
|
||||
}
|
||||
// 修改大陆银行卡按钮
|
||||
$('.accountPub .accountPub_in ul li i').click(function () {
|
||||
modifyId = $(this).parents('li').attr('id');
|
||||
userInfo.name = $(this).parents('li').attr('name');
|
||||
userInfo.idCardNo = $(this).parents('li').attr('idCardNo');
|
||||
userInfo.accountNo = $(this).parents('li').attr('accountNo');
|
||||
userInfo.contact = $(this).parents('li').attr('contact');
|
||||
userInfo.thirdAccountNo = $(this).parents('li').attr('thirdAccountNo');
|
||||
userInfo.address = $(this).parents('li').attr('address');
|
||||
userInfo.frontPhoto = $(this).parents('li').attr('frontPhoto');
|
||||
userInfo.backPhoto = $(this).parents('li').attr('backPhoto');
|
||||
$('.mainlandInfo').show();
|
||||
return false;
|
||||
})
|
||||
@@ -300,7 +335,7 @@ function calculate () {
|
||||
if (res.code === 200) {
|
||||
$('.withdrawal .numBox b').addClass('active');
|
||||
$('.withdrawal input').val(num);
|
||||
$('.withdrawal .numBox b').text(`${res.data.currency} ${res.data.currencyAmount}`);
|
||||
$('.withdrawal .numBox b').text(`${res.data.currency == undefined ? '' : res.data.currency} ${res.data.currencyAmount}`);
|
||||
$('.goldPub').hide();
|
||||
$('.goldPub .goldPub_in input').val('');
|
||||
$('.butBig').addClass('butBigActive');
|
||||
@@ -412,7 +447,7 @@ $('.income .rule').click(function () {
|
||||
})
|
||||
// 确认修改大陆信息按钮
|
||||
$('.mainlandInfo .mainlandInfo_in .ok').click(function () {
|
||||
window.location.href = `./chainBank.html?accountType=${2}&modifyId=${modifyId}`;
|
||||
window.location.href = `./chainBank.html?accountType=${2}&modifyId=${modifyId}&userInfo=${JSON.stringify(userInfo)}`;
|
||||
})
|
||||
// 取消修改大陆信息按钮
|
||||
$('.mainlandInfo .mainlandInfo_in .close').click(function () {
|
||||
|
@@ -126,4 +126,4 @@
|
||||
<script src="../../common/js/vconsole.min.js"></script>
|
||||
<script src="../../common/js/route-constant.js"></script>
|
||||
<script src="../../common/js/svga.min.js"></script>
|
||||
<script src="./js/withdrawal.js?v=1.7"></script>
|
||||
<script src="./js/withdrawal.js?v=1.8"></script>
|
Reference in New Issue
Block a user