更新目录结构
This commit is contained in:
@@ -8,10 +8,10 @@
|
||||
// +----------------------------------------------------------------------
|
||||
namespace app\controller\admin;
|
||||
|
||||
use app\model\Addons;
|
||||
use app\model\AuthGroup;
|
||||
use app\model\Menu;
|
||||
use app\model\Model;
|
||||
use app\model\addons\Addons;
|
||||
use app\model\auth\AuthGroup;
|
||||
use app\model\auth\Menu;
|
||||
use app\model\module\Model;
|
||||
use think\facade\View;
|
||||
use think\facade\Config;
|
||||
|
||||
@@ -36,12 +36,12 @@ class Base extends \app\controller\Base {
|
||||
];
|
||||
|
||||
protected function initialize() {
|
||||
$url = str_replace(".", "/", strtolower($this->request->controller())) . '/' . $this->request->action();
|
||||
if (!is_login() and !in_array($url, array('admin/index/login', 'admin/index/logout', 'admin/index/verify'))) {
|
||||
$this->redirect('/admin/index/login');
|
||||
$url = $this->request->rule()->getRule();
|
||||
if (!is_login() and !in_array($url, array('admin/login', 'admin/logout', 'admin/index/verify'))) {
|
||||
$this->redirect('/admin/login');
|
||||
}
|
||||
|
||||
if (!in_array($url, array('admin/index/login', 'admin/index/logout', 'admin/index/verify'))) {
|
||||
if (!in_array($url, array('admin/login', 'admin/logout', 'admin/index/verify'))) {
|
||||
|
||||
// 是否是超级管理员
|
||||
define('IS_ROOT', is_administrator());
|
||||
|
||||
Reference in New Issue
Block a user