diff --git a/bundle_b/pages/subsidy_shop/subsidy_shop.vue b/bundle_b/pages/subsidy_shop/subsidy_shop.vue index cd30cf9..bb73fa2 100644 --- a/bundle_b/pages/subsidy_shop/subsidy_shop.vue +++ b/bundle_b/pages/subsidy_shop/subsidy_shop.vue @@ -97,7 +97,8 @@ applyWithdraw, getBillionsWithdrawConfig, applyBillionsWithdrawl, - rechargeBalance + rechargeBalance, + postBillions } from "@/api/user"; import {mapGetters} from 'vuex' @@ -316,22 +317,36 @@ mask: true }) + 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 + this.postBillionsFunc(data.recharge_money, result.data) + + setTimeout(() => { + uni.$emit('refreshSubsidyPage') + this.showPopup = true + this.tipsText = '已成功充值¥' + data.recharge_money + this.form.recharge_money = '' + uni.hideLoading() + }, 2500) } - - this.form.recharge_money = '' - uni.hideLoading() } this.showPay = false this.getBillionsWithdrawConfigFun(); } }, + + // 异步请求 + postBillionsFunc(money, data) { + postBillions({ + money, + id: data.id, + order_sn: data.order_sn + }) + }, + onShowPopup() { this.showPopup = !this.showPopup if (this.currentTab == 1) {