Fix:5106 【商城小程序】选择地址页面,地址列表默认选中项逻辑错误
This commit is contained in:
@@ -633,11 +633,11 @@ export default {
|
||||
computed: mapGetters(["userInfo"]),
|
||||
onShow() {
|
||||
const _this = this
|
||||
const chooseAddress = uni.getStorageSync('chooseAddress') || {}
|
||||
const chooseAddress = uni.getStorageSync('updateOrderAddress') || {}
|
||||
const addressId = chooseAddress.id || ''
|
||||
// 监听到选择收货地址
|
||||
if (addressId && this._orderId) {
|
||||
uni.setStorageSync('chooseAddress', {})
|
||||
uni.setStorageSync('updateOrderAddress', {})
|
||||
uni.showModal({
|
||||
title:'确定修改地址吗?',
|
||||
content: '提交后将进入审核流程,请确认是否继续',
|
||||
@@ -655,7 +655,6 @@ export default {
|
||||
icon: 'success',
|
||||
title: '已提交审核'
|
||||
})
|
||||
uni.setStorageSync('sourceAddress', chooseAddress)
|
||||
_this.changeType()
|
||||
}).finally(() => {
|
||||
uni.hideLoading()
|
||||
@@ -923,7 +922,7 @@ export default {
|
||||
this.$yrouter.push({
|
||||
path: "/pages/user/address/AddressManagement/index",
|
||||
query: {
|
||||
choosMode: 1
|
||||
choosMode: 4
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
@@ -646,11 +646,11 @@ export default {
|
||||
this.key = opts.key || ''
|
||||
},
|
||||
onShow() {
|
||||
const chooseAddress = uni.getStorageSync('chooseAddress') || {}
|
||||
const chooseAddress = uni.getStorageSync('updateOrderAddress') || {}
|
||||
const addressId = chooseAddress.id || ''
|
||||
// 监听到选择收货地址
|
||||
if (addressId && this.addressEditOrderId) {
|
||||
uni.setStorageSync('chooseAddress', {})
|
||||
uni.setStorageSync('updateOrderAddress', {})
|
||||
uni.showModal({
|
||||
title:'确定修改地址吗?',
|
||||
content: '提交后将进入审核流程,请确认是否继续',
|
||||
@@ -668,7 +668,6 @@ export default {
|
||||
icon: 'success',
|
||||
title: '已提交审核'
|
||||
})
|
||||
uni.setStorageSync('sourceAddress', chooseAddress)
|
||||
this.getDetail()
|
||||
}).finally(() => {
|
||||
uni.hideLoading()
|
||||
@@ -798,7 +797,7 @@ export default {
|
||||
this.$yrouter.push({
|
||||
path:'/pages/user/address/AddressManagement/index',
|
||||
query: {
|
||||
choosMode: 1
|
||||
choosMode: 4
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
@@ -150,6 +150,11 @@ export default {
|
||||
uni.setStorageSync('giftChooseAddress', item)
|
||||
this.$yrouter.back()
|
||||
}
|
||||
// 来源修改订单地址(复用订单创建页的choosMode但避免污染chooseAddress)
|
||||
if (this.choosMode === 4) {
|
||||
uni.setStorageSync('updateOrderAddress', item)
|
||||
this.$yrouter.back()
|
||||
}
|
||||
},
|
||||
refresh() {
|
||||
this.addressList = []
|
||||
|
||||
Reference in New Issue
Block a user