public function applyAction() { if (!$this->validFlag) { echo json_encode(array('ret' => 0)); } else { if ($orderInfo = $this->order->getSpecifyOrder($this->uid, $this->_sanReq['orderSn'], self::ORDER_STATUS_FINISHED)) { $orderGoods = $this->order->getOrderGoods($orderInfo['order_id']); foreach ($orderGoods as $key => $goods) { $orderGoods[$key]['attrArr'] = $this->support->getGoodsAttr($goods['attrs_info']); } if ($orderInfo['order_tel']) { $telInfo = explode('-', $orderInfo['order_tel']); $orderInfo['areaCode'] = empty($telInfo[0]) ? '' : $telInfo[0]; $orderInfo['telNum'] = empty($telInfo[1]) ? '' : $telInfo[1]; $orderInfo['ext'] = empty($telInfo[2]) ? '' : $telInfo[2]; } $orderLogMdu = new \Mall\Mdu\OrderLogsModule(); echo json_encode(array('ret' => 1, 'orderSn' => $this->_sanReq['orderSn'], 'orderInfo' => $orderInfo, 'orderGoods' => $orderGoods, 'confirmTime' => $orderLogMdu->getOrderLogTime($orderInfo['order_id'], $this->sysconfig['orderActType']['received'])['ord_act_addtime'], 'nowTime' => $_SERVER['REQUEST_TIME'])); } else { echo json_encode(array('ret' => 0)); } } $this->view->disable(); return; }
public function applyAction() { if (!$this->validFlag) { $this->showMsg('/order', $this->sysconfig['flagMsg'][self::MSG_ORDER_NONE], '订单页'); } else { if ($orderInfo = $this->order->getSpecifyOrder($this->uid, $this->_sanReq['orderSn'], self::ORDER_STATUS_FINISHED)) { $orderGoods = $this->order->getOrderGoods($orderInfo['order_id']); foreach ($orderGoods as $key => $goods) { $orderGoods[$key]['attrArr'] = $this->support->getGoodsAttr($goods['attrs_info']); } if ($orderInfo['order_tel']) { $telInfo = explode('-', $orderInfo['order_tel']); $orderInfo['areaCode'] = empty($telInfo[0]) ? '' : $telInfo[0]; $orderInfo['telNum'] = empty($telInfo[1]) ? '' : $telInfo[1]; $orderInfo['ext'] = empty($telInfo[2]) ? '' : $telInfo[2]; } $orderLogMdu = new \Mall\Mdu\OrderLogsModule(); $this->view->setVars(array('orderSn' => $this->_sanReq['orderSn'], 'orderInfo' => $orderInfo, 'orderGoods' => $orderGoods, 'confirmTime' => $orderLogMdu->getOrderLogTime($orderInfo['order_id'], $this->sysconfig['orderActType']['received'])['ord_act_addtime'])); } else { $this->showMsg('/order', $this->sysconfig['flagMsg'][self::MSG_ORDER_NONE], '订单页'); } } }