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