refactor(admin): optimize log data processing and display
- Update log data serialization and deserialization method - Improve log data display format in the admin interface- Refactor log model initialization and table suffix handling - Optimize time model configuration for better timestamp management
This commit is contained in:
@@ -100,21 +100,21 @@ if (!function_exists('auth')) {
|
||||
$authService = new AuthService(session('admin.id'));
|
||||
return $authService->checkNode($node);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string|null $detail
|
||||
* @param string $name
|
||||
* @param string $placeholder
|
||||
* @return string
|
||||
*/
|
||||
function editor_textarea(?string $detail, string $name = 'desc', string $placeholder = '请输入'): string
|
||||
{
|
||||
$editor_type = sysConfig('site', 'editor_type');
|
||||
return match ($editor_type) {
|
||||
'ckeditor' => "<textarea name='{$name}' rows='20' class='layui-textarea editor' placeholder='{$placeholder}'>{$detail}</textarea>",
|
||||
'ueditor' => "<script type='text/plain' id='{$name}' name='{$name}' class='editor' data-content='{$detail}'></script>",
|
||||
'EasyMDE' => "<textarea id='{$name}' class='editor' name='{$name}'>{$detail}</textarea>",
|
||||
default => "<div class='wangEditor_div'><textarea name='{$name}' rows='20' class='layui-textarea editor layui-hide'>{$detail}</textarea><div id='editor_toolbar_{$name}'></div><div id='editor_{$name}' style='height: 300px'></div></div>",
|
||||
};
|
||||
}
|
||||
}
|
||||
/**
|
||||
* @param string|null $detail
|
||||
* @param string $name
|
||||
* @param string $placeholder
|
||||
* @return string
|
||||
*/
|
||||
function editor_textarea(?string $detail, string $name = 'desc', string $placeholder = '请输入'): string
|
||||
{
|
||||
$editor_type = sysConfig('site', 'editor_type');
|
||||
return match ($editor_type) {
|
||||
'ckeditor' => "<textarea name='{$name}' rows='20' class='layui-textarea editor' placeholder='{$placeholder}'>{$detail}</textarea>",
|
||||
'ueditor' => "<script type='text/plain' id='{$name}' name='{$name}' class='editor' data-content='{$detail}'></script>",
|
||||
'EasyMDE' => "<textarea id='{$name}' class='editor' name='{$name}'>{$detail}</textarea>",
|
||||
default => "<div class='wangEditor_div'><textarea name='{$name}' rows='20' class='layui-textarea editor layui-hide'>{$detail}</textarea><div id='editor_toolbar_{$name}'></div><div id='editor_{$name}' style='height: 300px'></div></div>",
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user