Merge branch 'feature_bugfix/20260106' of https://git.valuefrontier.cn/vf/vf_react into feature_bugfix/20260106

This commit is contained in:
2026-01-07 13:12:34 +08:00
4 changed files with 82 additions and 1 deletions

View File

@@ -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,
];

View File

@@ -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',

View File

@@ -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,

View File

@@ -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() {
<Tabs variant="enclosed" colorScheme="blue">
<TabList>
<Tab color={textColor} _selected={{ color: 'blue.500', borderColor: 'blue.500' }}>账户绑定</Tab>
<Tab color={textColor} _selected={{ color: 'blue.500', borderColor: 'blue.500' }}>账单与发票</Tab>
</TabList>
<TabPanels>
@@ -405,6 +406,71 @@ export default function SettingsPage() {
</VStack>
</TabPanel>
{/* 账单与发票 */}
<TabPanel>
<VStack spacing={6} align="stretch">
{/* 订阅管理 */}
<Card bg={cardBg} borderColor={borderColor}>
<CardHeader>
<Heading size="md" color={headingColor}>订阅管理</Heading>
</CardHeader>
<CardBody>
<HStack justify="space-between">
<VStack align="start" spacing={1}>
<HStack>
<CreditCard size={20} />
<Text fontWeight="medium" color={textColor}>
{user?.subscription_type === 'max' ? 'Max 会员' :
user?.subscription_type === 'pro' ? 'Pro 会员' : '免费版'}
</Text>
{user?.subscription_type && user?.subscription_type !== 'free' && (
<Badge colorScheme="purple" size="sm">有效</Badge>
)}
</HStack>
<Text fontSize="sm" color={subTextColor}>
管理您的会员订阅和续费
</Text>
</VStack>
<Button
colorScheme="purple"
onClick={() => navigate('/home/pages/account/subscription')}
>
管理订阅
</Button>
</HStack>
</CardBody>
</Card>
{/* 发票管理 */}
<Card bg={cardBg} borderColor={borderColor}>
<CardHeader>
<Heading size="md" color={headingColor}>发票管理</Heading>
</CardHeader>
<CardBody>
<HStack justify="space-between">
<VStack align="start" spacing={1}>
<HStack>
<FileText size={20} />
<Text fontWeight="medium" color={textColor}>
电子发票申请与下载
</Text>
</HStack>
<Text fontSize="sm" color={subTextColor}>
已支付的订单可申请开具电子发票
</Text>
</VStack>
<Button
colorScheme="teal"
onClick={() => navigate('/home/pages/account/invoice')}
>
管理发票
</Button>
</HStack>
</CardBody>
</Card>
</VStack>
</TabPanel>
</TabPanels>
</Tabs>
</VStack>