Files
vmall/openspec/changes/archive/2026-09-17-mall-pc-storefront-replica/tasks.md
T
Chengdong Zhang 21e99bb52b feat(mall): classic B2B2C PC storefront with fixed mock API layer
- Mock adapter implementing @vmall/shared ApiClient (localStorage-persisted
  cart/orders/invoices), runtime switch via mockApi flag (default on)
- Fixed bilingual mock catalog: 3-level categories, 24 products w/ SKUs,
  stores, brands, banners, floors, seckill/collective/integral, comments,
  coupons, addresses, seeded orders/shipments/invoices
- B2B2C mall shell: top bar, logo/search/cart header, dark nav + category
  mega-menu, value-prop footer, back-to-top; 1200px grid, #ca151e theme
- UI primitives replacing element-plus: carousel, pagination, breadcrumb,
  qty stepper, rating stars, modal, tabs, step bar, product card
- Pages: home floors, search (filters/sort/paging), goods detail (SKU
  picker, store rail, review tabs), cart -> checkout -> pay -> success,
  auth pages, user center (dashboard/orders/addresses/favorites/coupons/
  invoices), stores, seckill, collective, integral
- i18n split into per-domain locale modules (en+zh)
- OpenSpec change mall-pc-storefront-replica archived; all specs green
2026-09-17 19:13:29 +08:00

35 lines
2.5 KiB
Markdown

# Tasks: mall-pc-storefront-replica
## 1. Mock layer
- [x] `apps/mall/mock/data.ts`: fixed bilingual catalog (categories tree, brands, products+SKUs+images, stores, banners, home floors, seckill sessions, collectives, integral goods, comments, coupons, addresses, user profile/orders/invoices), money in minor units
- [x] `apps/mall/mock/api.ts`: `createMockApi()` implementing the `@vmall/shared` client surface (auth, products, categories, currencies+convert, cart with in-memory state, checkout, orders, shipments, invoices) returning fixed/derived data
- [x] `apps/mall/plugins/api.ts`: select mock vs real client via `runtimeConfig.public.mockApi` (default `true`)
## 2. Shell + shared components
- [x] Layout: `TopBar` (30px, city/links/login state), `SiteHeader` (logo, search box, cart badge, dark nav + category mega-menu `CategoryMenu`), `SiteFooter` (value props + copyright), scroll-aware header collapse, back-to-top
- [x] Primitives: `ProductCard`, `Pagination`, `Breadcrumb`, `QtyStepper`, `RatingStars`, `EmptyState`, `Modal`, `Tabs`, `Carousel`, `StepBar`; classic B2B2C mall theme via scoped CSS (1200px container, #ca151e, #f5f5f5 floors, card hover lift)
- [x] i18n: all new UI strings in `apps/mall/locales-extra.ts` (en/zh)
## 3. Browse pages
- [x] Home `/`: hero carousel, quick-link/promo strip, category floors (left adv + product cards)
- [x] Goods list `/search`: category/brand/sort filter block, 5-col cards, pagination, empty state
- [x] Goods detail `/goods/[id]`: gallery+zoom, attr/SKU picker, qty stepper, price block, coupon/activity strip, store card + sales rail, detail/comments/after-sale tabs
## 4. Transaction pages (mock)
- [x] Cart `/cart`: store-grouped table, select/qty/remove, summary + 结算
- [x] Checkout `/checkout`: step bar, address select, store-grouped preview, remark, submit
- [x] Pay `/checkout/pay` + success `/checkout/success`
## 5. Auth + user center
- [x] `/login`, `/register`, `/forgot-password` panels
- [x] `/user` shell: left menu; dashboard, orders list + detail, addresses, favorites, coupons, invoices
## 6. Stores + marketing pages
- [x] `/stores` directory + `/stores/[id]` store home
- [x] `/seckill` sessions + countdown grid, `/collective` list, `/integral` points mall home
## 7. Verify
- [x] `pnpm --filter @vmall/mall build` green
- [x] `openspec change validate mall-pc-storefront-replica --strict` green
- [x] Browser smoke: home, search, goods detail (SKU pick), cart → checkout → pay → success, login, user center, stores, seckill — in both locales