|
|
|
@ -776,21 +776,23 @@ class Information extends CI_Controller
|
|
|
|
|
|
|
|
|
|
/* 详细内容 */
|
|
|
|
|
$ic_content = $information->ic_content;
|
|
|
|
|
/**替换详细内容里面的价格
|
|
|
|
|
* // 一日游价格标签, "<!--@DayTripPrice:XASIC-41@-->" 或者<!--@DayTripPrice:XASIC-41,2@--> 逗号后面是人数
|
|
|
|
|
* //精华线路标签"<!--@TourPrice:ct-1@-->"
|
|
|
|
|
*/
|
|
|
|
|
$ic_content = preg_replace_callback('/<!--@DayTripPrice:(.*)@-->/i',function($match){
|
|
|
|
|
//处理一日游每次配备
|
|
|
|
|
$matchItem = $match[1];
|
|
|
|
|
return '<span class="js_getDayTripPrice" data="'.$matchItem.'"></span>';;
|
|
|
|
|
},$ic_content);
|
|
|
|
|
$ic_content = preg_replace_callback('/<!--@TourPrice:(.*)@-->/i',function($match){
|
|
|
|
|
//处理精华线路每次配备
|
|
|
|
|
$matchItem = $match[1];
|
|
|
|
|
return '<span class="js_getTourPrice" data="'.$matchItem.'"></span>';;
|
|
|
|
|
},$ic_content);
|
|
|
|
|
|
|
|
|
|
// /**替换详细内容里面的价格
|
|
|
|
|
/* 直接使用fetch来啊动态获取价格,这样不用替换标签,直接录标签
|
|
|
|
|
// * // 一日游价格标签, "<!--@DayTripPrice:XASIC-41@-->" 或者<!--@DayTripPrice:XASIC-41,2@--> 逗号后面是人数
|
|
|
|
|
// * //精华线路标签"<!--@TourPrice:ct-1@-->"
|
|
|
|
|
// */
|
|
|
|
|
// $ic_content = preg_replace_callback('/<!--@DayTripPrice:(.*)@-->/i',function($match){
|
|
|
|
|
// //处理一日游每次配备
|
|
|
|
|
// $matchItem = $match[1];
|
|
|
|
|
// return '<span class="js_getDayTripPrice" data="'.$matchItem.'"></span>';;
|
|
|
|
|
// },$ic_content);
|
|
|
|
|
// $ic_content = preg_replace_callback('/<!--@TourPrice:(.*)@-->/i',function($match){
|
|
|
|
|
// //处理精华线路每次配备
|
|
|
|
|
// $matchItem = $match[1];
|
|
|
|
|
// return '<span class="js_getTourPrice" data="'.$matchItem.'"></span>';;
|
|
|
|
|
// },$ic_content);
|
|
|
|
|
|
|
|
|
|
$ic_content = '<div class="container-details details-content">'.$ic_content.'</div>'; //兼容拷贝过来的内容样式
|
|
|
|
|
$data["CUSTOMCONENT"]=$ic_content;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -802,7 +804,7 @@ class Information extends CI_Controller
|
|
|
|
|
if (empty(get_meta($information->ic_id, 'meta_product_code'))) {
|
|
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
$data["PRODUCTJS"] = '<script src="https://data.chinatravel.com/js/mobile-first/flatpickr.js"></script>';
|
|
|
|
|
// $data["PRODUCTJS"] = '<script src="https://data.chinatravel.com/js/mobile-first/flatpickr.js"></script>';
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//顶部全屏大图
|
|
|
|
@ -811,10 +813,10 @@ class Information extends CI_Controller
|
|
|
|
|
$meta_addon_picture_url = get_meta($information->ic_id, 'meta_addon_picture_url');
|
|
|
|
|
if($device=='mobile'){//移动端读取移动大图
|
|
|
|
|
$meta_addon_picture = get_meta($information->ic_id, 'meta_addon_picture_mobile');
|
|
|
|
|
$bannerImg = '<img class="img-responsive" width="750" height="650" alt="' . $information->ic_title . '" src="' . $meta_addon_picture . '">';
|
|
|
|
|
$bannerImg = '<img class="img-responsive" alt="' . $information->ic_title . '" src="' . $meta_addon_picture . '">';
|
|
|
|
|
}else{
|
|
|
|
|
$meta_addon_picture = get_meta($information->ic_id, 'meta_addon_picture');
|
|
|
|
|
$bannerImg = '<img class="img-responsive" width="1920" height="720" alt="' . $information->ic_title . '" src="' . $meta_addon_picture . '">';
|
|
|
|
|
$bannerImg = '<img class="img-responsive" alt="' . $information->ic_title . '" src="' . $meta_addon_picture . '">';
|
|
|
|
|
$meta_addon_picture_text = get_meta($information->ic_id,'meta_addon_picture_text');
|
|
|
|
|
if(!empty($meta_addon_picture_url)){
|
|
|
|
|
$ImgText = '<div class="carousel-caption"><p class="ads-title"><a href="'.$meta_addon_picture_url.'">'.$meta_addon_picture_text.'</a></p></div>';
|
|
|
|
@ -860,13 +862,34 @@ class Information extends CI_Controller
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//总JS:为了方便以后js好维护,必须的把一些公用的JS统计到一个文件。但是又不是所有页面都需要调用这个基础js,所以必须在这里进行判断
|
|
|
|
|
$addBaseJs = false;
|
|
|
|
|
$addonJs = "";
|
|
|
|
|
$meta_ct_page_price = get_meta($information->ic_id, 'meta_ct_page_price'); //是否包含价格
|
|
|
|
|
$meta_ct_page_type = get_meta($information->ic_id, 'meta_ct_page_type'); //页面类型
|
|
|
|
|
if ($meta_ct_page_price=="yes"){
|
|
|
|
|
$addBaseJs=true;
|
|
|
|
|
}else if ($meta_ct_page_type!==false && $meta_ct_page_type!=""){
|
|
|
|
|
$addBaseJs=true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if ($addBaseJs){
|
|
|
|
|
$addonJs='<script src="/js/mobile-first/base.js"></script>';
|
|
|
|
|
}
|
|
|
|
|
/// ----- 总JS判断完成-----
|
|
|
|
|
|
|
|
|
|
//额外js
|
|
|
|
|
$data["ADDONJS"]="";
|
|
|
|
|
$meta_addon_js = get_meta($information->ic_id, 'meta_addon_js');
|
|
|
|
|
if (!empty($meta_addon_js)) {
|
|
|
|
|
$data["ADDONJS"]='<script src="' . $meta_addon_js . '"></script>';
|
|
|
|
|
$addonJs .='<script src="' . $meta_addon_js . '"></script>';
|
|
|
|
|
}
|
|
|
|
|
//价格js
|
|
|
|
|
if ($meta_ct_page_price=="yes"){
|
|
|
|
|
$addonJs .= '<script src="/js/mobile-first/getprice.js"></script>';
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$data["ADDONJS"]=$addonJs;
|
|
|
|
|
//社媒分享图片
|
|
|
|
|
$data["OGIMAGE"]="";
|
|
|
|
|
if (!empty($information->ic_photo)) {
|
|
|
|
|