From 9394f20dda43483a81456b41cefdddcab004dafa Mon Sep 17 00:00:00 2001 From: cyc Date: Mon, 27 Apr 2020 11:06:48 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=90=9C=E7=B4=A2amp?= =?UTF-8?q?=E4=B8=BA=E7=A9=BA=E7=9A=84=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../searchinfo/controllers/index.php | 12 ++++ .../searchinfo/models/infos_model.php | 6 ++ .../third_party/searchinfo/views/homepage.php | 64 ++++++++++++++++++- 3 files changed, 81 insertions(+), 1 deletion(-) diff --git a/application/third_party/searchinfo/controllers/index.php b/application/third_party/searchinfo/controllers/index.php index 43919390..420f1e49 100644 --- a/application/third_party/searchinfo/controllers/index.php +++ b/application/third_party/searchinfo/controllers/index.php @@ -27,4 +27,16 @@ class index extends CI_Controller { print_r(json_encode($pages)); } } + + public function search_empty_amp(){ + $sitecode = $this->input->get_post('sitecode'); + if(empty($sitecode) && empty($errorurl)){ + echo '请选择站点或填写url'; + }else{ + //查询url + $this->load->model('infos_model'); + $pages = $this->infos_model->get_emptyamp_pages($sitecode); + print_r(json_encode($pages)); + } + } } \ No newline at end of file diff --git a/application/third_party/searchinfo/models/infos_model.php b/application/third_party/searchinfo/models/infos_model.php index 62987942..c8c11d18 100644 --- a/application/third_party/searchinfo/models/infos_model.php +++ b/application/third_party/searchinfo/models/infos_model.php @@ -12,4 +12,10 @@ class infos_model extends CI_Model { $query = $this->HT->query($sql,array($sitecode)); return $query->result(); } + + function get_emptyamp_pages($sitecode){ + $sql = "select ic_url from infoMetas left join infoContents on im_ic_id = ic_id where im_key = 'amp' and ic_sitecode = ? and im_value like '%%'"; + $query = $this->HT->query($sql,array($sitecode)); + return $query->result(); + } } \ No newline at end of file diff --git a/application/third_party/searchinfo/views/homepage.php b/application/third_party/searchinfo/views/homepage.php index 8a841d90..09e0fe37 100644 --- a/application/third_party/searchinfo/views/homepage.php +++ b/application/third_party/searchinfo/views/homepage.php @@ -7,9 +7,12 @@
@@ -35,7 +38,32 @@
+ +
+
+
+ +
+ + +
+
+
+

查询amp为空页面列表

+
+
+
+
+
+ @@ -74,5 +102,39 @@ $(function(){ }); }); + $('#searchempty').click(function(){ + var sitecode = $('#destinationamp').val(); + var html = ''; + switch(sitecode){ + case 'ah': + host = 'https://www.asiahighlights.com'; + break; + case 'gm': + host = 'https://chinarundreisen.com'; + break; + case 'cht': + host = 'https://www.chinahighlights.com'; + break; + } + console.log(sitecode); + + $.ajax({ + url:'/info.php/apps/searchinfo/index/search_empty_amp', + data:{sitecode:sitecode}, + success:function(json,status){ + var data = $.parseJSON(json); + console.log(data); + for(var i = 0;i'; + html += '

'+data[i].ic_url+'

'; + html += ''; + html += ''; + } + $('.emptyinfodetails').html(html); + } + }); + }); + });