Authored by 毕凯

Merge branch 'develop/wap' of git.dev.yoho.cn:web/yohobuy into develop/wap

... ... @@ -583,7 +583,7 @@ class Helpers
foreach ($orderGoods as $key => $vo) {
$arr[$key]['thumb'] = Helpers::getImageUrl($vo['goods_image'], 90, 120);
$arr[$key]['name'] = $vo['product_name'];
$arr[$key]['name'] = isset($vo['product_name']) ? $vo['product_name'] : '';
$arr[$key]['color'] = $vo['color_name'];
$arr[$key]['size'] = $vo['size_name'];
$arr[$key]['price'] = $vo['goods_price'];
... ...
... ... @@ -10,6 +10,7 @@
</section>
<footer class="footer">
共{{count}}件商品 实付<span class="sum-cost">¥{{sumCost}}</span>
{{#shippingCost}}(含运费¥{{.}}){{/shippingCost}}
</footer>
{{!-- 对应订单状态的操作逻辑 --}}
... ...
... ... @@ -82,6 +82,10 @@ class OrderModel
$result[$key]['orderNum'] = $vo['order_code'];
$result[$key]['orderStatus'] = $vo['status_str'];
$result[$key]['sumCost'] = $vo['amount'];
// 如果运费大于0,会显示运费
if (floatval($vo['shipping_cost']) > 0) {
$result[$key]['shippingCost'] = $vo['shipping_cost'];
}
//类内调用格式化订单商品数据方法
$result[$key]['goods'] = Helpers::formatOrderGoods($vo['order_goods'], $count);
$result[$key]['detailUrl'] = Helpers::url('/home/orderdetail', array('order_code' => $vo['order_code']));
... ... @@ -327,13 +331,19 @@ class OrderModel
return $result;
}
/**
* 获取快递有关信息
* @param boolean $showLogistics 是否显示
* @param array $order 订单信息
* @param array $result
*/
private static function assignExpressInfo($showLogistics, $order, &$result)
{
$result['logisticsUrl'] = Helpers::url('/home/logistic', array('order_code' => $order['order_code']));
if ($showLogistics && isset($order['express_company']['caption'])) {
$result['logisticsCompany'] = $order['express_company']['caption'];
$result['logisticsNum'] = $order['express_number'];
$result['logisticsNum'] = isset($order['express_number']) ? $order['express_number'] : '';
}
}
... ...
... ... @@ -447,7 +447,7 @@ class CartModel
}
// 有货币
$result['yohoCoin'] = $payReturn['yoho_coin'];
$result['yohoCoin'] = Helpers::transPrice($payReturn['yoho_coin']);
/*
* 默认使用有货币
* $result['useYohoCoin'] = isset($orderCompute['use_yoho_coin']) ? $orderCompute['use_yoho_coin'] : $payReturn['use_yoho_coin'];
... ... @@ -511,6 +511,8 @@ class CartModel
$compute = CartData::orderCompute($uid, $cartType, $deliveryWay, $paymentType, $couponCode, $yohoCoin);
if ($compute && isset($compute['code']) && $compute['code'] === 200) {
// 有货币添加.00后缀
$compute['data']['use_yoho_coin'] = Helpers::transPrice($compute['data']['use_yoho_coin']);
$result = $compute['data'];
}
... ...