From e4d7532daaa10c6408fc8eaf45257ce126531989 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?old=E6=98=93?= <156663459@qq.com> Date: Thu, 10 Jul 2025 15:33:06 +0800 Subject: [PATCH] =?UTF-8?q?fix(mock-config):=20=E6=9B=B4=E6=96=B0=E7=94=A8?= =?UTF-8?q?=E6=88=B7=E5=9C=B0=E5=9D=80=E5=88=97=E8=A1=A8=E5=92=8C=E6=96=B0?= =?UTF-8?q?=E5=A2=9E=E5=9C=B0=E5=9D=80=E7=9A=84=E6=A8=A1=E6=8B=9F=E6=95=B0?= =?UTF-8?q?=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 将地址列表从动态生成改为固定数据,包含两个示例地址 - 更新新增地址接口的响应结构,添加code字段并固定id值 - 修改swagger文档中的示例id与响应数据一致 --- mock-config.json | 33 +++++++++++++++++++++++---------- 1 file changed, 23 insertions(+), 10 deletions(-) diff --git a/mock-config.json b/mock-config.json index 1406b5d..6980291 100644 --- a/mock-config.json +++ b/mock-config.json @@ -81,16 +81,26 @@ "method": "GET", "path": "/api/user/address/list", "response": { - "list|2": [ + "list": [ { - "id|+1": 1, - "name": "刘先生", - "phone": "134****7788", - "fullAddress": "山东省济南市某某区幸福小区5号10楼1003室", - "isDefault|1": [true, false], - "locationStatus|1": ["正常", "选中地址为高亮跳回"], + "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 } ] }, @@ -140,8 +150,11 @@ "method": "POST", "path": "/api/user/address/add", "response": { - "id": "@increment", - "message": "地址新增成功" + "code": 200, + "message": "地址新增成功", + "result": { + "id": 10086 + } }, "swagger": { "summary": "新增收货地址", @@ -155,7 +168,7 @@ "code": 200, "message": "地址新增成功", "result": { - "id": 3 + "id": 10086 } } }