页面优化
This commit is contained in:
parent
50eb3996d9
commit
ea5dca13ab
|
|
@ -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: () => {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user