页面优化
This commit is contained in:
parent
50eb3996d9
commit
ea5dca13ab
|
|
@ -293,6 +293,7 @@ export default {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
item._loading = true
|
item._loading = true
|
||||||
|
this.confirmingReceive = true
|
||||||
// #ifdef MP-WEIXIN
|
// #ifdef MP-WEIXIN
|
||||||
wx.requestMerchantTransfer({
|
wx.requestMerchantTransfer({
|
||||||
mchId: '1744231030',
|
mchId: '1744231030',
|
||||||
|
|
@ -300,14 +301,23 @@ export default {
|
||||||
package: item.packageInfo,
|
package: item.packageInfo,
|
||||||
success: (res) => {
|
success: (res) => {
|
||||||
console.log('[确认收款] 成功', res)
|
console.log('[确认收款] 成功', res)
|
||||||
uni.showToast({ title: '收款成功', icon: 'success' })
|
// 立即从列表移除
|
||||||
// 立即从列表移除,给用户即时反馈
|
|
||||||
this.pendingConfirms = this.pendingConfirms.filter(i => i.id !== item.id)
|
this.pendingConfirms = this.pendingConfirms.filter(i => i.id !== item.id)
|
||||||
// 后台静默刷新数据
|
// 显示加载提示,延迟2秒等待回调,再刷新数据后跳转
|
||||||
setTimeout(() => { this.loadData() }, 1000)
|
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) => {
|
fail: (res) => {
|
||||||
console.error('[确认收款] 失败', res)
|
console.error('[确认收款] 失败', res)
|
||||||
|
this.confirmingReceive = false
|
||||||
uni.showToast({ title: '收款取消或失败', icon: 'none' })
|
uni.showToast({ title: '收款取消或失败', icon: 'none' })
|
||||||
},
|
},
|
||||||
complete: () => {
|
complete: () => {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user