fix: 修复tags标签,getTableFieldsBUG
This commit is contained in:
@@ -65,13 +65,6 @@ class AdminController extends BaseController
|
||||
*/
|
||||
public $status = false;
|
||||
|
||||
/**
|
||||
* 管理员信息
|
||||
* @var array
|
||||
*/
|
||||
//public $admin = [];使用以下替代
|
||||
//request()->adminInfo['id']
|
||||
|
||||
/**
|
||||
* 获取模板
|
||||
* @access protected
|
||||
@@ -156,8 +149,8 @@ class AdminController extends BaseController
|
||||
public function index()
|
||||
{
|
||||
if (request()->isAjax()) {
|
||||
$page = (int)input('page') ?? 1;
|
||||
$limit = (int)input('limit') ?? 18;
|
||||
$page = (int)input('page', 1);
|
||||
$limit = (int)input('limit',18);
|
||||
$where = $this->buildSelectParams();
|
||||
$count = $this->model->where($where)->count();
|
||||
$limit = is_empty($limit) ? 10 : $limit;
|
||||
|
||||
@@ -246,8 +246,8 @@ class BaseController
|
||||
*/
|
||||
protected function getTableFields($model = null)
|
||||
{
|
||||
$this->model = $model ?: $this->model;
|
||||
$tableFields = $this->model->getTableFields();
|
||||
$model = $model ?: $this->model;
|
||||
$tableFields = $model->getTableFields();
|
||||
if (!empty($tableFields) && is_array($tableFields)) {
|
||||
foreach ($tableFields as $key => $value) {
|
||||
$filter = ['update_time', 'create_time', 'delete_time'];
|
||||
|
||||
@@ -293,24 +293,17 @@ class Auth
|
||||
}
|
||||
} else {
|
||||
|
||||
if (!Event::hasListener('cmscategoryPermissions')) {
|
||||
throw new \Exception('请安装CMS插件');
|
||||
} else {
|
||||
|
||||
if (!$this->superAdmin()) {
|
||||
if (!empty($auth_nodes[$class])) {
|
||||
$list = Event::emit('cmscategoryPermissions', [
|
||||
'field' => $this->authFields,
|
||||
'nodes' => $auth_nodes[$class]
|
||||
], true);
|
||||
}
|
||||
}
|
||||
|
||||
if (empty($list)) {
|
||||
if (!$this->superAdmin()) {
|
||||
if (!empty($auth_nodes[$class])) {
|
||||
$list = Event::emit('cmscategoryPermissions', [
|
||||
'field' => $this->authFields
|
||||
'field' => $this->authFields,
|
||||
'nodes' => $auth_nodes[$class]
|
||||
], true);
|
||||
}
|
||||
} else {
|
||||
$list = Event::emit('cmscategoryPermissions', [
|
||||
'field' => $this->authFields
|
||||
], true);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<!--// 加载Markdown编辑器-->
|
||||
<link href="/static/js/markdown/cherry-markdown.css?v={:release()}" rel="stylesheet" type="text/css"/>
|
||||
<script src="/static/js/markdown/cherry-markdown.min.js?v={:release()}"></script>
|
||||
<script src="/static/js/markdown/cherry-markdown.core.js?v={:release()}"></script>
|
||||
|
||||
<!-- // 全局加载第三方JS -->
|
||||
<script src="/static/js/tinymce/tinymce.min.js?v={:release()}"></script>
|
||||
|
||||
@@ -1,11 +1,4 @@
|
||||
<include file="/public/header" />
|
||||
<style>
|
||||
.layui-form-select dl{
|
||||
top: auto;
|
||||
bottom: 36px;
|
||||
}
|
||||
|
||||
</style>
|
||||
<div class="layui-fluid">
|
||||
<div class="layui-card">
|
||||
<!-- // 默认操作按钮 -->
|
||||
@@ -40,7 +33,7 @@
|
||||
<!-- // 默认搜索 -->
|
||||
<button class="layui-btn icon-btn" lay-filter="formSearch" lay-submit><i class="layui-icon layui-icon-search"></i>{:__('搜索')}</button>
|
||||
<!-- // 打开添加页面 -->
|
||||
<button class="layui-btn icon-btn" lay-open="" data-title="{:__('添加')}{:__('会员')}" data-area="500px" data-url="#editforms" >
|
||||
<button class="layui-btn icon-btn" lay-open="" data-title="{:__('添加')}{:__('会员')}" data-url="#editforms" >
|
||||
<i class="layui-icon layui-icon-add-1"></i>{:__('添加')}
|
||||
</button>
|
||||
</div>
|
||||
@@ -54,7 +47,7 @@
|
||||
</div>
|
||||
|
||||
<!-- // 添加编辑数据 -->
|
||||
<script type="text/html" id="editforms" >
|
||||
<script type="text/html" id="editforms" >
|
||||
<div class="layui-fluid layui-bg-white" >
|
||||
<form class="layui-form layui-form-fixed" lay-filter="editforms" >
|
||||
<input type="text" name="id" hidden="">
|
||||
@@ -111,7 +104,7 @@
|
||||
|
||||
<!-- // 列表工具栏 -->
|
||||
<script type="text/html" id="tableBar">
|
||||
<a class="layui-table-text" data-title="{:__('编辑会员')}" data-area="500px" data-url="#editforms" lay-event="edit">{:__('编辑')}</a>
|
||||
<a class="layui-table-text" data-title="{:__('编辑会员')}" data-url="#editforms" lay-event="edit">{:__('编辑')}</a>
|
||||
<div class="layui-divider layui-divider-vertical"></div>
|
||||
<a class="layui-table-text" data-url="{:url('/system/User/del')}?id={{d.id}}" lay-event="del">{:__('删除')}</a>
|
||||
</script>
|
||||
|
||||
@@ -39,13 +39,10 @@ class Dictionary extends Model
|
||||
* @throws DbException
|
||||
* @throws ModelNotFoundException
|
||||
*/
|
||||
public static function getValueList(string $value = ''): array
|
||||
public static function getValueList(string $value = '')
|
||||
{
|
||||
$list = [];
|
||||
$data = self::where([
|
||||
'pid' => 0,
|
||||
'value' => $value
|
||||
])->find();
|
||||
$data = self::where(['pid' => 0,'value' => $value])->find();
|
||||
if (!empty($data)) {
|
||||
$list = self::where('pid', $data['id'])->select();
|
||||
}
|
||||
|
||||
@@ -339,7 +339,7 @@ if (!function_exists('release')) {
|
||||
*/
|
||||
function release()
|
||||
{
|
||||
return getenv('APP_DEBUG') ? \system\Random::alphaNum() : config('app.version');
|
||||
return config('app.version');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1322,9 +1322,12 @@ if (!function_exists('plugin_refresh_hooks')) {
|
||||
$events[$hook][] = [$namespace, $hook];
|
||||
}
|
||||
|
||||
$taglibPath = plugin_path($name) . 'taglib.php';
|
||||
if (is_file($taglibPath)) {
|
||||
$taglib[] = 'plugin\\' . $name . '\\taglib.php';
|
||||
$taglibPath = plugin_path($name . DIRECTORY_SEPARATOR . 'taglib');
|
||||
|
||||
$tagList = glob($taglibPath . '*.php');
|
||||
foreach ($tagList as $index => $tag) {
|
||||
$tag = pathinfo($tag, PATHINFO_FILENAME);
|
||||
$taglib[] = 'plugin\\' . $name . '\\taglib\\' . $tag;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user