order-logistic.vue
4.69 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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
<template>
<div class="logistic-page yoho-page">
<header-box title="物流信息" ref="header"></header-box>
<div class="overview">
<div class="left" >
<img class="logoicon" v-img-src="{src: logo, width: 90, height: 90}"/>
</div>
<div class="right">
<div>
<span class='info'>物流公司:</span>
<span >{{logisticDate.caption}}</span>
</div>
<div>
<span class='info'>快递单号:</span>
<span>{{logisticDate.express_number}}</span>
</div>
</div>
</div><!--end overview-->
<div class="title">
<span>物流详情</span>
</div>
<div class="detail">
<div class="timeline-box" v-for="(detail, index) in logisticDate.express_detail" :key="index">
<span class="timeline-node"></span>
<div class="timeline-info">
<div class="timeline-info-row">
{{detail.accept_address}}
</div>
<div class="timeline-info-row time">
{{detail.acceptTime}}
</div>
</div>
</div>
</div><!--end detail-->
</div><!--end logistic-page-->
</template>
<style>
$logistic_gray: #f0f0f0;
$border_color_light: #eee;
.logistic-page {
background-color: $logistic_gray;
.overview {
height: 150px;
line-height: 120px;
width: 100%;
margin-bottom: 20px;
background-color: #fff;
color: #464646;
border-bottom: 1px solid $border_color_light;
.left {
width: 150px;
float: left;
text-align: center;
height: 100%;
.logoicon {
width: 90px;
height: 90px;
margin: 0 auto;
background-size: 100%;
background-repeat: no-repeat;
background-position: center;
margin-top: 30px;
}
}
.right {
width: 600px;
height: 100%;
float: left;
padding: 36px 0;
div {
height: 40px;
line-height: 44px;
font-size: 24px;
}
}
.info {
padding-right: 4px;
color: #b0b0b0;
}
}
.title {
height: 88px;
line-height: 89px;
background-color: #fff;
padding-left: 30px;
font-size: 34px;
}
.detail {
background-color: #fff;
padding-left: 42px;
margin-bottom: 40px;
}
.timeline-box {
border-left: 1px solid $border_color_light;
position: relative;
padding-left: 42px;
height: 116px;
}
.timeline-node {
position: absolute;
top: 32px;
left: -9.04444px;
display: inline-block;
width: 16px;
height: 16px;
background-color: #b0b0b0;
border-radius: 100%;
}
.timeline-box:first-child {
.timeline-node {
background-color: #000;
width: 22px;
height: 22px;
}
.timeline-info-row {
color: #000;
}
.time {
color: #b0b0b0;
}
}
.timeline-info {
padding: 20px 0;
border-bottom: 1px solid $border_color_light;
}
.timeline-box:last-child {
.timeline-info {
border: none;
}
}
.timeline-info-row {
min-height: 40px;
line-height: 40px;
font-size: 28px;
color: #b0b0b0;
padding-right: 32px;
}
.time {
font-size: 24px;
}
}
</style>
<script>
import $ from 'jquery';
import qs from 'yoho-qs';
import tip from 'common/tip';
import HeaderBox from 'component/header.vue';
export default {
data() {
return {
logisticDate: [],
logo: ''
};
},
created() {
const data = {
orderCode: qs.order_code || '',
type: qs.type || '',
id: qs.id || ''
};
$.ajax({
url: '/me/get-order-logistic-date',
data: data
}).then(result => {
this.logisticDate = result;
if (result && result.logo) {
this.logo = result.logo;
}
}).fail(() => {
tip('网络错误');
});
},
components: {HeaderBox}
};
</script>