This commit is contained in:
@@ -8,14 +8,21 @@ const router = express.Router();
|
|||||||
// http://192.168.31.101:9940/v1/api/home/banner
|
// http://192.168.31.101:9940/v1/api/home/banner
|
||||||
router.get('/banner', async (req, res) => {
|
router.get('/banner', async (req, res) => {
|
||||||
let $ = await Util.get(`${Config.baseUrl}/?orderby=rand`)
|
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() {
|
// $(".new-swiper .swiper-wrapper .swiper-slide").each(function() {
|
||||||
let src = $(this).find("span img").attr("src")
|
// let src = $(this).find("span img").attr("src")
|
||||||
if (src) {
|
|
||||||
result.push({ src })
|
// console.log("src: ", src);
|
||||||
}
|
|
||||||
})
|
// if (src) {
|
||||||
|
// result.push({ src })
|
||||||
|
// }
|
||||||
|
// })
|
||||||
|
|
||||||
res.json({
|
res.json({
|
||||||
status: 200,
|
status: 200,
|
||||||
|
|||||||
Reference in New Issue
Block a user