- 默认地址选中

This commit is contained in:
sin 2019-04-10 22:33:16 +08:00
parent efe80aeeec
commit 50d8ec33ee

View File

@ -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 {