From 79f600e69373f8d40829536e4ef6388d490f544a Mon Sep 17 00:00:00 2001 From: Devil Date: Sun, 22 Sep 2019 00:58:45 +0800 Subject: [PATCH] =?UTF-8?q?=E9=99=84=E4=BB=B6=E7=AE=A1=E7=90=86=E5=88=A0?= =?UTF-8?q?=E9=99=A4bug=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../common/lib/ueditor/dialogs/attachment/attachment.js | 7 +++---- public/static/common/lib/ueditor/dialogs/image/image.js | 7 +++---- public/static/common/lib/ueditor/dialogs/video/video.js | 7 +++---- 3 files changed, 9 insertions(+), 12 deletions(-) diff --git a/public/static/common/lib/ueditor/dialogs/attachment/attachment.js b/public/static/common/lib/ueditor/dialogs/attachment/attachment.js index 7f8c3e951..9e9e03d20 100755 --- a/public/static/common/lib/ueditor/dialogs/attachment/attachment.js +++ b/public/static/common/lib/ueditor/dialogs/attachment/attachment.js @@ -734,10 +734,9 @@ window.event.stopPropagation(); //阻止事件的传播 } finally { if(!confirm("确定要删除吗?")) return; - $.post(editor.getOpt("serverUrl") + "?action=deletefile", { "id": del.attr("data-id") }, function(responseText) { - json = utils.str2json(responseText); - if (json.state == 'SUCCESS') del.parent().remove(); - else alert(json.state); + $.post(editor.getOpt("serverUrl") + "?action=deletefile", { "id": del.attr("data-id") }, function(response) { + if (response.state == 'SUCCESS') del.parent().remove(); + else alert(response.state); }); } })[0]); diff --git a/public/static/common/lib/ueditor/dialogs/image/image.js b/public/static/common/lib/ueditor/dialogs/image/image.js index be12333a1..255d781dd 100755 --- a/public/static/common/lib/ueditor/dialogs/image/image.js +++ b/public/static/common/lib/ueditor/dialogs/image/image.js @@ -909,10 +909,9 @@ window.event.stopPropagation(); //阻止事件的传播 } finally { if(!confirm("确定要删除吗?")) return; - $.post(editor.getOpt("serverUrl") + "?action=deletefile", { "id": del.attr("data-id") }, function(responseText) { - json = utils.str2json(responseText); - if (json.state == 'SUCCESS') del.parent().remove(); - else alert(json.state); + $.post(editor.getOpt("serverUrl") + "?action=deletefile", { "id": del.attr("data-id") }, function(response) { + if (response.state == 'SUCCESS') del.parent().remove(); + else alert(response.state); }); } })[0]); diff --git a/public/static/common/lib/ueditor/dialogs/video/video.js b/public/static/common/lib/ueditor/dialogs/video/video.js index 89f51a610..3917398d8 100755 --- a/public/static/common/lib/ueditor/dialogs/video/video.js +++ b/public/static/common/lib/ueditor/dialogs/video/video.js @@ -286,10 +286,9 @@ window.event.stopPropagation(); //阻止事件的传播 } finally { if(!confirm("确定要删除吗?")) return; - $.post(editor.getOpt("serverUrl") + "?action=deletefile", { "id": del.attr("data-id") }, function(responseText) { - json = utils.str2json(responseText); - if (json.state == 'SUCCESS') del.parent().remove(); - else alert(json.state); + $.post(editor.getOpt("serverUrl") + "?action=deletefile", { "id": del.attr("data-id") }, function(response) { + if (response.state == 'SUCCESS') del.parent().remove(); + else alert(response.state); }); } })[0]); -- GitLab