feat: persist customer product and shop favorites through the live API

Replace mall fixture favorites with customer-scoped endpoints, and send signed-out shoppers back to the page they left after sign-in.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Chengdong Zhang
2026-09-21 18:51:45 +08:00
co-authored by Cursor
parent 94a64ec712
commit 6c1357ec4d
34 changed files with 1783 additions and 119 deletions
+5 -2
View File
@@ -73,9 +73,12 @@ openspec validate --all --strict # 规范校验
## 商城的 mock 边界
`apps/mall` 通过 `apps/mall/plugins/api.ts``liveDomains` 按域选择适配器。已有 API 的域全部走真实后端:catalog、currency、content、brands、shops、auth、cart、orders、shipments、invoices、addresses。
`apps/mall` 通过 `apps/mall/plugins/api.ts``liveDomains` 按域选择适配器。当前真实后端域包括
catalog、currency、content、brands、shops、auth、account、cart、orders、shipments、invoices、
addresses、coupons、points、flashSales、groupBuying、favorites。
来自 `~/mock/data`部分都是没有后端能力的营销/账户域,逐项记录在 `docs/TBD-marketing.md`(优惠券、收藏、账户统计、秒杀、拼团、积分商城、评价等)。每一项都是一次新的能力建设,不是适配层切换。
由页面直接读取 `~/mock/data`能力记录在 `docs/TBD-marketing.md`。营销 fixture 仍由
fixed-data 适配器使用,作为每个已迁移域的回滚实现。
- **fixed-data 适配器本身**:`Mock API adapter` 规范要求它仍能服务每个域,因此它是回滚路径,删除它会破坏回滚。