From 17c9575ab76fb08c519c783ee5d425ece14b901d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=B9=E8=AF=9A=E8=AF=9A?= Date: Thu, 13 Sep 2018 15:09:20 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8DAMP=E4=BF=9D=E5=AD=98?= =?UTF-8?q?=E6=8F=90=E7=A4=BA=E6=96=87=E5=AD=97=E4=B8=8D=E5=AF=B9=E9=97=AE?= =?UTF-8?q?=E9=A2=98=EF=BC=8C=E6=89=B9=E9=87=8FAMP=E6=9B=B4=E6=96=B0?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E9=94=99=E8=AF=AF=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/views/amp_editor.php | 2 +- application/views/bootstrap3/refresh_amp_urls.php | 14 +++++++++++--- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/application/views/amp_editor.php b/application/views/amp_editor.php index 1f6d2db4..108b2a30 100644 --- a/application/views/amp_editor.php +++ b/application/views/amp_editor.php @@ -123,7 +123,7 @@ $.modaldialog.error('AMP语法错误,请看下方错误详情'); $('#amp_error').html(error_msg); } else { - $.modaldialog.success(responseText.value); + $.modaldialog.success('保存成功!'); } }, error: function (responseText, statusText, xhr, form) { diff --git a/application/views/bootstrap3/refresh_amp_urls.php b/application/views/bootstrap3/refresh_amp_urls.php index c8c26357..cd51c9dc 100644 --- a/application/views/bootstrap3/refresh_amp_urls.php +++ b/application/views/bootstrap3/refresh_amp_urls.php @@ -29,7 +29,15 @@ "amp_status": 1 }, success: function (result, textStatus) { - $(msg_obj).html("\u0041\u004d\u0050\u66f4\u65b0\u6210\u529f\u0021"); + if (result.name === 'no') { + error_msg=''; + $.each(responseText.value, function (index, element) { + error_msg=error_msg+'line '+element.line+' col '+element.col+' :'+element.message+' '; + }); + $(msg_obj).html("保存失败,AMP语法错误!"+''); + }else{ + $(msg_obj).html("\u0041\u004d\u0050\u66f4\u65b0\u6210\u529f\u0021"); + } create_amp_data(++index); }, error: function () { @@ -69,8 +77,8 @@ # - URL - 更新进度 + URL + 更新进度