ttt
Some checks reported errors
continuous-integration/drone/push Build was killed

This commit is contained in:
2025-03-11 08:43:59 +08:00
parent c181921ced
commit fb430d2d6d

View File

@@ -8,14 +8,21 @@ const router = express.Router();
// http://192.168.31.101:9940/v1/api/home/banner
router.get('/banner', async (req, res) => {
let $ = await Util.get(`${Config.baseUrl}/?orderby=rand`)
let result = []
let result = [
'https://image.baidu.com/search/down?thumburl=https://baidu.com&url=https://imgsa.baidu.com/forum/pic/item/54e736d12f2eb938b7ce5c2990628535e4dd6f4d.jpg',
'https://image.baidu.com/search/down?thumburl=https://baidu.com&url=https://imgsa.baidu.com/forum/pic/item/b899a9014c086e06d533199047087bf40bd1cb56.jpg',
'https://image.baidu.com/search/down?thumburl=https://baidu.com&url=https://imgsa.baidu.com/forum/pic/item/269759ee3d6d55fb6c5d50fd28224f4a21a4dd56.jpg'
]
$(".new-swiper .swiper-wrapper .swiper-slide").each(function() {
let src = $(this).find("span img").attr("src")
if (src) {
result.push({ src })
}
})
// $(".new-swiper .swiper-wrapper .swiper-slide").each(function() {
// let src = $(this).find("span img").attr("src")
// console.log("src: ", src);
// if (src) {
// result.push({ src })
// }
// })
res.json({
status: 200,