From f5d379f96b02bc1440565761ec0afb768f410253 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=B9=E8=AF=9A=E8=AF=9A?= Date: Tue, 24 Apr 2018 15:45:24 +0800 Subject: [PATCH] =?UTF-8?q?=E5=85=A8=E7=AB=99=E9=9D=99=E6=80=81=E5=8C=96?= =?UTF-8?q?=E6=9B=B4=E6=96=B0=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 1 + application/controllers/welcome.php | 19 ++++--------------- application/views/bootstrap/cache_url.php | 8 ++++---- application/views/bootstrap/welcome.php | 1 + 4 files changed, 10 insertions(+), 19 deletions(-) diff --git a/.gitignore b/.gitignore index c4ecb2c8..9429a9fb 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ +.idea .svn/* */logs/log* /web.config diff --git a/application/controllers/welcome.php b/application/controllers/welcome.php index 214252b1..fc0f44d4 100644 --- a/application/controllers/welcome.php +++ b/application/controllers/welcome.php @@ -65,25 +65,14 @@ class Welcome extends CI_Controller { $this->load->view('bootstrap/footer'); } - //获取所有信息+产品url + //获取所有信息URL,用来批量静态化更新 public function create_all_urls() { set_time_limit(0); $this->output->enable_profiler(false); - $this->Information_model->topNum = false; $data['all_information'] = $this->Information_model->GetList('ic_status,ic_url,ic_sitecode'); - //系列站产品连接 - $site_code = strtoupper($this->config->item('site_code')); - if (!empty($site_code)) { - $this->load->helper('file'); - $path = APPPATH . '/views/product_urls/updateCache' . $site_code . '.txt'; - if (file_exists($path)) { - $data['product_urls'] = read_file($path); - $domain = $this->config->item('site_url'); - $data['product_urls'] = str_replace("\n", '
', $data['product_urls']); - $data['product_urls'] = str_replace($domain, $domain . '/index.php/welcome/update_cache/?static_html_url=', $data['product_urls']); - } - } - $this->load->view('none_urls', $data); + $this->load->view('bootstrap/header', $data); + $this->load->view('bootstrap/cache_url', $data); + $this->load->view('bootstrap/footer'); } //获取某个信息节点和子节点url diff --git a/application/views/bootstrap/cache_url.php b/application/views/bootstrap/cache_url.php index ea646ddf..41ffc24f 100644 --- a/application/views/bootstrap/cache_url.php +++ b/application/views/bootstrap/cache_url.php @@ -36,9 +36,9 @@ function batch_update_cache(url, index) { } } } - $(document).ready(function() { - batch_update_cache($('#cache_url1').html(),1); - }); + //$(document).ready(function() { + //batch_update_cache($('#cache_url1').html(),1); + //}); @@ -77,7 +77,7 @@ function batch_update_cache(url, index) {
- +开始更新
diff --git a/application/views/bootstrap/welcome.php b/application/views/bootstrap/welcome.php index 4b01fa01..4a6d3a78 100644 --- a/application/views/bootstrap/welcome.php +++ b/application/views/bootstrap/welcome.php @@ -40,6 +40,7 @@
  • CDN定时更新
  • 订单邮件管理
  • 信息分享平台
  • +
  • 全站静态化更新