Fix:3262 【礼品功能】每次领取礼品时输入新地址,都会把上一次保存的地址覆盖掉,设置新地址也要保留上一次的地址
This commit is contained in:
@@ -76,7 +76,7 @@ export default {
|
||||
// 组件数据
|
||||
giftNotice: '',
|
||||
isReceive: false,
|
||||
address: {},
|
||||
address: [],
|
||||
order: ''
|
||||
}
|
||||
},
|
||||
@@ -84,7 +84,8 @@ export default {
|
||||
addr: {
|
||||
handler(newVal, oldVal) {
|
||||
if (newVal && newVal.id) {
|
||||
this.address = newVal
|
||||
// this.address = newVal
|
||||
this.setAddress()
|
||||
}
|
||||
},
|
||||
deep: true
|
||||
@@ -132,7 +133,7 @@ export default {
|
||||
if (res.data.length === 0) {
|
||||
this.$refs.addressDialog.open()
|
||||
} else {
|
||||
this.address = res.data.filter(item => item.isDefault === 1).length === 0 ? res.data[0] : res.data.filter(item => item.isDefault === 1)[0]
|
||||
this.address = res.data
|
||||
this.$refs.AddressList.open()
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user