Fix:2448 【商城小程序】待付款订单详情页内点击【修改地址】,重复弹出确认修改的弹窗
This commit is contained in:
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user