Fix:3262 【礼品功能】每次领取礼品时输入新地址,都会把上一次保存的地址覆盖掉,设置新地址也要保留上一次的地址

This commit is contained in:
linxi
2025-02-24 17:01:26 +08:00
parent 37be03f3ee
commit f9a89a7129
2 changed files with 18 additions and 11 deletions
+4 -3
View File
@@ -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()
}
})