Fix:3815 【商城小程序】购买流程出现异常页面

This commit is contained in:
LinCyJang
2025-06-02 12:21:23 +08:00
parent 00ba2a3239
commit 375b5b1978
4 changed files with 39 additions and 32 deletions
+7 -5
View File
@@ -502,9 +502,10 @@ export default {
...mapGetters(["userInfo"])
},
onShow() {
const _this = this
const chooseAddress = uni.getStorageSync('chooseAddress') || {}
const addressId = chooseAddress.id || ''
console.log(addressId, 'addressId');
// 监听到选择收货地址
if (addressId) {
uni.setStorageSync('chooseAddress', {})
@@ -519,13 +520,14 @@ export default {
uni.showLoading()
editAddress({
addressId,
orderId: _this.orderInfo.orderId
orderId: this.orderInfo.orderId
}).then(res => {
uni.showToast({
icon: 'success',
title: '修改成功!'
})
_this.getDetail()
uni.setStorageSync('sourceAddress', chooseAddress)
this.getDetail()
}).finally(() => {
uni.hideLoading()
})
@@ -536,8 +538,8 @@ export default {
}
})
} else {
_this.id = _this.$yroute.query.id;
_this.getDetail();
this.id = this.$yroute.query.id;
this.getDetail();
}
},
// inject: ["app"],