From 6e8ea60b1a6ee8e854808cdd2deafa78f8db702e Mon Sep 17 00:00:00 2001 From: Mr Chen Date: Sat, 26 Jan 2019 23:15:36 +0800 Subject: [PATCH] Update firewall.js --- route/static/app/firewall.js | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/route/static/app/firewall.js b/route/static/app/firewall.js index ad3a29746..103bf71a8 100755 --- a/route/static/app/firewall.js +++ b/route/static/app/firewall.js @@ -120,14 +120,13 @@ function ping(status){ } }},function(){ layer.msg('正在处理,请稍候...',{icon:16,time:20000}); - $.post('/firewall/set_ping','status='+status, function(ret) { - console.log(ret); + $.post('/firewall/set_ping','status='+status, function(data) { layer.closeAll(); - if (ret.status == true) { + if (data['status'] == true) { if(status == 0){ - layer.msg('已禁Ping', {icon: 1}); + layer.msg(data['msg'], {icon: 1}); } else { - layer.msg('已解除禁Ping', {icon: 1}); + layer.msg('已解除禁PING', {icon: 1}); } setTimeout(function(){window.location.reload();},3000); } else {