From f8cbe8d9efcd3591391884a2e4ff3081d7044f2a Mon Sep 17 00:00:00 2001 From: chenzhi Date: Mon, 9 Dec 2019 18:33:22 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=86=E5=BC=80=E6=8E=A8=E5=B9=BF=E8=A1=A5?= =?UTF-8?q?=E9=93=BE=E5=92=8C=E8=A1=A5=E9=93=BE=E8=AE=B0=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Admin/Controller/MendController.class.php | 41 +-- Application/Admin/View/Mend/lists.html | 4 +- Application/Admin/View/Mend/recordList.html | 254 ++++++++++++++++++ 3 files changed, 282 insertions(+), 17 deletions(-) create mode 100644 Application/Admin/View/Mend/recordList.html diff --git a/Application/Admin/Controller/MendController.class.php b/Application/Admin/Controller/MendController.class.php index b4a22e062..08172daa0 100644 --- a/Application/Admin/Controller/MendController.class.php +++ b/Application/Admin/Controller/MendController.class.php @@ -12,18 +12,8 @@ class MendController extends ThinkController { public function lists($p=1){ $this->m_title = '推广补链'; - $this->assign('commonset',M('Kuaijieicon')->where(['url'=>'Mend/lists','status'=>1])->find()); - - switch ($_GET['type']) { - case '': - case 1: - $this->mendList(); - break; - default: - $this->recordList(); - break; - } - + $this->assign('commonset',M('Kuaijieicon')->where(['url'=>'Mend/lists','status'=>1])->find()); + $this->mendList(); } public function mendList(){ @@ -42,8 +32,16 @@ class MendController extends ThinkController { parent::lists("user",$p,$map); } - public function recordList() + public function recordList($p=1) { + $page = intval($p); + $page = $page ? $page : 1; + if (isset($_REQUEST['row'])) { + $row = $_REQUEST['row']; + } else { + $row = 10; + } + if(isset($_REQUEST['account'])){ if ($_REQUEST['account']=='全部') { unset($_REQUEST['account']); @@ -51,9 +49,22 @@ class MendController extends ThinkController { $map['user_account']=array('like','%'.$_REQUEST['account'].'%'); unset($_REQUEST['account']); } - $p = I('p'); + + $data = M("Mend","tab_") + ->where($map) + ->order("create_time desc") + ->page($page, $row) + ->select(); + $count = M("Mend","tab_")->where($map)->count(); + $this->assign('show_status',1); - parent::lists("Mend",$p,$map); + $this->assign('list_data', $data); + + $page = set_pagination($count,$row); + if($page) {$this->assign('_page', $page);} + + $this->display(); + // parent::lists("Mend",$p,$map); } public function edit($id = null) diff --git a/Application/Admin/View/Mend/lists.html b/Application/Admin/View/Mend/lists.html index 8cb0c4723..82544ba27 100644 --- a/Application/Admin/View/Mend/lists.html +++ b/Application/Admin/View/Mend/lists.html @@ -8,8 +8,8 @@