- 添加获取默认地址
This commit is contained in:
@@ -57,6 +57,7 @@
|
||||
<script>
|
||||
|
||||
import {createOrder} from '../../api/order';
|
||||
import {GetDefaultAddress} from '../../api/user';
|
||||
import orderStore from '../../store/order'
|
||||
import eventBus from '../eventBus';
|
||||
|
||||
@@ -132,8 +133,13 @@
|
||||
}
|
||||
this.addressData = this.$store.state.addressData;
|
||||
},
|
||||
activated() {
|
||||
|
||||
created() {
|
||||
GetDefaultAddress().then((result) => {
|
||||
if (result) {
|
||||
this.type = 'add1'
|
||||
this.addressData = result
|
||||
}
|
||||
})
|
||||
},
|
||||
store: orderStore,
|
||||
};
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
country: data.country,
|
||||
mobile: data.tel,
|
||||
name: data.name,
|
||||
hasDefault: data.isDefault,
|
||||
hasDefault: data.isDefault ? 2 : 1,
|
||||
};
|
||||
|
||||
if (data.id) {
|
||||
|
||||
Reference in New Issue
Block a user