From 2372a16f2c5d3d1458f6e820dbc6b2c49d55bbba Mon Sep 17 00:00:00 2001 From: Anyon Date: Tue, 17 Sep 2019 13:48:41 +0800 Subject: [PATCH] =?UTF-8?q?[=E6=9B=B4=E6=96=B0]=E4=BF=AE=E6=94=B9=E5=90=8E?= =?UTF-8?q?=E5=8F=B0=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/admin/controller/Config.php | 8 +++++--- application/admin/controller/api/Plugs.php | 2 +- application/admin/view/config/storage-local.html | 2 +- application/admin/view/config/storage-oss.html | 2 +- application/admin/view/config/storage-qiniu.html | 2 +- application/company/controller/api/Push.php | 2 +- 6 files changed, 10 insertions(+), 8 deletions(-) diff --git a/application/admin/controller/Config.php b/application/admin/controller/Config.php index d15f5e534..b18160879 100644 --- a/application/admin/controller/Config.php +++ b/application/admin/controller/Config.php @@ -71,10 +71,12 @@ class Config extends Controller if (Request::isGet()) { $this->title = '系统参数配置'; $this->fetch(); + } else { + foreach (Request::post() as $key => $value) { + sysconf($key, $value); + } + $this->success('系统参数配置成功!'); } - $post = $this->request->post(); - foreach ($post as $key => $value) sysconf($key, $value); - $this->success('系统参数配置成功!'); } /** diff --git a/application/admin/controller/api/Plugs.php b/application/admin/controller/api/Plugs.php index 99444c463..dc3fd76a4 100644 --- a/application/admin/controller/api/Plugs.php +++ b/application/admin/controller/api/Plugs.php @@ -44,7 +44,7 @@ class Plugs extends Controller */ public function check() { - $diff1 = explode(',', strtolower(input('exts'))); + $diff1 = explode(',', strtolower(input('exts', ''))); $diff2 = explode(',', strtolower(sysconf('storage_local_exts'))); $exts = array_intersect($diff1, $diff2); $this->success('获取文件上传参数', [ diff --git a/application/admin/view/config/storage-local.html b/application/admin/view/config/storage-local.html index 6c45e28de..12012103a 100644 --- a/application/admin/view/config/storage-local.html +++ b/application/admin/view/config/storage-local.html @@ -12,7 +12,7 @@
-
+
diff --git a/application/admin/view/config/storage-oss.html b/application/admin/view/config/storage-oss.html index ffc116975..73d9a48a5 100644 --- a/application/admin/view/config/storage-oss.html +++ b/application/admin/view/config/storage-oss.html @@ -70,7 +70,7 @@
-
+
diff --git a/application/admin/view/config/storage-qiniu.html b/application/admin/view/config/storage-qiniu.html index cca3b933e..f888e90db 100644 --- a/application/admin/view/config/storage-qiniu.html +++ b/application/admin/view/config/storage-qiniu.html @@ -71,7 +71,7 @@
-
+
diff --git a/application/company/controller/api/Push.php b/application/company/controller/api/Push.php index 83f69dcc2..676cb22ed 100644 --- a/application/company/controller/api/Push.php +++ b/application/company/controller/api/Push.php @@ -92,6 +92,6 @@ class Push extends Controller */ private function writeNone($ip, $mac, $desc) { - + // @todo 记录未匹配成功的设备标识 } }