ElderlyCare-MockServer/mock-config.json

1085 lines
31 KiB
JSON
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

[
{
"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": "护理垫、洗护、日常消毒"
}
]
}
},
{
"method": "GET",
"path": "/api/product/detail",
"response": {
"id": "1",
"title": "防摔防滑地垫 卫生间适老化改造专用",
"subtitle": "600g专用 600g专用 600g专用简介",
"price": 120.0,
"unit": "元",
"cover": ["https://res.klyj.jinzejk.com/img/p01.png", "https://res.klyj.jinzejk.com/img/p02.png","https://res.klyj.jinzejk.com/img/p03.png","https://res.klyj.jinzejk.com/img/p04.png"],
"freight": "包邮",
"images": ["https://res.klyj.jinzejk.com/img/xq01.png"],
"specifications": {
"商品编码": "1015955073277",
"保质期": "3年",
"数量": "6包"
},
"parameters": {
"功能": "吸水柔贴透气",
"尺码": "L",
"国产/进口": "国产"
},
"features": [
"防滑气泡颗粒",
"按摩云朵刷",
"强力吸盘",
"TPE材质",
"排水顺畅",
"环保无味"
],
"tags": ["适老化", "浴室", "防滑", "环保"],
"inStock": true
},
"swagger": {
"summary": "获取商品详情",
"description": "根据商品 ID 返回完整详情内容",
"responses": {
"200": {
"description": "成功响应",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"code": { "type": "integer" },
"message": { "type": "string" },
"result": {
"type": "object",
"properties": {
"id": { "type": "string" },
"title": { "type": "string" },
"price": { "type": "number" },
"specifications": { "type": "object" },
"parameters": { "type": "object" },
"features": {
"type": "array",
"items": { "type": "string" }
}
}
}
}
}
}
}
}
}
}
},
{
"method": "GET",
"path": "/api/user/address/list",
"response": {
"list": [
{
"id": 1,
"name": "张伟",
"phone": "13812345678",
"fullAddress": "北京市朝阳区光华路8号",
"isDefault": true,
"locationStatus": "正常",
"canEdit": true,
"canDelete": true
},
{
"id": 2,
"name": "李芳",
"phone": "13987654321",
"fullAddress": "上海市浦东新区陆家嘴环路100号",
"isDefault": false,
"locationStatus": "正常",
"canEdit": true,
"canDelete": false
}
]
},
"swagger": {
"summary": "获取用户收货地址列表",
"description": "用于地址管理页展示用户所有地址",
"responses": {
"200": {
"description": "返回地址列表",
"content": {
"application/json": {
"example": {
"code": 200,
"message": "success",
"result": {
"list": [
{
"id": 1,
"name": "刘先生",
"phone": "134****7788",
"fullAddress": "山东省济南市某某区幸福小区5号10楼1003室",
"isDefault": true,
"locationStatus": "正常",
"canEdit": true,
"canDelete": true
},
{
"id": 2,
"name": "刘先生",
"phone": "134****7788",
"fullAddress": "山东省济南市某某区幸福小区5号10楼1003室",
"isDefault": false,
"locationStatus": "选中地址为高亮跳回",
"canEdit": true,
"canDelete": true
}
]
}
}
}
}
}
}
}
},
{
"method": "POST",
"path": "/api/user/address/add",
"response": {
"code": 200,
"message": "地址新增成功",
"result": {
"id": 10086
}
},
"swagger": {
"summary": "新增收货地址",
"description": "用于添加用户的新收货地址信息",
"responses": {
"200": {
"description": "成功响应",
"content": {
"application/json": {
"example": {
"code": 200,
"message": "地址新增成功",
"result": {
"id": 10086
}
}
}
}
}
}
}
},{
"method": "POST",
"path": "/api/user/address/delete",
"response": {
"message": "地址已删除"
},
"swagger": {
"summary": "删除收货地址",
"description": "根据地址ID删除用户地址",
"responses": {
"200": {
"description": "成功",
"content": {
"application/json": {
"example": {
"code": 200,
"message": "地址已删除",
"result": null
}
}
}
}
}
}
},
{
"method": "POST",
"path": "/api/user/address/update",
"response": {
"message": "地址已更新"
},
"swagger": {
"summary": "修改收货地址",
"description": "根据地址ID更新地址信息",
"responses": {
"200": {
"description": "成功",
"content": {
"application/json": {
"example": {
"code": 200,
"message": "地址已更新",
"result": null
}
}
}
}
}
}
}
,{
"method": "POST",
"path": "/api/user/address/set-default",
"response": {
"message": "已设置为默认地址"
},
"swagger": {
"summary": "设置默认地址",
"description": "将指定地址设为默认",
"responses": {
"200": {
"description": "成功",
"content": {
"application/json": {
"example": {
"code": 200,
"message": "已设置为默认地址",
"result": null
}
}
}
}
}
}
},
{
"method": "GET",
"path": "/api/user/address/detail",
"response": {
"id": 2,
"name": "刘先生",
"phone": "134****7788",
"fullAddress": "山东省济南市某某区幸福小区5号10楼1003室",
"isDefault": false
},
"swagger": {
"summary": "获取单个收货地址详情",
"description": "根据地址 ID 获取详细信息,用于编辑表单回显",
"responses": {
"200": {
"description": "成功返回地址信息",
"content": {
"application/json": {
"example": {
"code": 200,
"message": "success",
"result": {
"id": 2,
"name": "刘先生",
"phone": "134****7788",
"fullAddress": "山东省济南市某某区幸福小区5号10楼1003室",
"isDefault": false
},
"extras": null,
"time": "2025-07-10 16:30:00"
}
}
}
}
}
}
},
{
"method": "GET",
"path": "/api/product/simple-list",
"response": {
"category": "单点",
"totalPrice": 28.0,
"shippingFee": 2.0,
"packingFee": 1.0,
"count": 3,
"items": [
{
"id": "10001",
"name": "青椒肉丝青椒肉丝",
"desc": "份量600g",
"price": 20.0,
"count": 11,
"image": "https://res.klyj.jinzejk.com/img/qingjiao1.png"
},
{
"id": "10002",
"name": "孜然排骨",
"desc": "12块大排骨",
"price": 18.0,
"count": 12,
"image": "https://res.klyj.jinzejk.com/img/ziran.png"
},
{
"id": "10003",
"name": "玉米排骨汤",
"desc": "份量600g",
"price": 12.0,
"count": 20,
"image": "https://res.klyj.jinzejk.com/img/yumitang.png"
},
{
"id": "10004",
"name": "套餐一",
"desc": "份量600g",
"price": 28.0,
"count": 20,
"image": "https://res.klyj.jinzejk.com/img/yumitang.png"
}
]
},
"swagger": {
"summary": "获取单点商品列表",
"description": "返回当前社区点餐的单点类商品及数量信息",
"responses": {
"200": {
"description": "商品数据",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"category": { "type": "string" },
"totalPrice": { "type": "number" },
"shippingFee": { "type": "number" },
"packingFee": { "type": "number" },
"count": { "type": "integer" },
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": { "type": "string" },
"name": { "type": "string" },
"desc": { "type": "string" },
"price": { "type": "number" },
"count": { "type": "integer" },
"image": { "type": "string" }
}
}
}
}
}
}
}
}
}
}
},
{
"method": "GET",
"path": "/api/product/setmeal-list",
"response": {
"category": "套餐",
"totalPrice": 480.0,
"shippingFee": 2.0,
"packingFee": 1.0,
"count": 3,
"items": [
{
"id": "20001",
"name": "家庭饭格子荤素自选(含米饭热汤)",
"desc": "份量600g",
"price": 120.0,
"count": 2,
"image": "https://res.klyj.jinzejk.com/img/taocan01.png"
},
{
"id": "20002",
"name": "招牌肉沫米粉套餐",
"desc": "热干粉+小炒肉+蔬菜拼配",
"price": 120.0,
"count": 1,
"image": "https://res.klyj.jinzejk.com/img/taocan03.png"
},
{
"id": "20003",
"name": "鸡丝麻酱拌面套餐",
"desc": "份量600g",
"price": 120.0,
"count": 2,
"image": "https://res.klyj.jinzejk.com/img/taocan02.png"
}
]
},
"swagger": {
"summary": "获取套餐商品列表",
"description": "返回社区点餐中的套餐类商品信息",
"responses": {
"200": {
"description": "套餐数据",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"category": { "type": "string" },
"totalPrice": { "type": "number" },
"shippingFee": { "type": "number" },
"packingFee": { "type": "number" },
"count": { "type": "integer" },
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": { "type": "string" },
"name": { "type": "string" },
"desc": { "type": "string" },
"price": { "type": "number" },
"count": { "type": "integer" },
"image": { "type": "string" }
}
}
}
}
}
}
}
}
}
}
},
{
"method": "GET",
"path": "/api/lesson/category",
"response": {
"categories": [
{ "id": "recommend", "name": "推荐", "icon": "https://res.klyj.jinzejk.com/img/c01.png" },
{ "id": "mobile", "name": "手机电脑", "icon": "https://res.klyj.jinzejk.com/img/c02.png" },
{ "id": "calligraphy", "name": "书法学习", "icon": "https://res.klyj.jinzejk.com/img/c03.png" },
{ "id": "instrument", "name": "乐器弹奏", "icon": "https://res.klyj.jinzejk.com/img/c04.png" },
{ "id": "art", "name": "美术", "icon": "https://res.klyj.jinzejk.com/img/c05.png" }
]
},
"swagger": {
"summary": "获取课程分类",
"description": "返回课程模块的分类项(带图标)",
"responses": {
"200": {
"description": "分类数据",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"categories": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": { "type": "string" },
"name": { "type": "string" },
"icon": { "type": "string" }
}
}
}
}
}
}
}
}
}
}
},
{
"method": "GET",
"path": "/api/lesson/list",
"response": {
"category": "推荐",
"total": 4,
"items": [
{
"id": "lesson001",
"title": "隶属的古法用笔技巧",
"image": "https://res.klyj.jinzejk.com/img/lesson1.png",
"price": 0.0,
"chapterCount": 7,
"learnCount": 6525,
"label": "免费"
},
{
"id": "lesson002",
"title": "六十三个常用行书字",
"image": "https://res.klyj.jinzejk.com/img/lesson2.png",
"price": 9.9,
"chapterCount": 3,
"learnCount": 6525
},
{
"id": "lesson003",
"title": "如何学习使用微信",
"image": "https://res.klyj.jinzejk.com/img/lesson3.png",
"price": 9.9,
"chapterCount": 3,
"learnCount": 6525
},
{
"id": "lesson004",
"title": "易道字体教学",
"image": "https://res.klyj.jinzejk.com/img/lesson4.png",
"price": 9.9,
"chapterCount": 3,
"learnCount": 6525
}
]
},
"swagger": {
"summary": "获取课程学习列表",
"description": "返回推荐课程列表数据(包含课程封面、价格、节数、学习人数等)",
"responses": {
"200": {
"description": "课程数据",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"category": { "type": "string" },
"total": { "type": "integer" },
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": { "type": "string" },
"title": { "type": "string" },
"image": { "type": "string" },
"price": { "type": "number" },
"chapterCount": { "type": "integer" },
"learnCount": { "type": "integer" },
"label": { "type": "string" }
}
}
}
}
}
}
}
}
}
}
},
{
"method": "GET",
"path": "/api/course/detail",
"query": {
"courseId": "course_001"
},
"response": {
"id": "course_001",
"title": "隶属的古法用笔技巧-第一节",
"coverImage": "https://res.klyj.jinzejk.com/img/course_001.png",
"videoUrl": "https://res.klyj.jinzejk.com/video/83c5cc4974b779562fb56f6970d6d888.mp4",
"duration": "17:03",
"played": "4:15",
"price": 120.0,
"lessonCount": 4,
"isFree": false,
"description": "本课程系统讲解隶属书法(隶书)的古法用笔技巧,从基础笔画到进阶创作,结合秦汉经典碑帖。",
"teacher": {
"name": "刘教授",
"avatar": "https://res.klyj.jinzejk.com/img/teacher_liu.png",
"tag": "金牌讲师",
"bio": "耐心细致,语言通俗,擅长用生活例子讲解手训功能。课程字号大、步骤清晰,每步骤配实物示意图课件穿插。"
},
"coursePlan": {
"schedule": "每周日上午 6:30-10:30",
"teacher": "创老师 / 小曹老师",
"targetAge": "4-12岁儿童"
},
"courseGains": [
"精选五古名句,帮助记忆理解",
"巩固学习成果,提升文化修养"
],
"priceInfo": {
"originalPrice": 698,
"limitedPrice": 368,
"isLimited": true
},
"materialsIncluded": true,
"extra": {
"notice": "课程内容贴合实际场景,以“听得懂、学得会、用得上”为目标,针对性强,注重实效性。",
"qrCode": "https://res.klyj.jinzejk.com/img/qrcode.png"
}
},
"swagger": {
"summary": "获取课程详情信息",
"description": "包含课程标题、讲师、价格、安排、收获、试听进度等信息",
"responses": {
"200": {
"description": "课程详情数据",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"id": { "type": "string" },
"title": { "type": "string" },
"coverImage": { "type": "string" },
"videoUrl": { "type": "string" },
"duration": { "type": "string" },
"played": { "type": "string" },
"price": { "type": "number" },
"lessonCount": { "type": "integer" },
"isFree": { "type": "boolean" },
"description": { "type": "string" },
"teacher": {
"type": "object",
"properties": {
"name": { "type": "string" },
"avatar": { "type": "string" },
"tag": { "type": "string" },
"bio": { "type": "string" }
}
},
"coursePlan": {
"type": "object",
"properties": {
"schedule": { "type": "string" },
"teacher": { "type": "string" },
"targetAge": { "type": "string" }
}
},
"courseGains": {
"type": "array",
"items": { "type": "string" }
},
"priceInfo": {
"type": "object",
"properties": {
"originalPrice": { "type": "number" },
"limitedPrice": { "type": "number" },
"isLimited": { "type": "boolean" }
}
},
"materialsIncluded": { "type": "boolean" },
"extra": {
"type": "object",
"properties": {
"notice": { "type": "string" },
"qrCode": { "type": "string" }
}
}
}
}
}
}
}
}
}
},
{
"method": "GET",
"path": "/api/lesson/catalog",
"query": {
"courseId": "course_001"
},
"response": {
"courseId": "course_001",
"title": "隶属的古法用笔技巧",
"price": 120.0,
"chapterCount": 4,
"chapters": [
{
"index": 1,
"title": "秦汉隶属的历史背景",
"duration": "15:43",
"playCount": 9990,
"isTrial": true,
"isLocked": false
},
{
"index": 2,
"title": "古法执笔与运腕",
"duration": "15:43",
"playCount": 9990,
"isTrial": true,
"isLocked": false
},
{
"index": 3,
"title": "墨法与笔法的结合",
"duration": "15:43",
"playCount": 9990,
"isTrial": false,
"isLocked": true
},
{
"index": 4,
"title": "笔势的连贯与呼应",
"duration": "15:43",
"playCount": 9990,
"isTrial": false,
"isLocked": true
}
]
},
"swagger": {
"summary": "获取课程章节目录",
"description": "根据课程ID获取课程目录详情",
"responses": {
"200": {
"description": "章节列表数据",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"courseId": { "type": "string" },
"title": { "type": "string" },
"price": { "type": "number" },
"chapterCount": { "type": "integer" },
"chapters": {
"type": "array",
"items": {
"type": "object",
"properties": {
"index": { "type": "integer" },
"title": { "type": "string" },
"duration": { "type": "string" },
"playCount": { "type": "integer" },
"isTrial": { "type": "boolean" },
"isLocked": { "type": "boolean" }
}
}
}
}
}
}
}
}
}
}
},{
"method": "GET",
"path": "/api/nursing-home/list",
"response": {
"area": "锦泽安康",
"list": [
{
"id": "nh_001",
"name": "泰康之家·锦绣府",
"location": "杨浦区",
"distance": "5.2km",
"pricePerDay": 200.0,
"image": "https://res.klyj.jinzejk.com/nursing/nh-01.png"
},
{
"id": "nh_002",
"name": "幸福家园养老中心",
"location": "杨浦区",
"distance": "5.2km",
"pricePerDay": 120.0,
"image": "https://res.klyj.jinzejk.com/nursing/nh-02.png"
},
{
"id": "nh_003",
"name": "祥和老年之家",
"location": "杨浦区",
"distance": "5.2km",
"pricePerDay": 500.0,
"image": "https://res.klyj.jinzejk.com/nursing/nh-03.png"
},
{
"id": "nh_004",
"name": "夕阳红养老院",
"location": "杨浦区",
"distance": "5.2km",
"pricePerDay": 120.0,
"image": "https://res.klyj.jinzejk.com/nursing/nh-04.png"
},
{
"id": "nh_005",
"name": "福寿康宁养老院",
"location": "杨浦区",
"distance": "8.2km",
"pricePerDay": 620.0,
"image": "https://res.klyj.jinzejk.com/nursing/nh-05.png"
},
{
"id": "nh_006",
"name": "乐龄康养老院",
"location": "杨浦区",
"distance": "5.2km",
"pricePerDay": 120.0,
"image": "https://res.klyj.jinzejk.com/nursing/nh-06.png"
},
{
"id": "nh_007",
"name": "薛城康养老院",
"location": "薛城区",
"distance": "44.2km",
"pricePerDay": 120.0,
"image": "https://res.klyj.jinzejk.com/nursing/nh-07.png"
},{
"id": "nh_008",
"name": "峄城康养老院",
"location": "峄城区",
"distance": "19.2km",
"pricePerDay": 120.0,
"image": "https://res.klyj.jinzejk.com/nursing/nh-08.png"
},{
"id": "nh_009",
"name": "台儿庄康养老院",
"location": "台儿庄",
"distance": "25.2km",
"pricePerDay": 120.0,
"image": "https://res.klyj.jinzejk.com/nursing/nh-09.png"
}
]
},
"swagger": {
"summary": "获取养老院列表",
"description": "返回指定区域下的养老院信息,包括名称、位置、价格、距离和图片",
"responses": {
"200": {
"description": "养老院列表数据",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"area": { "type": "string" },
"list": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": { "type": "string" },
"name": { "type": "string" },
"location": { "type": "string" },
"distance": { "type": "string" },
"pricePerDay": { "type": "number" },
"image": { "type": "string" }
}
}
}
}
}
}
}
}
}
}
},
{
"method": "GET",
"path": "/api/nursing/detail",
"response": {
"code": 200,
"message": "ok",
"data": {
"id": 1,
"name": "福寿康宁养老院-杨浦店",
"coverImage": "https://res.klyj.jinzejk.com/nursing/cover.png",
"price": {
"amount": 200.00,
"unit": "天/起"
},
"location": {
"district": "杨浦区",
"distance": "5.2km",
"address": "山东省济南市某某区幸福小区5号10楼1003室",
"mapUrl": "https://map.example.com/?q=福寿康宁养老院-杨浦店"
},
"contact": {
"phone": "400-800-1234",
"wechatShare": true
},
"description": "泰康之家·锦绣府于2021年7月30日开业位于上海市中心城区浦东内环内临近陆家嘴CBD和优质三甲医院——交通大学附属仁济医院是泰康之家在上海继和熹之后的第二个养老社区项目。",
"album": {
"total": 225,
"categories": ["全部照片", "视频", "门店环境", "服务展示"],
"images": [
"https://res.klyj.jinzejk.com/nursing/1.png",
"https://res.klyj.jinzejk.com/nursing/2.png",
"https://res.klyj.jinzejk.com/nursing/3.png",
"https://res.klyj.jinzejk.com/nursing/4.png",
"https://res.klyj.jinzejk.com/nursing/5.png",
"https://res.klyj.jinzejk.com/nursing/6.png",
"https://res.klyj.jinzejk.com/nursing/7.png",
"https://res.klyj.jinzejk.com/nursing/9.png",
"https://res.klyj.jinzejk.com/nursing/10.png",
"https://res.klyj.jinzejk.com/nursing/11.png",
"https://res.klyj.jinzejk.com/nursing/12.png",
"https://res.klyj.jinzejk.com/nursing/13.png",
"https://res.klyj.jinzejk.com/nursing/14.png"
]
},
"tags": ["机构介绍", "地理位置", "环境优质", "医养结合"],
"actions": {
"canReserve": true,
"reserveText": "立即预约",
"consultText": "电话咨询"
}
}
},
"swagger": {
"summary": "获取养老院详情",
"description": "返回指定 ID 的养老机构详情信息,包括价格、地址、图片、机构介绍等内容。",
"parameters": [
{
"name": "id",
"in": "query",
"required": true,
"schema": {
"type": "integer"
},
"description": "养老院ID"
}
],
"responses": {
"200": {
"description": "养老院详情",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"code": { "type": "integer" },
"message": { "type": "string" },
"data": {
"type": "object",
"properties": {
"id": { "type": "integer" },
"name": { "type": "string" },
"coverImage": { "type": "string" },
"price": {
"type": "object",
"properties": {
"amount": { "type": "number" },
"unit": { "type": "string" }
}
},
"location": {
"type": "object",
"properties": {
"district": { "type": "string" },
"distance": { "type": "string" },
"address": { "type": "string" },
"mapUrl": { "type": "string" }
}
},
"contact": {
"type": "object",
"properties": {
"phone": { "type": "string" },
"wechatShare": { "type": "boolean" }
}
},
"description": { "type": "string" },
"album": {
"type": "object",
"properties": {
"total": { "type": "integer" },
"categories": {
"type": "array",
"items": { "type": "string" }
},
"images": {
"type": "array",
"items": { "type": "string" }
}
}
},
"tags": {
"type": "array",
"items": { "type": "string" }
},
"actions": {
"type": "object",
"properties": {
"canReserve": { "type": "boolean" },
"reserveText": { "type": "string" },
"consultText": { "type": "string" }
}
}
}
}
}
}
}
}
}
}
}
}
]