更新文件
This commit is contained in:
@@ -9,20 +9,37 @@
|
||||
namespace app\controller\admin;
|
||||
|
||||
use app\controller\Admin;
|
||||
use app\model\Rewrite;
|
||||
use app\model\SeoRule;
|
||||
|
||||
class Seo extends Admin{
|
||||
|
||||
/**
|
||||
* @title 系统首页
|
||||
*/
|
||||
public function index(){
|
||||
public function index(SeoRule $seo){
|
||||
//读取规则列表
|
||||
$map = array('status' => array('=', 0));
|
||||
|
||||
$list = $seo->where($map)->order('sort asc')->paginate(10, false, array(
|
||||
'query' => $this->request->param()
|
||||
));
|
||||
|
||||
$this->data['data'] = array(
|
||||
'list' => $list,
|
||||
'page' => $list->render()
|
||||
);
|
||||
|
||||
return $this->data;
|
||||
}
|
||||
|
||||
/**
|
||||
* @title 重写规则
|
||||
*/
|
||||
public function rewrite(){
|
||||
|
||||
public function rewrite(Rewrite $rewrite){
|
||||
$this->data['data'] = array(
|
||||
'list' => array()
|
||||
);
|
||||
return $this->data;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user