From fd0e13ac69825f7a256e35ab6b5f9a5053bce60d Mon Sep 17 00:00:00 2001 From: wangxiaowei <1121133807@qq.com> Date: Mon, 16 Sep 2024 17:31:35 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=94=AF=E4=BB=98=E7=BB=93?= =?UTF-8?q?=E6=9E=9C=E9=80=9A=E7=9F=A5=E7=AD=89=E5=BE=85=E6=97=B6=E9=97=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../user_wallet/user_wallet_withdraw.vue | 33 +++++++++++-------- bundle_b/pages/subsidy_shop/subsidy_shop.vue | 15 +++++---- main.js | 1 + pages/payment/payment.vue | 11 +++++-- 4 files changed, 38 insertions(+), 22 deletions(-) diff --git a/bundle/pages/user_wallet/user_wallet_withdraw.vue b/bundle/pages/user_wallet/user_wallet_withdraw.vue index 18a9c7e..c97a960 100644 --- a/bundle/pages/user_wallet/user_wallet_withdraw.vue +++ b/bundle/pages/user_wallet/user_wallet_withdraw.vue @@ -207,19 +207,26 @@ } data.type = this.currentValue balanceApplyWithdraw(data).then(res => { - if (res.code == 1) { - this.$toast({ - title: '提交成功' - }, { - tab: 2, - url: '/bundle/pages/user_withdraw/withdrawal_record' - // url: '/bundle/pages/wallet_withdraw_result/wallet_withdraw_result?id=' + res.data.id - }); - } else { - this.$toast({ - title: res.msg - }); - } + uni.showLoading({ + title: '加载中', + mask: true + }) + setTimeout(() => { + if (res.code == 1) { + this.$toast({ + title: '提交成功' + }, { + tab: 2, + url: '/bundle/pages/user_withdraw/withdrawal_record' + // url: '/bundle/pages/wallet_withdraw_result/wallet_withdraw_result?id=' + res.data.id + }); + } else { + this.$toast({ + title: res.msg + }); + } + uni.hideLoading() + }, this.$payWait) }); } }, diff --git a/bundle_b/pages/subsidy_shop/subsidy_shop.vue b/bundle_b/pages/subsidy_shop/subsidy_shop.vue index 30133af..83e5e09 100644 --- a/bundle_b/pages/subsidy_shop/subsidy_shop.vue +++ b/bundle_b/pages/subsidy_shop/subsidy_shop.vue @@ -304,13 +304,14 @@ const result = await applyBillionsWithdrawl(data); if (result.code == 1) { - uni.$emit('refreshSubsidyPage') - this.showPopup = true - this.tipsText = '已成功提现¥' + data.withdrawl_money + '至微信零钱' + setTimeout(() => { + uni.$emit('refreshSubsidyPage') + this.showPopup = true + this.tipsText = '已成功提现¥' + data.withdrawl_money + '至微信零钱' + this.form.withdrawl_money = '' + uni.hideLoading() + }, this.$payWait) } - - this.form.withdrawl_money = '' - uni.hideLoading() } else if(this.currentTab == 2) { uni.showLoading({ title: '加载中...', @@ -329,7 +330,7 @@ this.tipsText = '已成功充值¥' + data.recharge_money this.form.recharge_money = '' uni.hideLoading() - }, 2500) + }, this.$payWait) } } this.showPay = false diff --git a/main.js b/main.js index 401c032..2b26fad 100644 --- a/main.js +++ b/main.js @@ -11,6 +11,7 @@ import routerLink from './js_sdk/uni-simple-router/link.vue' Vue.component('mescroll-body', MescrollBody) Vue.prototype.$toast = toast Vue.prototype.$Cache = Cache +Vue.prototype.$payWait = 2500 Vue.config.productionTip = false Vue.component('RouterLink', routerLink) diff --git a/pages/payment/payment.vue b/pages/payment/payment.vue index a38f515..4164a66 100644 --- a/pages/payment/payment.vue +++ b/pages/payment/payment.vue @@ -190,9 +190,16 @@ // 支付后处理 handPayResult(result) { // 页面出栈 + uni.showLoading({ + title: '加载中', + mask: true + }) //记录支付结果 - this.result = result - this.$Router.back(1) + setTimeout(() => { + this.result = result + this.$Router.back(1) + uni.hideLoading() + }, this.$payWait) } },