Fix:2448 【商城小程序】待付款订单详情页内点击【修改地址】,重复弹出确认修改的弹窗

This commit is contained in:
modendeveloper
2024-10-11 22:33:39 +08:00
parent fb23c8fccf
commit 58e29a98c8
+7 -1
View File
@@ -248,6 +248,7 @@ export default {
keyword: '', keyword: '',
_orderId: '', _orderId: '',
addressId: '', addressId: '',
currentRoute: ''
}; };
}, },
components: { components: {
@@ -263,7 +264,10 @@ export default {
this.getOrderListReq(); this.getOrderListReq();
uni.$on('chooseAddress', (res) => { uni.$on('chooseAddress', (res) => {
this.addressId = res.id this.addressId = res.id
}) })
const pages = getCurrentPages() // 获取栈实例
this.currentRoute = pages[pages.length - 1].route;
}, },
onHide() { onHide() {
this.orderList = []; this.orderList = [];
@@ -274,7 +278,9 @@ export default {
}, },
watch: { watch: {
addressId(val) { addressId(val) {
if(val) { const pages = getCurrentPages() // 获取栈实例
let currentRoute = pages[pages.length - 2].route;
if(val && this.currentRoute === currentRoute) {
const params = { const params = {
addressId: this.addressId, addressId: this.addressId,
orderId: this._orderId orderId: this._orderId