feat(mall): live flash-sale page and activity price snapshots

The flash-sale page loads active sessions and their items through the shared
client with live sale price, remaining activity stock, sell-through, and a
countdown, and adds the SKU to the existing cart so checkout resolves the
authoritative price. Payment and order detail tag and render the snapshotted
activity unit price.

The flash-sale fixtures leave the page; the fixed-data adapter still serves the
domain as the rollback path.
This commit is contained in:
2026-09-18 12:53:26 +00:00
parent 393e7f7209
commit 2125ae437f
10 changed files with 283 additions and 60 deletions
+4 -1
View File
@@ -21,7 +21,8 @@ type LiveDomain =
| "invoices"
| "addresses"
| "coupons"
| "points";
| "points"
| "flashSales";
/**
* Explicit per-domain method picks rather than a string allowlist: indexing
@@ -78,6 +79,7 @@ const LIVE_PICKS = {
listMyRedemptions: a.listMyRedemptions,
redeemPoints: a.redeemPoints,
}),
flashSales: (a: ApiClient) => ({ listFlashSales: a.listFlashSales }),
} satisfies Record<LiveDomain, (a: ApiClient) => Partial<ApiClient>>;
const KNOWN_DOMAINS = Object.keys(LIVE_PICKS) as LiveDomain[];
@@ -98,6 +100,7 @@ const DEFAULT_LIVE_DOMAINS: LiveDomain[] = [
"addresses",
"coupons",
"points",
"flashSales",
];
export default defineNuxtPlugin(() => {