Fix:2621 【商城小程序】订单详情—再买一单,修改收货地址确认框弹出之前地址已修改,点取消修改无法取消
This commit is contained in:
@@ -590,7 +590,7 @@ export default {
|
|||||||
const ids = res.data.cartInfo.map(e => e.id)
|
const ids = res.data.cartInfo.map(e => e.id)
|
||||||
const addressInfo = res.data.addressInfo
|
const addressInfo = res.data.addressInfo
|
||||||
if (ids.length === 0) return
|
if (ids.length === 0) return
|
||||||
uni.navigateTo({
|
uni.redirectTo({
|
||||||
url: '/pages/order/OrderSubmission/index?id=' + ids.join(',') + '&address=' + JSON.stringify(addressInfo)
|
url: '/pages/order/OrderSubmission/index?id=' + ids.join(',') + '&address=' + JSON.stringify(addressInfo)
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -392,10 +392,26 @@ export default {
|
|||||||
let that = this;
|
let that = this;
|
||||||
uni.$on('chooseAddress', (res) => {
|
uni.$on('chooseAddress', (res) => {
|
||||||
console.log('监听到选择收货地址:' + JSON.stringify(res));
|
console.log('监听到选择收货地址:' + JSON.stringify(res));
|
||||||
that.addressInfo = res;
|
setTimeout(() => {
|
||||||
//地址切换也要重新计算一下
|
uni.showModal({
|
||||||
that.computedPrice('onLoad chooseAddress');
|
title:'确定修改地址吗?',
|
||||||
})
|
content: '',
|
||||||
|
showCancel: true,
|
||||||
|
cancelText: '取消',
|
||||||
|
confirmText: '确认',
|
||||||
|
success:(success)=>{
|
||||||
|
if(success.confirm) {
|
||||||
|
that.addressInfo = res;
|
||||||
|
//地址切换也要重新计算一下
|
||||||
|
that.computedPrice('onLoad chooseAddress');
|
||||||
|
}
|
||||||
|
},
|
||||||
|
complete:(complete)=>{
|
||||||
|
uni.hideLoading()
|
||||||
|
},
|
||||||
|
})
|
||||||
|
})
|
||||||
|
},1000)
|
||||||
if (that.$yroute.query.pinkid !== undefined) {
|
if (that.$yroute.query.pinkid !== undefined) {
|
||||||
that.pinkId = that.$yroute.query.pinkid;
|
that.pinkId = that.$yroute.query.pinkid;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user