ElderlyCare-MockServer/mock-config.json

83 lines
1.8 KiB
JSON

[
{
"method": "GET",
"path": "/api/demo/user",
"response": {
"code": 200,
"msg": "mock success",
"users|5": [
{
"id|+1": 6,
"name": "@cname",
"age": "@integer(20,40)",
"email": "@email"
}
]
}
},
{
"method": "GET",
"path": "/api/notice/list",
"response": {
"list|3": [
{
"id|+1": 3000,
"title": "@ctitle(10, 20)",
"content": "@cparagraph(2, 4)",
"author": "@cname",
"publishDate": "@date"
}
]
}
},
{
"method": "GET",
"path": "/api/mall/recommend",
"response": {
"products|4": [
{
"id|+1": 1001,
"name": "@pick(['老年精纺防尿湿纸尿裤 医用护理','防摔防滑地垫 卫生间适老化改造专用','多功能床边扶手 起夜支撑辅助器','老人专用加厚棉拖鞋'])",
"price": "@float(39, 9999, 2, 2)",
"image": "@image('200x200', '#f4f4f4', '商品图')",
"soldCount": "@natural(50, 999)"
}
]
}
},
{
"method": "GET",
"path": "/api/mall/category/list",
"response": {
"categories": [
{
"id": 1,
"name": "推荐",
"icon": "✨",
"description": "系统精选热销好物"
},
{
"id": 2,
"name": "居家安全",
"icon": "🪑",
"description": "适老化家具与防护设施"
},
{
"id": 3,
"name": "出行助理",
"icon": "🧳",
"description": "轮椅、手杖、出行辅助工具"
},
{
"id": 4,
"name": "洗护用品",
"icon": "🧼",
"description": "护理垫、洗护、日常消毒"
}
]
}
}
]