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: "您确定要删除吗?",