Showing
18 changed files
with
140 additions
and
3 deletions
apps/pages/order/components/time-line.vue
0 → 100644
1 | +<template> | ||
2 | + <ul class="time-line-wrapper"> | ||
3 | + <li | ||
4 | + :class="i === 0 ? 'time-line-item active' : 'time-line-item'" | ||
5 | + v-for="(lineInfo, i) in lineList" | ||
6 | + :key="i" | ||
7 | + > | ||
8 | + <i class="circle"></i> | ||
9 | + <span class="content">{{ lineInfo }}</span> | ||
10 | + </li> | ||
11 | + </ul> | ||
12 | +</template> | ||
13 | + | ||
14 | +<script> | ||
15 | +export default { | ||
16 | + data() { | ||
17 | + return { | ||
18 | + lineList: [ | ||
19 | + "已签收", | ||
20 | + "南京市正在派送中,请准备签收(派件人:小明 电话:18323458818)", | ||
21 | + "快件到达【江宁区秣周东路】集散处", | ||
22 | + "南京市快件在【南京江宁集散中心】已装车,准备发往【南京浦口集散处】" | ||
23 | + ] | ||
24 | + }; | ||
25 | + } | ||
26 | +}; | ||
27 | +</script> | ||
28 | + | ||
29 | +<style lang="scss" scoped> | ||
30 | +.time-line-wrapper { | ||
31 | + padding: 50px; | ||
32 | + | ||
33 | + .time-line-item { | ||
34 | + position: relative; | ||
35 | + padding: 0 40px 40px 40px; | ||
36 | + width: 50%; | ||
37 | + border-left: 1px solid #eee; | ||
38 | + font-size: 28px; | ||
39 | + color: #999; | ||
40 | + display: flex; | ||
41 | + align-items: flex-start; | ||
42 | + | ||
43 | + &:last-child { | ||
44 | + border-left: none; | ||
45 | + } | ||
46 | + | ||
47 | + .content { | ||
48 | + margin-top: -6px; | ||
49 | + } | ||
50 | + | ||
51 | + .circle { | ||
52 | + width: 20px; | ||
53 | + height: 20px; | ||
54 | + background: #eee; | ||
55 | + border-radius: 50%; | ||
56 | + display: block; | ||
57 | + position: absolute; | ||
58 | + left: -10px; | ||
59 | + } | ||
60 | + | ||
61 | + &.active { | ||
62 | + font-size: 32px; | ||
63 | + color: #000; | ||
64 | + | ||
65 | + .content { | ||
66 | + margin-top: 0; | ||
67 | + } | ||
68 | + | ||
69 | + & > i { | ||
70 | + width: 40px; | ||
71 | + height: 40px; | ||
72 | + left: -20px; | ||
73 | + display: block; | ||
74 | + position: absolute; | ||
75 | + border-radius: 50%; | ||
76 | + background-image: url("~statics/image/order/time-icon@3x.png"); | ||
77 | + background-size: contain; | ||
78 | + } | ||
79 | + } | ||
80 | + } | ||
81 | +} | ||
82 | +</style> |
apps/pages/order/delivery.vue
0 → 100644
1 | <template> | 1 | <template> |
2 | <div class="logistics-wrapper"> | 2 | <div class="logistics-wrapper"> |
3 | - 物流信息 | 3 | + <div class="header"> |
4 | + <p class="title">{{ logisticInfo.expressSender }}</p> | ||
5 | + <img class="step" alt="" :src="stageImgUrl" /> | ||
6 | + </div> | ||
7 | + <div class="platform-delivery-info"> | ||
8 | + <time-line /> | ||
9 | + </div> | ||
10 | + <div class="platform-identification-info"></div> | ||
11 | + <div class="seller-delivery-info"></div> | ||
4 | </div> | 12 | </div> |
5 | </template> | 13 | </template> |
6 | 14 | ||
7 | <script> | 15 | <script> |
8 | import { createNamespacedHelpers } from "vuex"; | 16 | import { createNamespacedHelpers } from "vuex"; |
9 | -const { mapActions } = createNamespacedHelpers("order/logisticsInfo"); | 17 | +import TimeLine from "./components/time-line"; |
18 | + | ||
19 | +const { mapActions, mapState, mapGetters } = createNamespacedHelpers( | ||
20 | + "order/logisticsInfo" | ||
21 | +); | ||
10 | 22 | ||
11 | export default { | 23 | export default { |
12 | - computed: {}, | 24 | + components: { |
25 | + TimeLine | ||
26 | + }, | ||
27 | + computed: { | ||
28 | + ...mapState(["logisticInfo"]), | ||
29 | + ...mapGetters(["stageImgUrl"]) | ||
30 | + }, | ||
13 | mounted() { | 31 | mounted() { |
14 | this.fetchLogisticInfo(this.$route.params); | 32 | this.fetchLogisticInfo(this.$route.params); |
15 | }, | 33 | }, |
@@ -23,5 +41,11 @@ export default { | @@ -23,5 +41,11 @@ export default { | ||
23 | .logistics-wrapper { | 41 | .logistics-wrapper { |
24 | height: 100vh; | 42 | height: 100vh; |
25 | -webkit-box-orient: vertical; | 43 | -webkit-box-orient: vertical; |
44 | + | ||
45 | + .step { | ||
46 | + display: block; | ||
47 | + margin: 0 auto; | ||
48 | + height: 100px; | ||
49 | + } | ||
26 | } | 50 | } |
27 | </style> | 51 | </style> |
![](/fe/xianyu-ufo-app-web/raw/ea5cc65da98fcdc10909b5ab3ea48ccf84c8b60d/apps/statics/image/order/logistics_progress_10@3x.png)
12.6 KB
![](/fe/xianyu-ufo-app-web/raw/ea5cc65da98fcdc10909b5ab3ea48ccf84c8b60d/apps/statics/image/order/logistics_progress_11@3x.png)
9.92 KB
![](/fe/xianyu-ufo-app-web/raw/ea5cc65da98fcdc10909b5ab3ea48ccf84c8b60d/apps/statics/image/order/logistics_progress_12@3x.png)
13 KB
![](/fe/xianyu-ufo-app-web/raw/ea5cc65da98fcdc10909b5ab3ea48ccf84c8b60d/apps/statics/image/order/logistics_progress_13@3x.png)
10.2 KB
![](/fe/xianyu-ufo-app-web/raw/ea5cc65da98fcdc10909b5ab3ea48ccf84c8b60d/apps/statics/image/order/logistics_progress_1@3x.png)
19.8 KB
![](/fe/xianyu-ufo-app-web/raw/ea5cc65da98fcdc10909b5ab3ea48ccf84c8b60d/apps/statics/image/order/logistics_progress_2@3x.png)
19.1 KB
![](/fe/xianyu-ufo-app-web/raw/ea5cc65da98fcdc10909b5ab3ea48ccf84c8b60d/apps/statics/image/order/logistics_progress_3@3x.png)
15.7 KB
![](/fe/xianyu-ufo-app-web/raw/ea5cc65da98fcdc10909b5ab3ea48ccf84c8b60d/apps/statics/image/order/logistics_progress_4@3x.png)
15.4 KB
![](/fe/xianyu-ufo-app-web/raw/ea5cc65da98fcdc10909b5ab3ea48ccf84c8b60d/apps/statics/image/order/logistics_progress_5@3x.png)
10.4 KB
![](/fe/xianyu-ufo-app-web/raw/ea5cc65da98fcdc10909b5ab3ea48ccf84c8b60d/apps/statics/image/order/logistics_progress_6@3x.png)
13 KB
![](/fe/xianyu-ufo-app-web/raw/ea5cc65da98fcdc10909b5ab3ea48ccf84c8b60d/apps/statics/image/order/logistics_progress_7@3x.png)
10.2 KB
![](/fe/xianyu-ufo-app-web/raw/ea5cc65da98fcdc10909b5ab3ea48ccf84c8b60d/apps/statics/image/order/logistics_progress_8@3x.png)
12.7 KB
![](/fe/xianyu-ufo-app-web/raw/ea5cc65da98fcdc10909b5ab3ea48ccf84c8b60d/apps/statics/image/order/logistics_progress_9@3x.png)
9.97 KB
1 | +/* eslint-disable operator-linebreak */ | ||
1 | export default function() { | 2 | export default function() { |
2 | return { | 3 | return { |
3 | namespaced: true, | 4 | namespaced: true, |
@@ -9,6 +10,13 @@ export default function() { | @@ -9,6 +10,13 @@ export default function() { | ||
9 | state.logisticInfo = data; | 10 | state.logisticInfo = data; |
10 | }, | 11 | }, |
11 | }, | 12 | }, |
13 | + getters: { | ||
14 | + stageImgUrl: ({ logisticInfo: { stage } }) => { | ||
15 | + return stage | ||
16 | + ? require(`../../statics/image/order/logistics_progress_${stage}@3x.png`) | ||
17 | + : ''; | ||
18 | + }, | ||
19 | + }, | ||
12 | actions: { | 20 | actions: { |
13 | // 获取物流信息 | 21 | // 获取物流信息 |
14 | async fetchLogisticInfo({ commit }, { owner, code } = {}) { | 22 | async fetchLogisticInfo({ commit }, { owner, code } = {}) { |
-
Please register or login to post a comment