|
|
|
@@ -84,28 +84,34 @@ function translateFun() {
|
|
|
|
|
if (typeName == 'pix') {
|
|
|
|
|
$('.p7').text(langReplace(localLang.pTitle.AccountNo));
|
|
|
|
|
$('.text8').attr('placeholder', langReplace(localLang.pTitle.AccountNo));
|
|
|
|
|
}else{
|
|
|
|
|
} else {
|
|
|
|
|
$('.pix_box').hide()
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if(typeName == 'gcash'){
|
|
|
|
|
if (typeName == 'gcash') {
|
|
|
|
|
$('.p7').text(langReplace(localLang.pTitle.p71));
|
|
|
|
|
$('.text8').attr('placeholder', langReplace(localLang.pTitle.p72));
|
|
|
|
|
}
|
|
|
|
|
if(typeName == 'zalo'){
|
|
|
|
|
if (typeName == 'zalo') {
|
|
|
|
|
$('.p7').text(langReplace(localLang.pTitle.AccountNo));
|
|
|
|
|
$('.text8').attr('placeholder', langReplace(localLang.pTitle.p73));
|
|
|
|
|
}
|
|
|
|
|
if(typeName == 'usdt'){
|
|
|
|
|
if (typeName == 'usdt') {
|
|
|
|
|
$('.p7').text(langReplace(localLang.pTitle.payeeAccount));
|
|
|
|
|
$('.text8').attr('placeholder', langReplace(localLang.pTitle.payeeAccount));
|
|
|
|
|
$('.payeeName_top span').hide()
|
|
|
|
|
}
|
|
|
|
|
if(typeName == 'bkash'){
|
|
|
|
|
if (typeName == 'bkash') {
|
|
|
|
|
$('.p7').text(langReplace(localLang.pTitle.p2));
|
|
|
|
|
$('.text8').attr('placeholder', langReplace(localLang.pTitle.p2));
|
|
|
|
|
}
|
|
|
|
|
if (typeName == 'swiftcode') {
|
|
|
|
|
$('.p7').text(langReplace(localLang.pTitle.payeeAccount));
|
|
|
|
|
$('.text8').attr('placeholder', langReplace(localLang.pTitle.payeeAccount));
|
|
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
$('.swiftcode_box').hide();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
// 获取
|
|
|
|
|
function get() {
|
|
|
|
@@ -117,12 +123,12 @@ function get() {
|
|
|
|
|
success: function (res) {
|
|
|
|
|
if (res.code == 200) {
|
|
|
|
|
// 回显数据
|
|
|
|
|
if(res.data.country && res.data.country != ''){
|
|
|
|
|
if (res.data.country && res.data.country != '') {
|
|
|
|
|
let list = res.data.countryOptionalList.filter(item => item.value == res.data.country);
|
|
|
|
|
console.log(list)
|
|
|
|
|
$('.currencyType input').val(langReplace(localLang.payonner.text6)+list[0].currency);
|
|
|
|
|
}else{
|
|
|
|
|
$('.currencyType input').val(langReplace(localLang.payonner.text6));
|
|
|
|
|
$('.currencyType input').val(langReplace(localLang.payonner.text6) + list[0].currency);
|
|
|
|
|
} else {
|
|
|
|
|
$('.currencyType input').val(langReplace(localLang.payonner.text6));
|
|
|
|
|
}
|
|
|
|
|
fields = res.data.fields;
|
|
|
|
|
if (fields.country == '') {
|
|
|
|
@@ -148,11 +154,16 @@ function get() {
|
|
|
|
|
})
|
|
|
|
|
$('.pub .pub_in').append(str);
|
|
|
|
|
|
|
|
|
|
if(typeName == 'pix'){
|
|
|
|
|
if (typeName == 'pix') {
|
|
|
|
|
$('.payeeAccountNo input').val(fields.account_name);
|
|
|
|
|
$('.payeeName input').val(fields.account_no);
|
|
|
|
|
$('.Document_input').val(fields.document_id);
|
|
|
|
|
$('.AccountType_box input').val(fields.account_type);
|
|
|
|
|
$('.payeeName input').val(fields.account_no);
|
|
|
|
|
$('.Document_input').val(fields.document_id);
|
|
|
|
|
$('.AccountType_box input').val(fields.account_type);
|
|
|
|
|
}
|
|
|
|
|
if (typeName == 'swiftcode') {
|
|
|
|
|
$('.payeeAccountNo input').val(fields.account_name);
|
|
|
|
|
$('.payeeName input').val(fields.account_no);
|
|
|
|
|
$('.swift_code_input').val(fields.swift_code);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
} else {
|
|
|
|
@@ -176,7 +187,7 @@ $('.pub_type').click(function (params) {
|
|
|
|
|
})
|
|
|
|
|
// 选择国家
|
|
|
|
|
$('.country').click(function () {
|
|
|
|
|
if(fields.country !='')return
|
|
|
|
|
if (fields.country != '') return
|
|
|
|
|
$('.pub').show();
|
|
|
|
|
})
|
|
|
|
|
// 关闭选择国家
|
|
|
|
@@ -239,12 +250,30 @@ $('.but .ok').click(function (params) {
|
|
|
|
|
toastMsg(langReplace(localLang.payonner.text10));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
} else if (typeName === 'swiftcode') {
|
|
|
|
|
// 类型是swiftcode的时候
|
|
|
|
|
obj.account_name = $('.payeeAccountNo input').val();
|
|
|
|
|
obj.account_no = $('.payeeName input').val();
|
|
|
|
|
obj.swift_code = $('.swift_code_input').val();
|
|
|
|
|
if (obj.country && obj.account_name && obj.account_no && obj.swift_code) {
|
|
|
|
|
fields = obj;
|
|
|
|
|
var objJson = {
|
|
|
|
|
uid: pubInfo.uid,
|
|
|
|
|
uid: 3838,
|
|
|
|
|
type: getQueryString().type,
|
|
|
|
|
fields,
|
|
|
|
|
}
|
|
|
|
|
update(JSON.stringify(objJson));
|
|
|
|
|
} else {
|
|
|
|
|
toastMsg(langReplace(localLang.payonner.text10));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
obj.bank_account = $('.payeeAccountNo input').val();
|
|
|
|
|
if (typeName !== 'epay') {
|
|
|
|
|
obj.full_name = $('.payeeName input').val();
|
|
|
|
|
}
|
|
|
|
|
if (obj.country && obj.bank_account && ((typeName !== 'epay' ? obj.full_name : true)||(typeName !== 'usdt' ? obj.full_name : true))) {
|
|
|
|
|
if (obj.country && obj.bank_account && ((typeName !== 'epay' ? obj.full_name : true) || (typeName !== 'usdt' ? obj.full_name : true))) {
|
|
|
|
|
fields = obj;
|
|
|
|
|
var objJson = {
|
|
|
|
|
uid: pubInfo.uid,
|
|
|
|
@@ -287,7 +316,7 @@ function update(obj) {
|
|
|
|
|
$('.but .determine').click(function () {
|
|
|
|
|
var objJson = {
|
|
|
|
|
uid: pubInfo.uid,
|
|
|
|
|
// uid: 3839,
|
|
|
|
|
// uid: 3838,
|
|
|
|
|
type: getQueryString().type,
|
|
|
|
|
}
|
|
|
|
|
unbound(JSON.stringify(objJson));
|
|
|
|
|