service == '') { $this->service = new OrderlistService(); } return $this->service; } /** * Function Description:订单列表 * Function Name: indexAction * * @return string * * @author 娄梦宁 */ public function indexAction() { $checkLogin = LoginTool::checkLogin();//校验用户登录状态 if ($checkLogin['flag'] == false) { return json_encode($checkLogin); } $result = $this->getService()->getmyorder(); if ($result['flag'] == true) { return json_encode($result); } return Util::returnJsEr('未获取到符合条件的数据'); } /** * Function Description:订单详情 * Function Name: getDetaileAction * * @return string * * @author 娄梦宁 */ public function getDetaileAction() { if($_POST['code']==md5('zhizhuchuxing')){ }else{ $checkLogin = LoginTool::checkLogin();//校验用户登录状态 if($checkLogin['flag'] == false) { return json_encode($checkLogin); } } if ($_POST['order_id']) { $result = $this->getService()->getOrder($_POST['order_id']); return json_encode($result); } return Util::returnJsEr('未获取到符合条件的数据'); } /** * Function Description:取消订单 * Function Name: cancelAction * * @return string * * @author 娄梦宁 */ public function cancelAction() { $userId = LoginTool::$userId; if (Util::checkPattern('intVal', $_POST['pro_id']) && $userId) { $result = $this->getService()->cancelticket($_POST['order_id'], $userId); return json_encode($result); } return Util::returnJsEr('参数错误'); } }