修复运行状态显示

This commit is contained in:
net909 2024-04-19 19:44:52 +08:00
parent 497aabb8e6
commit 3292f8e9ce
3 changed files with 6 additions and 3 deletions

View File

@ -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) ?? '无',

View File

@ -68,7 +68,7 @@ class DnsHelper
'sk' => 'API密钥'
],
'remark' => 2,
'status' => true,
'status' => false,
'redirect' => false,
'log' => false,
],

View File

@ -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});