feat: add payment gateway and billing plans

This commit is contained in:
Entropy.Xu
2026-05-13 01:18:38 +08:00
parent 0fa97595bf
commit 10285c5eb9
97 changed files with 14797 additions and 404 deletions

View File

@@ -1,5 +1,6 @@
import { adminWalletApi } from '@/api/admin-wallets'
import { adminApi } from '@/api/admin'
import { adminBillingPlansApi, epayGatewayApi } from '@/api/billing'
import { getProvidersSummary } from '@/api/endpoints/providers'
import { getPoolOverview, getPoolSchedulingPresets, listPoolKeys } from '@/api/endpoints/pool'
import { listGlobalModels } from '@/api/global-models'
@@ -71,6 +72,18 @@ const adminRouteWarmers: Record<string, () => Promise<void>> = {
{ cacheTtlMs: NAV_DATA_CACHE_TTL_MS },
)
},
'/admin/payment-gateways': async () => {
await Promise.allSettled([
import('@/views/admin/PaymentGatewaySettings.vue'),
epayGatewayApi.get(),
])
},
'/admin/billing-plans': async () => {
await Promise.allSettled([
import('@/views/admin/BillingPlansManagement.vue'),
adminBillingPlansApi.list(),
])
},
}
export function prefetchAdminNavigationTarget(href: string): void {

View File

@@ -71,6 +71,8 @@ export function paymentMethodLabel(method: string | null | undefined): string {
const labels: Record<string, string> = {
alipay: '支付宝',
wechat: '微信支付',
wxpay: '微信支付',
epay: '易支付',
admin_manual: '人工充值',
card_code: '充值卡',
gift_code: '礼品卡',