diff --git a/view/moliparty/modules/guild-ar/js/BANK.js b/view/moliparty/modules/guild-ar/js/BANK.js index 65b4196..1004411 100644 --- a/view/moliparty/modules/guild-ar/js/BANK.js +++ b/view/moliparty/modules/guild-ar/js/BANK.js @@ -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 += ` -
${res.name}
+
${res.name}
` }) $('.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) { diff --git a/view/moliparty/modules/guild-ar/js/PAYONNER.js b/view/moliparty/modules/guild-ar/js/PAYONNER.js index 508261b..5cbb3a6 100644 --- a/view/moliparty/modules/guild-ar/js/PAYONNER.js +++ b/view/moliparty/modules/guild-ar/js/PAYONNER.js @@ -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 += ` -
${res.name}
+
${res.name}
` }) $('.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) { diff --git a/view/moliparty/modules/guild-ar/js/VODAFONE.js b/view/moliparty/modules/guild-ar/js/VODAFONE.js index 4626f46..664c53d 100644 --- a/view/moliparty/modules/guild-ar/js/VODAFONE.js +++ b/view/moliparty/modules/guild-ar/js/VODAFONE.js @@ -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 += ` -
${res.name}
+
${res.name}
` }) $('.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) { diff --git a/view/moliparty/modules/guild-ar/js/generalSalary.js b/view/moliparty/modules/guild-ar/js/generalSalary.js index 0cc9109..469099d 100644 --- a/view/moliparty/modules/guild-ar/js/generalSalary.js +++ b/view/moliparty/modules/guild-ar/js/generalSalary.js @@ -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 += ` -
${res.name}
+
${res.name}
` }) $('.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) { diff --git a/view/moliparty/modules/guild-ar/js/salary.js b/view/moliparty/modules/guild-ar/js/salary.js index 22e38ed..9334131 100644 --- a/view/moliparty/modules/guild-ar/js/salary.js +++ b/view/moliparty/modules/guild-ar/js/salary.js @@ -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 += `
@@ -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'); + 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 { - var name = $(this).attr('name'); if (name == 'bank') { location.href = `./BANK.html?type=${type}` } else if (name == 'payonner') {