- 默认地址选中
This commit is contained in:
parent
efe80aeeec
commit
50d8ec33ee
@ -26,7 +26,7 @@
|
|||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
chosenAddressId: '1',
|
chosenAddressId: -1,
|
||||||
isSelect: false,
|
isSelect: false,
|
||||||
list: [],
|
list: [],
|
||||||
}
|
}
|
||||||
@ -55,6 +55,9 @@
|
|||||||
this.isSelect = this.$route.query.id > 0;
|
this.isSelect = this.$route.query.id > 0;
|
||||||
GetAddressList().then(response => {
|
GetAddressList().then(response => {
|
||||||
this.list = response.map(item => {
|
this.list = response.map(item => {
|
||||||
|
if (item.hasDefault == 2) {
|
||||||
|
this.chosenAddressId = item.id;
|
||||||
|
}
|
||||||
|
|
||||||
// convert data
|
// convert data
|
||||||
return {
|
return {
|
||||||
|
Loading…
Reference in New Issue
Block a user