diff --git a/.env.prod-atyou b/.env.prod-atyou index a02fe4f..eb2b461 100644 --- a/.env.prod-atyou +++ b/.env.prod-atyou @@ -1,4 +1,6 @@ -ENV = 'development' +NODE_ENV = production + +ENV = 'production' VUE_APP_BASE_API = '/console' @@ -16,4 +18,3 @@ VUE_APP_H5_BASE_URL = 'https://h5.azizichat.com' # start mock VUE_APP_START_MOCK = false - diff --git a/package.json b/package.json index 21474be..fab5eb3 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,7 @@ "dev": "vue-cli-service serve", "build:dev": "vue-cli-service build --mode development", "build:prod": "vue-cli-service build", - "build:atu-prod": "vue-cli-service build --mode prod-atyou", + "build:atu-prod": "vue-demi-switch 2 && vue-cli-service build --mode prod-atyou", "build:stage": "vue-cli-service build --mode staging", "preview": "node build/index.js --preview", "lint": "eslint --ext .js,.vue src", diff --git a/src/api/sys-pay.js b/src/api/sys-pay.js index e7a9eb7..ced160c 100644 --- a/src/api/sys-pay.js +++ b/src/api/sys-pay.js @@ -204,6 +204,14 @@ export function updatePayOpenCountryExchangeRate(id, rate) { }) } +// 开通支付国家-同步全部国家汇率 +export function syncPayOpenCountryExchangeRate() { + return request({ + url: '/sys-pay-open-country/sync-exchange-rate', + method: 'post' + }) +} + // 开通支付国家-修改国家货币 export function updatePayOpenCountryCurrent(id, currency) { return request({ diff --git a/src/views/cnf/pay/application/commodity-v2/edit-form.vue b/src/views/cnf/pay/application/commodity-v2/edit-form.vue index 4901449..4fdafbe 100644 --- a/src/views/cnf/pay/application/commodity-v2/edit-form.vue +++ b/src/views/cnf/pay/application/commodity-v2/edit-form.vue @@ -20,11 +20,24 @@
{{ regionName }}
- + {} + }, + countryList: { + type: Array, + require: false, + default: () => [] } }, data() { @@ -129,8 +147,9 @@ export default { awardContent: '', amountUsd: '', type: '', + payCountryIds: [], regionId: '', - shelf: '' + shelf: true }, regionName: '', activeNames: '', @@ -145,6 +164,14 @@ export default { isUpdate() { return this.row && this.row.id }, + rowCountry() { + const country = (this.row && this.row.country) || {} + return { + icon: country.icon || country.nationalFlag || '', + currency: country.currency || '', + countryName: country.countryName || country.aliasName || country.enName || '' + } + }, shelfStatusOptions() { return this.shelfStatus.map(item => ({ ...item, @@ -157,6 +184,7 @@ export default { ] return { applicationId: commonRules, + payCountryIds: commonRules, content: commonRules, awardContent: commonRules, type: commonRules, @@ -181,6 +209,18 @@ export default { return } this.form = deepClone(newVal) + if (!this.form.payCountryIds || this.form.payCountryIds.length === 0) { + this.$set(this.form, 'payCountryIds', this.form.payCountryId ? [this.form.payCountryId] : []) + } + if (!this.form.awardContent && this.form.awardContent !== 0) { + this.$set(this.form, 'awardContent', '0') + } + if (this.form.shelf === '' || this.form.shelf === undefined || this.form.shelf === null) { + this.$set(this.form, 'shelf', true) + } + if (!this.form.type) { + this.$set(this.form, 'type', 'GOLD') + } this.regionName = newVal.regionName this.loadSupportAmountChannels() }, @@ -196,6 +236,26 @@ export default { handleClose() { this.$emit('close') }, + getPayCountryId(item) { + return item ? (item.id || item.payCountryId || '') : '' + }, + getCountryBase(item) { + return (item && (item.country || item.payCountry || item.countryInfo || item.sysCountryCode)) || {} + }, + getCountryName(item) { + if (!item) { + return '' + } + const country = this.getCountryBase(item) + return country.aliasName || country.countryName || country.enName || item.payCountryName || item.countryName || item.aliasName || item.enName || '' + }, + getCountryIcon(item) { + if (!item) { + return '' + } + const country = this.getCountryBase(item) + return country.nationalFlag || country.icon || item.nationalFlag || item.countryNationalFlag || item.payCountryNationalFlag || item.icon || '' + }, changeAmount(val) { if (!val || !validPositiveNumberPointTwo(val)) { this.supportAmounts = [] diff --git a/src/views/cnf/pay/application/commodity-v2/index.vue b/src/views/cnf/pay/application/commodity-v2/index.vue index 84febdb..39dac24 100644 --- a/src/views/cnf/pay/application/commodity-v2/index.vue +++ b/src/views/cnf/pay/application/commodity-v2/index.vue @@ -27,6 +27,25 @@ {{ item.appName }} + + + + {{ getCountryName(item) }} + + {{ $t('pages.payApplication.action.search') }} + + 同步全球汇率 + + + + @@ -122,6 +158,7 @@ @@ -130,7 +167,7 @@