From ba9464f0990cf5bb39f23f20bb4cf89401413742 Mon Sep 17 00:00:00 2001 From: LiaoYijun Date: Wed, 21 Jul 2021 14:26:31 +0800 Subject: [PATCH 01/14] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E7=AC=AC=E4=BA=8C?= =?UTF-8?q?=E7=BA=A7=E7=9B=AE=E5=BD=95=E8=A7=84=E5=88=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/models/information_model.php | 62 +++++++++++++++++++----- 1 file changed, 49 insertions(+), 13 deletions(-) diff --git a/application/models/information_model.php b/application/models/information_model.php index 876a5b86..6bd87480 100644 --- a/application/models/information_model.php +++ b/application/models/information_model.php @@ -144,30 +144,66 @@ class Information_model extends CI_Model { */ function get_path_exclude_self($is_id, $path) { $site_code = $this->config->item('site_code'); - $path_query = $this->HT->query("select ic_id, is_id, ic_url,ic_url_title,ic_title,is_path + $path_query = $this->HT->query("select + ic_id, is_id, ic_url,ic_url_title,ic_title,is_path,is_level,ic_status from infoStructures a inner join infoContents b on a.is_ic_id=b.ic_id where is_id in ($path 0) and is_id <> ? and is_siteCode = ? order by is_level asc", array($is_id, $site_code)); $path_result = $path_query->result(); $path_list = []; + $group_map = [ + 278008010 => [ + 'ic_url' => '/travelguide/culture/', + 'ic_url_title' => 'Chinese Culture' + ], + 278008011 => [ + 'ic_url' => '/travelguide/', + 'ic_url_title' => 'Travel Guide' + ], + 278008012 => [ + 'ic_url' => '/aboutus/', + 'ic_url_title' => 'About Us' + ], + 278008013 => [ + 'ic_url' => '/citytour/', + 'ic_url_title' => 'City Tours' + ], + 278008014 => [ + 'ic_url' => '/tour/', + 'ic_url_title' => 'China Tours' + ] + ]; + foreach ($path_result as $path_row) { $ic_url = $path_row->ic_url; $ic_url_title = $path_row->ic_url_title; - if ($path_row->is_id === 278008010) { - $ic_url = '/inspiration'; - $ic_url_title = 'inspiration title'; + if ($path_row->is_level === 0) { + if (array_key_exists($path_row->ic_id, $group_map)) { + $top_group = $group_map[$path_row->ic_id]; + + $path_array = [ + 'ic_id' => $path_row->ic_id, + 'is_id' => $path_row->is_id, + 'ic_title' => $path_row->ic_title, + 'ic_url' => $top_group['ic_url'], + 'ic_url_title' => $top_group['ic_url_title'] + ]; + $path_list[] = $path_array; + } + } else if ($path_row->ic_status === 1) { + + $path_array = [ + 'ic_id' => $path_row->ic_id, + 'is_id' => $path_row->is_id, + 'ic_title' => $path_row->ic_title, + 'ic_url' => $path_row->ic_url, + 'ic_url_title' => $path_row->ic_url_title + ]; + $path_list[] = $path_array; + } - - $path_array = [ - 'ic_id' => $path_row->ic_id, - 'is_id' => $path_row->is_id, - 'ic_title' => $path_row->ic_title, - 'ic_url' => $ic_url, - 'ic_url_title' => $ic_url_title - ]; - $path_list[] = $path_array; } return $path_list; From 1b687eac8e2ac5a446347a8b351e6cf27099adc9 Mon Sep 17 00:00:00 2001 From: LiaoYijun Date: Wed, 21 Jul 2021 14:31:32 +0800 Subject: [PATCH 02/14] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20Group=20Map=20?= =?UTF-8?q?=E7=9A=84=E9=94=AE=E5=80=BC=E7=B1=BB=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/models/information_model.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/application/models/information_model.php b/application/models/information_model.php index 6bd87480..99c8aefa 100644 --- a/application/models/information_model.php +++ b/application/models/information_model.php @@ -152,23 +152,23 @@ class Information_model extends CI_Model { $path_list = []; $group_map = [ - 278008010 => [ + '278008010' => [ 'ic_url' => '/travelguide/culture/', 'ic_url_title' => 'Chinese Culture' ], - 278008011 => [ + '278008011' => [ 'ic_url' => '/travelguide/', 'ic_url_title' => 'Travel Guide' ], - 278008012 => [ + '278008012' => [ 'ic_url' => '/aboutus/', 'ic_url_title' => 'About Us' ], - 278008013 => [ + '278008013' => [ 'ic_url' => '/citytour/', 'ic_url_title' => 'City Tours' ], - 278008014 => [ + '278008014' => [ 'ic_url' => '/tour/', 'ic_url_title' => 'China Tours' ] From d79092c571afbadef589780da73308b51dd9717a Mon Sep 17 00:00:00 2001 From: LiaoYijun Date: Wed, 21 Jul 2021 14:40:18 +0800 Subject: [PATCH 03/14] =?UTF-8?q?=E4=BD=BF=E7=94=A8=20IS=5FID=20=E8=BF=9B?= =?UTF-8?q?=E8=A1=8C=E5=AD=98=E5=82=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/models/information_model.php | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/application/models/information_model.php b/application/models/information_model.php index 99c8aefa..0ec79029 100644 --- a/application/models/information_model.php +++ b/application/models/information_model.php @@ -152,23 +152,23 @@ class Information_model extends CI_Model { $path_list = []; $group_map = [ - '278008010' => [ + 27800801 => [ 'ic_url' => '/travelguide/culture/', 'ic_url_title' => 'Chinese Culture' ], - '278008011' => [ + 278008011 => [ 'ic_url' => '/travelguide/', 'ic_url_title' => 'Travel Guide' ], - '278008012' => [ + 278008012 => [ 'ic_url' => '/aboutus/', 'ic_url_title' => 'About Us' ], - '278008013' => [ + 278008013 => [ 'ic_url' => '/citytour/', 'ic_url_title' => 'City Tours' ], - '278008014' => [ + 278008014 => [ 'ic_url' => '/tour/', 'ic_url_title' => 'China Tours' ] @@ -180,9 +180,8 @@ class Information_model extends CI_Model { $ic_url_title = $path_row->ic_url_title; if ($path_row->is_level === 0) { - if (array_key_exists($path_row->ic_id, $group_map)) { - $top_group = $group_map[$path_row->ic_id]; - + if (array_key_exists($path_row->is_id, $group_map)) { + $top_group = $group_map[$path_row->is_id]; $path_array = [ 'ic_id' => $path_row->ic_id, 'is_id' => $path_row->is_id, From d258c778eaf9f70f1bb0c0cde6e61b887916c1da Mon Sep 17 00:00:00 2001 From: LiaoYijun Date: Wed, 21 Jul 2021 14:56:03 +0800 Subject: [PATCH 04/14] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E9=9D=A2=E5=8C=85?= =?UTF-8?q?=E5=B1=91=E7=B4=A2=E5=BC=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/views/mobile_first/ch-h1.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/application/views/mobile_first/ch-h1.php b/application/views/mobile_first/ch-h1.php index 6b979a29..ab96f453 100644 --- a/application/views/mobile_first/ch-h1.php +++ b/application/views/mobile_first/ch-h1.php @@ -9,8 +9,8 @@ From f2a3dbd52ba31ad1b8dc57e49482820b7e650a7f Mon Sep 17 00:00:00 2001 From: LiaoYijun Date: Wed, 21 Jul 2021 15:12:13 +0800 Subject: [PATCH 05/14] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E4=BA=A7=E5=93=81?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E7=9A=84=E9=9D=A2=E5=8C=85=E5=B1=91=E6=A0=87?= =?UTF-8?q?=E7=AD=BE=E6=B5=8B=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/controllers/information.php | 3 +++ application/views/mobile_first/ch-breadcrumb.php | 6 ++++++ 2 files changed, 9 insertions(+) create mode 100644 application/views/mobile_first/ch-breadcrumb.php diff --git a/application/controllers/information.php b/application/controllers/information.php index 94216cb6..3cc04240 100644 --- a/application/controllers/information.php +++ b/application/controllers/information.php @@ -626,6 +626,9 @@ class Information extends CI_Controller $template = str_replace('', '', $template); $inquiry_form_template = $this->load->view($template_path . '-inquiry-form', array('meta_product_code'=>$meta_product_code), true); $information->ic_content = str_replace('', $inquiry_form_template, $information->ic_content); + + $breadcrumb_content = $this->load->view($template_path . '-breadcrumb', array('breadcrumb_data'=>$breadcrumb_data), true); + $information->ic_content = str_replace('', $inquiry_form_template, $information->ic_content); } //顶部全屏大图 if ($device == 'mobile') { //移动端读取移动大图 diff --git a/application/views/mobile_first/ch-breadcrumb.php b/application/views/mobile_first/ch-breadcrumb.php new file mode 100644 index 00000000..d391ffd1 --- /dev/null +++ b/application/views/mobile_first/ch-breadcrumb.php @@ -0,0 +1,6 @@ + \ No newline at end of file From 84edfc6a00f8cc91e0262f7b2dfdffa9372ef821 Mon Sep 17 00:00:00 2001 From: LiaoYijun Date: Wed, 21 Jul 2021 15:15:24 +0800 Subject: [PATCH 06/14] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=9D=A2=E5=8C=85?= =?UTF-8?q?=E5=B1=91=E7=9A=84=E4=BD=8D=E7=BD=AE?= 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 3cc04240..c67ddc8b 100644 --- a/application/controllers/information.php +++ b/application/controllers/information.php @@ -628,7 +628,7 @@ class Information extends CI_Controller $information->ic_content = str_replace('', $inquiry_form_template, $information->ic_content); $breadcrumb_content = $this->load->view($template_path . '-breadcrumb', array('breadcrumb_data'=>$breadcrumb_data), true); - $information->ic_content = str_replace('', $inquiry_form_template, $information->ic_content); + $information->ic_content = str_replace('', $breadcrumb_content, $information->ic_content); } //顶部全屏大图 if ($device == 'mobile') { //移动端读取移动大图 From 203a2ea4ce1e16284369f26d519f271b4658d5ba Mon Sep 17 00:00:00 2001 From: candice Date: Wed, 21 Jul 2021 15:57:06 +0800 Subject: [PATCH 07/14] 11 --- application/views/mobile_first/ch-breadcrumb.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/application/views/mobile_first/ch-breadcrumb.php b/application/views/mobile_first/ch-breadcrumb.php index d391ffd1..cd70dfe6 100644 --- a/application/views/mobile_first/ch-breadcrumb.php +++ b/application/views/mobile_first/ch-breadcrumb.php @@ -1,4 +1,4 @@ -