From 3292f8e9cec209faf47165587d1ed48312fcc96b Mon Sep 17 00:00:00 2001 From: net909 Date: Fri, 19 Apr 2024 19:44:52 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E8=BF=90=E8=A1=8C=E7=8A=B6?= =?UTF-8?q?=E6=80=81=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controller/Dmonitor.php | 2 +- app/lib/DnsHelper.php | 2 +- app/view/dmonitor/taskform.html | 5 ++++- 3 files changed, 6 insertions(+), 3 deletions(-) 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});