Fix:3256 【商城小程序】收货地址页面,给当前选择的地址增加一个标识,放在地址右下角
This commit is contained in:
@@ -413,33 +413,11 @@ export default {
|
|||||||
_this.getCartInfo()
|
_this.getCartInfo()
|
||||||
//获取用户信息
|
//获取用户信息
|
||||||
_this.$store.dispatch("getUser", true)
|
_this.$store.dispatch("getUser", true)
|
||||||
const chooseAddress = uni.getStorageSync('chooseAddress') || {}
|
|
||||||
// 监听到选择收货地址
|
|
||||||
if (chooseAddress.id) {
|
|
||||||
uni.showModal({
|
|
||||||
title:'确定修改地址吗?',
|
|
||||||
content: '',
|
|
||||||
showCancel: true,
|
|
||||||
cancelText: '取消',
|
|
||||||
confirmText: '确认',
|
|
||||||
success: (res) => {
|
|
||||||
if(res.confirm) {
|
|
||||||
_this.addressInfo = chooseAddress
|
|
||||||
// 地址切换也要重新计算一下
|
|
||||||
_this.computedPrice('onLoad chooseAddress')
|
|
||||||
}
|
|
||||||
},
|
|
||||||
complete: () => {
|
|
||||||
uni.hideLoading()
|
|
||||||
// uni.setStorageSync('chooseAddress', {})
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
isNullOrEmpty,
|
isNullOrEmpty,
|
||||||
couponMax(e) {
|
couponMax(e) {
|
||||||
console.log(e, 'dxdhkasjhdajks');
|
|
||||||
this.couponTitle = e.couponTitle
|
this.couponTitle = e.couponTitle
|
||||||
this.couponId = this.$yroute.query.couponId || uni.getStorageSync('couponId') || 0
|
this.couponId = this.$yroute.query.couponId || uni.getStorageSync('couponId') || 0
|
||||||
},
|
},
|
||||||
@@ -528,8 +506,30 @@ export default {
|
|||||||
} else {
|
} else {
|
||||||
_this.addressInfo = uni.getStorageSync('chooseAddress') ? uni.getStorageSync('chooseAddress') : data.addressInfo || {}
|
_this.addressInfo = uni.getStorageSync('chooseAddress') ? uni.getStorageSync('chooseAddress') : data.addressInfo || {}
|
||||||
}
|
}
|
||||||
|
const chooseAddress = uni.getStorageSync('chooseAddress') || {}
|
||||||
|
const sourceAddress = uni.getStorageSync('sourceAddress') || data.addressInfo || uni.getStorageSync('chooseAddress')
|
||||||
|
// 监听到选择收货地址
|
||||||
|
if (chooseAddress.id && (chooseAddress.id !== sourceAddress.id)) {
|
||||||
|
uni.showModal({
|
||||||
|
title:'确定修改地址吗?',
|
||||||
|
content: '',
|
||||||
|
showCancel: true,
|
||||||
|
cancelText: '取消',
|
||||||
|
confirmText: '确认',
|
||||||
|
success: (res) => {
|
||||||
|
if(res.confirm) {
|
||||||
|
_this.addressInfo = chooseAddress
|
||||||
|
// 地址切换也要重新计算一下
|
||||||
|
uni.setStorageSync('sourceAddress', _this.addressInfo || '')
|
||||||
|
_this.computedPrice('onLoad chooseAddress')
|
||||||
|
}
|
||||||
|
},
|
||||||
|
complete: () => {
|
||||||
|
uni.hideLoading()
|
||||||
|
// uni.setStorageSync('chooseAddress', {})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
_this.systemStore = data.systemStore || {}
|
_this.systemStore = data.systemStore || {}
|
||||||
_this.storeSelfMention = data.storeSelfMention
|
_this.storeSelfMention = data.storeSelfMention
|
||||||
_this.computedPrice()
|
_this.computedPrice()
|
||||||
|
|||||||
Reference in New Issue
Block a user