diff --git a/application/controllers/information.php b/application/controllers/information.php index b2c84337..73b52844 100644 --- a/application/controllers/information.php +++ b/application/controllers/information.php @@ -3304,10 +3304,19 @@ class Information extends CI_Controller { $tourdata = json_decode(GET_HTTP($apiurl . "/thirdparty/ctmobilefirst/api/getCliSn/?param=" . $productCode)); $data["clisn"] = $tourdata->clisn; + $tourdetail = json_decode(GET_HTTP($apiurl . "/thirdparty/ctmobilefirst/api/getTourDetail/?param=" . $productCode)); + if ($tourdetail->status =="ok"){ + $tourDays = $tourdetail->data->CLI_Days; + $tourPassCity = $tourdetail->data->CLI2_PassCity; + }else{ + $tourDays = 0; + $tourPassCity = ""; + } + //调取模板 $dataform["TourCode"] = $productCode; $dataform["CLI_SN"] = $tourdata->clisn; - $dataform["TourName"] = $information->ic_title; + $dataform["TourName"] = $tourDays." Days ".$information->ic_title." (".$tourPassCity.")"; } diff --git a/application/third_party/ctmobilefirst/controllers/api.php b/application/third_party/ctmobilefirst/controllers/api.php index f01834e9..ba145a12 100644 --- a/application/third_party/ctmobilefirst/controllers/api.php +++ b/application/third_party/ctmobilefirst/controllers/api.php @@ -242,6 +242,26 @@ class Api extends CI_Controller { echo json_encode($result); } + /** + * 根据获取线路编码cli_no 获取对应产品的详细信息 + */ + public function getTourDetail(){ + if (isset($_GET["param"])){ + $param = $_GET["param"]; + $result["status"]="ok"; + $tour = $this->api_model->getTourDetail($param); + if ($tour!=null){ + $result["data"]=$tour; + }else{ + $result["status"]="no data"; + $result["data"]=[]; + } + }else{ + $result["status"]="no param"; + $result["data"]=[]; + } + echo json_encode($result); + } /** * @description: 一日游价格表