Fix:5125 【商城小程序】订单列表状态未同步刷新

This commit is contained in:
linxi
2026-04-13 15:00:10 +08:00
parent 9e9a058325
commit 4f2670ba01
3 changed files with 8 additions and 0 deletions
+4
View File
@@ -633,6 +633,7 @@ export default {
computed: mapGetters(["userInfo"]), computed: mapGetters(["userInfo"]),
onShow() { onShow() {
const _this = this const _this = this
const needRefreshOrderList = uni.getStorageSync('needRefreshMyOrderList')
const chooseAddress = uni.getStorageSync('updateOrderAddress') || {} const chooseAddress = uni.getStorageSync('updateOrderAddress') || {}
const addressId = chooseAddress.id || '' const addressId = chooseAddress.id || ''
// 监听到选择收货地址 // 监听到选择收货地址
@@ -668,6 +669,9 @@ export default {
_this._orderId = '' _this._orderId = ''
} }
}) })
} else if (needRefreshOrderList) {
uni.removeStorageSync('needRefreshMyOrderList')
this.changeType()
} }
}, },
onLoad() { onLoad() {
+3
View File
@@ -691,6 +691,9 @@ export default {
this.getDetail(); this.getDetail();
} }
}, },
onUnload() {
uni.setStorageSync('needRefreshMyOrderList', 1)
},
// inject: ["app"], // inject: ["app"],
mounted: function () { mounted: function () {
this.id = this.$yroute.query.id; this.id = this.$yroute.query.id;
+1
View File
@@ -252,6 +252,7 @@ export default {
this.getSojoumOrderDetail(); this.getSojoumOrderDetail();
}, },
onUnload() { onUnload() {
uni.setStorageSync('needRefreshMyOrderList', 1)
this.stopExperienceCouponPolling(); this.stopExperienceCouponPolling();
}, },
methods: { methods: {