service == null) { $this->service = new Order(); } return $this->service; } /** * Des:获取用户的订单列表 * Name: actionGetList * @return string * @author 倪宗锋 */ public function actionGetList() { $params = [ 'order_status' => $this->_post('order_status', ''), 'current_page' => $this->_post('current_page', 1), 'page_size' => $this->_post('page_size', 10), 'sh_uid' => LoginService::$uid ]; if ($params['order_status'] == '5') { $params['order_status'] = '4,5,6'; } $getList = $this->service()->getList($params); return Util::returnJsSu('', $getList['data']); } /** * Des:获取订单详情 * Name: actionGetOrderInfo * @return string * @author 倪宗锋 */ public function actionGetOrderInfo() { $order_id = $this->_post('order_id', ''); $getInfo = $this->service()->getOrderInfo($order_id); if ($getInfo['flag'] == false) { return Util::returnJsEr($getInfo['msg']); } return Util::returnJsSu('', $getInfo['data']); } /** * Des:取消订单 * Name: actionCancel * @return string * @author 倪宗锋 */ public function actionCancel() { $order_id = $this->_post('order_id', ''); $getInfo = $this->service()->cancel($order_id); if ($getInfo['flag'] == false) { return Util::returnJsEr($getInfo['msg']); } return Util::returnJsSu(); } }