diff --git a/route/static/app/site.js b/route/static/app/site.js index f3aac26de..71ba77390 100755 --- a/route/static/app/site.js +++ b/route/static/app/site.js @@ -1626,6 +1626,7 @@ function toProxy(siteName, type, obj) { closeBtn: 2, shift: 5, shadeClose: false, + btn: ['提交','关闭'], content: "
" - }); - setTimeout(function() { - $('.btn-colse-proxy').click(function() { - layer.close(proxy_form); - }); - $('.btn-submit-proxy').click(function() { + "", + yes:function(){ + var to = $('[name="to"]').val(); var from = $('[name="from"]').val(); var host = $('[name="host"]').val(); - - $.post('/site/set_proxy', { - siteName: siteName, - from: from, - to: to, - host: host, - }, function(res) { - res = JSON.parse(res); + $.post('/site/set_proxy', {siteName: siteName,from: from,to: to,host: host}, function(res) { if (res.status) { layer.close(proxy_form); toProxy(siteName) } else { - layer.msg(res.msg, { - icon: 2 - }); + layer.msg(res.msg, {icon: 2}); } - }); - }); - }, 100); + },'json'); + + } + }); } if (type == 2) { - $.post('/site/del_proxy', { - siteName: siteName, - id: obj, - }, function(res) { - res = JSON.parse(res); + $.post('/site/del_proxy', {siteName: siteName,id: obj,}, function(res) { if (res.status == true) { - layer.msg('删除成功', { - time: 1000, - icon: 1 - }); + layer.msg('删除成功', {time: 1000,icon: 1}); toProxy(siteName) } else { - layer.msg(res.msg, { - time: 1000, - icon: 2 - }); + layer.msg(res.msg, {time: 1000,icon: 2}); } - }); + },'json'); return } @@ -1704,7 +1682,7 @@ function toProxy(siteName, type, obj) { res = JSON.parse(res); if (res.status == true) { var mBody = "