Showing
10 changed files
with
141 additions
and
42 deletions
1 | +<template> | ||
2 | + <div class="address-wrapper"> | ||
3 | + <i class="address-icon"></i> | ||
4 | + <div> | ||
5 | + <p class="consignee">{{ userAddress.consignee }}</p> | ||
6 | + <p class="area">{{ userAddress.area }}</p> | ||
7 | + <p class="mobile">{{ userAddress.mobile }}</p> | ||
8 | + </div> | ||
9 | + </div> | ||
10 | +</template> | ||
11 | + | ||
12 | +<script> | ||
13 | +import { createNamespacedHelpers } from "vuex"; | ||
14 | +const { mapGetters } = createNamespacedHelpers("order/orderDetail"); | ||
15 | + | ||
16 | +export default { | ||
17 | + computed: { | ||
18 | + ...mapGetters(["userAddress"]) | ||
19 | + } | ||
20 | +}; | ||
21 | +</script> | ||
22 | + | ||
23 | +<style lang="scss" scoped> | ||
24 | +.address-wrapper { | ||
25 | + display: flex; | ||
26 | + align-items: center; | ||
27 | + | ||
28 | + .consignee { | ||
29 | + font-size: 32px; | ||
30 | + font-weight: bold; | ||
31 | + } | ||
32 | + | ||
33 | + .area { | ||
34 | + color: #999; | ||
35 | + margin: 12px 0; | ||
36 | + } | ||
37 | + | ||
38 | + .mobile { | ||
39 | + font: 28px; | ||
40 | + } | ||
41 | + | ||
42 | + .address-icon { | ||
43 | + width: 48px; | ||
44 | + height: 48px; | ||
45 | + display: block; | ||
46 | + background-size: contain; | ||
47 | + margin-right: 40px; | ||
48 | + background-image: url("~statics/image/order/addr-icon@3x.png"); | ||
49 | + } | ||
50 | +} | ||
51 | +</style> |
1 | -<template> | ||
2 | - <div class="logistics-wrapper"> | ||
3 | - <p>{{ userAddress.consignee }}</p> | ||
4 | - <p>{{ userAddress.area }}</p> | ||
5 | - <p>{{ userAddress.mobile }}</p> | ||
6 | - </div> | ||
7 | -</template> | ||
8 | - | ||
9 | -<script> | ||
10 | -import { createNamespacedHelpers } from "vuex"; | ||
11 | -const { mapGetters } = createNamespacedHelpers("order/orderDetail"); | ||
12 | - | ||
13 | -export default { | ||
14 | - computed: { | ||
15 | - ...mapGetters(["userAddress"]) | ||
16 | - } | ||
17 | -}; | ||
18 | -</script> | ||
19 | - | ||
20 | -<style lang="scss" scoped> | ||
21 | -</style> |
@@ -7,43 +7,47 @@ | @@ -7,43 +7,47 @@ | ||
7 | <p class="status-desc">{{ statusDetail.detailDesc }}</p> | 7 | <p class="status-desc">{{ statusDetail.detailDesc }}</p> |
8 | </div> | 8 | </div> |
9 | <!-- 物流信息 --> | 9 | <!-- 物流信息 --> |
10 | - <div class="logistics item-wrapper"> | ||
11 | - <div class="detail"> | ||
12 | - <p>{{ lastExpressInfo.acceptRemark }}</p> | ||
13 | - <p>{{ lastExpressInfo.createTimeStr }}</p> | 10 | + <div class="logistics-info item-wrapper"> |
11 | + <div class="content"> | ||
12 | + <i class="logistics-icon"></i> | ||
13 | + <div class="info"> | ||
14 | + <p>{{ lastExpressInfo.acceptRemark }}</p> | ||
15 | + <p>{{ lastExpressInfo.createTimeStr }}</p> | ||
16 | + </div> | ||
14 | </div> | 17 | </div> |
18 | + <i class="right-icon"></i> | ||
15 | </div> | 19 | </div> |
16 | <!-- 地址信息 --> | 20 | <!-- 地址信息 --> |
17 | - <logistic-info class="item-wrapper" /> | 21 | + <address-info class="item-wrapper" /> |
18 | <!-- 商品信息 --> | 22 | <!-- 商品信息 --> |
19 | <order-item-info class="item-wrapper" /> | 23 | <order-item-info class="item-wrapper" /> |
20 | <!-- 价格信息 --> | 24 | <!-- 价格信息 --> |
21 | <div class="price-info item-wrapper"> | 25 | <div class="price-info item-wrapper"> |
22 | <p> | 26 | <p> |
23 | - <span>商品金额:</span> | ||
24 | - <span>{{ priceInfo.goodPrice }}</span> | 27 | + <span class="label">商品金额:</span> |
28 | + <span>¥{{ priceInfo.goodPrice }}</span> | ||
25 | </p> | 29 | </p> |
26 | - <p> | ||
27 | - <span>运费:</span> | ||
28 | - <span>{{ priceInfo.feePrice }}</span> | 30 | + <p class="delivery-fee"> |
31 | + <span class="label">运费:</span> | ||
32 | + <span>¥{{ priceInfo.feePrice }}</span> | ||
29 | </p> | 33 | </p> |
30 | <p> | 34 | <p> |
31 | - <span>实际金额:</span> | ||
32 | - <span>{{ priceInfo.realPayPrice }}</span> | 35 | + <span class="label">实际金额:</span> |
36 | + <span class="pay-price">¥{{ priceInfo.realPayPrice }}</span> | ||
33 | </p> | 37 | </p> |
34 | </div> | 38 | </div> |
35 | <!-- 交易信息 --> | 39 | <!-- 交易信息 --> |
36 | <div class="trade-info item-wrapper"> | 40 | <div class="trade-info item-wrapper"> |
37 | <p> | 41 | <p> |
38 | - <span>创建时间:</span> | 42 | + <span class="label">创建时间:</span> |
39 | <span>{{ orderDetail.createTime }}</span> | 43 | <span>{{ orderDetail.createTime }}</span> |
40 | </p> | 44 | </p> |
41 | <p> | 45 | <p> |
42 | - <span>订单编号:</span> | 46 | + <span class="label">订单编号:</span> |
43 | <span>{{ orderDetail.orderCode }}</span> | 47 | <span>{{ orderDetail.orderCode }}</span> |
44 | </p> | 48 | </p> |
45 | <p> | 49 | <p> |
46 | - <span>支付方式:</span> | 50 | + <span class="label">支付方式:</span> |
47 | <span>{{ orderDetail.paymentStr }}</span> | 51 | <span>{{ orderDetail.paymentStr }}</span> |
48 | </p> | 52 | </p> |
49 | </div> | 53 | </div> |
@@ -59,7 +63,7 @@ | @@ -59,7 +63,7 @@ | ||
59 | 63 | ||
60 | <script> | 64 | <script> |
61 | import { createNamespacedHelpers } from "vuex"; | 65 | import { createNamespacedHelpers } from "vuex"; |
62 | -import LogisticInfo from "./components/logistics-info"; | 66 | +import AddressInfo from "./components/address-info"; |
63 | import OrderItemInfo from "./components/order-detail-item"; | 67 | import OrderItemInfo from "./components/order-detail-item"; |
64 | import { Button } from "cube-ui"; | 68 | import { Button } from "cube-ui"; |
65 | 69 | ||
@@ -68,12 +72,12 @@ const { mapActions, mapState, mapGetters } = createNamespacedHelpers( | @@ -68,12 +72,12 @@ const { mapActions, mapState, mapGetters } = createNamespacedHelpers( | ||
68 | ); | 72 | ); |
69 | export default { | 73 | export default { |
70 | components: { | 74 | components: { |
71 | - LogisticInfo, | 75 | + AddressInfo, |
72 | OrderItemInfo, | 76 | OrderItemInfo, |
73 | Button | 77 | Button |
74 | }, | 78 | }, |
75 | asyncData({ store, router }) { | 79 | asyncData({ store, router }) { |
76 | - store.dispatch("order/orderDetail/fetchOrderDetail", router.params); | 80 | + // store.dispatch("order/orderDetail/fetchOrderDetail", router.params); |
77 | }, | 81 | }, |
78 | mounted() { | 82 | mounted() { |
79 | this.fetchOrderDetail(this.$route.params); | 83 | this.fetchOrderDetail(this.$route.params); |
@@ -101,6 +105,7 @@ export default { | @@ -101,6 +105,7 @@ export default { | ||
101 | height: 100vh; | 105 | height: 100vh; |
102 | overflow-x: hidden; | 106 | overflow-x: hidden; |
103 | overflow-y: auto; | 107 | overflow-y: auto; |
108 | + font-size: 24px; | ||
104 | 109 | ||
105 | .item-wrapper { | 110 | .item-wrapper { |
106 | border-top: 1px solid #eee; | 111 | border-top: 1px solid #eee; |
@@ -117,15 +122,79 @@ export default { | @@ -117,15 +122,79 @@ export default { | ||
117 | } | 122 | } |
118 | 123 | ||
119 | .status-desc { | 124 | .status-desc { |
120 | - font-size: 24px; | ||
121 | color: #999; | 125 | color: #999; |
122 | letter-spacing: 0; | 126 | letter-spacing: 0; |
123 | margin-top: 30px; | 127 | margin-top: 30px; |
124 | } | 128 | } |
125 | } | 129 | } |
126 | 130 | ||
127 | - .logistics { | 131 | + .logistics-info { |
128 | margin-top: 40px; | 132 | margin-top: 40px; |
133 | + display: flex; | ||
134 | + align-items: center; | ||
135 | + justify-content: space-between; | ||
136 | + | ||
137 | + .content { | ||
138 | + display: flex; | ||
139 | + align-items: center; | ||
140 | + | ||
141 | + .info :last-child { | ||
142 | + color: #999; | ||
143 | + margin-top: 12px; | ||
144 | + } | ||
145 | + } | ||
146 | + | ||
147 | + .logistics-icon, | ||
148 | + .right-icon { | ||
149 | + width: 48px; | ||
150 | + height: 48px; | ||
151 | + display: block; | ||
152 | + background-size: contain; | ||
153 | + } | ||
154 | + | ||
155 | + .logistics-icon { | ||
156 | + margin-right: 40px; | ||
157 | + background-image: url("~statics/image/order/logistics-icon@3x.png"); | ||
158 | + } | ||
159 | + | ||
160 | + .right-icon { | ||
161 | + background-image: url("~statics/image/order/right-arrow-icon@3x.png"); | ||
162 | + } | ||
163 | + } | ||
164 | + | ||
165 | + .price-info { | ||
166 | + font-size: 28px; | ||
167 | + | ||
168 | + & > p { | ||
169 | + display: flex; | ||
170 | + justify-content: space-between; | ||
171 | + } | ||
172 | + | ||
173 | + & > p:first-child { | ||
174 | + color: #999; | ||
175 | + } | ||
176 | + | ||
177 | + .delivery-fee { | ||
178 | + margin: 12px 0; | ||
179 | + color: #999; | ||
180 | + } | ||
181 | + | ||
182 | + .pay-price { | ||
183 | + color: #d0021b; | ||
184 | + } | ||
185 | + } | ||
186 | + | ||
187 | + .trade-info { | ||
188 | + font-size: 28px; | ||
189 | + | ||
190 | + & > :first-child + p { | ||
191 | + margin: 20px 0; | ||
192 | + } | ||
193 | + } | ||
194 | + | ||
195 | + .label { | ||
196 | + font-size: 28px; | ||
197 | + margin-right: 12px; | ||
129 | } | 198 | } |
130 | 199 | ||
131 | .actions { | 200 | .actions { |
apps/statics/image/order/addr-icon@3x.png
0 → 100644
![](/fe/xianyu-ufo-app-web/raw/feefda45924001a1376496890dec46ad914e80fb/apps/statics/image/order/addr-icon@3x.png)
1.36 KB
![](/fe/xianyu-ufo-app-web/raw/feefda45924001a1376496890dec46ad914e80fb/apps/statics/image/order/logistics-icon@3x.png)
1.01 KB
![](/fe/xianyu-ufo-app-web/raw/feefda45924001a1376496890dec46ad914e80fb/apps/statics/image/order/right-arrow-icon@3x.png)
178 Bytes
apps/statics/image/order/time-icon@3x.png
0 → 100644
![](/fe/xianyu-ufo-app-web/raw/feefda45924001a1376496890dec46ad914e80fb/apps/statics/image/order/time-icon@3x.png)
795 Bytes
apps/statics/image/order/单选框@3x.png
0 → 100644
![](/fe/xianyu-ufo-app-web/raw/feefda45924001a1376496890dec46ad914e80fb/apps/statics/image/order/%E5%8D%95%E9%80%89%E6%A1%86@3x.png)
1.62 KB
apps/statics/image/order/单选框选择@3x.png
0 → 100644
![](/fe/xianyu-ufo-app-web/raw/feefda45924001a1376496890dec46ad914e80fb/apps/statics/image/order/%E5%8D%95%E9%80%89%E6%A1%86%E9%80%89%E6%8B%A9@3x.png)
1.45 KB
@@ -27,7 +27,7 @@ export default function() { | @@ -27,7 +27,7 @@ export default function() { | ||
27 | async fetchOrderDetail({ commit }, { owner, code } = {}) { | 27 | async fetchOrderDetail({ commit }, { owner, code } = {}) { |
28 | const res = await this.$api.get('/api/order/detail', { | 28 | const res = await this.$api.get('/api/order/detail', { |
29 | tabType: owner, | 29 | tabType: owner, |
30 | - orderCode: code, | 30 | + orderCode: +code, |
31 | 31 | ||
32 | // Todo 删除 | 32 | // Todo 删除 |
33 | uid: 600043484, | 33 | uid: 600043484, |
-
Please register or login to post a comment