feat(mall): live group-buying page with open or join intent
The group-buying page lists active activities, the group price against the catalog price, and each open group with its paid-member count and expiry. A shopper opens a group or picks one to join; either way the activity SKU goes into the cart and the intent is carried to checkout, which submits it and hides the coupon picker for that order. Payment and order detail show the snapshotted group price. The group-buying fixtures leave the page; the fixed-data adapter still serves the domain as the rollback path.
This commit is contained in:
@@ -22,7 +22,8 @@ type LiveDomain =
|
||||
| "addresses"
|
||||
| "coupons"
|
||||
| "points"
|
||||
| "flashSales";
|
||||
| "flashSales"
|
||||
| "groupBuying";
|
||||
|
||||
/**
|
||||
* Explicit per-domain method picks rather than a string allowlist: indexing
|
||||
@@ -80,6 +81,9 @@ const LIVE_PICKS = {
|
||||
redeemPoints: a.redeemPoints,
|
||||
}),
|
||||
flashSales: (a: ApiClient) => ({ listFlashSales: a.listFlashSales }),
|
||||
groupBuying: (a: ApiClient) => ({
|
||||
listGroupBuyingActivities: a.listGroupBuyingActivities,
|
||||
}),
|
||||
} satisfies Record<LiveDomain, (a: ApiClient) => Partial<ApiClient>>;
|
||||
|
||||
const KNOWN_DOMAINS = Object.keys(LIVE_PICKS) as LiveDomain[];
|
||||
@@ -101,6 +105,7 @@ const DEFAULT_LIVE_DOMAINS: LiveDomain[] = [
|
||||
"coupons",
|
||||
"points",
|
||||
"flashSales",
|
||||
"groupBuying",
|
||||
];
|
||||
|
||||
export default defineNuxtPlugin(() => {
|
||||
|
||||
Reference in New Issue
Block a user