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:
wolfcode
2025-03-25 18:08:35 +08:00
parent fc202be987
commit 12b38c7bf5
18 changed files with 214 additions and 108 deletions

View File

@@ -41,12 +41,12 @@ class Config extends AdminController
if ($group == 'upload') {
$upload_types = config('admin.upload_types');
// 兼容旧版本
$this->model->where('name', 'upload_allow_type')->update(['value' => implode(',', array_keys($upload_types))]);
$this->model->removeOption('where')->where('name', 'upload_allow_type')->update(['value' => implode(',', array_keys($upload_types))]);
}
foreach ($post as $key => $val) {
if (in_array($key, $notAddFields)) continue;
if ($this->model->where('name', $key)->count()) {
$this->model->where('name', $key)->update(['value' => $val,]);
if ($this->model->removeOption('where')->where('name', $key)->count()) {
$this->model->removeOption('where')->where('name', $key)->update(['value' => $val,]);
}else {
$this->model->create(
[
@@ -59,7 +59,7 @@ class Config extends AdminController
TriggerService::updateMenu();
TriggerService::updateSysConfig();
}catch (\Exception $e) {
$this->error('保存失败');
$this->error('保存失败' .$e->getMessage());
}
$this->success('保存成功');
}