From 0839b597085540951b7e6c5ddc04980677a4affb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=B9=E8=AF=9A=E8=AF=9A?= Date: Thu, 21 Oct 2021 15:06:13 +0800 Subject: [PATCH] =?UTF-8?q?GH=E7=9A=84=E9=9D=99=E6=80=81=E5=8C=96=E5=8F=91?= =?UTF-8?q?=E5=B8=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/controllers/information.php | 29 ++++++------------------ application/views/mobile_first/gh-h1.php | 2 +- application/views/mobile_first/gh-pc.php | 2 -- application/views/mobile_first/gh.php | 5 ---- 4 files changed, 8 insertions(+), 30 deletions(-) diff --git a/application/controllers/information.php b/application/controllers/information.php index 2ccc1646..e08c5280 100644 --- a/application/controllers/information.php +++ b/application/controllers/information.php @@ -961,6 +961,12 @@ class Information extends CI_Controller } } + //顶部全屏大图 + if ($device == 'mobile') { //移动端读取移动大图 + $meta_addon_picture = get_meta($information->ic_id, 'meta_addon_picture_mobile'); + } else { + $meta_addon_picture = get_meta($information->ic_id, 'meta_addon_picture'); + } //非产品页面 $meta_product_code = get_meta($information->ic_id, 'meta_product_code'); @@ -973,7 +979,7 @@ class Information extends CI_Controller $author = $this->Operator_model->get_author_nikename($information->ic_author); $data_H1['author'] = $author; //获取作者信息 $data_H1['ic_title'] = $information->ic_title; - $data_H1['ic_photo'] = $information->ic_photo; + $data_H1['ic_photo'] = $meta_addon_picture;//$information->ic_photo; 用额外设置的图片替代 $data_H1['breadcrumb_data'] = $breadcrumb_data; $data_H1['ads_by_google'] = $ads_by_google; $template_H1 = $this->load->view($template_path . '-h1', $data_H1, TRUE); @@ -1027,28 +1033,7 @@ class Information extends CI_Controller } } - //顶部全屏大图 - if ($device == 'mobile') { //移动端读取移动大图 - $meta_addon_picture = get_meta($information->ic_id, 'meta_addon_picture_mobile'); - } else { - $meta_addon_picture = get_meta($information->ic_id, 'meta_addon_picture'); - } - - $meta_addon_picture_url = get_meta($information->ic_id, 'meta_addon_picture_url'); - if (!empty($meta_addon_picture)) { - if (!empty($meta_addon_picture_url)) { - // $template = str_replace('', '
' . $information->ic_title . '
', $template); - } else { - // $template = str_replace('', '
' . $information->ic_title . '' . $template_TrainSearch . '
', $template); - } - } - //顶部视频 -// $meta_news_video = get_meta($information->ic_id, 'meta_news_video'); -// $meta_video_picture = get_meta($information->ic_id, 'meta_video_picture'); -// if (!empty($meta_news_video) && !empty($meta_video_picture)) { -// $template = str_replace('', '
', $template); -// } if (is_file('D:/wwwroot/origin-www.globalhighlights.com/css/gh-global.css')) {//主样式表,内联模式,优先读取本地,没有在从网络读取,为了加速 $main_css_string = compress_css(file_get_contents('D:/wwwroot/origin-www.globalhighlights.com/css/gh-global.css')); diff --git a/application/views/mobile_first/gh-h1.php b/application/views/mobile_first/gh-h1.php index 70735a37..7716e719 100644 --- a/application/views/mobile_first/gh-h1.php +++ b/application/views/mobile_first/gh-h1.php @@ -1,6 +1,6 @@
- <?php echo !empty($ic_title)?$ic_title:'H1 title globalhighlights mobile first template'; ?> diff --git a/application/views/mobile_first/gh-pc.php b/application/views/mobile_first/gh-pc.php index 7631d179..87f244e7 100644 --- a/application/views/mobile_first/gh-pc.php +++ b/application/views/mobile_first/gh-pc.php @@ -135,8 +135,6 @@ height="0" width="0" style="display:none;visibility:hidden"> - -
diff --git a/application/views/mobile_first/gh.php b/application/views/mobile_first/gh.php index 2034c5a1..f6f8dc34 100644 --- a/application/views/mobile_first/gh.php +++ b/application/views/mobile_first/gh.php @@ -113,11 +113,6 @@ - - - - -