更新代码,完善功能

This commit is contained in:
2020-02-18 14:50:57 +08:00
parent 31fd944b9c
commit 8bc0f7534b
36 changed files with 283 additions and 280 deletions

View File

@@ -6,8 +6,9 @@
// +----------------------------------------------------------------------
// | Author: molong <molong@tensent.cn> <http://www.tensent.cn>
// +----------------------------------------------------------------------
namespace app\controller\admin;
use app\model\Link as LinkM;
use app\controller\Admin;
/**
@@ -19,20 +20,16 @@ class Link extends Admin {
/**
* @title 链接列表
*/
public function index() {
public function index(LinkM $link) {
$map = array();
$order = "id desc";
$list = db('Link')->where($map)->order($order)->paginate(10, false, array(
'query' => $this->request->param(),
));
$list = $link->where($map)->order($order)->paginate($this->request->pageConfig);
$data = array(
$this->data = array(
'list' => $list,
'page' => $list->render(),
);
$this->assign($data);
$this->setMeta("友情链接");
return $this->fetch();
}