v4.0.19版本提交
This commit is contained in:
@@ -52,6 +52,19 @@ export function buildPayUrl(params: {
|
||||
return `/pages/pay/index?${parts.join('&')}`;
|
||||
}
|
||||
|
||||
export function buildOrderConfirmPickupUrl(ctx: {
|
||||
productId: string;
|
||||
skuId?: string;
|
||||
qty?: string | number;
|
||||
}): string {
|
||||
const parts = [`productId=${encodeURIComponent(ctx.productId)}`];
|
||||
if (ctx.skuId) parts.push(`skuId=${encodeURIComponent(ctx.skuId)}`);
|
||||
if (ctx.qty != null && String(ctx.qty).trim()) {
|
||||
parts.push(`qty=${encodeURIComponent(String(ctx.qty))}`);
|
||||
}
|
||||
return `/pages/order-confirm-pickup/index?${parts.join('&')}`;
|
||||
}
|
||||
|
||||
export function readCheckoutContext(params: Record<string, string | undefined>): CheckoutContext {
|
||||
return {
|
||||
productId: params.productId,
|
||||
|
||||
Reference in New Issue
Block a user