dy-dashboard/vault/知识库/工作指南/训练记录/2026-08-17-修复刷新子页面回退占位页.md
2026-10-28 11:14:17 +08:00

10 lines
976 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

### 1. 修复刷新子页面回退到父菜单占位页
**旭东 → OpenClaw:**
> [Mon 2026-08-17 15:37 GMT+8] 发现一个异常,每次我在采销协同下边刷新之后,整个页面会跳转到采销协同请选择左侧子菜单这个界面,应该默认跳转的是第一个子菜单库存数据看板
**OpenClaw 响应:**
已定位并修复。根因:app.py 的 SPA 回退路由(`/<path:path>`)只取路径第一段映射 page key,导致刷新 `/collaboration/inventory-dashboard` 时被映射成 `page='collaboration'`,正好命中「采销协同 请选择左侧子菜单」占位页。
修复方式:改用完整路径映射(`/collaboration/inventory-dashboard` → `collaboration_inventory_dashboard`),同时顺带修复了其他所有多级子页面刷新回退问题(data/summary、inventory/finished、purchase/ready、orders/domestic 等 19 个路径全部验证通过)。测试服务已重启(HTTP 200),Git 提交 ad6c1a0