'cart-or-orderList-salesPrice'
Showing
11 changed files
with
110 additions
and
10 deletions
@@ -132,6 +132,7 @@ const formatCartGoods = (cartGoods, isAdvanceCart, inValid, isOffShelves, analys | @@ -132,6 +132,7 @@ const formatCartGoods = (cartGoods, isAdvanceCart, inValid, isOffShelves, analys | ||
132 | productColor: it.factory_goods_name, | 132 | productColor: it.factory_goods_name, |
133 | productSize: it.size_name, | 133 | productSize: it.size_name, |
134 | productPrice: transPrice(it.last_vip_price), // self::transPrice($value['real_price']); | 134 | productPrice: transPrice(it.last_vip_price), // self::transPrice($value['real_price']); |
135 | + salesPrice: transPrice(it.sales_price), | ||
135 | productNum: Number(it.buy_number), | 136 | productNum: Number(it.buy_number), |
136 | storageNum: Number(it.storage_number), | 137 | storageNum: Number(it.storage_number), |
137 | isSoldOut: parseInt(it.storage_number, 10) === 0 || parseInt(it.off_shelves, 10) === 1, // 已售罄 | 138 | isSoldOut: parseInt(it.storage_number, 10) === 0 || parseInt(it.off_shelves, 10) === 1, // 已售罄 |
@@ -91,6 +91,9 @@ const handlePaymentInfo = (d, address) => { | @@ -91,6 +91,9 @@ const handlePaymentInfo = (d, address) => { | ||
91 | // link to goods | 91 | // link to goods |
92 | g.linkToGoods = helper.urlFormat(`/product/pro_${g.product_id}_${g.goods_id}/${g.cn_alphabet}.html`, | 92 | g.linkToGoods = helper.urlFormat(`/product/pro_${g.product_id}_${g.goods_id}/${g.cn_alphabet}.html`, |
93 | '', 'item'); | 93 | '', 'item'); |
94 | + | ||
95 | + g.isVipPrice = g.sales_price !== g.last_vip_price && g.discount_tag === 'V'; | ||
96 | + g.isStuPrice = g.sales_price !== g.last_vip_price && g.discount_tag === 'S'; | ||
94 | }); | 97 | }); |
95 | resData.goodsList = d.goods_list; | 98 | resData.goodsList = d.goods_list; |
96 | 99 |
@@ -142,7 +142,16 @@ | @@ -142,7 +142,16 @@ | ||
142 | 尺码:<span class="size">{{size_name}}</span> | 142 | 尺码:<span class="size">{{size_name}}</span> |
143 | </td> | 143 | </td> |
144 | <td class="border-top price"> | 144 | <td class="border-top price"> |
145 | - <span class="red">¥ {{round last_price 2}}</span> | 145 | + <p class="red">¥ {{round last_price 2}}</p> |
146 | + {{#if sales_price}} | ||
147 | + <p class="line-through">¥ {{round sales_price 2}}</p> | ||
148 | + {{/if}} | ||
149 | + {{#isVipPrice}} | ||
150 | + <p class="tip-message">(VIP)</p> | ||
151 | + {{/isVipPrice}} | ||
152 | + {{#isStuPrice}} | ||
153 | + <p class="tip-message">(学生价)</p> | ||
154 | + {{/isStuPrice}} | ||
146 | </td> | 155 | </td> |
147 | <td class="border-top">× {{buy_number}}</td> | 156 | <td class="border-top">× {{buy_number}}</td> |
148 | <td{{#if @first}} class="border-top"{{/if}}></td> | 157 | <td{{#if @first}} class="border-top"{{/if}}></td> |
@@ -371,6 +371,8 @@ const getOrders = (uid, page, limit, type, isPage)=> { | @@ -371,6 +371,8 @@ const getOrders = (uid, page, limit, type, isPage)=> { | ||
371 | newGood.color = good.factory_color_name; | 371 | newGood.color = good.factory_color_name; |
372 | newGood.size = good.size_name; | 372 | newGood.size = good.size_name; |
373 | newGood.price = good.goods_price; | 373 | newGood.price = good.goods_price; |
374 | + newGood.realPayPrice = good.real_pay_price; | ||
375 | + newGood.salesPrice = good.sales_price; | ||
374 | 376 | ||
375 | let buyNum = _.parseInt(good.buy_number); | 377 | let buyNum = _.parseInt(good.buy_number); |
376 | let refundNum = _.parseInt(good.refund_num); | 378 | let refundNum = _.parseInt(good.refund_num); |
@@ -766,6 +768,8 @@ const _getOrderDetail = co(function * (uid, orderId) { | @@ -766,6 +768,8 @@ const _getOrderDetail = co(function * (uid, orderId) { | ||
766 | color: good.factory_color_name, | 768 | color: good.factory_color_name, |
767 | size: good.size_name, | 769 | size: good.size_name, |
768 | price: good.goods_price, | 770 | price: good.goods_price, |
771 | + realPayPrice: good.real_pay_price, | ||
772 | + salesPrice: good.sales_price, | ||
769 | coin: good.yoho_give_coin, | 773 | coin: good.yoho_give_coin, |
770 | num: good.buy_number, | 774 | num: good.buy_number, |
771 | sum: good.goods_amount, | 775 | sum: good.goods_amount, |
@@ -260,7 +260,21 @@ | @@ -260,7 +260,21 @@ | ||
260 | {{/if}} | 260 | {{/if}} |
261 | </p> | 261 | </p> |
262 | </td> | 262 | </td> |
263 | - <td>{{price}}</td> | 263 | + <td> |
264 | + <p>{{realPayPrice}}</p> | ||
265 | + {{#if salesPrice}} | ||
266 | + <p class="line-through">{{salesPrice}}</p> | ||
267 | + {{/if}} | ||
268 | + {{#isVipPrice}} | ||
269 | + <p class="tip-message">(VIP)</p> | ||
270 | + {{/isVipPrice}} | ||
271 | + {{#isStuPrice}} | ||
272 | + <p class="tip-message">(学生价)</p> | ||
273 | + {{/isStuPrice}} | ||
274 | + {{#if free}} | ||
275 | + <span class="free-icon">免单</span> | ||
276 | + {{/if}} | ||
277 | + </td> | ||
264 | <td>{{coin}}个</td> | 278 | <td>{{coin}}个</td> |
265 | <td>{{num}}</td> | 279 | <td>{{num}}</td> |
266 | <td>{{sum}}</td> | 280 | <td>{{sum}}</td> |
@@ -60,9 +60,17 @@ | @@ -60,9 +60,17 @@ | ||
60 | </span> | 60 | </span> |
61 | </div> | 61 | </div> |
62 | </div> | 62 | </div> |
63 | - <div class="price{{#if free}} free-price{{/if}}"> | ||
64 | - <em>{{price}}</em> | ||
65 | - | 63 | + <div class="price"> |
64 | + <p>{{realPayPrice}}</p> | ||
65 | + {{#if salesPrice}} | ||
66 | + <p class="line-through">{{salesPrice}}</p> | ||
67 | + {{/if}} | ||
68 | + {{#isVipPrice}} | ||
69 | + <p class="tip-message">(VIP)</p> | ||
70 | + {{/isVipPrice}} | ||
71 | + {{#isStuPrice}} | ||
72 | + <p class="tip-message">(学生价)</p> | ||
73 | + {{/isStuPrice}} | ||
66 | {{#if free}} | 74 | {{#if free}} |
67 | <span class="free-icon">免单</span> | 75 | <span class="free-icon">免单</span> |
68 | {{/if}} | 76 | {{/if}} |
@@ -67,6 +67,9 @@ | @@ -67,6 +67,9 @@ | ||
67 | </p> | 67 | </p> |
68 | </div> | 68 | </div> |
69 | <div class="product-price td" style="width:148px;">¥{{productPrice}} | 69 | <div class="product-price td" style="width:148px;">¥{{productPrice}} |
70 | + {{#if salesPrice}} | ||
71 | + <p class="line-through">¥{{salesPrice}}</p> | ||
72 | + {{/if}} | ||
70 | {{#isVipPrice}} | 73 | {{#isVipPrice}} |
71 | <p class="tip-message">(VIP)</p> | 74 | <p class="tip-message">(VIP)</p> |
72 | {{/isVipPrice}} | 75 | {{/isVipPrice}} |
@@ -1213,6 +1213,7 @@ | @@ -1213,6 +1213,7 @@ | ||
1213 | .product-price { | 1213 | .product-price { |
1214 | margin-top: 33px; | 1214 | margin-top: 33px; |
1215 | position: relative; | 1215 | position: relative; |
1216 | + padding-top: 15px !important; | ||
1216 | 1217 | ||
1217 | .sale-info { | 1218 | .sale-info { |
1218 | position: absolute; | 1219 | position: absolute; |
@@ -1224,6 +1225,12 @@ | @@ -1224,6 +1225,12 @@ | ||
1224 | .tip-message { | 1225 | .tip-message { |
1225 | margin-top: -2px; | 1226 | margin-top: -2px; |
1226 | } | 1227 | } |
1228 | + | ||
1229 | + .line-through { | ||
1230 | + font-weight: normal; | ||
1231 | + text-decoration: line-through; | ||
1232 | + color: #9a9a9a; | ||
1233 | + } | ||
1227 | } | 1234 | } |
1228 | 1235 | ||
1229 | .sale-info { | 1236 | .sale-info { |
@@ -729,6 +729,21 @@ | @@ -729,6 +729,21 @@ | ||
729 | 729 | ||
730 | .price { | 730 | .price { |
731 | font-size: 14px; | 731 | font-size: 14px; |
732 | + | ||
733 | + p { | ||
734 | + line-height: 18px; | ||
735 | + } | ||
736 | + } | ||
737 | + | ||
738 | + p.line-through { | ||
739 | + font-weight: normal; | ||
740 | + text-decoration: line-through; | ||
741 | + color: #9a9a9a; | ||
742 | + } | ||
743 | + | ||
744 | + p.tip-message { | ||
745 | + font-weight: normal; | ||
746 | + color: #ff575c; | ||
732 | } | 747 | } |
733 | 748 | ||
734 | .border-top { | 749 | .border-top { |
@@ -148,10 +148,6 @@ | @@ -148,10 +148,6 @@ | ||
148 | padding: 5px; | 148 | padding: 5px; |
149 | font-weight: bold; | 149 | font-weight: bold; |
150 | 150 | ||
151 | - &.free-price em { | ||
152 | - text-decoration: line-through; | ||
153 | - } | ||
154 | - | ||
155 | .free-icon { | 151 | .free-icon { |
156 | display: block; | 152 | display: block; |
157 | width: 37px; | 153 | width: 37px; |
@@ -165,6 +161,21 @@ | @@ -165,6 +161,21 @@ | ||
165 | border: 1px solid #80bb45; | 161 | border: 1px solid #80bb45; |
166 | border-radius: 3px; | 162 | border-radius: 3px; |
167 | } | 163 | } |
164 | + | ||
165 | + p { | ||
166 | + line-height: 18px; | ||
167 | + } | ||
168 | + | ||
169 | + p.line-through { | ||
170 | + font-weight: normal; | ||
171 | + text-decoration: line-through; | ||
172 | + color: #9a9a9a; | ||
173 | + } | ||
174 | + | ||
175 | + p.tip-message { | ||
176 | + font-weight: normal; | ||
177 | + color: #ff575c; | ||
178 | + } | ||
168 | } | 179 | } |
169 | 180 | ||
170 | .count { | 181 | .count { |
@@ -73,9 +73,34 @@ | @@ -73,9 +73,34 @@ | ||
73 | .content { | 73 | .content { |
74 | padding: 10px 20px 20px; | 74 | padding: 10px 20px 20px; |
75 | 75 | ||
76 | + .free-icon { | ||
77 | + display: block; | ||
78 | + width: 37px; | ||
79 | + height: 18px; | ||
80 | + line-height: 18px; | ||
81 | + font-size: 12px; | ||
82 | + text-align: center; | ||
83 | + color: #80bb45; | ||
84 | + background: #e7fbc0; | ||
85 | + margin: 5px auto; | ||
86 | + border: 1px solid #80bb45; | ||
87 | + border-radius: 3px; | ||
88 | + } | ||
89 | + | ||
76 | p { | 90 | p { |
77 | line-height: 18px; | 91 | line-height: 18px; |
78 | } | 92 | } |
93 | + | ||
94 | + p.line-through { | ||
95 | + font-weight: normal; | ||
96 | + text-decoration: line-through; | ||
97 | + color: #9a9a9a; | ||
98 | + } | ||
99 | + | ||
100 | + p.tip-message { | ||
101 | + font-weight: normal; | ||
102 | + color: #ff575c; | ||
103 | + } | ||
79 | } | 104 | } |
80 | 105 | ||
81 | .order-progress { | 106 | .order-progress { |
@@ -565,7 +590,7 @@ | @@ -565,7 +590,7 @@ | ||
565 | display: inline-block; | 590 | display: inline-block; |
566 | height: 22px; | 591 | height: 22px; |
567 | width: 22px; | 592 | width: 22px; |
568 | - vertical-align: text-bottom; | 593 | + vertical-align: middle; |
569 | } | 594 | } |
570 | 595 | ||
571 | .success-icon { | 596 | .success-icon { |
-
Please register or login to post a comment