重构脚本:删除profile脚本中不需要使用的swal,替换login.js文件中的swal为lgbSwal

This commit is contained in:
Argo-MacBookPro 2018-10-05 09:25:45 +08:00
parent 9920f91f4f
commit 85cd6c5ea1
2 changed files with 3 additions and 6 deletions

View File

@ -20,7 +20,7 @@
method: "post",
callback: function (result) {
var title = result ? "提交成功<br/>等待管理员审批" : "提交失败";
swal({ html: true, showConfirmButton: false, showCancelButton: false, timer: 1500, title: title, type: result ? "success" : "error" });
lgbSwal({ timer: 1500, title: title, type: result ? "success" : "error" });
}
});
});

View File

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