如果运费大于0,订单列表页显示运费信息
Code Review By Rock Zhang
Showing
2 changed files
with
5 additions
and
0 deletions
@@ -10,6 +10,7 @@ | @@ -10,6 +10,7 @@ | ||
10 | </section> | 10 | </section> |
11 | <footer class="footer"> | 11 | <footer class="footer"> |
12 | 共{{count}}件商品 实付<span class="sum-cost">¥{{sumCost}}</span> | 12 | 共{{count}}件商品 实付<span class="sum-cost">¥{{sumCost}}</span> |
13 | + {{#shippingCost}}(含运费¥{{.}}){{/shippingCost}} | ||
13 | </footer> | 14 | </footer> |
14 | 15 | ||
15 | {{!-- 对应订单状态的操作逻辑 --}} | 16 | {{!-- 对应订单状态的操作逻辑 --}} |
@@ -82,6 +82,10 @@ class OrderModel | @@ -82,6 +82,10 @@ class OrderModel | ||
82 | $result[$key]['orderNum'] = $vo['order_code']; | 82 | $result[$key]['orderNum'] = $vo['order_code']; |
83 | $result[$key]['orderStatus'] = $vo['status_str']; | 83 | $result[$key]['orderStatus'] = $vo['status_str']; |
84 | $result[$key]['sumCost'] = $vo['amount']; | 84 | $result[$key]['sumCost'] = $vo['amount']; |
85 | + // 如果运费大于0,会显示运费 | ||
86 | + if (floatval($vo['shipping_cost']) > 0) { | ||
87 | + $result[$key]['shippingCost'] = $vo['shipping_cost']; | ||
88 | + } | ||
85 | //类内调用格式化订单商品数据方法 | 89 | //类内调用格式化订单商品数据方法 |
86 | $result[$key]['goods'] = Helpers::formatOrderGoods($vo['order_goods'], $count); | 90 | $result[$key]['goods'] = Helpers::formatOrderGoods($vo['order_goods'], $count); |
87 | $result[$key]['detailUrl'] = Helpers::url('/home/orderdetail', array('order_code' => $vo['order_code'])); | 91 | $result[$key]['detailUrl'] = Helpers::url('/home/orderdetail', array('order_code' => $vo['order_code'])); |
-
Please register or login to post a comment