@ -4124,11 +4124,8 @@ class Information extends CI_Controller {
//$addonJs .= '< script src = "'.$apiweb.'/js/mobile-first/flatpickr.js" > < / script > ';
$data["ADDONCSS"] .= '< link href = "' . $apiweb . '/css/css3/flatpickr.css" rel = "preload" as = "style" onload = "this.rel=\'stylesheet\'" / > ';
//一日游表单的替换
$DayTripData["productCode"] = $productCode;
$template_form_daydetail = $this->load->view($template_path . '-daydetail-form', $DayTripData, true); //模板内容
//使用simple_html_dom_lib库来进行表单添加
$ic_content = $this->html_optimize_lib->add_htmlcode($ic_content, "#maincontent", $template_form_daydetail);
//一日游表单的替换, 放到下面的区分PC端和移动端
}
if ($meta_ct_page_type == "tourdetail") {
//线路
@ -4258,6 +4255,68 @@ class Information extends CI_Controller {
}
}
if ($meta_ct_page_type == "daytripdetail") { //一日游产品的表单处理放这里, 根据PC和移动端有所区别
$DayTripData['device'] = $device;
//准备数据
$DayTripData["productCode"] = $productCode;
$DayTripData["picture_mobile"] = get_meta($information->ic_id, 'meta_addon_picture_mobile');
$DayTripData["picture_pc"] = get_meta($information->ic_id, 'meta_addon_picture');
$DayTripData["TITLE"] = $information->ic_title;
$InfoData = new stdClass(); //传递用来计算的信息平台数据
$MinTravelers = get_meta($information->ic_id, 'meta_trippest_limitperson');
$InfoData->MinTravelers = $MinTravelers == null ? 0 : $MinTravelers;
//附加选项
$t_Type = get_meta($information->ic_id, "meta_trippest_type"); //产品类型
if ($t_Type) {
$InfoData->t_Type = $t_Type;
} else {
$InfoData->t_Type = "general";
}
$t_excludedate = get_meta($information->ic_id, "meta_trippest_excludedate");
$t_includedate = get_meta($information->ic_id, "meta_trippest_includedate");
$t_excludemonth = get_meta($information->ic_id, "meta_trippest_excludemonth");
$InfoData->t_excludedate = $t_excludedate;
$InfoData->t_includedate = $t_includedate;
$InfoData->t_excludemonth = $t_excludemonth;
$InfoData->t_hoteladdress = get_meta($information->ic_id, "meta_trippest_hoteladdress");
$InfoData->t_defaultDate = get_meta($information->ic_id, "meta_trippest_defaultDate");
//延迟天数
$t_meta_trippest_delayday = get_meta($information->ic_id, "meta_trippest_delayday");
$InfoData->t_meta_trippest_delayday = $t_meta_trippest_delayday == null ? 0 : $t_meta_trippest_delayday;
$DayTripData["InfoData"] = $InfoData; //传递信息平台数据
$linktour = get_meta($information->ic_id, 'meta_trainspread_linktour'); //关联线路
if (! empty($linktour)) {
$paramCode = $productCode . "," . $linktour;
} else {
$paramCode = $productCode;
}
//产品汉特信息,测试地址: http://202.103.68.104:61/info.php/thirdparty/ctmobilefirst/apits/getDaytripDetail/?param=TS-HKALC-1,TS-HKALC-2,TS-HKALC-3
$TourData = json_decode(GET_HTTP($apiurl . "/thirdparty/ctmobilefirst/api/getDaytripDetail/?webcode=beijing& param=" . $paramCode));
$DayTripData["TourData"] = $TourData;
$TourPrice = json_decode(GET_HTTP($apiurl . "/thirdparty/ctmobilefirst/api/getDaytripsPrice/?webcode=beijing& param=" . $productCode));
if ($TourPrice->status == "ok") {
$DayTripData["DaytripPrice"] = $TourPrice->price;
} else {
$TourPrice = json_decode(GET_HTTP($apiurl . "/thirdparty/ctmobilefirst/api/getDaytripsPrice/?webcode=beijing& param=" . $productCode . ",3"));
$DayTripData["DaytripPrice"] = $TourPrice->price;
}
$template_form_daydetail = $this->load->view($template_path . '-daydetail-form', $DayTripData, true); //模板内容
//使用simple_html_dom_lib库来进行表单添加
$ic_content_pc = $ic_content; //需要一个变量来过渡,不然$ic_content改变以后PC端就没有
$ic_content_pc = $this->html_optimize_lib->add_htmlcode($ic_content, "#maincontent", $template_form_daydetail);
$data["CUSTOMCONENT"] = $ic_content_pc;
}
if ($meta_ct_page_type == "tourdetail") { //线路表单,左右结构,用标签来做
$dataform['device'] = $device;
$template_form_tourqi = $this->load->view($template_path . '-form-tourqi-new', $dataform, true);
@ -4744,7 +4803,7 @@ class Information extends CI_Controller {
$InfoData->Option2 = $TsOption2;
}
//附加选项
//附加选项
$t_Type = get_meta($information->ic_id, "meta_trippest_type"); //产品类型
if ($t_Type) {
$InfoData->t_Type = $t_Type;
@ -4760,6 +4819,10 @@ class Information extends CI_Controller {
$InfoData->t_hoteladdress = get_meta($information->ic_id, "meta_trippest_hoteladdress");
$InfoData->t_defaultDate = get_meta($information->ic_id, "meta_trippest_defaultDate");
//延迟天数
$t_meta_trippest_delayday = get_meta($information->ic_id, "meta_trippest_delayday");
$InfoData->t_meta_trippest_delayday = $t_meta_trippest_delayday == null ? 0 : $t_meta_trippest_delayday;
$t_Cancellation = get_meta($information->ic_id, "meta_trainspread_Cancellation"); //取消条款类型
if ($t_Cancellation) {
$InfoData->t_Cancellation = $t_Cancellation;
@ -4794,7 +4857,7 @@ class Information extends CI_Controller {
$DayTripData["DaytripPrice"] = $TourPrice->price;
}
//替换模板
//替换模板
$TS_DayTripContent = $ic_content; //因为需要替换, 所以要转给零时变量。不然手机端替换完了, PC端就没有了。
$template_form_daydetail = $this->load->view($template_path . '-daydetail-form', $DayTripData, true); //模板内容
$TS_DayTripContent = str_replace('<!-- @DAYTRIP - FORM@ --> ', $template_form_daydetail, $TS_DayTripContent);