From ea5dca13ab932cc4acadcb3e9b3f2141f7d910c2 Mon Sep 17 00:00:00 2001 From: 18631081161 <2088094923@qq.com> Date: Fri, 17 Apr 2026 22:54:59 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- miniapp/pages/mine/earnings.vue | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/miniapp/pages/mine/earnings.vue b/miniapp/pages/mine/earnings.vue index fd50859..97cbc39 100644 --- a/miniapp/pages/mine/earnings.vue +++ b/miniapp/pages/mine/earnings.vue @@ -293,6 +293,7 @@ export default { return } item._loading = true + this.confirmingReceive = true // #ifdef MP-WEIXIN wx.requestMerchantTransfer({ mchId: '1744231030', @@ -300,14 +301,23 @@ export default { package: item.packageInfo, success: (res) => { console.log('[确认收款] 成功', res) - uni.showToast({ title: '收款成功', icon: 'success' }) - // 立即从列表移除,给用户即时反馈 + // 立即从列表移除 this.pendingConfirms = this.pendingConfirms.filter(i => i.id !== item.id) - // 后台静默刷新数据 - setTimeout(() => { this.loadData() }, 1000) + // 显示加载提示,延迟2秒等待回调,再刷新数据后跳转 + uni.showLoading({ title: '收款处理中...' }) + setTimeout(async () => { + await this.loadData() + uni.hideLoading() + this.confirmingReceive = false + uni.showToast({ title: '收款成功', icon: 'success' }) + setTimeout(() => { + uni.switchTab({ url: '/pages/order-hall/order-hall' }) + }, 1000) + }, 2000) }, fail: (res) => { console.error('[确认收款] 失败', res) + this.confirmingReceive = false uni.showToast({ title: '收款取消或失败', icon: 'none' }) }, complete: () => {