From 4587517ee46d1a0a6a9ce586fedea11d151ca4ad Mon Sep 17 00:00:00 2001 From: Sky Date: Mon, 11 Apr 2016 14:16:33 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E7=B3=BB=E7=BB=9F=E8=AE=BE?= =?UTF-8?q?=E7=BD=AE=E4=B8=ADlogo=E4=B8=8A=E4=BC=A0=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/javascripts/settings.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/public/javascripts/settings.js b/public/javascripts/settings.js index 7576ea6..1130f73 100644 --- a/public/javascripts/settings.js +++ b/public/javascripts/settings.js @@ -16,8 +16,11 @@ url: "/admin/uploadimg", dataType: "text", done: function (e, data) { - $(this).prev("img").attr("src", data.result); - $(this).next(":hidden").val(data.result); + if(data.result){ + var path = '/images/' + JSON.parse(data.result).files[0].name; + $(this).prev("img").attr("src", path); + $(this).next(":hidden").val(path); + } } });