订单详情页添加优惠码信息显示
Code Review By Rock Zhang
Showing
2 changed files
with
10 additions
and
0 deletions
@@ -60,6 +60,12 @@ | @@ -60,6 +60,12 @@ | ||
60 | 运费 | 60 | 运费 |
61 | <span>{{freight}}</span> | 61 | <span>{{freight}}</span> |
62 | </li> | 62 | </li> |
63 | + {{#if promo_code_amount}} | ||
64 | + <li> | ||
65 | + 优惠码 | ||
66 | + <span>{{promo_code_amount}}</span> | ||
67 | + </li> | ||
68 | + {{/if}} | ||
63 | {{#if coupon}} | 69 | {{#if coupon}} |
64 | <li> | 70 | <li> |
65 | 优惠券 | 71 | 优惠券 |
@@ -208,6 +208,10 @@ class OrderModel | @@ -208,6 +208,10 @@ class OrderModel | ||
208 | $result['salePrice'] = self::filterOrderPrice($orderDetail['data']['promotion_amount']); // 活动金额 | 208 | $result['salePrice'] = self::filterOrderPrice($orderDetail['data']['promotion_amount']); // 活动金额 |
209 | $result['freight'] = $orderDetail['data']['shipping_cost']; // 运费 | 209 | $result['freight'] = $orderDetail['data']['shipping_cost']; // 运费 |
210 | $result['coupon'] = self::filterOrderPrice($orderDetail['data']['coupons_amount']); // 优惠券 | 210 | $result['coupon'] = self::filterOrderPrice($orderDetail['data']['coupons_amount']); // 优惠券 |
211 | + if (isset($orderDetail['data']['promo_code_amount'])) { | ||
212 | + $result['promo_code_amount'] = self::filterOrderPrice($orderDetail['data']['promo_code_amount']); // 优惠码 | ||
213 | + } | ||
214 | + | ||
211 | $result['yohoCoin'] = self::filterOrderPrice($orderDetail['data']['yoho_coin_num']); // YOHO币 | 215 | $result['yohoCoin'] = self::filterOrderPrice($orderDetail['data']['yoho_coin_num']); // YOHO币 |
212 | $result['price'] = $orderDetail['data']['amount']; // 实付金额 | 216 | $result['price'] = $orderDetail['data']['amount']; // 实付金额 |
213 | $result['goodsAmount'] = $orderDetail['data']['payment_amount']; // 商品总金额没有人民币符号 | 217 | $result['goodsAmount'] = $orderDetail['data']['payment_amount']; // 商品总金额没有人民币符号 |
-
Please register or login to post a comment