ddd
This commit is contained in:
@@ -1,5 +1,42 @@
|
||||
const _ = require("../import");
|
||||
|
||||
|
||||
/**
|
||||
* @api {post} /type/titleList titleList
|
||||
* @apiDescription 获取分类页面,横向分类的标题 接口
|
||||
* @apiName titleList
|
||||
* @apiGroup type
|
||||
* @apiSuccessExample {json} 请求成功的返回:
|
||||
* {
|
||||
* "status" : 200,
|
||||
* "message" : "请求成功"
|
||||
* "result" : "asjXzXxmnSp8TZGWiTSlJF8Gb...5LhYoHs86SEI2LBXrTZ9e/a4frZOWHZ"
|
||||
* }
|
||||
* @apiErrorExample {json} 请求失败的返回
|
||||
* {
|
||||
* "status": 404,
|
||||
* "message" : "请求失败"
|
||||
* "result": null
|
||||
* }
|
||||
* @apiSampleRequest http://127.0.0.1:9090/type/titleList
|
||||
* @apiVersion 1.0.0
|
||||
*/
|
||||
_.router.post('/titleList', async function (req, res, next) {
|
||||
res.json({
|
||||
status: 200,
|
||||
message: '请求成功',
|
||||
result: [
|
||||
{ id: 1, title: '小米', content: []},
|
||||
{ id: 2, title: '魅族', content: [] },
|
||||
{ id: 3, title: '华为', content: [] },
|
||||
{ id: 4, title: 'iphone', content: [] },
|
||||
{ id: 5, title: '三星', content: [] },
|
||||
{ id: 6, title: '锤子', content: [] },
|
||||
{ id: 7, title: '诺基亚', content: [] },
|
||||
]
|
||||
});
|
||||
});
|
||||
|
||||
/**
|
||||
* @api {post} /type/list list
|
||||
* @apiDescription 分类页面获取分类商品的接口
|
||||
|
||||
Reference in New Issue
Block a user