deliver.vue
1.11 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
<template>
<div>
<Row>
<Steps :current="current">
<Step title="确认订单信息"></Step>
<Step title="确认发货/退货地址信息"></Step>
<Step title="选择物流服务"></Step>
</Steps>
</Row>
<Row class="deliver-step">
<router-view :current="current" :order-code="orderCode" :order-info="orderInfo" @nextStep="nextStep">
</router-view>
</Row>
</div>
</template>
<script>
import OrderService from 'services/order/order-service';
import _ from 'lodash';
export default {
data() {
return {
orderCode: this.$route.query.orderCode,
current: 0,
orderInfo: [],
};
},
created() {
this.orderService = new OrderService();
this.getOrderInfo();
},
methods: {
nextStep(step) {
this.current = step;
},
//获取订单详情
getOrderInfo() {
this.orderService.orderDetail({ orderCode: +this.orderCode }).then(ret => {
this.orderInfo = _.get(ret, 'data', []);
});
},
},
};
</script>
<style lang="scss">
.deliver-step {
padding: 20px;
button {
margin-top: 20px;
}
}
</style>