diff --git a/application/admin/controller/Auth.php b/application/admin/controller/Auth.php index 925cfb41f..a937967e5 100644 --- a/application/admin/controller/Auth.php +++ b/application/admin/controller/Auth.php @@ -12,8 +12,11 @@ use controller\BasicAdmin; */ class Auth extends BasicAdmin { - public function index() { + protected $table = 'SystemAuth'; + public function index() { + $this->title = '系统权限管理'; + parent::_list($this->table); } } \ No newline at end of file diff --git a/application/admin/controller/Login.php b/application/admin/controller/Login.php index ff773adf0..588d27965 100644 --- a/application/admin/controller/Login.php +++ b/application/admin/controller/Login.php @@ -49,6 +49,6 @@ class Login extends BasicAdmin { */ public function out() { session('user', null); - $this->success('退出登录成功!', '@admin/login'); + $this->success('退出登录成功!', '@admin / login'); } } \ No newline at end of file diff --git a/application/admin/controller/Menu.php b/application/admin/controller/Menu.php index cb57e3043..14f29e891 100644 --- a/application/admin/controller/Menu.php +++ b/application/admin/controller/Menu.php @@ -17,12 +17,6 @@ use think\Db; */ class Menu extends BasicAdmin { - /** - * 模块标题 - * @var string - */ - public $title = '系统菜单'; - /** * 绑定操作模型 * @var string @@ -44,6 +38,7 @@ class Menu extends BasicAdmin { * 菜单列表 */ public function index() { + $this->title = '系统菜单管理'; parent::_list($this->table, false); } diff --git a/application/extra/view/admin.main.html b/application/extra/view/admin.main.html index f7777b899..d17b58b35 100644 --- a/application/extra/view/admin.main.html +++ b/application/extra/view/admin.main.html @@ -5,7 +5,7 @@ - {block name="title"}{$title|default=''}{/block} + {block name="title"}{$title|default=''} {if !empty($title)}-{/if} {:sysconf('app_name')}{/block} diff --git a/extend/controller/BasicAdmin.php b/extend/controller/BasicAdmin.php index d8a7794fe..49a487f3c 100644 --- a/extend/controller/BasicAdmin.php +++ b/extend/controller/BasicAdmin.php @@ -15,6 +15,12 @@ use think\db\Query; */ class BasicAdmin extends Controller { + /** + * 页面标题 + * @var string + */ + protected $title; + /** * 默认操作数据表 * @var string @@ -106,6 +112,7 @@ class BasicAdmin extends Controller { if ($this->_callback('_data_filter', $result['list']) === false) { return $result; } + !empty($this->title) && $this->assign('title', $this->title); $is_display && exit($this->fetch('', $result)); return $result; }