This commit is contained in:
haoouba 2021-02-02 19:55:14 +08:00
parent 7a7dacd66a
commit a45e71f6b1
2 changed files with 2 additions and 2 deletions

View File

@ -26,7 +26,7 @@ document.addEventListener('DOMContentLoaded', () => {
if (res.code !== 1) return $('.joe_video__type-list').html(`<li class="error">${res.data}</li>`);
if (!res.data.class.length) return $('.joe_video__type-list').html(`<li class="error">暂无数据!</li>`);
let htmlStr = '<li class="item" data-t="">全部</li>';
res.data.class.forEach(_ => (htmlStr += `<li class="item" data-t="${_.type_id}">${_.type_name}</li>`));
res.data.class.forEach(_ => (htmlStr += `<li class="item animated swing" data-t="${_.type_id}">${_.type_name}</li>`));
$('.joe_video__type-list').html(htmlStr);
$('.joe_video__type-list .item').first().click();
}

View File

@ -17,7 +17,7 @@ document.addEventListener('DOMContentLoaded', () => {
if (res.code !== 1) return $('.joe_wallpaper__type-list').html('<li class="error">壁纸抓取失败!请联系作者!</li>')
if (!res.data.length) return $('.joe_wallpaper__type-list').html(`<li class="error">暂无数据!</li>`)
let htmlStr = ''
res.data.forEach(_ => (htmlStr += `<li class="item" data-cid="${_.id}">${_.name}</li>`))
res.data.forEach(_ => (htmlStr += `<li class="item animated swing" data-cid="${_.id}">${_.name}</li>`))
$('.joe_wallpaper__type-list').html(htmlStr)
$('.joe_wallpaper__type-list .item').first().click()
}