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: {