refactor(会员下单): 下单入参去掉未使用的 kind
- useAccountWallet.buyRechargeProduct 入参收窄为仅 productId,会员结算调用同步删除未被消费的 kind: 'membership'。
This commit is contained in:
@@ -287,7 +287,7 @@ export function useAccountWallet(currentUserId: string) {
|
||||
}
|
||||
|
||||
async function buyRechargeProduct(
|
||||
product: Pick<ProfileRechargeProduct, 'productId' | 'kind'>,
|
||||
product: Pick<ProfileRechargeProduct, 'productId'>,
|
||||
) {
|
||||
if (submittingRechargeProductId) {
|
||||
return;
|
||||
@@ -434,7 +434,6 @@ export function useAccountWallet(currentUserId: string) {
|
||||
// 这里只需要把 productId 交给同一条下单链路。
|
||||
void buyRechargeProduct({
|
||||
productId: resolveMembershipProductId(plan, cycleKind),
|
||||
kind: 'membership',
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user