service == null) { $this->service = new FreeWalker(); } return $this->service; } /** * Des:查询 * Name: actionSearch * @return string * @author 倪宗锋 */ public function actionSearch() { $param = [ 'prod_name' => htmlspecialchars(trim($this->_post('prod_name', ''))),//产品名称 ]; $getList = $this->service()->getSearch($param); return Util::returnJsSu('', $getList['data']); } /** * Des:销售页面初始化 * Name: actionInitialize * @return string * @author 倪宗锋 */ public function actionInitialize() { $pro_cate_id = $this->_post('pro_cate_id', ''); $result = $this->service()->getInitialize($pro_cate_id); return json_encode($result); } /** * Des:获取产品价格列表 * Name: actionGetProdArr * @return string * @author 倪宗锋 */ public function actionGetProdArr() { $params = [ 'prod_cate_id' => $this->_post('prod_cate_id', ''), 'date' => $this->_post('date', '') ]; $result = $this->service()->getProdArrForDate($params); return json_encode($result); } /** * Des:获取价格 * Name: actionGetPrice * @return string * @author 倪宗锋 */ public function actionGetPrice() { $params = [ 'pro_cate_id' => $this->_post('pro_cate_id', ''), 'start_date' => $this->_post('start_date', ''), 'prod_arr' => json_decode(Yii::$app->request->post('prod_arr', ''), true) ]; $result = $this->service()->getPrice($params); return json_encode($result); } /** * Function Description:获取自由行保险价格 * Function Name: actionGetFreeWalkDays * @return string * @author 田玲菲 */ public function actionGetFreeWalkInsure(){ $pro_cate_id = $this->_post('pro_cate_id', ''); $run_date = $this->_post('run_date', ''); $result = $this->service()->getTripDays($pro_cate_id,$run_date); return json_encode($result); } }