引入easyadmin'

This commit is contained in:
augushong
2021-11-12 11:21:14 +08:00
parent b999be97ab
commit f7d3bc3827
680 changed files with 44615 additions and 22811 deletions

View File

@@ -0,0 +1,48 @@
define(["easy-admin"], function (ea) {
var Controller = {
index: function () {
if (top.location !== self.location) {
top.location = self.location;
}
$('.bind-password').on('click', function () {
if ($(this).hasClass('icon-5')) {
$(this).removeClass('icon-5');
$("input[name='password']").attr('type', 'password');
} else {
$(this).addClass('icon-5');
$("input[name='password']").attr('type', 'text');
}
});
$('.icon-nocheck').on('click', function () {
if ($(this).hasClass('icon-check')) {
$(this).removeClass('icon-check');
} else {
$(this).addClass('icon-check');
}
});
$('.login-tip').on('click', function () {
$('.icon-nocheck').click();
});
ea.listen(function (data) {
data['keep_login'] = $('.icon-nocheck').hasClass('icon-check') ? 1 : 0;
return data;
}, function (res) {
ea.msg.success(res.msg, function () {
window.location = ea.url('index');
})
}, function (res) {
ea.msg.error(res.msg, function () {
$('#refreshCaptcha').trigger("click");
});
});
},
};
return Controller;
});