fix(mock-config): 更新用户地址列表和新增地址的模拟数据
- 将地址列表从动态生成改为固定数据,包含两个示例地址 - 更新新增地址接口的响应结构,添加code字段并固定id值 - 修改swagger文档中的示例id与响应数据一致master
parent
2041d87ddc
commit
e4d7532daa
|
|
@ -81,16 +81,26 @@
|
||||||
"method": "GET",
|
"method": "GET",
|
||||||
"path": "/api/user/address/list",
|
"path": "/api/user/address/list",
|
||||||
"response": {
|
"response": {
|
||||||
"list|2": [
|
"list": [
|
||||||
{
|
{
|
||||||
"id|+1": 1,
|
"id": 1,
|
||||||
"name": "刘先生",
|
"name": "张伟",
|
||||||
"phone": "134****7788",
|
"phone": "13812345678",
|
||||||
"fullAddress": "山东省济南市某某区幸福小区5号10楼1003室",
|
"fullAddress": "北京市朝阳区光华路8号",
|
||||||
"isDefault|1": [true, false],
|
"isDefault": true,
|
||||||
"locationStatus|1": ["正常", "选中地址为高亮跳回"],
|
"locationStatus": "正常",
|
||||||
"canEdit": true,
|
"canEdit": true,
|
||||||
"canDelete": true
|
"canDelete": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 2,
|
||||||
|
"name": "李芳",
|
||||||
|
"phone": "13987654321",
|
||||||
|
"fullAddress": "上海市浦东新区陆家嘴环路100号",
|
||||||
|
"isDefault": false,
|
||||||
|
"locationStatus": "正常",
|
||||||
|
"canEdit": true,
|
||||||
|
"canDelete": false
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|
@ -140,8 +150,11 @@
|
||||||
"method": "POST",
|
"method": "POST",
|
||||||
"path": "/api/user/address/add",
|
"path": "/api/user/address/add",
|
||||||
"response": {
|
"response": {
|
||||||
"id": "@increment",
|
"code": 200,
|
||||||
"message": "地址新增成功"
|
"message": "地址新增成功",
|
||||||
|
"result": {
|
||||||
|
"id": 10086
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"swagger": {
|
"swagger": {
|
||||||
"summary": "新增收货地址",
|
"summary": "新增收货地址",
|
||||||
|
|
@ -155,7 +168,7 @@
|
||||||
"code": 200,
|
"code": 200,
|
||||||
"message": "地址新增成功",
|
"message": "地址新增成功",
|
||||||
"result": {
|
"result": {
|
||||||
"id": 3
|
"id": 10086
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue