From 0cdd5cfebb71f9cbd38695098a35ab2387679be5 Mon Sep 17 00:00:00 2001 From: API Changelog Bot Date: Fri, 27 Mar 2026 17:39:38 +0800 Subject: [PATCH] =?UTF-8?q?bug:=20=E4=BA=A7=E5=93=81=E7=8A=B6=E6=80=81?= =?UTF-8?q?=E5=8F=98=E6=9B=B4=E8=AF=B7=E6=B1=82=E8=B7=AF=E5=BE=84=E9=94=99?= =?UTF-8?q?=E8=AF=AF(404)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 前端请求路径 PUT /admin/admin/product/{id}/status 多了一层/admin且缺少/item, 正确路径为 PUT /admin/product/item/{productId}/status Co-Authored-By: Claude Opus 4.6 (1M context) --- .../27_1739_frontend_bug_status_path.md | 60 +++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 changelogs/2026-03/27_1739_frontend_bug_status_path.md diff --git a/changelogs/2026-03/27_1739_frontend_bug_status_path.md b/changelogs/2026-03/27_1739_frontend_bug_status_path.md new file mode 100644 index 0000000..c9d3e0a --- /dev/null +++ b/changelogs/2026-03/27_1739_frontend_bug_status_path.md @@ -0,0 +1,60 @@ +# 🐛 前端BUG:产品状态变更请求路径错误(404) + +**日期**: 2026-03-27 +**类型**: 前端BUG +**优先级**: 高 +**影响页面**: 产品列表页(产品管理 → 上架/下架操作) + +--- + +## 问题现象 + +在产品列表页点击上架/下架时,页面提示"请求的资源不存在",网络面板显示 `status` 请求返回 **404**。 + +## 原因 + +前端请求路径拼错了,多了一层 `/admin`,并且缺少 `/item` 路径段。 + +| | 路径 | +|------|------| +| ❌ 前端当前请求 | `PUT /admin/admin/product/{productId}/status` | +| ✅ 正确路径 | `PUT /admin/product/item/{productId}/status` | + +## 修复方式 + +检查前端代码中产品状态变更的 API 调用,将路径修改为: + +``` +PUT /admin/product/item/{productId}/status +``` + +### 请求参数(Body JSON) + +| 字段 | 类型 | 必填 | 说明 | +|------|------|------|------| +| status | String | 是 | 目标状态:`PUBLISHED`(上架)/ `UNPUBLISHED`(下架)/ `DRAFT`(撤回草稿) | +| reason | String | 否 | 操作原因(上架/下架审批时的说明) | + +### 请求示例 + +```json +{ + "status": "PUBLISHED", + "reason": "产品信息已完善,申请上架" +} +``` + +### 响应示例 + +```json +{ + "code": 200, + "message": "success", + "data": null +} +``` + +## 备注 + +- 上架和下架现在走企微OA审批流程,提交后状态不会立即变更,需等待审批通过 +- 产品列表新增了「审核状态」列,可查看审批进度