From fcb9b6973a60484392fb3b17a3e3b5f1672571b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=B9=E8=AF=9A=E8=AF=9A?= Date: Sun, 29 Sep 2019 11:17:54 +0800 Subject: [PATCH] =?UTF-8?q?=E6=90=9C=E7=B4=A2=E7=BB=93=E6=9E=9C=E9=A1=B5?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=89=B9=E9=87=8F=E9=9D=99=E6=80=81=E5=8C=96?= =?UTF-8?q?=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/controllers/welcome.php | 19 +++++++++++++++++++ application/models/information_model.php | 8 ++++++++ application/views/bootstrap/welcome.php | 7 ++++++- 3 files changed, 33 insertions(+), 1 deletion(-) diff --git a/application/controllers/welcome.php b/application/controllers/welcome.php index 75659070..e782bc19 100644 --- a/application/controllers/welcome.php +++ b/application/controllers/welcome.php @@ -100,6 +100,25 @@ class Welcome extends CI_Controller { $this->load->view('bootstrap/footer'); } } + + //根据信息节点ID获取信息,用于搜索结果的批量更新静态页面 + public function create_infomation_urls_by_ids($view = false){ + $is_ids=$this->input->get('key'); + if (empty($is_ids)) { + show_404(); + return false; + } + $data['all_information'] = $this->Information_model->get_detail_by_ids($is_ids); + if ($view == 'amp') { + $this->load->view('bootstrap3/header', $data); + $this->load->view('bootstrap3/refresh_amp_urls'); + $this->load->view('bootstrap3/footer'); + } else { + $this->load->view('bootstrap/header', $data); + $this->load->view('bootstrap/cache_url', $data); + $this->load->view('bootstrap/footer'); + } + } public function get_infomation_urls($is_parent_id) { $this->output->enable_profiler(FALSE); diff --git a/application/models/information_model.php b/application/models/information_model.php index b1b78052..f1e2ef23 100644 --- a/application/models/information_model.php +++ b/application/models/information_model.php @@ -93,6 +93,13 @@ class Information_model extends CI_Model { $this->orderBy = ' ORDER BY is1.is_level ASC, is1.is_sort ASC,is1.is_path ASC '; return $this->GetList(); } + //根据节点ID列表获取信息 + function get_detail_by_ids($is_ids) { + $this->init(); + $this->is_id_array = " AND is1.is_id IN ($is_ids) "; + $this->orderBy = ' ORDER BY is1.is_level ASC, is1.is_sort ASC,is1.is_path ASC '; + return $this->GetList(); + } //根据根节点ID获取子节点列表 function get_list_by_id($is_parent_id, $level = false) { @@ -104,6 +111,7 @@ class Information_model extends CI_Model { $this->orderBy = ' ORDER BY is1.is_level ASC, is1.is_sort ASC,is1.is_path ASC '; return $this->GetList(); } + function Detail($ic_url_is_id) { if (empty($ic_url_is_id)) { diff --git a/application/views/bootstrap/welcome.php b/application/views/bootstrap/welcome.php index d2bca395..61fe770d 100644 --- a/application/views/bootstrap/welcome.php +++ b/application/views/bootstrap/welcome.php @@ -151,7 +151,9 @@ $item) { + $is_ids.=$item->is_id.','; ?> @@ -162,7 +164,10 @@ - + + +

批量更新搜索页面

+