step2.vue
2.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
<template>
<div>
<Row :gutter="16">
<i-col span="8">
<order-user-info :order-info="orderInfo"></order-user-info>
</i-col>
<i-col span="8">
<div class="ivu-card">
<div class="ivu-card-head">
<p slot="title">退货地址信息</p>
</div>
<div class="ivu-card-body">
<Row>
<i-col span="24">
{{ shopsAddressInfo.province }}
{{ shopsAddressInfo.city }}
{{ shopsAddressInfo.county }}
{{ shopsAddressInfo.street }}
</i-col>
</Row>
<Row>
<i-col span="24">{{ shopsAddressInfo.detailAdd }}</i-col>
</Row>
<Row>
<i-col span="24">{{ customerTel }}</i-col>
</Row>
</div>
</div>
</i-col>
</Row>
<Button type="primary" @click="prevStep(orderCode)">上一步</Button>
<Button type="primary" @click="nextStep(orderCode)">下一步</Button>
</div>
</template>
<script>
import { orderUserInfo } from '../../components';
import ShopService from 'services/shop/shop-service';
export default {
components: { orderUserInfo },
props: ['current', 'orderCode', 'orderInfo'],
data() {
return {
shopsAddressInfo: [],
customerTel: '',
};
},
created() {
this.shopService = new ShopService();
this.getShopInfo();
this.$emit('nextStep', 1);
},
methods: {
getShopInfo() {
this.shopService.getShop().then(res => {
const { shopsAddressInfo, customerTel } = res.data;
this.shopsAddressInfo = shopsAddressInfo;
this.customerTel = customerTel;
});
},
nextStep(code) {
this.$router.push({
name: 'order.deliver.step3',
params: {},
query: {
orderCode: code,
},
});
},
prevStep(code) {
this.$router.push({
name: 'order.deliver.step1',
params: {},
query: {
orderCode: code,
},
});
},
},
};
</script>