mirror of
https://gitee.com/zoujingli/ThinkAdmin.git
synced 2026-07-07 16:51:17 +08:00
Compare commits
No commits in common. "2bd3cd715b9ad4a3107dde35645bf289cc22661c" and "b6d97d791c103f5dcdee84429df86b6ff7176b98" have entirely different histories.
2bd3cd715b
...
b6d97d791c
@ -18,19 +18,17 @@ $(function () {
|
||||
|
||||
/*! 登录界面背景切换 */
|
||||
$('[data-bg-transition]').each(function (i, el) {
|
||||
el.idx = 0, el.imgs = [], el.SetBackImage = function (css) {
|
||||
window.setTimeout(function () {
|
||||
$(el).removeClass(el.imgs.join(' ')).addClass(css)
|
||||
}, 1000) && $body.removeClass(el.imgs.join(' ')).addClass(css)
|
||||
}, el.lazy = window.setInterval(function () {
|
||||
el.imgs.length > 0 && el.SetBackImage(el.imgs[++el.idx] || el.imgs[el.idx = 0]);
|
||||
}, 5000) && el.dataset.bgTransition.split(',').forEach(function (image) {
|
||||
layui.img(image, function (img, cssid, style) {
|
||||
style = document.createElement('style'), cssid = 'LoginBackImage' + (el.imgs.length + 1);
|
||||
style.innerHTML = '.' + cssid + '{background-image:url("' + encodeURI(image) + '")!important}';
|
||||
document.head.appendChild(style) && el.imgs.push(cssid);
|
||||
el.idx = 0, el.imgs = [], el.lazy = setInterval(function () {
|
||||
el.imgs.length > 0 && el.setImg(el.imgs[++el.idx] || el.imgs[el.idx = 0]);
|
||||
}, 5000) && el.dataset.bgTransition.split(',').forEach(function (url) {
|
||||
layui.img(url, function () {
|
||||
el.imgs.push(url);
|
||||
});
|
||||
});
|
||||
}), el.setImg = function (url) {
|
||||
setTimeout(function () {
|
||||
el.style.backgroundImage = 'url(' + url + ')';
|
||||
}, 1000) && $body.css({backgroundImage: 'url(' + url + ')'});
|
||||
};
|
||||
});
|
||||
|
||||
/*! 后台加密登录处理 */
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user