更新目录结构

This commit is contained in:
molong
2022-04-29 20:26:03 +08:00
parent 4ef43e0258
commit ca1fbd6fd1
89 changed files with 529 additions and 381 deletions
+8 -8
View File
@@ -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());