1
0
mirror of https://gitee.com/zoujingli/ThinkAdmin.git synced 2025-04-06 03:58:04 +08:00

Update Runtime.php

This commit is contained in:
Anyon 2022-04-18 17:43:59 +08:00
parent 603104a64c
commit 8eb0af3a69

@ -39,7 +39,7 @@ class Runtime extends Controller
if (AdminService::instance()->isSuper()) try {
AdminService::instance()->clearCache();
SystemService::instance()->pushRuntime();
sysoplog('系统运维管理', '刷新并创建网站路由缓存');
sysoplog('系统运维管理', '刷新并创建路由缓存');
$this->success('网站缓存加速成功!', 'javascript:location.reload()');
} catch (HttpResponseException $exception) {
throw $exception;
@ -59,7 +59,7 @@ class Runtime extends Controller
if (AdminService::instance()->isSuper()) try {
AdminService::instance()->clearCache();
SystemService::instance()->clearRuntime();
sysoplog('系统运维管理', '清理网站日志及缓存数据');
sysoplog('系统运维管理', '清理日志及缓存数据');
$this->success('清空缓存日志成功!', 'javascript:location.reload()');
} catch (HttpResponseException $exception) {
throw $exception;
@ -78,11 +78,11 @@ class Runtime extends Controller
{
if (AdminService::instance()->isSuper()) if (input('state')) {
SystemService::instance()->setRuntime('product');
sysoplog('系统运维管理', '开发模式切换为生产模式');
sysoplog('系统运维管理', '开发模式切换为生产模式');
$this->success('已切换为生产模式!', 'javascript:location.reload()');
} else {
SystemService::instance()->setRuntime('debug');
sysoplog('系统运维管理', '生产模式切换为开发模式');
sysoplog('系统运维管理', '生产模式切换为开发模式');
$this->success('已切换为开发模式!', 'javascript:location.reload()');
} else {
$this->error('只有超级管理员才能操作!');
@ -107,7 +107,7 @@ class Runtime extends Controller
SystemConfig::mQuery()->empty()->insertAll($newdata);
});
$this->app->cache->delete('SystemConfig');
sysoplog('系统运维管理', '清理系统参数配置成功');
sysoplog('系统运维管理', '清理系统配置参数');
$this->success('清理系统配置成功!', 'javascript:location.reload()');
} catch (HttpResponseException $exception) {
throw $exception;