From 6290c843a6a567af192d2e8584525b2ac5e345dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B5=B5=E9=B9=8F?= Date: Tue, 30 Mar 2021 15:09:09 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=B7=E6=A0=BC=E8=AF=BB=E5=8F=96=E5=AE=8C?= =?UTF-8?q?=E6=88=90=EF=BC=8C=E5=B9=B6=E6=B7=BB=E5=8A=A0CT=E4=BD=BF?= =?UTF-8?q?=E7=94=A8=E7=9A=84=E9=A1=B5=E9=9D=A2=E7=B1=BB=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/controllers/information.php | 61 +++++++++++----- .../views/bootstrap3/information_edit.php | 72 ++++++++++++++++++- 2 files changed, 112 insertions(+), 21 deletions(-) diff --git a/application/controllers/information.php b/application/controllers/information.php index a6c54c06..641c4538 100644 --- a/application/controllers/information.php +++ b/application/controllers/information.php @@ -776,21 +776,23 @@ class Information extends CI_Controller /* 详细内容 */ $ic_content = $information->ic_content; - /**替换详细内容里面的价格 - * // 一日游价格标签, "" 或者 逗号后面是人数 - * //精华线路标签"" - */ - $ic_content = preg_replace_callback('//i',function($match){ - //处理一日游每次配备 - $matchItem = $match[1]; - return '';; - },$ic_content); - $ic_content = preg_replace_callback('//i',function($match){ - //处理精华线路每次配备 - $matchItem = $match[1]; - return '';; - },$ic_content); + // /**替换详细内容里面的价格 + /* 直接使用fetch来啊动态获取价格,这样不用替换标签,直接录标签 + // * // 一日游价格标签, "" 或者 逗号后面是人数 + // * //精华线路标签"" + // */ + // $ic_content = preg_replace_callback('//i',function($match){ + // //处理一日游每次配备 + // $matchItem = $match[1]; + // return '';; + // },$ic_content); + // $ic_content = preg_replace_callback('//i',function($match){ + // //处理精华线路每次配备 + // $matchItem = $match[1]; + // return '';; + // },$ic_content); + $ic_content = '
'.$ic_content.'
'; //兼容拷贝过来的内容样式 $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"] = ''; + // $data["PRODUCTJS"] = ''; } //顶部全屏大图 @@ -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 = '' . $information->ic_title . ''; + $bannerImg = '' . $information->ic_title . ''; }else{ $meta_addon_picture = get_meta($information->ic_id, 'meta_addon_picture'); - $bannerImg = '' . $information->ic_title . ''; + $bannerImg = '' . $information->ic_title . ''; $meta_addon_picture_text = get_meta($information->ic_id,'meta_addon_picture_text'); if(!empty($meta_addon_picture_url)){ $ImgText = ''; @@ -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=''; + } + /// ----- 总JS判断完成----- + //额外js - $data["ADDONJS"]=""; + $data["ADDONJS"]=""; $meta_addon_js = get_meta($information->ic_id, 'meta_addon_js'); if (!empty($meta_addon_js)) { - $data["ADDONJS"]=''; + $addonJs .=''; + } + //价格js + if ($meta_ct_page_price=="yes"){ + $addonJs .= ''; } + $data["ADDONJS"]=$addonJs; //社媒分享图片 $data["OGIMAGE"]=""; if (!empty($information->ic_photo)) { diff --git a/application/views/bootstrap3/information_edit.php b/application/views/bootstrap3/information_edit.php index ea0ded2c..cfeb5862 100644 --- a/application/views/bootstrap3/information_edit.php +++ b/application/views/bootstrap3/information_edit.php @@ -879,7 +879,7 @@ ic_sitecode == 'chinatravel') { ?>
-
+
-
+
+ + + + + +
+
+ + +
+ +
+ + +
+ +