From 6233d6649e9d5595aee8720bea356c328ea2d10b Mon Sep 17 00:00:00 2001 From: API Changelog Bot Date: Fri, 3 Apr 2026 12:08:47 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BB=B7=E6=A0=BC=E6=97=A5=E5=8E=86API?= =?UTF-8?q?=E5=AD=97=E6=AE=B5=E5=90=8D=E4=B8=8D=E5=8C=B9=E9=85=8D=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D=20(PR=20#148)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...026-04-03_1210_a344a2d8_fix_field_names.md | 32 +++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 changelogs/2026-04/2026-04-03_1210_a344a2d8_fix_field_names.md diff --git a/changelogs/2026-04/2026-04-03_1210_a344a2d8_fix_field_names.md b/changelogs/2026-04/2026-04-03_1210_a344a2d8_fix_field_names.md new file mode 100644 index 0000000..7007bf2 --- /dev/null +++ b/changelogs/2026-04/2026-04-03_1210_a344a2d8_fix_field_names.md @@ -0,0 +1,32 @@ +# 接口变更记录 — 2026-04-03 12:10 + +> **提交** `a344a2d8` · **PR** #148 · **作者** wx · **时间** 2026-04-03 12:10 +0800 +> +> fix: 价格日历API返回字段名与小程序前端不匹配(dateStr/price) + +## 变更总览 + +**纯后端修复,前端无需改动。** + +### 🐛 修复内容 + +小程序价格日历接口 `/mp/product/{id}/price-calendar` 返回的字段名与前端 calendar-popup 组件不匹配: +- 前端使用 `item.dateStr` → 后端只返回 `date` +- 前端使用 `item.price` → 后端只返回 `adultPrice` + +导致前端 `availableDates` 始终为空数组,日历无可选日期。 + +### 📋 接口响应变更 + +**GET** `/mp/product/{id}/price-calendar` + +每个日期对象**新增**两个字段(原有字段不变): + +| 新增字段 | 类型 | 说明 | +|---------|------|------| +| `dateStr` | String | `date` 的别名,格式 yyyy-MM-dd | +| `price` | BigDecimal | `adultPrice` 的别名,成人售价 | + +### 🔧 需重启服务 + +- **hl-product-service**