更新后台模板

This commit is contained in:
邹景立 2017-02-16 10:12:52 +08:00
parent fce4707d09
commit ae49b216c7
5 changed files with 14 additions and 9 deletions

View File

@ -12,8 +12,11 @@ use controller\BasicAdmin;
*/ */
class Auth extends BasicAdmin { class Auth extends BasicAdmin {
protected $table = 'SystemAuth';
public function index() { public function index() {
$this->title = '系统权限管理';
parent::_list($this->table);
} }
} }

View File

@ -17,12 +17,6 @@ use think\Db;
*/ */
class Menu extends BasicAdmin { class Menu extends BasicAdmin {
/**
* 模块标题
* @var string
*/
public $title = '系统菜单';
/** /**
* 绑定操作模型 * 绑定操作模型
* @var string * @var string
@ -44,6 +38,7 @@ class Menu extends BasicAdmin {
* 菜单列表 * 菜单列表
*/ */
public function index() { public function index() {
$this->title = '系统菜单管理';
parent::_list($this->table, false); parent::_list($this->table, false);
} }

View File

@ -5,7 +5,7 @@
<meta name="renderer" content="webkit"/> <meta name="renderer" content="webkit"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<link rel="shortcut icon" href="{:sysconf('app_logo')}" /> <link rel="shortcut icon" href="{:sysconf('app_logo')}" />
<title>{block name="title"}{$title|default=''}{/block}</title> <title>{block name="title"}{$title|default=''}&nbsp;{if !empty($title)}-{/if}&nbsp;{:sysconf('app_name')}{/block}</title>
<link rel="stylesheet" href="__STATIC__/plugs/bootstrap/css/bootstrap.min.css"/> <link rel="stylesheet" href="__STATIC__/plugs/bootstrap/css/bootstrap.min.css"/>
<link rel="stylesheet" href="__STATIC__/theme/default/css/console.css"> <link rel="stylesheet" href="__STATIC__/theme/default/css/console.css">
<link rel="stylesheet" href="__STATIC__/theme/default/css/animate.css"> <link rel="stylesheet" href="__STATIC__/theme/default/css/animate.css">

View File

@ -15,6 +15,12 @@ use think\db\Query;
*/ */
class BasicAdmin extends Controller { class BasicAdmin extends Controller {
/**
* 页面标题
* @var string
*/
protected $title;
/** /**
* 默认操作数据表 * 默认操作数据表
* @var string * @var string
@ -106,6 +112,7 @@ class BasicAdmin extends Controller {
if ($this->_callback('_data_filter', $result['list']) === false) { if ($this->_callback('_data_filter', $result['list']) === false) {
return $result; return $result;
} }
!empty($this->title) && $this->assign('title', $this->title);
$is_display && exit($this->fetch('', $result)); $is_display && exit($this->fetch('', $result));
return $result; return $result;
} }