refactor(会员下单): 收窄桌面端下单入参为 productId 与 kind

- useAccountWallet.ts:buyRechargeProduct 只接受 productId 与 kind,会员下单不再伪造价格等无用字段

Co-authored-by: Junie <junie@jetbrains.com>
This commit is contained in:
2026-10-03 14:59:32 +08:00
parent 40c754ee0e
commit 44952704b6
@@ -286,7 +286,9 @@ export function useAccountWallet(currentUserId: string) {
}
}
async function buyRechargeProduct(product: ProfileRechargeProduct) {
async function buyRechargeProduct(
product: Pick<ProfileRechargeProduct, 'productId' | 'kind'>,
) {
if (submittingRechargeProductId) {
return;
}
@@ -432,14 +434,7 @@ export function useAccountWallet(currentUserId: string) {
// 这里只需要把 productId 交给同一条下单链路。
void buyRechargeProduct({
productId: resolveMembershipProductId(plan, cycleKind),
title: plan,
priceCents: 0,
kind: 'membership',
pointsAmount: 0,
bonusPoints: 0,
durationDays: 0,
badgeLabel: '',
description: '',
});
}