refactor(会员下单): 收窄平台面板下单入参为 productId 与 kind
- usePlatformProfileCenterController.ts:buyRechargeProduct 只接受 productId 与 kind,会员下单不再传 priceCents 等无用字段 Co-authored-by: Junie <junie@jetbrains.com>
This commit is contained in:
@@ -1041,7 +1041,7 @@ export function usePlatformProfileCenterController({
|
||||
}, [isRechargeOrderCurrent, nativeWechatPayment]);
|
||||
|
||||
const buyRechargeProduct = useCallback(
|
||||
(product: ProfileRechargeProduct) => {
|
||||
(product: Pick<ProfileRechargeProduct, 'productId' | 'kind'>) => {
|
||||
const account = captureAccountLifecycle();
|
||||
if (
|
||||
rechargeSubmissionRef.current ||
|
||||
@@ -1397,14 +1397,7 @@ export function usePlatformProfileCenterController({
|
||||
// 这里只需要把 productId 交给同一条下单链路。
|
||||
buyRechargeProduct({
|
||||
productId: resolveMembershipProductId(plan, cycleKind),
|
||||
title: plan,
|
||||
priceCents: 0,
|
||||
kind: 'membership',
|
||||
pointsAmount: 0,
|
||||
bonusPoints: 0,
|
||||
durationDays: 0,
|
||||
badgeLabel: '',
|
||||
description: '',
|
||||
});
|
||||
},
|
||||
[buyRechargeProduct],
|
||||
|
||||
Reference in New Issue
Block a user