diff --git a/route/static/app/files.js b/route/static/app/files.js index 9ec2d36f4..9bee48b4b 100755 --- a/route/static/app/files.js +++ b/route/static/app/files.js @@ -298,21 +298,29 @@ function openFilename(obj){ } if (inArray(ext,['svg'])){ - - $.post("/files/get_body", "path=" + encodeURIComponent(path), function(rdata) { - if (rdata.data.status){ - layer.open({ - type:1, - closeBtn: 1, - title:"SVG预览", - area: '400px', - shadeClose: true, - content: '
'+rdata.data.data+'
' - }); - } else { - layer.msg("无法预览"); - } - },'json'); + var url = '/files/download?filename='+path; + layer.open({ + type:1, + closeBtn: 1, + title:"SVG预览", + area: ['600px','500px'], + maxmin:true, + shadeClose: true, + content: '' + }); } }