Update login.js

This commit is contained in:
邹景立 2022-04-19 23:37:23 +08:00
parent 7a7ded23df
commit aee5433838

View File

@ -17,13 +17,14 @@ $(function () {
window.$body = $('body'); window.$body = $('body');
/*! 后台界面背景切换 */ /*! 后台界面背景切换 */
$('[data-supersized]').map(function () { $('[data-supersized]').each(function (i, el) {
var idx = 0, imgs = []; el.idx = 0, el.imgs = [], el.state = setInterval(function () {
window.setInterval(function () { el.imgs.length > 0 && $body.css({
imgs.length > 0 && $body.css({backgroundImage: 'url(' + (imgs[++idx] || imgs[idx = 0]) + ')'}); backgroundImage: 'url(' + (el.imgs[++el.idx] || el.imgs[el.idx = 0]) + ')'
}, 5000) && this.dataset.supersized.split(',').forEach(function (url) { });
}, 5000) && el.dataset.supersized.split(',').forEach(function (url) {
layui.img(url, function () { layui.img(url, function () {
imgs.push(url); el.imgs.push(url);
}); });
}); });
}); });