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 @@ - + + +

批量更新搜索页面

+