From 46457a8785477415aebed6845f0bbccdce965361 Mon Sep 17 00:00:00 2001 From: Jimmy Liow Date: Mon, 8 Apr 2024 10:55:30 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E7=B2=BE=E7=AE=80AH=E7=BD=91=E7=AB=99revie?= =?UTF-8?q?ws=E4=B8=AA=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/controllers/information.php | 30 +++---------------------- 1 file changed, 3 insertions(+), 27 deletions(-) diff --git a/application/controllers/information.php b/application/controllers/information.php index f69e48f2..47782fb0 100644 --- a/application/controllers/information.php +++ b/application/controllers/information.php @@ -2176,19 +2176,6 @@ class Information extends CI_Controller $template = str_replace('', $tips_right_list_content, $template); - // - $feedback_newest_10 = $this->Feedback_model->get_feedback_newest(10); - $feedback_newest_10_content = $this->load->view( - 'mobile_first/ah-feedback-newest-10', - array('feedback_list' => $feedback_newest_10), - true - ); - $template = str_replace( - '', - $feedback_newest_10_content, - $template - ); - //文中的信息推荐 if (strpos($information->ic_content, '') !== false) { $information->ic_content = str_replace('', $this->load->view($template_path . '-recommends-article', array('recommands' => $template_recommand), true), $information->ic_content); @@ -2296,7 +2283,9 @@ class Information extends CI_Controller foreach ($feedback_array[0] as $index => $tag_name) { $city_name_string = $feedback_array[1][$index]; $city_name_list = explode(',', $city_name_string); - $feedback_list = $this->Feedback_model->get_feedback_by_city_list($city_name_list); + $feedback_list = $this->Feedback_model->get_feedback_by_city_list($city_name_list); + // 防止触发 Google 网络垃圾政策只返回前三条 + $top3_feedback_list = array_slice($feedback_list, 0, 3); $feedback_content = $this->load->view( $template_path . '-feedback-list', array('feedback_list' => $feedback_list), @@ -2359,19 +2348,6 @@ class Information extends CI_Controller } } - // - $feedback_newest = $this->Feedback_model->get_feedback_newest(); - $feedback_newest_content = $this->load->view( - 'mobile_first/ah-feedback-newest', - array('feedback_list' => $feedback_newest), - true - ); - $information->ic_content = str_replace( - '', - $feedback_newest_content, - $information->ic_content - ); - //主样式表,内联模式 if (is_file('D:/wwwroot/origin-www.asiahighlights.com/css/mobile-first.css')) { //主样式表,内联模式,优先读取本地,没有在从网络读取,为了加速 $main_css_string = compress_css(file_get_contents('D:/wwwroot/origin-www.asiahighlights.com/css/mobile-first.css')); From 840f7e5b9f0737c5ebfbe63cccb2f1ca4c2509e1 Mon Sep 17 00:00:00 2001 From: Jimmy Liow Date: Mon, 8 Apr 2024 11:37:48 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E4=BF=AE=E5=A4=8DAH=E7=9B=AE=E7=9A=84?= =?UTF-8?q?=E5=9C=B0Review=E4=B8=BA=E4=B8=89=E4=B8=AA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/controllers/information.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/application/controllers/information.php b/application/controllers/information.php index 47782fb0..6db8fd7e 100644 --- a/application/controllers/information.php +++ b/application/controllers/information.php @@ -2288,7 +2288,7 @@ class Information extends CI_Controller $top3_feedback_list = array_slice($feedback_list, 0, 3); $feedback_content = $this->load->view( $template_path . '-feedback-list', - array('feedback_list' => $feedback_list), + array('feedback_list' => $top3_feedback_list), true ); $information->ic_content = str_replace(