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

2.5 KiB

Tasks: mall-pc-storefront-replica

1. Mock layer

  • 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
  • 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
  • apps/mall/plugins/api.ts: select mock vs real client via runtimeConfig.public.mockApi (default true)

2. Shell + shared components

  • 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
  • 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)
  • i18n: all new UI strings in apps/mall/locales-extra.ts (en/zh)

3. Browse pages

  • Home /: hero carousel, quick-link/promo strip, category floors (left adv + product cards)
  • Goods list /search: category/brand/sort filter block, 5-col cards, pagination, empty state
  • 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)

  • Cart /cart: store-grouped table, select/qty/remove, summary + 结算
  • Checkout /checkout: step bar, address select, store-grouped preview, remark, submit
  • Pay /checkout/pay + success /checkout/success

5. Auth + user center

  • /login, /register, /forgot-password panels
  • /user shell: left menu; dashboard, orders list + detail, addresses, favorites, coupons, invoices

6. Stores + marketing pages

  • /stores directory + /stores/[id] store home
  • /seckill sessions + countdown grid, /collective list, /integral points mall home

7. Verify

  • pnpm --filter @vmall/mall build green
  • openspec change validate mall-pc-storefront-replica --strict green
  • Browser smoke: home, search, goods detail (SKU pick), cart → checkout → pay → success, login, user center, stores, seckill — in both locales