From fd35b04a5aa7759ade43143690918d743b1a356b Mon Sep 17 00:00:00 2001 From: LiaoYijun Date: Tue, 24 Aug 2021 14:22:16 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E4=B8=8A=E7=BA=BF=E5=8F=8D=E9=A6=88?= =?UTF-8?q?=E5=8A=A8=E6=80=81=E6=A0=87=E7=AD=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/controllers/information.php | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/application/controllers/information.php b/application/controllers/information.php index 314d6241..43663464 100644 --- a/application/controllers/information.php +++ b/application/controllers/information.php @@ -613,16 +613,16 @@ class Information extends CI_Controller preg_match_all('^^', $template, $feedback_array); if (!empty($feedback_array)) { foreach ($feedback_array[0] as $index => $tag_name) { - // $city_name = $feedback_array[1][$index]; - // $feedback_data = $this->feedback_model->get_feedback_by_city($city_name); - // $feedback_content = $this->load->view( - // $template_path . '-feedback', - // array('feedback_data' => $feedback_data), - // true); - // $template = str_replace( - // $tag_name, - // $feedback_content, - // $template); + $city_name = $feedback_array[1][$index]; + $feedback_data = $this->feedback_model->get_feedback_by_city($city_name); + $feedback_content = $this->load->view( + $template_path . '-feedback', + array('feedback_data' => $feedback_data), + true); + $template = str_replace( + $tag_name, + $feedback_content, + $template); } } From 6ac53e884b630dac8f52f33609e8f5e416e50049 Mon Sep 17 00:00:00 2001 From: LiaoYijun Date: Tue, 24 Aug 2021 14:32:00 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=B5=8B=E8=AF=95?= =?UTF-8?q?=E5=8F=8D=E9=A6=88=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/controllers/test.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/application/controllers/test.php b/application/controllers/test.php index 06d74e76..2163f22f 100644 --- a/application/controllers/test.php +++ b/application/controllers/test.php @@ -10,15 +10,19 @@ class Test extends CI_Controller { parent::__construct(); $this->load->model('feedback_model'); + $this->load->model('Information_model'); } public function feedback() { + $is_id = $this->input->get_post('is_id'); $template_path = 'mobile_first/ch'; + $information = $this->Information_model->Detail($is_id); + $feedback_array = array(); - preg_match_all('^^', '
', $feedback_array); + preg_match_all('^^', $information->ic_content, $feedback_array); if (!empty($feedback_array)) { foreach ($feedback_array[0] as $index => $tag_name) { $city_name = $feedback_array[1][$index]; From 5c3e206261da509f8102510373f19f581299db63 Mon Sep 17 00:00:00 2001 From: LiaoYijun Date: Tue, 24 Aug 2021 14:36:11 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=B5=8B=E8=AF=95?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E6=A0=87=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/controllers/test.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/application/controllers/test.php b/application/controllers/test.php index 2163f22f..7a7efa6b 100644 --- a/application/controllers/test.php +++ b/application/controllers/test.php @@ -26,8 +26,9 @@ class Test extends CI_Controller if (!empty($feedback_array)) { foreach ($feedback_array[0] as $index => $tag_name) { $city_name = $feedback_array[1][$index]; - echo $city_name; - echo htmlentities($tag_name); + echo $information->ic_title.'
'; + echo $city_name.'
'; + echo htmlentities($tag_name).'
'; $feedback_data = $this->feedback_model->get_feedback_by_city($city_name); $feedback_content = $this->load->view( $template_path . '-feedback',