From 85cd6c5ea1b990c1733c696a0a90376c0812fe12 Mon Sep 17 00:00:00 2001 From: Argo-MacBookPro Date: Fri, 5 Oct 2018 09:25:45 +0800 Subject: [PATCH] =?UTF-8?q?=E9=87=8D=E6=9E=84=E8=84=9A=E6=9C=AC=EF=BC=9A?= =?UTF-8?q?=E5=88=A0=E9=99=A4profile=E8=84=9A=E6=9C=AC=E4=B8=AD=E4=B8=8D?= =?UTF-8?q?=E9=9C=80=E8=A6=81=E4=BD=BF=E7=94=A8=E7=9A=84swal=EF=BC=8C?= =?UTF-8?q?=E6=9B=BF=E6=8D=A2login.js=E6=96=87=E4=BB=B6=E4=B8=AD=E7=9A=84s?= =?UTF-8?q?wal=E4=B8=BAlgbSwal?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Bootstrap.Admin/wwwroot/js/login.js | 2 +- Bootstrap.Admin/wwwroot/js/profiles.js | 7 ++----- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/Bootstrap.Admin/wwwroot/js/login.js b/Bootstrap.Admin/wwwroot/js/login.js index 7dbca135..1044296a 100644 --- a/Bootstrap.Admin/wwwroot/js/login.js +++ b/Bootstrap.Admin/wwwroot/js/login.js @@ -20,7 +20,7 @@ method: "post", callback: function (result) { var title = result ? "提交成功
等待管理员审批" : "提交失败"; - swal({ html: true, showConfirmButton: false, showCancelButton: false, timer: 1500, title: title, type: result ? "success" : "error" }); + lgbSwal({ timer: 1500, title: title, type: result ? "success" : "error" }); } }); }); diff --git a/Bootstrap.Admin/wwwroot/js/profiles.js b/Bootstrap.Admin/wwwroot/js/profiles.js index b4ff9993..821266a9 100644 --- a/Bootstrap.Admin/wwwroot/js/profiles.js +++ b/Bootstrap.Admin/wwwroot/js/profiles.js @@ -23,11 +23,8 @@ }).on('fileuploaded', function (event, data, previewId, index) { var url = data.response.initialPreview[0]; if (!!url === true) $headerIcon.attr('src', url); - }).on('filebeforedelete', function (e, file) { - if (file === "default.jpg") { - swal({ showConfirmButton: false, showCancelButton: false, timer: 1500, title: '默认头像不能删除', type: "info" }); - return true; - } + }).on('filebeforedelete', function (e, key) { + if (key === "default.jpg") return true; return new Promise(function (resolve, reject) { swal({ title: "您确定要删除吗?",