From e6e126fc7ea818f803ee0efe758257a291417abf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?old=E6=98=93?= <156663459@qq.com> Date: Mon, 14 Jul 2025 13:36:08 +0800 Subject: [PATCH] bug fixed --- mock-config.json | 68 ++++++++++++++++++++++++++++++++++++++++++++++++ mock-db.json | 1 - 2 files changed, 68 insertions(+), 1 deletion(-) diff --git a/mock-config.json b/mock-config.json index 6980291..ffb008a 100644 --- a/mock-config.json +++ b/mock-config.json @@ -77,6 +77,74 @@ ] } }, +{ + "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", diff --git a/mock-db.json b/mock-db.json index ae42f43..d428c74 100644 --- a/mock-db.json +++ b/mock-db.json @@ -31,7 +31,6 @@ "canDelete": false } ], - "products": [], "orders": [] } \ No newline at end of file