mirror of
https://gitee.com/wonderful-code/buildadmin
synced 2024-11-21 22:55:36 +00:00
fix:修复部分日志记录没有标题的问题
This commit is contained in:
parent
7b29dbc53b
commit
81e7f53321
@ -303,6 +303,7 @@ INSERT INTO `__PREFIX__menu_rule` VALUES ('73', '71', 'button', '添加', 'secur
|
||||
INSERT INTO `__PREFIX__menu_rule` VALUES ('74', '71', 'button', '编辑', 'security/sensitiveData/edit', '', '', null, '', '', '0', 'none', '', '81', '1', '1648065864', '1647806129');
|
||||
INSERT INTO `__PREFIX__menu_rule` VALUES ('75', '71', 'button', '删除', 'security/sensitiveData/del', '', '', null, '', '', '0', 'none', '', '81', '1', '1648065864', '1647806112');
|
||||
INSERT INTO `__PREFIX__menu_rule` VALUES ('76', '0', 'menu', 'BuildAdmin', 'buildadmin/buildadmin', 'buildadmin', 'local-logo', 'link', 'https://doc.buildadmin.com', '', '0', 'none', '', '0', '0', '1651926977', '1648947396');
|
||||
INSERT INTO `__PREFIX__menu_rule` VALUES ('77', '45', 'button', '添加', 'routine/config/add', '', '', null, '', '', '0', 'none', '', '88', '1', '1655375826', '1655375812');
|
||||
COMMIT;
|
||||
|
||||
-- ----------------------------
|
||||
|
@ -8,6 +8,7 @@ use think\exception\FileException;
|
||||
use app\common\library\Upload;
|
||||
use app\common\controller\Backend;
|
||||
use think\facade\Db;
|
||||
use app\admin\model\AdminLog;
|
||||
|
||||
class Ajax extends Backend
|
||||
{
|
||||
@ -20,6 +21,7 @@ class Ajax extends Backend
|
||||
|
||||
public function upload()
|
||||
{
|
||||
AdminLog::setTitle(__('upload'));
|
||||
$file = $this->request->file('file');
|
||||
try {
|
||||
$upload = new Upload($file);
|
||||
@ -58,6 +60,7 @@ class Ajax extends Backend
|
||||
|
||||
public function changeTerminalConfig()
|
||||
{
|
||||
AdminLog::setTitle(__('changeTerminalConfig'));
|
||||
if (CommandExec::instance(false)->changeTerminalConfig()) {
|
||||
$this->success('');
|
||||
} else {
|
||||
|
@ -34,13 +34,13 @@ class Config extends Backend
|
||||
$list[$item['key']]['name'] = $item['key'];
|
||||
$list[$item['key']]['title'] = __($item['value']);
|
||||
|
||||
$newConfigGroup[$item['key']] = $item['value'];
|
||||
$newConfigGroup[$item['key']] = $list[$item['key']]['title'];
|
||||
}
|
||||
|
||||
$this->success('', [
|
||||
'list' => $list,
|
||||
'remark' => get_route_remark(),
|
||||
'configGroup' => $newConfigGroup,
|
||||
'configGroup' => $newConfigGroup ?? [],
|
||||
'quickEntrance' => get_sys_config('config_quick_entrance'),
|
||||
]);
|
||||
}
|
||||
|
@ -2,4 +2,6 @@
|
||||
return [
|
||||
'Failed to switch package manager. Please modify the configuration file manually:%s' => 'Failed to switch package manager. Please modify the configuration file manually:%s',
|
||||
'Failed to modify the terminal configuration. Please modify the configuration file manually:%s' => 'Failed to modify the terminal configuration. Please modify the configuration file manually:%s',
|
||||
'upload' => 'Upload',
|
||||
'changeTerminalConfig' => 'change Terminal Config',
|
||||
];
|
@ -2,4 +2,6 @@
|
||||
return [
|
||||
'Failed to switch package manager. Please modify the configuration file manually:%s' => '包管理器切换失败,请手动修改配置文件:%s',
|
||||
'Failed to modify the terminal configuration. Please modify the configuration file manually:%s' => '修改终端配置失败,请手动修改配置文件:%s',
|
||||
'upload' => '上传文件',
|
||||
'changeTerminalConfig' => '修改终端配置',
|
||||
];
|
@ -15,4 +15,5 @@ return [
|
||||
'smtp pass' => 'SMTP 密码',
|
||||
'smtp verification' => 'SMTP 验证方式',
|
||||
'smtp sender mail' => 'SMTP 发件人邮箱',
|
||||
'Variable name' => '变量名',
|
||||
];
|
41
app/admin/validate/Config.php
Normal file
41
app/admin/validate/Config.php
Normal file
@ -0,0 +1,41 @@
|
||||
<?php
|
||||
|
||||
namespace app\admin\validate;
|
||||
|
||||
use think\Validate;
|
||||
|
||||
class Config extends Validate
|
||||
{
|
||||
protected $failException = true;
|
||||
|
||||
protected $rule = [
|
||||
'name' => 'require|unique:config',
|
||||
];
|
||||
|
||||
/**
|
||||
* 验证提示信息
|
||||
* @var array
|
||||
*/
|
||||
protected $message = [];
|
||||
|
||||
/**
|
||||
* 字段描述
|
||||
*/
|
||||
protected $field = [
|
||||
];
|
||||
|
||||
/**
|
||||
* 验证场景
|
||||
*/
|
||||
protected $scene = [
|
||||
'add' => ['name'],
|
||||
];
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->field = [
|
||||
'name' => __('Variable name'),
|
||||
];
|
||||
parent::__construct();
|
||||
}
|
||||
}
|
@ -5,7 +5,7 @@
|
||||
|
||||
return [
|
||||
// 上传Url
|
||||
'url' => 'api/common/upload',
|
||||
'url' => 'api/ajax/upload',
|
||||
// cdn地址
|
||||
'cdn' => '',
|
||||
// 文件保存格式化方法
|
||||
|
Loading…
Reference in New Issue
Block a user