Files
medical-mall/ROUTING_FIX_REPORT.md
2026-02-02 20:07:37 +08:00

45 lines
1.5 KiB
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.
# Vue Router 路由错误修复报告
## 问题描述
用户报告了一个 Vue Router 警告:
```
[Vue Router warn]: No match found for location with path "/pages/mall/admin/marketing/points/index?tab=seckill-config"
```
该错误出现在应用启动阶段main.uts:18表明系统仍在尝试加载一个已废弃的、使用 query 参数的旧路由。
## 根本原因
在升级营销模块从多标签页(单个 `/points/index` 页面带多个 tabs改为独立页面架构时存在两个不同的 `pages.json` 文件:
1. **`d:\骅锋\mall\pages.json`** - 根目录主配置文件(已正确更新)
2. **`d:\骅锋\mall\pages\mall\pages.json`** - 旧的子包配置文件(未更新)
旧的子包配置文件中仍然包含已废弃的 `marketing/points/index` 路由注册。
## 解决方案
**已删除** `d:\骅锋\mall\pages\mall\pages.json` 中的以下条目(第 488-495 行):
```json
{
"path": "marketing/points/index",
"style": {
"navigationBarTitleText": "积分管理",
"enablePullDownRefresh": false
}
}
```
## 验证
- ✅ 代码搜索确认:没有任何代码引用 `/pages/mall/admin/marketing/points/index?tab=*` 路由
- ✅ menu.uts 中所有营销菜单项已正确指向独立页面路由
- ✅ 所有 5 个积分相关页面stats, goods, order, record, config已正确注册在根 pages.json 中
## 后续步骤
应用重新编译后Vue Router 警告应该消失。所有营销页面导航将按照新的独立页面架构正确运行。