diff --git a/application/controllers/information.php b/application/controllers/information.php index 999199d0..96d83664 100644 --- a/application/controllers/information.php +++ b/application/controllers/information.php @@ -3710,6 +3710,18 @@ class Information extends CI_Controller $addonJs .= ''; } + if ($meta_ct_page_type == "daytriplist") { + //一日游类型 + $allTypeList = json_decode(GET_HTTP($apiurl . "/thirdparty/ctmobilefirst/api/getPagTypeList/?webcode=shanghai")); + $dataDayTripList["allTypeList"] = $allTypeList; + $dayTripListData = json_decode(GET_HTTP($apiurl . "/thirdparty/ctmobilefirst/api/getSearchDaytripList/?webcode=shanghai")); + $dataDayTripList["dayTripListData"] = $dayTripListData; + + //替换模板 + $template_page_daytriplist = $this->load->view($template_path . '-daytrip-list', $dataDayTripList, true); //模板内容 + $ic_content = str_replace('', $template_page_daytriplist, $ic_content); + } + //表单页 if (in_array($meta_ct_page_type, array("customize", "contactus", "pagewithform", "tourdetail"))) { diff --git a/application/third_party/ctmobilefirst/models/api_model.php b/application/third_party/ctmobilefirst/models/api_model.php index b8ed370a..1c05a49a 100644 --- a/application/third_party/ctmobilefirst/models/api_model.php +++ b/application/third_party/ctmobilefirst/models/api_model.php @@ -677,7 +677,8 @@ class Api_model extends CI_Model { FROM information_ct.dbo.infoContents INNER JOIN information_ct.dbo.infoStructures ON ic_id = is_ic_id WHERE is_sitecode ='".$this->WebCode."' AND ic_status = 1 - and ic_id in (select im_ic_id from information_ct.dbo.infoMetas where im_key='meta_ct_page_type' and convert(varchar(100),im_value)='tourdetail') "; //信息平台开放的线路列表 + and ic_id in (select im_ic_id from information_ct.dbo.infoMetas where im_key='meta_ct_page_type' and convert(varchar(100),im_value)='tourdetail') + order by is_sort "; //信息平台开放的线路列表 $query =$this->HT->query($sql); @@ -871,7 +872,8 @@ class Api_model extends CI_Model { FROM information_ct.dbo.infoContents INNER JOIN information_ct.dbo.infoStructures ON ic_id = is_ic_id WHERE is_sitecode ='".$this->WebCode."' AND ic_status = 1 - and ic_id in (select im_ic_id from information_ct.dbo.infoMetas where im_key='meta_ct_page_type' and convert(varchar(100),im_value)='daytripdetail') "; //信息平台开放的一日游列表 + and ic_id in (select im_ic_id from information_ct.dbo.infoMetas where im_key='meta_ct_page_type' and convert(varchar(100),im_value)='daytripdetail') + order by is_sort "; //信息平台开放的一日游列表 $query =$this->HT->query($sql); @@ -889,13 +891,21 @@ class Api_model extends CI_Model { $tourItem->title = $row["ic_url_title"]; //价格 + $resultPrice = 0; $price = $this->getDaytripsPrice($row["code"],2); + $PKP_AdultSpecialPrice = isset($price->PKP_AdultSpecialPrice)?$price->PKP_AdultSpecialPrice:0; + $PKP_AdultPrice = isset($price->PKP_AdultPrice)?$price->PKP_AdultPrice:0; + if ($PKP_AdultPrice!=$PKP_AdultSpecialPrice && $PKP_AdultSpecialPrice>0){ + $resultPrice = $this->currency->convert_moneny_by_char($PKP_AdultSpecialPrice,"USD"); + }else{ + $resultPrice = $this->currency->convert_moneny_by_char($PKP_AdultPrice,"USD"); + } // 处理价格: // 1. 如果是 null,设为空字符串 "" // 2. 如果是数字(如 100.0000),转为整数(100) - $tourItem->price = ($price === null) + $tourItem->price = ($resultPrice === null) ? "" - : (string)(int)floatval($price); + : (string)(int)floatval($resultPrice); //类别信息 @@ -937,7 +947,7 @@ class Api_model extends CI_Model { dbo.BIZ_PackageInfo2 p2 ON P1.PAG_SN = p2.PAG2_PAG_SN INNER JOIN dbo.CItyInfo2 ON P1.PAG_CII_SN = dbo.CItyInfo2.CII2_CII_SN AND dbo.CItyInfo2.CII2_LGC = 1 - WHERE (p2.PAG2_LGC =".$this->CTLGC.") AND (p1.pag_dei_sn=".$this->dei_sn.") ) AND + WHERE (p2.PAG2_LGC =".$this->CTLGC.") AND (p1.pag_dei_sn=".$this->dei_sn.") AND (p2.PAG2_Check = 2) and (PAG_Code='".$pagcode."')"; $query =$this->HT->query($sql);