Authored by cailing

取消订单详情页优化

... ... @@ -226,6 +226,10 @@ class OrderModel
$detail['packages'] = CartModel::getPackageInfo($orderDetail);
//判断是否可以修改地址
$result['changeable'] = $orderDetail['can_update_delivery_address'] == 'Y' ? 'true' : 'false';
//判断是否有关联订单
$result['relation'] = $orderDetail['relate_order_code'] == 'Y' ? 'true' : 'false';
//修改地址跳转链接
$result['url'] = Helpers::url('/home/addressModify', array('orderCode' => $orderCode, 'relation' => $result['relation']));
}
return $detail;
}
... ...
... ... @@ -92,6 +92,8 @@ class OrdersController extends WebAction
$orderCode = $this->get('order_code', '');
}
$detail = OrderModel::getOrderDetail($uid, $orderCode);
//取消订单原因列表
$resons = OrderData::closeReasons();
//非当前用户的订单,跳转个首
if (isset($detail['code']) && $detail['code'] == 400) {
$this->go(Helpers::url('/home'));
... ... @@ -115,6 +117,7 @@ class OrdersController extends WebAction
'orderBalance' => isset($detail['orderBalance']) ? $detail['orderBalance'] : array(),
'operation' => $detail['operation'],
'totalYoho' => $detail['yoho_give_coin'],
'cancelReason' => isset($resons['data']) ? $resons['data'] : '',
);
if (isset($detail['noramlPayMode'])) {
$data['orderInfo'] = $detail['orderInfo'];
... ...