From 1e100a44cb28c110d1bc47e47235aeba1a8c3c7e Mon Sep 17 00:00:00 2001 From: Devil Date: Wed, 30 Dec 2020 21:39:37 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BB=86=E8=8A=82=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/static/common/js/common.js | 19 +++++++++++-------- public/static/index/default/js/cart.js | 2 +- public/static/index/default/js/goods.js | 6 +++--- public/static/index/default/js/pay.qrcode.js | 2 +- public/static/index/default/js/search.js | 2 +- 5 files changed, 17 insertions(+), 14 deletions(-) diff --git a/public/static/common/js/common.js b/public/static/common/js/common.js index 19edbc4cd..ac2f7abbb 100755 --- a/public/static/common/js/common.js +++ b/public/static/common/js/common.js @@ -5,7 +5,7 @@ * @version 0.0.1 * @datetime 2016-12-10T14:32:39+0800 * @param {[string]} msg [提示信息] - * @param {[string]} type [类型(失败:danger, 警告:warning, 成功:success)] + * @param {[string]} type [类型(失败:error, 警告:warning, 成功:success)] * @param {[int]} time [自动关闭时间(秒), 默认3秒] */ var temp_time_out; @@ -21,7 +21,10 @@ function Prompt(msg, type, time) // 提示信息添加 $('#common-prompt').remove(); - if((type || null) == null) type = 'danger'; + if((type || null) == null) + { + type = 'danger'; + } // icon图标, 默认错误 var icon = 'am-icon-times-circle'; @@ -509,7 +512,7 @@ function FromInit(form_name) { $.AMUI.progress.done(); $button.button('reset'); - Prompt(HtmlToString(xhr.responseText) || '异常错误', 'danger', 30); + Prompt(HtmlToString(xhr.responseText) || '异常错误', null, 30); } }); } @@ -1095,7 +1098,7 @@ function DataDelete(e) error:function(xhr, type) { $.AMUI.progress.done(); - Prompt(HtmlToString(xhr.responseText) || '异常错误', 'danger', 30); + Prompt(HtmlToString(xhr.responseText) || '异常错误', null, 30); } }); } @@ -1203,7 +1206,7 @@ function AjaxRequest(e) error:function(xhr, type) { $.AMUI.progress.done(); - Prompt(HtmlToString(xhr.responseText) || '异常错误', 'danger', 30); + Prompt(HtmlToString(xhr.responseText) || '异常错误', null, 30); } }); } @@ -1994,7 +1997,7 @@ $(function() { $.AMUI.progress.done(); $button.button('reset'); - Prompt(HtmlToString(xhr.responseText) || '异常错误', 'danger', 30); + Prompt(HtmlToString(xhr.responseText) || '异常错误', null, 30); } }); }); @@ -2106,7 +2109,7 @@ $(function() error: function(xhr, type) { $.AMUI.progress.done(); - Prompt(HtmlToString(xhr.responseText) || '异常错误', 'danger', 30); + Prompt(HtmlToString(xhr.responseText) || '异常错误', null, 30); } }); }, @@ -2261,7 +2264,7 @@ $(function() error:function(xhr, type) { $.AMUI.progress.done(); - Prompt(HtmlToString(xhr.responseText) || '异常错误', 'danger', 30); + Prompt(HtmlToString(xhr.responseText) || '异常错误', null, 30); } }); }); diff --git a/public/static/index/default/js/cart.js b/public/static/index/default/js/cart.js index 558c27aa3..133cb19b0 100755 --- a/public/static/index/default/js/cart.js +++ b/public/static/index/default/js/cart.js @@ -90,7 +90,7 @@ $(function() error: function(xhr, type) { $.AMUI.progress.done(); - Prompt(HtmlToString(xhr.responseText) || '异常错误', 'danger', 30); + Prompt(HtmlToString(xhr.responseText) || '异常错误', null, 30); } }); } diff --git a/public/static/index/default/js/goods.js b/public/static/index/default/js/goods.js index 30fe45bf8..5d2b98de5 100755 --- a/public/static/index/default/js/goods.js +++ b/public/static/index/default/js/goods.js @@ -245,7 +245,7 @@ function GoodsSpecDetail() error: function(xhr, type) { $.AMUI.progress.done(); - Prompt(HtmlToString(xhr.responseText) || '异常错误', 'danger', 30); + Prompt(HtmlToString(xhr.responseText) || '异常错误', null, 30); } }); } @@ -326,7 +326,7 @@ function GoodsSpecType() error: function(xhr, type) { $.AMUI.progress.done(); - Prompt(HtmlToString(xhr.responseText) || '异常错误', 'danger', 30); + Prompt(HtmlToString(xhr.responseText) || '异常错误', null, 30); } }); } @@ -550,7 +550,7 @@ $(function() { { PoptitClose(); $.AMUI.progress.done(); - Prompt(HtmlToString(xhr.responseText) || '异常错误', 'danger', 30); + Prompt(HtmlToString(xhr.responseText) || '异常错误', null, 30); } }); } diff --git a/public/static/index/default/js/pay.qrcode.js b/public/static/index/default/js/pay.qrcode.js index e818ea263..69a4c2c05 100755 --- a/public/static/index/default/js/pay.qrcode.js +++ b/public/static/index/default/js/pay.qrcode.js @@ -34,7 +34,7 @@ $(function() }, error: function(xhr, type) { - Prompt(HtmlToString(xhr.responseText) || '异常错误', 'danger', 30); + Prompt(HtmlToString(xhr.responseText) || '异常错误', null, 30); } }); }, 2000); diff --git a/public/static/index/default/js/search.js b/public/static/index/default/js/search.js index 149abc4b6..2c79eb574 100755 --- a/public/static/index/default/js/search.js +++ b/public/static/index/default/js/search.js @@ -213,7 +213,7 @@ $(function() $('.loding-view').hide(); $('.search-pages-submit').hide(); $('.table-no').show(); - Prompt(HtmlToString(xhr.responseText) || '异常错误', 'danger', 30); + Prompt(HtmlToString(xhr.responseText) || '异常错误', null, 30); } }); }