diff --git a/application/controllers/information.php b/application/controllers/information.php
index 0cf70289..281ebd77 100644
--- a/application/controllers/information.php
+++ b/application/controllers/information.php
@@ -1186,9 +1186,26 @@ class Information extends CI_Controller {
if (empty($meta_product_code)) {
$template = str_replace('?product_code=', '', $template);
+ $meta_addon_picture = get_meta($information->ic_id, 'meta_addon_picture');
+ $meta_addon_picture_mobile = get_meta($information->ic_id, 'meta_addon_picture_mobile');
+
+ $article_image_list = [$meta_addon_picture, $meta_addon_picture_mobile];
+ $article_image_list = array_values(array_filter($article_image_list, function($value) {
+ return !empty($value);
+ }));
+ $article_image_json = json_encode($article_image_list, JSON_UNESCAPED_SLASHES);
+
+ $article_published_date = new DateTime($information->is_datetime, new DateTimeZone('UTC'));
+ $article_modified_date = new DateTime('now', new DateTimeZone('UTC'));
+
$article_structured_data_content = $this->load->view(
- $template_path . '-structured-data-article',
- ['information' => $information, 'author_name' => $data_H1['author'], 'author_url' => $author_url],
+ $template_path . '-structured-data-article', [
+ 'information' => $information,
+ 'article_published_date' => $article_published_date,
+ 'article_modified_date' => $article_modified_date,
+ 'author_name' => $data_H1['author'], 'author_url' => $author_url,
+ 'article_image_urls' => $article_image_json
+ ],
true
);
$template = str_replace('', $article_structured_data_content, $template);
@@ -1876,6 +1893,19 @@ class Information extends CI_Controller {
$meta_product_code = get_meta($information->ic_id, 'meta_product_code');
$ads_by_google = ! empty(get_meta($information->ic_id, 'meta_google_ad_article'));
+
+ $meta_addon_picture = get_meta($information->ic_id, 'meta_addon_picture');
+ $meta_addon_picture_mobile = get_meta($information->ic_id, 'meta_addon_picture_mobile');
+
+ $article_image_list = [$meta_addon_picture, $meta_addon_picture_mobile];
+ $article_image_list = array_values(array_filter($article_image_list, function($value) {
+ return !empty($value);
+ }));
+ $article_image_json = json_encode($article_image_list, JSON_UNESCAPED_SLASHES);
+
+ $article_published_date = new DateTime($information->is_datetime, new DateTimeZone('UTC'));
+ $article_modified_date = new DateTime('now', new DateTimeZone('UTC'));
+
//H1模板替换
$data_H1 = [];
$data_H1['infocategory'] = $this->Information_model->get_detail_by_path($information->is_path, 1); //信息所属分类,获取信息顶级节点内容
@@ -1906,8 +1936,13 @@ class Information extends CI_Controller {
}
$article_structured_data_content = $this->load->view(
- 'mobile_first/gh-structured-data-article',
- ['information' => $information, 'author_name' => $data_H1['author'], 'author_url' => $author_url],
+ $template_path . '-structured-data-article', [
+ 'information' => $information,
+ 'article_published_date' => $article_published_date,
+ 'article_modified_date' => $article_modified_date,
+ 'author_name' => $data_H1['author'], 'author_url' => $author_url,
+ 'article_image_urls' => $article_image_json
+ ],
true
);
$template = str_replace('', $article_structured_data_content, $template);
@@ -2266,6 +2301,19 @@ class Information extends CI_Controller {
$breadcrumb_data = $this->Information_model->get_breadcrumb_data($information->is_id, $information->is_path, $group_map);
$ads_by_google = ! empty(get_meta($information->ic_id, 'meta_google_ad_article'));
+
+ $meta_addon_picture = get_meta($information->ic_id, 'meta_addon_picture');
+ $meta_addon_picture_mobile = get_meta($information->ic_id, 'meta_addon_picture_mobile');
+
+ $article_image_list = [$meta_addon_picture, $meta_addon_picture_mobile];
+ $article_image_list = array_values(array_filter($article_image_list, function($value) {
+ return !empty($value);
+ }));
+ $article_image_json = json_encode($article_image_list, JSON_UNESCAPED_SLASHES);
+
+ $article_published_date = new DateTime($information->is_datetime, new DateTimeZone('UTC'));
+ $article_modified_date = new DateTime('now', new DateTimeZone('UTC'));
+
$data['meta_news_createdate'] = $this->get_publish_date_in_6_month($information);
$data['ads_by_google'] = $ads_by_google;
$data['author'] = ''; //获取作者信息
@@ -2288,8 +2336,13 @@ class Information extends CI_Controller {
$template = str_replace('', $template_H1, $template);
// 结构化标签:Article
$article_structured_data_content = $this->load->view(
- $template_path . '-structured-data-article',
- ['information' => $information, 'author_name' => $data['author'], 'author_url' => $author_url],
+ $template_path . '-structured-data-article', [
+ 'information' => $information,
+ 'article_published_date' => $article_published_date,
+ 'article_modified_date' => $article_modified_date,
+ 'author_name' => $data['author'], 'author_url' => $author_url,
+ 'article_image_urls' => $article_image_json
+ ],
true
);
$template = str_replace('', $article_structured_data_content, $template);
@@ -2710,6 +2763,18 @@ class Information extends CI_Controller {
],
];
+ $meta_addon_picture = get_meta($information->ic_id, 'meta_addon_picture');
+ $meta_addon_picture_mobile = get_meta($information->ic_id, 'meta_addon_picture_mobile');
+
+ $article_image_list = [$meta_addon_picture, $meta_addon_picture_mobile];
+ $article_image_list = array_values(array_filter($article_image_list, function($value) {
+ return !empty($value);
+ }));
+ $article_image_json = json_encode($article_image_list, JSON_UNESCAPED_SLASHES);
+
+ $article_published_date = new DateTime($information->is_datetime, new DateTimeZone('UTC'));
+ $article_modified_date = new DateTime('now', new DateTimeZone('UTC'));
+
$breadcrumb_data = $this->Information_model->get_breadcrumb_data($information->is_id, $information->is_path, $group_map);
$ads_by_google = ! empty(get_meta($information->ic_id, 'meta_google_ad_article'));
$data['meta_news_createdate'] = $this->get_publish_date_in_6_month($information);
@@ -2734,10 +2799,16 @@ class Information extends CI_Controller {
$data['breadcrumb_data'] = $breadcrumb_data;
$template_H1 = $this->load->view($template_path . '-h1', $data, true);
$template = str_replace('', $template_H1, $template);
+
// 结构化标签:Article
$article_structured_data_content = $this->load->view(
- $template_path . '-structured-data-article',
- ['information' => $information, 'author_name' => $data['author_name'], 'author_url' => $author_info['url']],
+ $template_path . '-structured-data-article', [
+ 'information' => $information,
+ 'article_published_date' => $article_published_date,
+ 'article_modified_date' => $article_modified_date,
+ 'author_name' => $data['author_name'], 'author_url' => $author_info['url'],
+ 'article_image_urls' => $article_image_json
+ ],
true
);
$template = str_replace('', $article_structured_data_content, $template);
@@ -4306,7 +4377,7 @@ class Information extends CI_Controller {
$DayTripData["InfoData"] = $InfoData; //传递信息平台数据
-
+
$linktour = get_meta($information->ic_id, 'meta_trainspread_linktour'); //关联线路
if (! empty($linktour)) {
$paramCode = $productCode . "," . $linktour;
diff --git a/application/views/mobile_first/ch-inquiry-form.php b/application/views/mobile_first/ch-inquiry-form.php
index 1093196e..ede1d094 100644
--- a/application/views/mobile_first/ch-inquiry-form.php
+++ b/application/views/mobile_first/ch-inquiry-form.php
@@ -779,12 +779,12 @@
});
})
+