...
|
...
|
@@ -68,10 +68,16 @@ class OrderModel |
|
|
}
|
|
|
//检查数据返回是否正常,正常则处理数据
|
|
|
if (!empty($data['data']['order_list'])) {
|
|
|
// 订单的状态列表
|
|
|
$orderStatus = Helpers::getOrderStatus();
|
|
|
|
|
|
foreach ($data['data']['order_list'] as $key => $vo) {
|
|
|
if ($vo['payment_status'] == 'Y' && $vo['status'] == 0) {
|
|
|
$vo['status'] = 1;
|
|
|
}
|
|
|
//订单号,支付状态,订单商品数量,订单总价格
|
|
|
$result[$key]['orderNum'] = $vo['order_code'];
|
|
|
$result[$key]['orderStatus'] = ($vo['is_cancel'] === 'Y') ? '已取消' : $vo['status_str'];
|
|
|
$result[$key]['orderStatus'] = ($vo['is_cancel'] === 'Y') ? '已取消' : $orderStatus[ $vo['payment_type'] ][ $vo['status'] ];
|
|
|
$result[$key]['count'] = count($vo['order_goods']);
|
|
|
$result[$key]['sumCost'] = $vo['amount'];
|
|
|
//类内调用格式化订单商品数据方法
|
...
|
...
|
|