diff --git a/application/controllers/information.php b/application/controllers/information.php index 0506d759..424a2493 100644 --- a/application/controllers/information.php +++ b/application/controllers/information.php @@ -778,6 +778,9 @@ class Information extends CI_Controller function make_www_cache_ct($device, $information) { $data = array(); + // $apiurl = "http://202.103.68.104:61/info.php"; //本地测试 + $apiurl = "https://ct.mycht.cn/info.php"; //网前 + //先准备数据,CT采用直接赋值视图然后返回视图字符串的模式,不使用一次次替换视图模板内容的模式。 $data["TITLE"] = $information->ic_seo_title; $data["DESCRIPTION"] = $information->ic_seo_description; @@ -961,6 +964,19 @@ class Information extends CI_Controller //$addonJs .= ''; $data["ADDONCSS"] .= ''; } + if ($meta_ct_page_type=="tourdetail"){ + //线路 + $productType=$meta_ct_page_type; + $meta_ct_page_value = get_meta($information->ic_id, 'meta_ct_page_value'); + if (!empty($meta_ct_page_value)) { + $productCode = $meta_ct_page_value; + } + + //获取cli_sn + $tourdata = json_decode(GET_HTTP($apiurl."/thirdparty/ctmobilefirst/api/getCliSn/?param=".$productCode)); + $data["clisn"] = $tourdata->clisn; + + } $data["productType"] = $productType; $data["productCode"] = $productCode; diff --git a/application/third_party/ctmobilefirst/controllers/api.php b/application/third_party/ctmobilefirst/controllers/api.php index f4cfb359..b50b5398 100644 --- a/application/third_party/ctmobilefirst/controllers/api.php +++ b/application/third_party/ctmobilefirst/controllers/api.php @@ -213,6 +213,32 @@ class Api extends CI_Controller { echo json_encode($list); } + /** + * @description: 获取线路sn + * @param {*} $clino + * @return {*} + * @Date Changed: + */ + public function getCliSn(){ + //处理参数 + if (isset($_GET["param"])){ + $param = $_GET["param"]; + $result["status"]="ok"; + $tour = $this->api_model->getCliSn($param); + $CLI_SN = $tour->CLI_SN; + if (!empty($CLI_SN)){ + $result["clisn"]=$CLI_SN; + }else { + $result["clisn"]=0; + } + }else{ + $result["status"]="no param"; + $result["clisn"]=0; + + } + echo json_encode($result); + } + } /* End of file Api.php */ diff --git a/application/third_party/ctmobilefirst/models/api_model.php b/application/third_party/ctmobilefirst/models/api_model.php index b2c7c986..bc4ed864 100644 --- a/application/third_party/ctmobilefirst/models/api_model.php +++ b/application/third_party/ctmobilefirst/models/api_model.php @@ -281,6 +281,24 @@ class Api_model extends CI_Model { return $qurey->result(); } + /** + * @description: 获取线路的sn + * @param {*} $clino 线路编码 + * @return {*} + * @Date Changed: + */ + function getCliSn($clino=""){ + $sql = "select top 1 CLI_SN,CLI_PackageClass from CustomerLineInfo + where CLI_NO=? and CLI_State=1005004 + AND (CLI_DEI_SN= ? )"; + $query = $this->HT->query($sql,array($clino,$this->dei_sn)); + if (!$query->num_rows()>0){ + return null; + }else{ + return $query->row(); + } + } + } /* End of file Api_model.php */ diff --git a/application/views/mobile_first/chinatravel-pc.php b/application/views/mobile_first/chinatravel-pc.php index f232f73b..e6e2d502 100644 --- a/application/views/mobile_first/chinatravel-pc.php +++ b/application/views/mobile_first/chinatravel-pc.php @@ -187,6 +187,10 @@ + + +
Inquire This Tour
+ diff --git a/application/views/mobile_first/chinatravel.php b/application/views/mobile_first/chinatravel.php index 5d6fead6..27b54834 100644 --- a/application/views/mobile_first/chinatravel.php +++ b/application/views/mobile_first/chinatravel.php @@ -183,6 +183,11 @@ + + + +
Inquire This Tour
+