90 lines
2.5 KiB
TypeScript
90 lines
2.5 KiB
TypeScript
// API 端点定义
|
|
|
|
export const API_ENDPOINTS = {
|
|
// 认证
|
|
AUTH: {
|
|
LOGIN: '/auth/login',
|
|
LOGOUT: '/auth/logout',
|
|
REFRESH: '/auth/refresh',
|
|
FORGOT_PASSWORD: '/auth/forgot-password',
|
|
REGISTER: '/auth/register',
|
|
},
|
|
|
|
// 用户管理
|
|
USERS: {
|
|
LIST: '/users',
|
|
DETAIL: (id: string) => `/users/${id}`,
|
|
UPDATE: (id: string) => `/users/${id}`,
|
|
DELETE: (id: string) => `/users/${id}`,
|
|
EXPORT: '/users/export',
|
|
BATCH_UPDATE: '/users/batch',
|
|
},
|
|
|
|
// 龙虎榜
|
|
LEADERBOARD: {
|
|
RANKINGS: '/leaderboard/rankings',
|
|
DAILY: '/leaderboard/daily',
|
|
WEEKLY: '/leaderboard/weekly',
|
|
MONTHLY: '/leaderboard/monthly',
|
|
SETTINGS: '/leaderboard/settings',
|
|
EXPORT: '/leaderboard/export',
|
|
},
|
|
|
|
// 授权管理
|
|
AUTHORIZATION: {
|
|
PROVINCE_COMPANIES: '/authorization/province-companies',
|
|
CITY_COMPANIES: '/authorization/city-companies',
|
|
PROVINCE_RULES: '/authorization/province-rules',
|
|
CITY_RULES: '/authorization/city-rules',
|
|
ASSESSMENT_RULES: '/authorization/assessment-rules',
|
|
LADDER_TARGETS: '/authorization/ladder-targets',
|
|
LIMITS: '/authorization/limits',
|
|
AUTHORIZE: (id: string) => `/authorization/${id}/authorize`,
|
|
REVOKE: (id: string) => `/authorization/${id}/revoke`,
|
|
},
|
|
|
|
// 数据统计
|
|
STATISTICS: {
|
|
OVERVIEW: '/statistics/overview',
|
|
TREND: '/statistics/trend',
|
|
REGION: '/statistics/region',
|
|
REGION_PROVINCE: '/statistics/region/province',
|
|
REGION_CITY: '/statistics/region/city',
|
|
LEADERBOARD: '/statistics/leaderboard',
|
|
OPERATIONS: '/statistics/operations',
|
|
REVENUE: '/statistics/revenue',
|
|
EXPORT: '/statistics/export',
|
|
},
|
|
|
|
// 系统设置
|
|
SETTINGS: {
|
|
ALL: '/settings',
|
|
SETTLEMENT: '/settings/settlement',
|
|
LEADERBOARD: '/settings/leaderboard',
|
|
QUOTA: '/settings/quota',
|
|
ASSESSMENT: '/settings/assessment',
|
|
DISPLAY: '/settings/display',
|
|
SECURITY: '/settings/security',
|
|
ACCOUNTS: '/settings/accounts',
|
|
OPERATION_LOGS: '/settings/operation-logs',
|
|
},
|
|
|
|
// 帮助中心
|
|
HELP: {
|
|
DOCUMENTS: '/help/documents',
|
|
DOCUMENT_DETAIL: (id: string) => `/help/documents/${id}`,
|
|
FAQ: '/help/faq',
|
|
SEARCH: '/help/search',
|
|
FEEDBACK: '/help/feedback',
|
|
},
|
|
|
|
// 仪表板
|
|
DASHBOARD: {
|
|
OVERVIEW: '/dashboard/overview',
|
|
STATS: '/dashboard/stats',
|
|
ACTIVITIES: '/dashboard/activities',
|
|
CHARTS: '/dashboard/charts',
|
|
REGION: '/dashboard/region',
|
|
},
|
|
} as const;
|