From a7ac508949bbc956f8066be5ff41fec60e7ae652 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B5=B5=E9=B9=8F?= Date: Wed, 25 Sep 2024 14:19:59 +0800 Subject: [PATCH] =?UTF-8?q?CT=E7=AB=99TA=E5=8A=A0=E6=95=B4=E9=A1=B5?= =?UTF-8?q?=E7=9A=84=E6=98=BE=E7=A4=BA=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/controllers/information.php | 27 ++++++++++++++++++- .../chinatravel-feedback-cross.php | 25 +++++++++++++++++ 2 files changed, 51 insertions(+), 1 deletion(-) create mode 100644 application/views/mobile_first/chinatravel-feedback-cross.php diff --git a/application/controllers/information.php b/application/controllers/information.php index d797f72d..695fd36d 100644 --- a/application/controllers/information.php +++ b/application/controllers/information.php @@ -2595,7 +2595,7 @@ class Information extends CI_Controller } - // 动态加载反馈标签,按城市出前三条。 + // 动态加载反馈标签,按城市出前三条。左侧 // HTLM:
,显示全部用 // 解析结果:; Shanghai,Beijing $feedback_array = []; @@ -2619,6 +2619,31 @@ class Information extends CI_Controller } } + // 动态加载反馈标签,按城市出前三条。整页 + // HTLM:
,显示全部用 + // 解析结果:; Shanghai,Beijing + $feedback_array = []; + preg_match_all('^^', $information->ic_content, $feedback_array); + if (!empty($feedback_array)) { + foreach ($feedback_array[0] as $index => $tag_name) { + $city_name_string = $feedback_array[1][$index]; + $feedback_list = $this->Feedback_model->get_CT_feedback_by_cityname($city_name_string,30); + // 防止触发 Google 网络垃圾政策只返回前三条 + $top3_feedback_list = array_slice($feedback_list, 0, 3); + $feedback_content = $this->load->view( + 'mobile_first/chinatravel-feedback-cross', + array('feedback_list' => $top3_feedback_list), + true + ); + $ic_content = str_replace( + $tag_name, + $feedback_content, + $ic_content + ); + } + } + + //图片加延迟 $ic_content = $this->html_optimize_lib->set_lazy_loader($ic_content, 'https://data.chinatravel.com/images/mobile-first/grey.gif'); diff --git a/application/views/mobile_first/chinatravel-feedback-cross.php b/application/views/mobile_first/chinatravel-feedback-cross.php new file mode 100644 index 00000000..16677e53 --- /dev/null +++ b/application/views/mobile_first/chinatravel-feedback-cross.php @@ -0,0 +1,25 @@ + +
+
+
+

ta logo

+

+
+
+
+ $feedback) {?> +
+

+

+
+

more

+

+

+
+
+ +
+
+
+
+ \ No newline at end of file