mirror of
https://gitee.com/zoujingli/ThinkAdmin.git
synced 2026-07-07 16:51:17 +08:00
Compare commits
2 Commits
7a7ded23df
...
cc8b6ed9e7
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
cc8b6ed9e7 | ||
|
|
aee5433838 |
@ -16,14 +16,15 @@ $(function () {
|
||||
|
||||
window.$body = $('body');
|
||||
|
||||
/*! 后台界面背景切换 */
|
||||
$('[data-supersized]').map(function () {
|
||||
var idx = 0, imgs = [];
|
||||
window.setInterval(function () {
|
||||
imgs.length > 0 && $body.css({backgroundImage: 'url(' + (imgs[++idx] || imgs[idx = 0]) + ')'});
|
||||
}, 5000) && this.dataset.supersized.split(',').forEach(function (url) {
|
||||
/*! 登录界面背景切换 */
|
||||
$('[data-supersized]').each(function (i, el) {
|
||||
el.idx = 0, el.imgs = [], el.state = setInterval(function () {
|
||||
el.imgs.length > 0 && $body.css({
|
||||
backgroundImage: 'url(' + (el.imgs[++el.idx] || el.imgs[el.idx = 0]) + ')'
|
||||
});
|
||||
}, 5000) && el.dataset.supersized.split(',').forEach(function (url) {
|
||||
layui.img(url, function () {
|
||||
imgs.push(url);
|
||||
el.imgs.push(url);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user