From b3d45d0aa3b04ba66520afc9ab3f24d12474f6a2 Mon Sep 17 00:00:00 2001 From: API Changelog Bot Date: Sat, 9 May 2026 22:35:50 +0800 Subject: [PATCH] =?UTF-8?q?P0=20frontend=20notice:=20ShareModal=20label=20?= =?UTF-8?q?=E7=9B=B4=E6=8E=A5=20=3D=20enterpriseWechatName=20=E4=B8=8D?= =?UTF-8?q?=E8=A6=81=20fallback=20(=E7=94=A8=E6=88=B7=E8=BF=9E=E7=BB=AD=20?= =?UTF-8?q?2=20=E6=AC=A1=E5=8F=8D=E9=A6=88)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 后端 customizers 已返 enterpriseWechatName 中文真名,前端 mmg 已切到该接口,但 label 用 nickname || realName || username chain 命中不到字段,显示英文 username。 改 1 行 label = o.enterpriseWechatName 即可。 --- ...re-modal-show-enterprise-wechat-name-P0.md | 96 +++++++++++++++++++ 1 file changed, 96 insertions(+) create mode 100644 changelogs/2026-05/09_frontend_notice_admin_share-modal-show-enterprise-wechat-name-P0.md diff --git a/changelogs/2026-05/09_frontend_notice_admin_share-modal-show-enterprise-wechat-name-P0.md b/changelogs/2026-05/09_frontend_notice_admin_share-modal-show-enterprise-wechat-name-P0.md new file mode 100644 index 0000000..0ae9ed4 --- /dev/null +++ b/changelogs/2026-05/09_frontend_notice_admin_share-modal-show-enterprise-wechat-name-P0.md @@ -0,0 +1,96 @@ +# 🔴 P0 前端 BUG 紧急通知 — ShareModal label 直接展示企微名,不要 fallback + +**日期**: 2026-05-09 +**类型**: 前端 P0 BUG (紧急,用户已经第 2 次反馈) +**模块**: 产品管理 → 产品列表 → 分享产品(ShareModal) +**通知**: @mmg +**严重性**: **P0** — 用户连续 2 次反馈"分享下拉显示英文 username,要中文真名" +**前端改动**: **就 1 行** + +--- + +## ⚠️ 用户原话 + +> "我只要展示企业微信名不要复杂化" + +**直接改 label = enterpriseWechatName,不要 fallback chain,不要拼接 mobile**。 + +--- + +## 当前实测线上版本(测试服 hl-admin/assets/ShareModal-2fxUWA3D.js) + +```js +const e = await V(); // V = ju = GET /admin/user/customizers ✅ 接口对的 +p.value = t.filter(o => String(o.adminId) !== String(I.value)) + .map(o => ({ + label: `${o.nickname || o.realName || o.username || ""}${o.mobile ? ` (${o.mobile})` : ""}`, // ❌ 这一行错 + value: o.adminId + })) +``` + +后端 `customizers` 接口**根本不返** `nickname` / `realName` / `mobile` 字段(只返 `adminId / username / enterpriseWechatName / avatar`),所以 fallback chain 一路落到 `o.username`,展示英文登录名。 + +--- + +## ✅ 改成 + +```js +.map(o => ({ + label: o.enterpriseWechatName, // ← 就这一行,纯展示企微名 + value: o.adminId +})) +``` + +--- + +## 后端字段证据(已部署到测试服 21:50) + +```bash +$ curl https://api.test.1814.love:9443/admin/user/customizers +{ + "code": 200, + "data": [ + { "adminId": 1001, "username": "admin", "enterpriseWechatName": null, "avatar": null }, + { "adminId": "2021059720172838914", "username": "wx", "enterpriseWechatName": "王骁", ... }, + { "adminId": "2027579942221352962", "username": "mmg", "enterpriseWechatName": "米明光", ... }, + { "adminId": "2033349904889524226", "username": "qulili", "enterpriseWechatName": "曲丽莉", ... }, + { "adminId": "2033349906135203841", "username": "bozhihe", "enterpriseWechatName": "卜志鹤 18847040111", ... } + ] +} +``` + +20 条 admin 中,绑企微的全有中文真名,未绑(admin / test_admin)的为 null。 + +--- + +## 注意:没绑企微的 admin + +- admin / test_admin 这种没绑企微的,enterpriseWechatName = null +- 改 label = `o.enterpriseWechatName` 后,他们在下拉里显示空白 +- 用户的预期是"只展示企微名",所以**空白是预期行为**,不要 fallback 到 username + +如果业务上希望"未绑企微的人不在下拉里",前端可以加一行 `.filter(o => o.enterpriseWechatName)` 把这些过滤掉。这点请你按 UX 决策,不强求。 + +--- + +## 改完之后 + +1. `pnpm build` +2. 部署 hl-admin(deploy panel 触发 frontend 部署) +3. 浏览器硬刷新 Ctrl+Shift+R +4. 产品列表 → 任一产品「分享」按钮 → 看下拉: + - 王骁 / 米明光 / 曲丽莉 / 卜志鹤 ... ✅ + - 不再有 admin / test_admin / wx / mmg 这种英文 username + +--- + +## 历史 changelog 关系 + +- `09_feat_admin_customizers-add-enterprise-wechat-name.md` (commit `1e3feab`,~21:55):后端加字段通知,提了 `label = enterpriseWechatName ?? username` — **本通知撤销 fallback 建议**,改为纯展示企微名(用户明确反对复杂化) +- `09_frontend_notice_admin_product-share-use-customizers-endpoint.md`:接口切换通知,已生效 +- `09_fix_admin_product-share-2-regressions.md`:后端 2 项回归修复,无前端改动 + +--- + +**联系人**: wx +**P0 紧急度**: ⚠️ 用户连续 2 次反馈,优先级最高,请立即改这 1 行 + 部署