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