From e1b9ca5a6bbe45a6cdd564c21a6e57f2cee69a25 Mon Sep 17 00:00:00 2001 From: gongfuxiang Date: Sun, 22 Sep 2024 17:30:17 +0800 Subject: [PATCH] =?UTF-8?q?=E9=92=B1=E5=8C=85=E6=8F=90=E7=8E=B0=E9=80=82?= =?UTF-8?q?=E9=85=8D=E6=96=B0=E7=89=88=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- locale/en.json | 2 + locale/zh.json | 4 +- pages/plugins/wallet/cash-auth/cash-auth.vue | 2 +- .../wallet/cash-create/cash-create.vue | 83 +++++++++++++++---- .../user-cash-detail/user-cash-detail.vue | 1 + 5 files changed, 76 insertions(+), 16 deletions(-) diff --git a/locale/en.json b/locale/en.json index 7cf68d9e..62d7ac8e 100644 --- a/locale/en.json +++ b/locale/en.json @@ -1306,6 +1306,7 @@ "iaw845": "Withdrawable amount", "1dbkw2": "Available amount", "162f7o": "Total amount of gifts", + "yu2raf": "Withdrawal method", "5mmir5": "Payment platform", "14n20v": "It is strongly recommended to give priority to filling in the names of the four state-owned banks (Bank of China, China Construction Bank, Industrial and Commercial Bank of China and Agricultural Bank of China). Please fill in the detailed names of the branches of the deposit banks. For virtual accounts such as Alipay, Tenpay and WeChat, you can fill in the corresponding names directly.", "36756z": "Receiving account", @@ -1320,6 +1321,7 @@ "s72t44": "The format of the receiving account should be between 1 and 60 characters", "f4605e": "The format of the account holder's name is between 1 to 30 characters", "6t7x9u": "Please fill in the cash amount", + "thjid2": "Please choose a withdrawal method", "vbr59h": "Please fill in the payment platform", "0mn186": "Please fill in the receiving account number", "c7h4mu": "Please fill in the name of the account holder", diff --git a/locale/zh.json b/locale/zh.json index 445d00bf..f6700916 100644 --- a/locale/zh.json +++ b/locale/zh.json @@ -1298,7 +1298,8 @@ "iaw845": "可提现金额", "1dbkw2": "可用金额", "162f7o": "赠送总额", - "5mmir5": "收款平台", + "yu2raf": "提现方式", + "5mmir5": "收款平台", "14n20v": "强烈建议优先填写国有4大银行(中国银行、中国建设银行、中国工商银行和中国农业银行) 请填写详细的开户银行分行名称,虚拟账户如支付宝、财付通、微信 直接填写 相应的名称 即可。", "36756z": "收款账号", "748r3i": "银行账号或虚拟账号(支付宝、财付通、微信等账号)", @@ -1312,6 +1313,7 @@ "s72t44": "收款账号格式 1~60 个字符之间", "f4605e": "开户人姓名格式 1~30 个字符之间", "6t7x9u": "请填写提现金额", + "thjid2": "请选择提现方式", "vbr59h": "请填写收款平台", "0mn186": "请填写收款账号", "c7h4mu": "请填写开户人姓名", diff --git a/pages/plugins/wallet/cash-auth/cash-auth.vue b/pages/plugins/wallet/cash-auth/cash-auth.vue index ec7cd79c..d07e0b76 100644 --- a/pages/plugins/wallet/cash-auth/cash-auth.vue +++ b/pages/plugins/wallet/cash-auth/cash-auth.vue @@ -33,7 +33,7 @@ {{$t('cash-auth.cash-auth.0j8388')}} - {{$t('cash-auth.cash-auth.59iipw')}}{{$t('cash-auth.cash-auth.8qcte7')}}{{$t('cash-auth.cash-auth.t8y3r7')}}{{$t('login.login.np9177')}}{{$t('cash-auth.cash-auth.5wbuuy')}} + {{$t('cash-auth.cash-auth.59iipw')}}{{$t('cash-auth.cash-auth.8qcte7')}}{{$t('cash-auth.cash-auth.t8y3r7')}}{{$t('login.login.np9177')}}{{$t('cash-auth.cash-auth.5wbuuy')}} {{$t('cash-auth.cash-auth.r569wz')}} {{$t('cash-auth.cash-auth.35837l')}} {{$t('cash-auth.cash-auth.q2a553')}} diff --git a/pages/plugins/wallet/cash-create/cash-create.vue b/pages/plugins/wallet/cash-create/cash-create.vue index 4d89dcd3..78f0a137 100644 --- a/pages/plugins/wallet/cash-create/cash-create.vue +++ b/pages/plugins/wallet/cash-create/cash-create.vue @@ -29,24 +29,35 @@ {{cash_commission_value}} + + + + {{$t('cash-create.cash-create.yu2raf')}}* + + + + + - + {{$t('cash-create.cash-create.5mmir5')}}* - {{$t('cash-create.cash-create.14n20v')}} + {{$t('cash-create.cash-create.14n20v')}} - + {{$t('cash-create.cash-create.36756z')}}* - {{$t('cash-create.cash-create.748r3i')}} + {{$t('cash-create.cash-create.748r3i')}} {{$t('cash-create.cash-create.1xtff6')}}* - {{$t('cash-create.cash-create.445m7n')}} + {{$t('cash-create.cash-create.445m7n')}} @@ -78,7 +89,8 @@ export default { data() { return { - theme_view: app.globalData.get_theme_value_view(), + theme_view: app.globalData.get_theme_value_view(), + theme_color: app.globalData.get_theme_color(), params: null, form_submit_loading: false, data_list_loding_status: 1, @@ -88,7 +100,10 @@ default_data: {}, check_status: null, can_cash_max_money: 0.00, - cash_commission_value: 0.00 + cash_commission_value: 0.00, + user_cash_type_list: [], + cash_type_0_status: false, + cash_type_2_status: false }; }, @@ -156,8 +171,13 @@ check_status: data.check_status || 0, default_data: data.default_data || {}, user_wallet: data.user_wallet || {}, - can_cash_max_money: parseFloat(data.can_cash_max_money) || 0.0, - }); + can_cash_max_money: parseFloat(data.can_cash_max_money) || 0.0, + user_cash_type_list: data.user_cash_type_list || [] + }); + // 默认选中处理 + if(this.default_data.cash_type !== undefined) { + this.cash_type_event(this.default_data.cash_type); + } } else { this.setData({ data_list_loding_status: 2, @@ -187,6 +207,35 @@ cash_commission_value: app.globalData.price_two_decimal(value*parseFloat(this.data_base.cash_commission_rate)), }) } + }, + + // 提现方式事件 + cash_type_event(e) { + var status_0 = false; + var status_2 = false; + var value = parseInt(typeof(e) == 'object' ? e.detail.value : e); + switch(value) + { + // 其他方式 + case 0 : + status_2 = false; + status_0 = true; + break; + // 微信 + case 1 : + status_0 = false; + status_2 = false; + break; + // 支付宝 + case 2 : + status_0 = false; + status_2 = true; + break; + } + this.setData({ + cash_type_0_status: status_0, + cash_type_2_status: status_2 + }); }, // 数据提交 @@ -196,11 +245,17 @@ // 数据校验 var validation = [ - { fields: 'money', msg: this.$t('cash-create.cash-create.6t7x9u') }, - { fields: 'bank_name', msg: this.$t('cash-create.cash-create.vbr59h') }, - { fields: 'bank_accounts', msg: this.$t('cash-create.cash-create.0mn186') }, - { fields: 'bank_username', msg: this.$t('cash-create.cash-create.c7h4mu') }, - ]; + { fields: 'money', msg: this.$t('cash-create.cash-create.6t7x9u') }, + { fields: 'cash_type', msg: this.$t('cash-create.cash-create.thjid2'), is_can_zero: 1 } + ]; + var cash_type = parseInt(form_data.cash_type); + if(cash_type == 0) { + validation.push({ fields: 'bank_name', msg: this.$t('cash-create.cash-create.vbr59h') }); + } + if(cash_type == 0 || cash_type == 2) { + validation.push({ fields: 'bank_accounts', msg: this.$t('cash-create.cash-create.0mn186') }); + } + validation.push({ fields: 'bank_username', msg: this.$t('cash-create.cash-create.c7h4mu') }); // 验证提交表单 if (app.globalData.fields_check(form_data, validation)) { diff --git a/pages/plugins/wallet/user-cash-detail/user-cash-detail.vue b/pages/plugins/wallet/user-cash-detail/user-cash-detail.vue index f524a743..c73f764f 100644 --- a/pages/plugins/wallet/user-cash-detail/user-cash-detail.vue +++ b/pages/plugins/wallet/user-cash-detail/user-cash-detail.vue @@ -92,6 +92,7 @@ export default { { name: this.$t('user-cash-detail.user-cash-detail.wyad6w'), value: data.data.status_name || "" }, { name: this.$t('cash-create.cash-create.qg404q'), value: data.data.money || "" }, { name: this.$t('cash-create.cash-create.9ugssd'), value: data.data.commission || "" }, + { name: this.$t('cash-create.cash-create.yu2raf'), value: data.data.cash_type_name || "" }, { name: this.$t('user-cash-detail.user-cash-detail.j5s3u6'), value: data.data.bank_name || "" }, { name: this.$t('user-cash-detail.user-cash-detail.53k647'), value: data.data.bank_username || "" }, { name: this.$t('user-cash-detail.user-cash-detail.m556tl'), value: data.data.bank_accounts || "" },