修改bug
This commit is contained in:
@@ -101,4 +101,4 @@
|
|||||||
<script src="../../common/js/route-constant.js"></script>
|
<script src="../../common/js/route-constant.js"></script>
|
||||||
<script src="../../common/js/svga.min.js"></script>
|
<script src="../../common/js/svga.min.js"></script>
|
||||||
<script src="./js/qiniu.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'
|
skin: 'msg'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
var photoBool = false;
|
||||||
$(function () {
|
$(function () {
|
||||||
setTimeout(function () {
|
setTimeout(function () {
|
||||||
getInfoFromClient()
|
getInfoFromClient()
|
||||||
@@ -35,6 +35,20 @@ $(function () {
|
|||||||
$('.back').hide();
|
$('.back').hide();
|
||||||
}
|
}
|
||||||
setTimeout(function () {
|
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)
|
}, 100)
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
@@ -101,16 +115,16 @@ function getUploadToken (type) {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
// 确认绑定按钮
|
// 确认绑定按钮
|
||||||
$('.but').click(function () {
|
// $('.but').click(function () {
|
||||||
if (listenFun()) {
|
// if (listenFun()) {
|
||||||
var filesList = document.querySelector('#frontImageUpload').files;
|
// var filesList = document.querySelector('#frontImageUpload').files;
|
||||||
var backImageUpload = document.querySelector('#backImageUpload').files;
|
// var backImageUpload = document.querySelector('#backImageUpload').files;
|
||||||
if (filesList.length == 0 || backImageUpload.length == 0) {
|
// if (filesList.length == 0 || backImageUpload.length == 0) {
|
||||||
toastMsg('請上傳身份證照片')
|
// toastMsg('請上傳身份證照片')
|
||||||
return;
|
// return;
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
})
|
// })
|
||||||
//监听是否完善信息
|
//监听是否完善信息
|
||||||
function listenFun () {
|
function listenFun () {
|
||||||
var num1 = $(".box1 div .name").val();
|
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) {
|
function withdrawUserAccount (name, idCardNo, accountNo, contact, thirdAccountNo, address, frontPhoto, backPhoto) {
|
||||||
var obj = {
|
if (url.modifyId == undefined) {
|
||||||
id: url.modifyId == undefined ? null : url.modifyId,
|
var obj = {
|
||||||
uid: pubInfo.uid,
|
uid: pubInfo.uid,
|
||||||
accountType: url.accountType,
|
accountType: url.accountType,
|
||||||
name,
|
name,
|
||||||
idCardNo,
|
idCardNo,
|
||||||
accountNo,
|
accountNo,
|
||||||
contact,
|
contact,
|
||||||
thirdAccountNo,
|
thirdAccountNo,
|
||||||
address,
|
address,
|
||||||
frontPhoto,
|
frontPhoto,
|
||||||
backPhoto,
|
backPhoto,
|
||||||
};
|
};
|
||||||
|
} else {
|
||||||
|
var obj = {
|
||||||
|
id: url.modifyId,
|
||||||
|
uid: pubInfo.uid,
|
||||||
|
accountType: url.accountType,
|
||||||
|
name,
|
||||||
|
idCardNo,
|
||||||
|
accountNo,
|
||||||
|
contact,
|
||||||
|
thirdAccountNo,
|
||||||
|
address,
|
||||||
|
frontPhoto,
|
||||||
|
backPhoto,
|
||||||
|
};
|
||||||
|
}
|
||||||
showLoading()
|
showLoading()
|
||||||
networkRequest({
|
networkRequest({
|
||||||
type: 'POST',
|
type: 'POST',
|
||||||
@@ -175,11 +204,13 @@ $('.but').click(function () {
|
|||||||
var frontImageUpload = document.querySelector('#frontImageUpload').files;
|
var frontImageUpload = document.querySelector('#frontImageUpload').files;
|
||||||
var backImageUpload = document.querySelector('#backImageUpload').files;
|
var backImageUpload = document.querySelector('#backImageUpload').files;
|
||||||
if (listenFun()) {
|
if (listenFun()) {
|
||||||
if (frontImageUpload.length == 0 || backImageUpload.length == 0) {
|
if (photoBool) {
|
||||||
|
$('.mainlandInfo').show();
|
||||||
|
return;
|
||||||
|
} else if (frontImageUpload.length == 0 || backImageUpload.length == 0) {
|
||||||
toastMsg('請上傳身份證');
|
toastMsg('請上傳身份證');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
$('.mainlandInfo').show();
|
$('.mainlandInfo').show();
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
@@ -33,6 +33,7 @@ var weekLimitCount;//本周剩余次数
|
|||||||
var weekMaxValue;//本周剩余最大金额
|
var weekMaxValue;//本周剩余最大金额
|
||||||
var realName = false;//默认大陆未实名
|
var realName = false;//默认大陆未实名
|
||||||
var modifyId = null;
|
var modifyId = null;
|
||||||
|
var userInfo = {}//账户信息暂存
|
||||||
$(function () {
|
$(function () {
|
||||||
setTimeout(function () {
|
setTimeout(function () {
|
||||||
getInfoFromClient()
|
getInfoFromClient()
|
||||||
@@ -46,6 +47,7 @@ $(function () {
|
|||||||
})
|
})
|
||||||
// 提領配置接口接口
|
// 提領配置接口接口
|
||||||
function getConfig () {
|
function getConfig () {
|
||||||
|
$('.withdrawal p').remove();
|
||||||
showLoading()
|
showLoading()
|
||||||
networkRequest({
|
networkRequest({
|
||||||
type: 'GET',
|
type: 'GET',
|
||||||
@@ -132,6 +134,8 @@ function getUser () {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
// 提領賬戶管理接口
|
// 提領賬戶管理接口
|
||||||
|
var isPrevBool = false;
|
||||||
|
var updateNums = 0;
|
||||||
function getAccounts () {
|
function getAccounts () {
|
||||||
showLoading()
|
showLoading()
|
||||||
networkRequest({
|
networkRequest({
|
||||||
@@ -143,28 +147,40 @@ function getAccounts () {
|
|||||||
var str = '';
|
var str = '';
|
||||||
res.data.forEach((res) => {
|
res.data.forEach((res) => {
|
||||||
str += `
|
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) {
|
if (res.isPrev == 1) {
|
||||||
|
isPrevBool = true;
|
||||||
accountType = res.accountType
|
accountType = res.accountType
|
||||||
$('.account span').text(res.accountName);
|
$('.account span').text(res.accountName);
|
||||||
$('.account span').addClass('active');
|
$('.account span').addClass('active');
|
||||||
} else {
|
|
||||||
if (res.isBind == 1) {
|
|
||||||
accountType = res.accountType
|
|
||||||
$('.account span').text(res.accountName);
|
|
||||||
$('.account span').addClass('active');
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
if (accountType == 2) {
|
if (res.isBind == 1 && isPrevBool == false) {
|
||||||
$('.authentication').show();
|
accountType = res.accountType
|
||||||
// 判断是否展示修改
|
$('.account span').text(res.accountName);
|
||||||
if (res.updateNum >= 1) {
|
$('.account span').addClass('active');
|
||||||
$('.mainlandInfo .mainlandInfo_in p span').text(res.updateNum + '次');
|
}
|
||||||
$('.accountPub .accountPub_in ul li i').show();
|
if (res.accountType == 2) {
|
||||||
} else {
|
updateNums = res.updateNum;
|
||||||
$('.accountPub .accountPub_in ul li i').hide();
|
|
||||||
}
|
|
||||||
// 判断是否认证
|
// 判断是否认证
|
||||||
if (res.isRealCertify == 0) {
|
if (res.isRealCertify == 0) {
|
||||||
$('.withdrawal input').attr('placeholder', '請先進行實名認證');
|
$('.withdrawal input').attr('placeholder', '請先進行實名認證');
|
||||||
@@ -175,14 +191,33 @@ function getAccounts () {
|
|||||||
$('.withdrawal input').attr('placeholder', '請先選擇提領賬戶');
|
$('.withdrawal input').attr('placeholder', '請先選擇提領賬戶');
|
||||||
$('.authentication span').text('已實名');
|
$('.authentication span').text('已實名');
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
if (accountType == 2) {
|
||||||
|
$('.authentication').show();
|
||||||
} else {
|
} else {
|
||||||
$('.authentication').hide();
|
$('.authentication').hide();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
$('.accountPub .accountPub_in ul').append(str);
|
$('.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 () {
|
$('.accountPub .accountPub_in ul li i').click(function () {
|
||||||
modifyId = $(this).parents('li').attr('id');
|
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();
|
$('.mainlandInfo').show();
|
||||||
return false;
|
return false;
|
||||||
})
|
})
|
||||||
@@ -300,7 +335,7 @@ function calculate () {
|
|||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
$('.withdrawal .numBox b').addClass('active');
|
$('.withdrawal .numBox b').addClass('active');
|
||||||
$('.withdrawal input').val(num);
|
$('.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').hide();
|
||||||
$('.goldPub .goldPub_in input').val('');
|
$('.goldPub .goldPub_in input').val('');
|
||||||
$('.butBig').addClass('butBigActive');
|
$('.butBig').addClass('butBigActive');
|
||||||
@@ -412,7 +447,7 @@ $('.income .rule').click(function () {
|
|||||||
})
|
})
|
||||||
// 确认修改大陆信息按钮
|
// 确认修改大陆信息按钮
|
||||||
$('.mainlandInfo .mainlandInfo_in .ok').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 () {
|
$('.mainlandInfo .mainlandInfo_in .close').click(function () {
|
||||||
|
@@ -126,4 +126,4 @@
|
|||||||
<script src="../../common/js/vconsole.min.js"></script>
|
<script src="../../common/js/vconsole.min.js"></script>
|
||||||
<script src="../../common/js/route-constant.js"></script>
|
<script src="../../common/js/route-constant.js"></script>
|
||||||
<script src="../../common/js/svga.min.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