feat(updateAddress): add loading
This commit is contained in:
parent
f911c08d96
commit
497126ac47
|
@ -112,7 +112,6 @@ export default {
|
|||
}
|
||||
},
|
||||
watch: {},
|
||||
onLoad() {},
|
||||
onShow() {
|
||||
this.getDataList()
|
||||
},
|
||||
|
@ -149,9 +148,29 @@ export default {
|
|||
return urls
|
||||
},
|
||||
getDataList() {
|
||||
sel.getOderSelfList(this.queryParams).then(res => {
|
||||
// 显示全局loading
|
||||
uni.showLoading({
|
||||
title: '加载中...',
|
||||
mask: true,
|
||||
})
|
||||
|
||||
sel
|
||||
.getOderSelfList(this.queryParams)
|
||||
.then(res => {
|
||||
this.orderLists = res.rows
|
||||
})
|
||||
.catch(err => {
|
||||
console.error('获取订单列表失败:', err)
|
||||
// 可以添加错误提示
|
||||
uni.showToast({
|
||||
title: '获取数据失败',
|
||||
icon: 'none',
|
||||
})
|
||||
})
|
||||
.finally(() => {
|
||||
// 确保无论成功还是失败都隐藏loading
|
||||
uni.hideLoading()
|
||||
})
|
||||
},
|
||||
updateAdress(item) {
|
||||
let params = item
|
||||
|
|
Loading…
Reference in New Issue