This commit is contained in:
2025-04-16 22:47:17 +08:00
parent 7a7d8a7d01
commit 1a0d461f03
5 changed files with 391 additions and 131 deletions

View File

@@ -1,6 +1,39 @@
const { log } = require("debug");
const _ = require("../import");
/**
* @api {post} /home/hotSales hotSales
* @apiDescription 获取九宫格下手机重点推荐的数据
* @apiName hotSales
* @apiGroup Home
* @apiSuccessExample {json} 请求成功的返回:
* {
* "status" : 200,
* "message" : "请求成功"
* "result" : "asjXzXxmnSp8TZGWiTSlJF8Gb...5LhYoHs86SEI2LBXrTZ9e/a4frZOWHZ"
* }
* @apiErrorExample {json} 请求失败的返回
* {
* "status": 404,
* "message" : "请求失败"
* "result": null
* }
* @apiSampleRequest http://127.0.0.1:9090/home/hotSales
* @apiVersion 1.0.0
*/
_.router.post('/hotSales', async function (req, res, next) {
res.json({
status: 200,
message: '请求成功',
result: [
{ wares_id: 113, src: 'https://fms.res.meizu.com/dms/2024/12/06/f4d1f706-f5c1-41c7-ac36-f8d55a044ec8.jpg' },
{ wares_id: 114, src: 'https://fms.res.meizu.com/dms/2025/01/22/7e9e15db-7b8e-44a0-8e9f-77c5e5a3b28d.png' },
{ wares_id: 115, src: 'https://fms.res.meizu.com/dms/2025/03/24/6d7b1e2c-b129-4d48-9aad-3afb57c334b4.jpg' },
]
});
});
/**
* @api {post} /home/index index