feat(updateAddress): add loading

This commit is contained in:
woody 2025-05-26 11:47:31 +08:00
parent f911c08d96
commit 497126ac47
1 changed files with 22 additions and 3 deletions

View File

@ -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 => {
this.orderLists = res.rows
// 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