From c4a746789ced7470423ee1d2c8b9429cf13c8199 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E6=99=AF=E7=AB=8B?= Date: Fri, 14 May 2021 10:39:02 +0800 Subject: [PATCH] Update Runtime.php --- app/admin/controller/api/Runtime.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/app/admin/controller/api/Runtime.php b/app/admin/controller/api/Runtime.php index 54c97496f..7024de383 100644 --- a/app/admin/controller/api/Runtime.php +++ b/app/admin/controller/api/Runtime.php @@ -39,7 +39,7 @@ class Runtime extends Controller AdminService::instance()->clearCache(); SystemService::instance()->pushRuntime(); sysoplog('系统运维管理', '刷新并创建网站路由缓存'); - $this->success('网站缓存加速成功!'); + $this->success('网站缓存加速成功!', 'javascript:location.reload()'); } catch (HttpResponseException $exception) { throw $exception; } catch (\Exception $exception) { @@ -59,7 +59,7 @@ class Runtime extends Controller AdminService::instance()->clearCache(); SystemService::instance()->clearRuntime(); sysoplog('系统运维管理', '清理网站日志及缓存数据'); - $this->success('清空缓存日志成功!'); + $this->success('清空缓存日志成功!', 'javascript:location.reload()'); } catch (HttpResponseException $exception) { throw $exception; } catch (\Exception $exception) { @@ -78,11 +78,11 @@ class Runtime extends Controller if (AdminService::instance()->isSuper()) if (input('state')) { SystemService::instance()->setRuntime('product'); sysoplog('系统运维管理', '由开发模式切换为生产模式'); - $this->success('已切换为生产模式!'); + $this->success('已切换为生产模式!', 'javascript:location.reload()'); } else { SystemService::instance()->setRuntime('debug'); sysoplog('系统运维管理', '由生产模式切换为开发模式'); - $this->success('已切换为开发模式!'); + $this->success('已切换为开发模式!', 'javascript:location.reload()'); } else { $this->error('只有超级管理员才能操作!'); } @@ -107,7 +107,7 @@ class Runtime extends Controller }); $this->app->cache->delete('SystemConfig'); sysoplog('系统运维管理', '清理系统参数配置成功'); - $this->success('清理系统配置成功!'); + $this->success('清理系统配置成功!', 'javascript:location.reload()'); } catch (HttpResponseException $exception) { throw $exception; } catch (\Exception $exception) {