From 5f7ede6b28051cc50391695c4d0074dfb583a4cf Mon Sep 17 00:00:00 2001 From: walkor Date: Tue, 6 Dec 2022 17:29:48 +0800 Subject: [PATCH] save --- .../app/controller/AdminRuleController.php | 4 + src/plugin/admin/app/view/dict/index.html | 1 + .../admin/app/view/upload/attachment.html | 109 +++++++++++------- src/plugin/admin/app/view/upload/index.html | 13 ++- src/plugin/admin/config/menu.php | 16 ++- 5 files changed, 95 insertions(+), 48 deletions(-) diff --git a/src/plugin/admin/app/controller/AdminRuleController.php b/src/plugin/admin/app/controller/AdminRuleController.php index f740c82..83b3471 100644 --- a/src/plugin/admin/app/controller/AdminRuleController.php +++ b/src/plugin/admin/app/controller/AdminRuleController.php @@ -219,6 +219,7 @@ class AdminRuleController extends Crud return view('admin-rule/insert'); } $data = $this->insertInput($request); + $data['key'] = str_replace('\\\\', '\\', $data['key']); $key = $data['key'] ?? ''; if ($this->model->where('key', $key)->first()) { return $this->json(1, "菜单标识 $key 已经存在"); @@ -247,6 +248,9 @@ class AdminRuleController extends Crud if ($data['pid'] == $row['id']) { return $this->json(2, '不能将自己设置为上级菜单'); } + if (isset($data['key'])) { + $data['key'] = str_replace('\\\\', '\\', $data['key']); + } $this->doUpdate($id, $data); return $this->json(0); } diff --git a/src/plugin/admin/app/view/dict/index.html b/src/plugin/admin/app/view/dict/index.html index 2761088..b5c87a8 100644 --- a/src/plugin/admin/app/view/dict/index.html +++ b/src/plugin/admin/app/view/dict/index.html @@ -67,6 +67,7 @@ +