修改官方提现页面接口返回,以及绑定页面接口返回
This commit is contained in:
@@ -84,7 +84,13 @@ function get() {
|
||||
success: function (res) {
|
||||
if (res.code == 200) {
|
||||
// 回显数据
|
||||
$('.currencyType input').val(langReplace(localLang.payonner.text6) + res.data.currency);
|
||||
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));
|
||||
}
|
||||
fields = res.data.fields;
|
||||
if (fields.country == '') {
|
||||
$('.but .determine').hide();
|
||||
@@ -107,7 +113,7 @@ function get() {
|
||||
var str = '';
|
||||
res.data.countryOptionalList.forEach(res => {
|
||||
str += `
|
||||
<div country='${res.value}' name="${res.name}" class="countryPub">${res.name}</div>
|
||||
<div country='${res.value}' name="${res.name}" currency="${res.currency}" class="countryPub">${res.name}</div>
|
||||
`
|
||||
})
|
||||
$('.pub .pub_in').append(str);
|
||||
@@ -124,6 +130,7 @@ function get() {
|
||||
}
|
||||
// 选择国家
|
||||
$('.country').click(function () {
|
||||
if(fields.country !='')return
|
||||
$('.pub').show();
|
||||
})
|
||||
// 关闭选择国家
|
||||
@@ -132,9 +139,11 @@ $('.pub').click(function (params) {
|
||||
})
|
||||
// 选中国家
|
||||
var nameval;
|
||||
var currency;
|
||||
$('.pub .pub_in').on('click', '.countryPub', function (params) {
|
||||
$(this).addClass('act').siblings().removeClass('act');
|
||||
nameval = $(this).attr('name');
|
||||
currency = $(this).attr('currency');
|
||||
var country = $(this).attr('country');
|
||||
fields.country = country;
|
||||
return false;
|
||||
@@ -143,6 +152,7 @@ $('.pub .pub_in').on('click', '.countryPub', function (params) {
|
||||
$('.pub .pub_in .soure').click(function (params) {
|
||||
$('.country input').val(nameval);
|
||||
$('.pub').hide();
|
||||
$('.currencyType input').val(langReplace(localLang.payonner.text6) + currency);
|
||||
})
|
||||
// 确认绑定按钮
|
||||
$('.but .ok').click(function (params) {
|
||||
|
@@ -81,7 +81,13 @@ function get() {
|
||||
success: function (res) {
|
||||
if (res.code == 200) {
|
||||
// 回显数据
|
||||
$('.currencyType input').val(langReplace(localLang.payonner.text6) + res.data.currency);
|
||||
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));
|
||||
}
|
||||
fields = res.data.fields;
|
||||
if (fields.country == '') {
|
||||
$('.but .determine').hide();
|
||||
@@ -101,7 +107,7 @@ function get() {
|
||||
var str = '';
|
||||
res.data.countryOptionalList.forEach(res => {
|
||||
str += `
|
||||
<div country='${res.value}' name="${res.name}" class="countryPub">${res.name}</div>
|
||||
<div country='${res.value}' name="${res.name}" currency="${res.currency}" class="countryPub">${res.name}</div>
|
||||
`
|
||||
})
|
||||
$('.pub .pub_in').append(str);
|
||||
@@ -118,6 +124,7 @@ function get() {
|
||||
}
|
||||
// 选择国家
|
||||
$('.country').click(function () {
|
||||
if(fields.country !='')return
|
||||
$('.pub').show();
|
||||
})
|
||||
// 关闭选择国家
|
||||
@@ -126,9 +133,11 @@ $('.pub').click(function (params) {
|
||||
})
|
||||
// 选中国家
|
||||
var nameTitle
|
||||
var currency;
|
||||
$('.pub .pub_in').on('click', '.countryPub', function name(params) {
|
||||
$(this).addClass('act').siblings().removeClass('act');
|
||||
nameTitle = $(this).attr('name');
|
||||
currency = $(this).attr('currency');
|
||||
var country = $(this).attr('country');
|
||||
fields.country = country;
|
||||
return false;
|
||||
@@ -137,6 +146,8 @@ $('.pub .pub_in').on('click', '.countryPub', function name(params) {
|
||||
$('.pub .pub_in .soure').click(function name(params) {
|
||||
$('.country input').val(nameTitle);
|
||||
$('.pub').hide();
|
||||
$('.currencyType input').val(langReplace(localLang.payonner.text6) + currency);
|
||||
|
||||
})
|
||||
// 确认绑定按钮
|
||||
$('.but .ok').click(function (params) {
|
||||
|
@@ -77,7 +77,13 @@ function get() {
|
||||
success: function (res) {
|
||||
if (res.code == 200) {
|
||||
// 回显数据
|
||||
$('.currencyType input').val(langReplace(localLang.payonner.text6) + res.data.currency);
|
||||
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));
|
||||
}
|
||||
fields = res.data.fields;
|
||||
if (fields.country == '') {
|
||||
$('.but .determine').hide();
|
||||
@@ -96,7 +102,7 @@ function get() {
|
||||
var str = '';
|
||||
res.data.countryOptionalList.forEach(res => {
|
||||
str += `
|
||||
<div country='${res.value}' name="${res.name}" class="countryPub">${res.name}</div>
|
||||
<div country='${res.value}' name="${res.name}" currency="${res.currency}" class="countryPub">${res.name}</div>
|
||||
`
|
||||
})
|
||||
$('.pub .pub_in').append(str);
|
||||
@@ -113,6 +119,7 @@ function get() {
|
||||
}
|
||||
// 选择国家
|
||||
$('.country').click(function () {
|
||||
if(fields.country !='')return
|
||||
$('.pub').show();
|
||||
})
|
||||
// 关闭选择国家
|
||||
@@ -121,10 +128,12 @@ $('.pub').click(function (params) {
|
||||
})
|
||||
// 选中国家
|
||||
var nameTitle;
|
||||
var currency;
|
||||
$('.pub .pub_in').on('click', '.countryPub', function name(params) {
|
||||
$(this).addClass('act').siblings().removeClass('act');
|
||||
nameTitle = $(this).attr('name');
|
||||
var country = $(this).attr('country');
|
||||
currency = $(this).attr('currency');
|
||||
fields.country = country;
|
||||
return false;
|
||||
})
|
||||
@@ -132,6 +141,7 @@ $('.pub .pub_in').on('click', '.countryPub', function name(params) {
|
||||
$('.pub .pub_in .soure').click(function name(params) {
|
||||
$('.country input').val(nameTitle);
|
||||
$('.pub').hide();
|
||||
$('.currencyType input').val(langReplace(localLang.payonner.text6) + currency);
|
||||
})
|
||||
// 确认绑定按钮
|
||||
$('.but .ok').click(function (params) {
|
||||
|
@@ -113,7 +113,13 @@ function get() {
|
||||
success: function (res) {
|
||||
if (res.code == 200) {
|
||||
// 回显数据
|
||||
$('.currencyType input').val(langReplace(localLang.payonner.text6) + res.data.currency);
|
||||
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));
|
||||
}
|
||||
fields = res.data.fields;
|
||||
if (fields.country == '') {
|
||||
$('.but .determine').hide();
|
||||
@@ -133,7 +139,7 @@ function get() {
|
||||
var str = '';
|
||||
res.data.countryOptionalList.forEach(res => {
|
||||
str += `
|
||||
<div country='${res.value}' name="${res.name}" class="countryPub">${res.name}</div>
|
||||
<div country='${res.value}' name="${res.name}" currency="${res.currency}" class="countryPub">${res.name}</div>
|
||||
`
|
||||
})
|
||||
$('.pub .pub_in').append(str);
|
||||
@@ -166,6 +172,7 @@ $('.pub_type').click(function (params) {
|
||||
})
|
||||
// 选择国家
|
||||
$('.country').click(function () {
|
||||
if(fields.country !='')return
|
||||
$('.pub').show();
|
||||
})
|
||||
// 关闭选择国家
|
||||
@@ -188,10 +195,12 @@ $('.pub_type .pub_in .soure').click(function name(params) {
|
||||
|
||||
// 选中国家
|
||||
var nameTitle
|
||||
var currency;
|
||||
$('.pub .pub_in').on('click', '.countryPub', function name(params) {
|
||||
$(this).addClass('act').siblings().removeClass('act');
|
||||
nameTitle = $(this).attr('name');
|
||||
var country = $(this).attr('country');
|
||||
currency = $(this).attr('currency');
|
||||
fields.country = country;
|
||||
return false;
|
||||
})
|
||||
@@ -199,6 +208,8 @@ $('.pub .pub_in').on('click', '.countryPub', function name(params) {
|
||||
$('.pub .pub_in .soure').click(function name(params) {
|
||||
$('.country input').val(nameTitle);
|
||||
$('.pub').hide();
|
||||
$('.currencyType input').val(langReplace(localLang.payonner.text6) + currency);
|
||||
|
||||
})
|
||||
// 确认绑定按钮
|
||||
$('.but .ok').click(function (params) {
|
||||
|
@@ -164,9 +164,8 @@ function getTab() {
|
||||
}
|
||||
// 渲染账户列表
|
||||
var accountListStr = '';
|
||||
withdrawRate = res.data.withdrawAccountVo.withdrawRate;
|
||||
$('.selectAccount .selectAccount_in .accountBox .account').remove();
|
||||
res.data.withdrawAccountVo.accountList.forEach(res => {
|
||||
res.data.withdrawAccountList.forEach(res => {
|
||||
accountListStr += `
|
||||
<div class="account">
|
||||
<img style="display:${res.hasBound ? 'block' : 'none'}" src="./images/not.png" alt="" class="sel" name=${res.name} type=${res.type} obj='${JSON.stringify(res)}'>
|
||||
@@ -574,25 +573,25 @@ function operateValue(than) {
|
||||
if (accountObj.type == 'VODAFONE') {
|
||||
$('.pubWithdrawal .pubWithdrawal_in .box3 .left p strong').text(localLang.salary.textnew8);
|
||||
$('.pubWithdrawal .pubWithdrawal_in .box3 .left p span').text(accountObj.usdRatio);
|
||||
var num = numberFun(((than.attr('guildUsdNum')) - (than.attr('guildUsdNum') * withdrawRate)) * accountObj.usdRatio)
|
||||
var num = numberFun(((than.attr('guildUsdNum')) - (than.attr('guildUsdNum') * accountObj.withdrawRate)) * accountObj.usdRatio)
|
||||
$('.pubWithdrawal .pubWithdrawal_in .box4 .right').text(`${num} ${accountObj.currency}`);
|
||||
$('.pubWithdrawal .pubWithdrawal_in .box3 .left p').show();
|
||||
} else if (accountObj.type == 'BANK_TRANSFER_LIRA') {
|
||||
$('.pubWithdrawal .pubWithdrawal_in .box3 .left p strong').text(localLang.salary.textnew8_TRY);
|
||||
$('.pubWithdrawal .pubWithdrawal_in .box3 .left p span').text(accountObj.usdRatio);
|
||||
var num = numberFun(((than.attr('guildUsdNum')) - (than.attr('guildUsdNum') * withdrawRate)) * accountObj.usdRatio)
|
||||
var num = numberFun(((than.attr('guildUsdNum')) - (than.attr('guildUsdNum') * accountObj.withdrawRate)) * accountObj.usdRatio)
|
||||
$('.pubWithdrawal .pubWithdrawal_in .box4 .right').text(`${num} ${accountObj.currency}`);
|
||||
$('.pubWithdrawal .pubWithdrawal_in .box3 .left p').show();
|
||||
// Math.floor(((than.attr('guildUsdNum')) - (than.attr('guildUsdNum') * withdrawRate)) * accountObj.usdRatio * 100) / 100
|
||||
} else {
|
||||
$('.pubWithdrawal .pubWithdrawal_in .box3 .left p').hide();
|
||||
console.log(accountObj.usdRatio);
|
||||
var num = numberFun(((than.attr('guildUsdNum')) - (than.attr('guildUsdNum') * withdrawRate)) * accountObj.usdRatio)
|
||||
var num = numberFun(((than.attr('guildUsdNum')) - (than.attr('guildUsdNum') * accountObj.withdrawRate)) * accountObj.usdRatio)
|
||||
$('.pubWithdrawal .pubWithdrawal_in .box4 .right').text(`${num} ${accountObj.currency}`);
|
||||
}
|
||||
$('.pubWithdrawal .pubWithdrawal_in .box1 .right').text(`${than.attr('guildUsdNum')} USD`);
|
||||
$('.pubWithdrawal .pubWithdrawal_in .box2 .right').text(withdrawRate * 100 + '%');
|
||||
$('.pubWithdrawal .pubWithdrawal_in .box3 .right').text(`${than.attr('guildUsdNum') * withdrawRate} USD`);
|
||||
$('.pubWithdrawal .pubWithdrawal_in .box2 .right').text(accountObj.withdrawRate * 100 + '%');
|
||||
$('.pubWithdrawal .pubWithdrawal_in .box3 .right').text(`${than.attr('guildUsdNum') * accountObj.withdrawRate} USD`);
|
||||
$('.pubWithdrawal').show();
|
||||
} else {
|
||||
toastMsg(langReplace(localLang.salary.textnew13))
|
||||
@@ -691,10 +690,14 @@ $('.selectAccount .selectAccount_in .accountBox').on('click', ' .account .sel',
|
||||
// 选择账户编辑
|
||||
$('.selectAccount .selectAccount_in .accountBox').on('click', ' .account .eid', function () {
|
||||
var type = $(this).attr('type');
|
||||
if (partitionId != 16) {
|
||||
location.href = `./${type}.html?type=${type}`
|
||||
} else {
|
||||
var name = $(this).attr('name');
|
||||
if (partitionId != 16) {
|
||||
if(type == 'BANK' || type == 'VODAFONE' || type == 'PAYONNER'){
|
||||
location.href = `./${type}.html?type=${type}`
|
||||
}else{
|
||||
location.href = `./generalSalary.html?type=${type}&name=${name}`
|
||||
}
|
||||
} else {
|
||||
if (name == 'bank') {
|
||||
location.href = `./BANK.html?type=${type}`
|
||||
} else if (name == 'payonner') {
|
||||
|
Reference in New Issue
Block a user