Showing
5 changed files
with
143 additions
and
6 deletions
@@ -17,6 +17,20 @@ | @@ -17,6 +17,20 @@ | ||
17 | <span>{{ info.refundAmount }}</span> | 17 | <span>{{ info.refundAmount }}</span> |
18 | </p> | 18 | </p> |
19 | </div> | 19 | </div> |
20 | + <div v-if="isPlatformFee" class="price-info"> | ||
21 | + <p class="price-item"> | ||
22 | + <span>{{ info.orderPriceDesc }}</span> | ||
23 | + <span>{{ info.orderPrice }}</span> | ||
24 | + </p> | ||
25 | + <p class="price-item"> | ||
26 | + <span>{{ info.penaltyDesc }} ({{ info.penaltyRate }})</span> | ||
27 | + <span>{{ info.penaltyAmount }}</span> | ||
28 | + </p> | ||
29 | + <p class="price-item"> | ||
30 | + <span>{{ info.refundDesc }}</span> | ||
31 | + <span>{{ info.refundAmount }}</span> | ||
32 | + </p> | ||
33 | + </div> | ||
20 | </div> | 34 | </div> |
21 | </template> | 35 | </template> |
22 | 36 | ||
@@ -25,7 +39,19 @@ export default { | @@ -25,7 +39,19 @@ export default { | ||
25 | props: { | 39 | props: { |
26 | info: { | 40 | info: { |
27 | type: Object, | 41 | type: Object, |
28 | - default: {} | 42 | + default: function() { |
43 | + return {}; | ||
44 | + } | ||
45 | + }, | ||
46 | + isPlatformFee: { | ||
47 | + type: Boolean, | ||
48 | + default: false | ||
49 | + }, | ||
50 | + platformFeeInfo: { | ||
51 | + type: Object, | ||
52 | + default: function() { | ||
53 | + return {}; | ||
54 | + } | ||
29 | } | 55 | } |
30 | }, | 56 | }, |
31 | computed: { | 57 | computed: { |
@@ -35,7 +61,7 @@ export default { | @@ -35,7 +61,7 @@ export default { | ||
35 | const regexp = /#\*(.*?)\*#/; | 61 | const regexp = /#\*(.*?)\*#/; |
36 | return confirmDesc.split(regexp); | 62 | return confirmDesc.split(regexp); |
37 | } else { | 63 | } else { |
38 | - return [desc]; | 64 | + return [confirmDesc]; |
39 | } | 65 | } |
40 | } | 66 | } |
41 | } | 67 | } |
1 | +<template> | ||
2 | + <div class="platform-fee-info-wrapper"> | ||
3 | + <div class="price-info"> | ||
4 | + <p class="price-item"> | ||
5 | + <span>{{ platformFeeInfo.orderPriceDesc }}</span> | ||
6 | + <span>{{ platformFeeInfo.orderPrice }}</span> | ||
7 | + </p> | ||
8 | + <p class="price-item"> | ||
9 | + <span | ||
10 | + >{{ platformFeeInfo.penaltyDesc }} ({{ | ||
11 | + platformFeeInfo.penaltyRate | ||
12 | + }})</span | ||
13 | + > | ||
14 | + <span>{{ platformFeeInfo.penaltyAmount }}</span> | ||
15 | + </p> | ||
16 | + <p class="price-item"> | ||
17 | + <span>{{ platformFeeInfo.refundDesc }}</span> | ||
18 | + <span>{{ platformFeeInfo.refundAmount }}</span> | ||
19 | + </p> | ||
20 | + </div> | ||
21 | + </div> | ||
22 | +</template> | ||
23 | + | ||
24 | +<script> | ||
25 | +export default { | ||
26 | + props: { | ||
27 | + platformFeeInfo: { | ||
28 | + type: Object, | ||
29 | + default: function() { | ||
30 | + return {}; | ||
31 | + } | ||
32 | + } | ||
33 | + } | ||
34 | +}; | ||
35 | +</script> | ||
36 | + | ||
37 | +<style lang="scss" scoped> | ||
38 | +.platform-fee-info-wrapper { | ||
39 | + display: flex; | ||
40 | + padding: 0 40px; | ||
41 | + color: #000; | ||
42 | + | ||
43 | + .confrim-info { | ||
44 | + font-size: 28px; | ||
45 | + text-align: center; | ||
46 | + flex: 1; | ||
47 | + | ||
48 | + span { | ||
49 | + color: #d0021b; | ||
50 | + } | ||
51 | + | ||
52 | + & > :first-child, | ||
53 | + & > :last-child { | ||
54 | + color: #000; | ||
55 | + padding-left: 10px; | ||
56 | + } | ||
57 | + | ||
58 | + // p { | ||
59 | + // display: inline-block; | ||
60 | + // text-align: left; | ||
61 | + // max-width: 100%; | ||
62 | + // } | ||
63 | + } | ||
64 | + | ||
65 | + .price-info { | ||
66 | + flex: 1; | ||
67 | + | ||
68 | + .price-item { | ||
69 | + display: flex; | ||
70 | + justify-content: space-between; | ||
71 | + | ||
72 | + .penalty { | ||
73 | + color: #d0021b; | ||
74 | + } | ||
75 | + } | ||
76 | + } | ||
77 | +} | ||
78 | +</style> | ||
79 | + |
1 | <template> | 1 | <template> |
2 | - <router-link :to="toLinkParam"> | 2 | + <router-link :to="toLinkParam" class="detial-item-wrapper"> |
3 | <div class="order-item-wrapper"> | 3 | <div class="order-item-wrapper"> |
4 | <div class="item-img"> | 4 | <div class="item-img"> |
5 | <image-format | 5 | <image-format |
@@ -47,6 +47,10 @@ export default { | @@ -47,6 +47,10 @@ export default { | ||
47 | </script> | 47 | </script> |
48 | 48 | ||
49 | <style lang="scss" scoped> | 49 | <style lang="scss" scoped> |
50 | +.detial-item-wrapper { | ||
51 | + display: block; | ||
52 | +} | ||
53 | + | ||
50 | .order-item-wrapper { | 54 | .order-item-wrapper { |
51 | display: flex; | 55 | display: flex; |
52 | 56 |
@@ -27,7 +27,9 @@ | @@ -27,7 +27,9 @@ | ||
27 | <!-- 价格信息 --> | 27 | <!-- 价格信息 --> |
28 | <div class="price-info item-wrapper"> | 28 | <div class="price-info item-wrapper"> |
29 | <p> | 29 | <p> |
30 | - <span class="label">平台费用:<i class="tip"></i></span> | 30 | + <span class="label platform-fee" |
31 | + >平台费用:<i @click="onPlatformFee" class="tip"></i | ||
32 | + ></span> | ||
31 | <span>{{ platformFee.amount }}</span> | 33 | <span>{{ platformFee.amount }}</span> |
32 | </p> | 34 | </p> |
33 | <p class="delivery-fee"> | 35 | <p class="delivery-fee"> |
@@ -107,6 +109,7 @@ import DetailFooter from "./components//detail-footer"; | @@ -107,6 +109,7 @@ import DetailFooter from "./components//detail-footer"; | ||
107 | import OrderActions from "../components/order-actions"; | 109 | import OrderActions from "../components/order-actions"; |
108 | 110 | ||
109 | import orderActionMixin from "./mixins/order-action"; | 111 | import orderActionMixin from "./mixins/order-action"; |
112 | +import PlatformFeeInfo from "../components/platform-fee-info"; | ||
110 | 113 | ||
111 | const STORE_PATH = "order/orderDetail"; | 114 | const STORE_PATH = "order/orderDetail"; |
112 | 115 | ||
@@ -151,7 +154,26 @@ export default { | @@ -151,7 +154,26 @@ export default { | ||
151 | ]) | 154 | ]) |
152 | }, | 155 | }, |
153 | methods: { | 156 | methods: { |
154 | - ...mapActions(["fetchOrderDetail"]) | 157 | + ...mapActions(["fetchOrderDetail"]), |
158 | + onPlatformFee() { | ||
159 | + this.$createDialog( | ||
160 | + { | ||
161 | + type: "alert", | ||
162 | + title: "平台费用", | ||
163 | + confirmBtn: { text: "我知道了" } | ||
164 | + }, | ||
165 | + createElement => { | ||
166 | + return [ | ||
167 | + createElement(PlatformFeeInfo, { | ||
168 | + props: { | ||
169 | + platformFeeInfo: { orderPriceDesc: "1341234123" } | ||
170 | + }, | ||
171 | + slot: "content" | ||
172 | + }) | ||
173 | + ]; | ||
174 | + } | ||
175 | + ).show(); | ||
176 | + } | ||
155 | } | 177 | } |
156 | }; | 178 | }; |
157 | </script> | 179 | </script> |
@@ -232,6 +254,12 @@ export default { | @@ -232,6 +254,12 @@ export default { | ||
232 | .price-info { | 254 | .price-info { |
233 | font-size: 28px; | 255 | font-size: 28px; |
234 | 256 | ||
257 | + .platform-fee { | ||
258 | + line-height: 1; | ||
259 | + display: flex; | ||
260 | + align-items: center; | ||
261 | + } | ||
262 | + | ||
235 | .tip { | 263 | .tip { |
236 | width: 60px; | 264 | width: 60px; |
237 | height: 30px; | 265 | height: 30px; |
1 | { | 1 | { |
2 | "name": "xianyu-ufo-app-web", | 2 | "name": "xianyu-ufo-app-web", |
3 | - "version": "0.0.2-beta-12", | 3 | + "version": "0.0.2-beta-13", |
4 | "private": true, | 4 | "private": true, |
5 | "description": "Xianyu Project With Express", | 5 | "description": "Xianyu Project With Express", |
6 | "repository": { | 6 | "repository": { |
-
Please register or login to post a comment