Files
guilixu-admin/.workbuddy/memory/2026-07-15.md
赵忠林 57b584df1b feat(shop): 支持Dashboard订单总数点击跳转指定tab
- 修改Dashboard中订单总数和总营业额跳转链接,默认携带tab参数
- 订单总数点击跳转至/shop/shopOrder?tab=all页面
- 待发货订单跳转至/shop/shopOrder?tab=undelivered,退款申请跳转至?tab=refunded
- shopOrder页面根据路由查询参数初始化激活tab,确保页面首次加载可正确显示对应订单列表
- 为无效或缺省tab参数设置默认值undelivered
- 简化订单页面tab切换逻辑复用公共状态映射函数
2026-07-15 02:35:01 +08:00

14 lines
1017 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.

# 2026-07-15
## 修复 shopOrder 页面默认待发货tab数据不正确
- 根因:`activeKey` 默认为 `'undelivered'`,但 `datasource` 函数只设了 `where.type = 0`,没有设 `statusFilter``statusFilter` 只在用户点击 tab 触发 `onTabs` 时才设置。所以页面初次加载时查的是全部订单而非待发货订单。
- 修复:提取 `getStatusFilterByTab(key)` 公共映射函数,在 `datasource` 中当 `where.statusFilter` 未设置时从 `activeKey` 自动推导。`onTabs` 也简化为复用同一函数。
- 文件:`src/views/shop/shopOrder/index.vue`
## Dashboard 订单总数点击跳转支持指定 tab
- Dashboard 中"订单总数"/"总营业额"跳转链接改为 `/shop/shopOrder?tab=all`"待发货订单"改为 `?tab=undelivered`"退款申请"改为 `?tab=refunded`
- shopOrder 页面读取 `route.query.tab` 初始化 `activeKey`,无效值回退到 `'undelivered'`
- 文件:`src/views/shop/dashboard/index.vue``src/views/shop/shopOrder/index.vue`