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: '',
_orderId: '',
addressId: '',
currentRoute: ''
};
},
components: {
@@ -263,7 +264,10 @@ export default {
this.getOrderListReq();
uni.$on('chooseAddress', (res) => {
this.addressId = res.id
})
const pages = getCurrentPages() // 获取栈实例
this.currentRoute = pages[pages.length - 1].route;
},
onHide() {
this.orderList = [];
@@ -274,7 +278,9 @@ export default {
},
watch: {
addressId(val) {
if(val) {
const pages = getCurrentPages() // 获取栈实例
let currentRoute = pages[pages.length - 2].route;
if(val && this.currentRoute === currentRoute) {
const params = {
addressId: this.addressId,
orderId: this._orderId