diff --git a/app/controller/Dmonitor.php b/app/controller/Dmonitor.php index a81fc11..e335ac3 100644 --- a/app/controller/Dmonitor.php +++ b/app/controller/Dmonitor.php @@ -15,7 +15,7 @@ class Dmonitor extends BaseController $switch_count = Db::name('dmlog')->where('date', '>=', date("Y-m-d H:i:s",strtotime("-1 days")))->count(); $fail_count = Db::name('dmlog')->where('date', '>=', date("Y-m-d H:i:s",strtotime("-1 days")))->where('action', 1)->count(); - $run_state = config_get('run_time') ? (time()-strtotime(config_get('run_time')) > 10 ? 0 : 1) : 0; + $run_state = config_get('run_time', null, true) ? (time()-strtotime(config_get('run_time')) > 10 ? 0 : 1) : 0; View::assign('info', [ 'run_count' => config_get('run_count', null, true) ?? 0, 'run_time' => config_get('run_time', null, true) ?? '无', diff --git a/app/lib/DnsHelper.php b/app/lib/DnsHelper.php index 0fa6047..006673e 100644 --- a/app/lib/DnsHelper.php +++ b/app/lib/DnsHelper.php @@ -68,7 +68,7 @@ class DnsHelper 'sk' => 'API密钥' ], 'remark' => 2, - 'status' => true, + 'status' => false, 'redirect' => false, 'log' => false, ], diff --git a/app/view/dmonitor/taskform.html b/app/view/dmonitor/taskform.html index 452ac06..2093dc7 100644 --- a/app/view/dmonitor/taskform.html +++ b/app/view/dmonitor/taskform.html @@ -224,7 +224,10 @@ new Vue({ layer.close(ii); if(data.code == 0){ layer.alert(data.msg, {icon: 1}, function(){ - window.history.back(); + if(document.referrer.indexOf('task?') > 0) + window.location.href = document.referrer; + else + window.location.href = '/dmonitor/task'; }); }else{ layer.alert(data.msg, {icon: 2});