diff --git a/src/mocks/handlers/index.js b/src/mocks/handlers/index.js index 5070d1cf..f075f008 100644 --- a/src/mocks/handlers/index.js +++ b/src/mocks/handlers/index.js @@ -19,6 +19,7 @@ import { agentHandlers } from './agent'; import { bytedeskHandlers } from './bytedesk'; import { predictionHandlers } from './prediction'; import { forumHandlers } from './forum'; +import { invoiceHandlers } from './invoice'; // 可以在这里添加更多的 handlers // import { userHandlers } from './user'; @@ -42,5 +43,6 @@ export const handlers = [ ...bytedeskHandlers, // ⚡ Bytedesk 客服 Widget passthrough ...predictionHandlers, // 预测市场 ...forumHandlers, // 价值论坛帖子 (ES) + ...invoiceHandlers, // 发票管理 // ...userHandlers, ]; diff --git a/src/routes/homeRoutes.js b/src/routes/homeRoutes.js index 04918aa3..b6c9e25e 100644 --- a/src/routes/homeRoutes.js +++ b/src/routes/homeRoutes.js @@ -69,6 +69,17 @@ export const homeRoutes = [ } }, + // 发票管理 - /home/pages/account/invoice + { + path: 'pages/account/invoice', + component: lazyComponents.Invoice, + protection: PROTECTION_MODES.REDIRECT, + meta: { + title: '发票管理', + description: '发票申请与管理' + } + }, + // 隐私政策 - /home/privacy-policy { path: 'privacy-policy', diff --git a/src/routes/lazy-components.js b/src/routes/lazy-components.js index 6f281c06..86c1f34f 100644 --- a/src/routes/lazy-components.js +++ b/src/routes/lazy-components.js @@ -17,6 +17,7 @@ export const lazyComponents = { ForumMyPoints: React.lazy(() => import('@views/Profile')), SettingsPage: React.lazy(() => import('@views/Settings/SettingsPage')), Subscription: React.lazy(() => import('@views/Pages/Account/Subscription')), + Invoice: React.lazy(() => import('@views/Pages/Account/Invoice')), PrivacyPolicy: React.lazy(() => import('@views/Pages/PrivacyPolicy')), UserAgreement: React.lazy(() => import('@views/Pages/UserAgreement')), WechatCallback: React.lazy(() => import('@views/Pages/WechatCallback')), @@ -64,6 +65,7 @@ export const { ForumMyPoints, SettingsPage, Subscription, + Invoice, PrivacyPolicy, UserAgreement, WechatCallback, diff --git a/src/views/Settings/SettingsPage.js b/src/views/Settings/SettingsPage.js index 36cb1f14..92dc7168 100644 --- a/src/views/Settings/SettingsPage.js +++ b/src/views/Settings/SettingsPage.js @@ -31,7 +31,7 @@ import { PinInput, PinInputField } from '@chakra-ui/react'; -import { Link2, Trash2, Pencil, Smartphone, Mail } from 'lucide-react'; +import { Link2, Trash2, Pencil, Smartphone, Mail, FileText, CreditCard } from 'lucide-react'; import { WechatOutlined } from '@ant-design/icons'; import { useAuth } from '../../contexts/AuthContext'; import { getApiBase } from '../../utils/apiConfig'; @@ -224,6 +224,7 @@ export default function SettingsPage() { 账户绑定 + 账单与发票 @@ -405,6 +406,71 @@ export default function SettingsPage() { + + {/* 账单与发票 */} + + + {/* 订阅管理 */} + + + 订阅管理 + + + + + + + + {user?.subscription_type === 'max' ? 'Max 会员' : + user?.subscription_type === 'pro' ? 'Pro 会员' : '免费版'} + + {user?.subscription_type && user?.subscription_type !== 'free' && ( + 有效 + )} + + + 管理您的会员订阅和续费 + + + + + + + + {/* 发票管理 */} + + + 发票管理 + + + + + + + + 电子发票申请与下载 + + + + 已支付的订单可申请开具电子发票 + + + + + + + +