feat(payment): implement coffee tip plans and update payment flow

This commit is contained in:
2026-07-14 11:48:46 +08:00
parent f9c15bd91f
commit 3a4f24cb06
30 changed files with 632 additions and 56 deletions
+11
View File
@@ -8,6 +8,7 @@ import {
CreatePaymentOrderResponse,
PaymentOrderStatusResponse,
PaymentPlansResponse,
TipPaymentPlansResponse,
} from "@/data/dto/payment";
import { ApiPath } from "./api_path";
@@ -25,6 +26,16 @@ export class PaymentApi {
);
}
/** 获取咖啡打赏套餐列表。 */
async getTipPlans(): Promise<TipPaymentPlansResponse> {
const env = await httpClient<ApiEnvelope<unknown>>(
ApiPath.paymentTipPlans,
);
return TipPaymentPlansResponse.fromJson(
unwrap(env) as Record<string, unknown>,
);
}
/**
* 创建支付订单
*/