Files
gitlab-instance-0a899031_cn…/config/services.config.ts
root 283d65d1d1 ;s
2026-06-07 12:48:17 +08:00

31 lines
940 B
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
/**
* 前端服务配置。
* 浏览器侧只保留 UI 需要的公开配置;后端地址、支付网关、存储和 PB 连接都由 FastAPI 持有。
*/
export interface PaymentConfig {
defaultAmount: number;
defaultType: string;
}
/** 站点标识,用于 VIP 按站点隔离 */
export const SITE_ID = process.env.NEXT_PUBLIC_SITE_ID || "meetup";
/** meetup 加入游牧中国价格88 元 = 8800 */
export const MEETUP_JOIN_AMOUNT = 8800;
export function getPaymentConfig(): PaymentConfig {
return {
defaultAmount: Number(process.env.PAYMENT_DEFAULT_AMOUNT) || 8800,
defaultType: process.env.PAYMENT_DEFAULT_TYPE || "meetup",
};
}
/** 获取「加入」场景的支付配置 */
export function getJoinPaymentConfig(): { amount: number; type: string } {
return {
amount: Number(process.env.PAYMENT_JOIN_AMOUNT) || MEETUP_JOIN_AMOUNT,
type: process.env.PAYMENT_JOIN_TYPE || "meetup",
};
}