mirror of
https://gitee.com/ulthon/ulthon_admin.git
synced 2026-07-09 11:32:48 +08:00
优化logo判断;增加缺失节点的权限默认配置项;
This commit is contained in:
@@ -46,3 +46,6 @@ STATIC_PATH=/static
|
||||
|
||||
# OSS静态文件路径前缀
|
||||
OSS_STATIC_PREFIX=static_ulthon_admin
|
||||
|
||||
# 没有节点控制的是否放行
|
||||
DEFAULT_AUTH_CHECK=false
|
||||
@@ -10,6 +10,8 @@
|
||||
// | github开源项目:https://github.com/zhongshaofa/EasyAdmin
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
use think\facade\Env;
|
||||
|
||||
return [
|
||||
|
||||
// 不需要验证登录的控制器
|
||||
@@ -35,4 +37,6 @@ return [
|
||||
'login/index',
|
||||
'login/out',
|
||||
],
|
||||
|
||||
'default_auth_check' => Env::get('adminsystem.default_auth_check', false)
|
||||
];
|
||||
@@ -14,6 +14,7 @@ namespace app\common\service;
|
||||
|
||||
use app\common\constants\AdminConstant;
|
||||
use EasyAdmin\tool\CommonTool;
|
||||
use think\facade\Config;
|
||||
use think\facade\Db;
|
||||
|
||||
/**
|
||||
@@ -103,7 +104,8 @@ class AuthService
|
||||
}
|
||||
// 判断是否加入节点控制,优先获取缓存信息
|
||||
if (!isset($this->nodeList[$node])) {
|
||||
return false;
|
||||
|
||||
return Config::get('admin.default_auth_check');
|
||||
}
|
||||
$nodeInfo = $this->nodeList[$node];
|
||||
if ($nodeInfo['is_auth'] == 0) {
|
||||
|
||||
@@ -85,7 +85,7 @@ define(["jquery", "miniMenu", "miniTheme", "miniTab"], function ($, miniMenu, mi
|
||||
*/
|
||||
renderLogo: function (data) {
|
||||
var logoHtml = '';
|
||||
if (data.image.length != 0) {
|
||||
if (data.image) {
|
||||
logoHtml = '<img src="' + data.image + '" alt="logo">';
|
||||
}
|
||||
var html = '<a href="' + data.href + '">' + logoHtml + '<h1>' + data.title + '</h1></a>';
|
||||
|
||||
Reference in New Issue
Block a user