From 944cf8f4fd2f0b58810ee37fd491eb4a7045b4c6 Mon Sep 17 00:00:00 2001 From: wangxiaowei <1121133807@qq.com> Date: Wed, 28 Aug 2024 22:47:18 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9A=82=E6=97=B6=E5=B0=86=E6=B6=88=E8=B4=B9?= =?UTF-8?q?=E8=BF=94=E8=A1=A5=E5=85=85=E5=80=BC=E5=88=B0=E6=9C=AC=E5=9C=B0?= =?UTF-8?q?=E4=BD=99=E9=A2=9D=E5=85=B3=E9=97=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bundle_b/pages/subsidy_shop/subsidy_shop.vue | 234 +++++++++++-------- 1 file changed, 140 insertions(+), 94 deletions(-) diff --git a/bundle_b/pages/subsidy_shop/subsidy_shop.vue b/bundle_b/pages/subsidy_shop/subsidy_shop.vue index 6673c06..ef9d685 100644 --- a/bundle_b/pages/subsidy_shop/subsidy_shop.vue +++ b/bundle_b/pages/subsidy_shop/subsidy_shop.vue @@ -5,7 +5,7 @@ active-color="#333333" inactive-color="#666666" :bar-style="styleTabsBarStyle" @change="changeTab" /> - + - + + @@ -56,15 +57,13 @@ - + - - - {{dot > 99 ? '99+' : dot}} - + + @@ -94,8 +93,11 @@ }, data() { return { + // tabsList: [ + // {name: '充值到本地余额'}, + // {name: '补贴提现'} + // ], tabsList: [ - {name: '充值到本地余额'}, {name: '补贴提现'} ], currentTab: 0, @@ -110,9 +112,11 @@ }, active: -1, order: [{ - name: '排队中' + name: '排队中', + num: 0 }, { - name: '已完成' + name: '已完成', + num: 0 }], dot: 0, widthDrawConfig: [], @@ -129,10 +133,6 @@ this.changeShow(0); this.getBillionsWithdrawConfigFun(); uni.$on('refreshBillionsWithdrawConfigFun', this.getBillionsWithdrawConfigFun) - - if (options && options.unread) { - this.order[1].dot = options.unread - } }, onUnload() { uni.$off('refreshBillionsWithdrawConfigFun') @@ -189,99 +189,145 @@ const data = { ...this.form } - if (this.currentTab == 0){ - // 充值 - if (!Number(data.recharge_money)) { - this.$toast({ - title: '请输入充值金额' - }); - return; - } + // if (this.currentTab == 0){ + // // 充值 + // if (!Number(data.recharge_money)) { + // this.$toast({ + // title: '请输入充值金额' + // }); + // return; + // } - if (!uni.$u.test.amount(data.recharge_money)) { - this.$toast({ - title: '充值金额格式错误' - }); - return; - } + // if (!uni.$u.test.amount(data.recharge_money)) { + // this.$toast({ + // title: '充值金额格式错误' + // }); + // return; + // } - if (Number(data.recharge_money) < Number(this.widthDrawConfig.min_recharge)) { - this.$toast({ - title: '最小充值金额为¥' + this.widthDrawConfig.min_recharge - }); - return; - } + // if (Number(data.recharge_money) < Number(this.widthDrawConfig.min_recharge)) { + // this.$toast({ + // title: '最小充值金额为¥' + this.widthDrawConfig.min_recharge + // }); + // return; + // } - if (Number(data.recharge_money) > Number(this.widthDrawConfig.able_withdraw)) { - this.$toast({ - title: '可充值金额不足' - }); - return; - } + // if (Number(data.recharge_money) > Number(this.widthDrawConfig.able_withdraw)) { + // this.$toast({ + // title: '可充值金额不足' + // }); + // return; + // } - uni.showLoading({ - title: '加载中...', - mask: true - }) + // uni.showLoading({ + // title: '加载中...', + // mask: true + // }) - data.money = data.recharge_money - const result = await rechargeBalance(data) + // data.money = data.recharge_money + // const result = await rechargeBalance(data) - if (result.code == 1) { - uni.$emit('refreshSubsidyPage') - this.showPopup = true - this.tipsText = '已成功充值¥' + data.recharge_money - } + // if (result.code == 1) { + // uni.$emit('refreshSubsidyPage') + // this.showPopup = true + // this.tipsText = '已成功充值¥' + data.recharge_money + // } - this.form.recharge_money = '' - uni.hideLoading() - } else if(this.currentTab == 1) { - // 提现 - if (!data.withdrawl_money) { - this.$toast({ - title: '请输入提现金额' - }); - return; - } + // this.form.recharge_money = '' + // uni.hideLoading() + // } else if(this.currentTab == 1) { + // // 提现 + // if (!data.withdrawl_money) { + // this.$toast({ + // title: '请输入提现金额' + // }); + // return; + // } - if (!uni.$u.test.amount(data.withdrawl_money)) { - this.$toast({ - title: '提现金额格式错误' - }); - return; - } + // if (!uni.$u.test.amount(data.withdrawl_money)) { + // this.$toast({ + // title: '提现金额格式错误' + // }); + // return; + // } - if (data.withdrawl_money < this.widthDrawConfig.min_withdraw) { - this.$toast({ - title: '最小提现金额为¥' + this.widthDrawConfig.min_withdraw - }); - return; - } + // if (data.withdrawl_money < this.widthDrawConfig.min_withdraw) { + // this.$toast({ + // title: '最小提现金额为¥' + this.widthDrawConfig.min_withdraw + // }); + // return; + // } - if (data.withdrawl_money > this.widthDrawConfig.able_withdraw) { - this.$toast({ - title: '可提现金额不足' - }); - return; - } + // if (data.withdrawl_money > this.widthDrawConfig.able_withdraw) { + // this.$toast({ + // title: '可提现金额不足' + // }); + // return; + // } - uni.showLoading({ - title: '加载中...', - mask: true - }) + // uni.showLoading({ + // title: '加载中...', + // mask: true + // }) - data.money = data.withdrawl_money - const result = await applyBillionsWithdrawl(data); + // data.money = data.withdrawl_money + // const result = await applyBillionsWithdrawl(data); - if (result.code == 1) { - uni.$emit('refreshSubsidyPage') - this.showPopup = true - this.tipsText = '已成功提现¥' + data.withdrawl_money + '至微信零钱' - } + // if (result.code == 1) { + // uni.$emit('refreshSubsidyPage') + // this.showPopup = true + // this.tipsText = '已成功提现¥' + data.withdrawl_money + '至微信零钱' + // } - this.form.withdrawl_money = '' - uni.hideLoading() + // this.form.withdrawl_money = '' + // uni.hideLoading() + // } + + // 提现 + if (!data.withdrawl_money) { + this.$toast({ + title: '请输入提现金额' + }); + return; } + + if (!uni.$u.test.amount(data.withdrawl_money)) { + this.$toast({ + title: '提现金额格式错误' + }); + return; + } + + if (data.withdrawl_money < this.widthDrawConfig.min_withdraw) { + this.$toast({ + title: '最小提现金额为¥' + this.widthDrawConfig.min_withdraw + }); + return; + } + + if (data.withdrawl_money > this.widthDrawConfig.able_withdraw) { + this.$toast({ + title: '可提现金额不足' + }); + return; + } + + uni.showLoading({ + title: '加载中...', + mask: true + }) + + data.money = data.withdrawl_money + const result = await applyBillionsWithdrawl(data); + + if (result.code == 1) { + uni.$emit('refreshSubsidyPage') + this.showPopup = true + this.tipsText = '已成功提现¥' + data.withdrawl_money + '至微信零钱' + } + + this.form.withdrawl_money = '' + uni.hideLoading() this.getBillionsWithdrawConfigFun(); }, onShowPopup() { @@ -297,7 +343,7 @@ } }, changeUnreadBillions(e) { - this.dot = e + this.order[1].num = e } }, watch: {