Merge branch 'feature_bugfix/20260106' of https://git.valuefrontier.cn/vf/vf_react into feature_bugfix/20260106
This commit is contained in:
@@ -19,6 +19,7 @@ import { agentHandlers } from './agent';
|
|||||||
import { bytedeskHandlers } from './bytedesk';
|
import { bytedeskHandlers } from './bytedesk';
|
||||||
import { predictionHandlers } from './prediction';
|
import { predictionHandlers } from './prediction';
|
||||||
import { forumHandlers } from './forum';
|
import { forumHandlers } from './forum';
|
||||||
|
import { invoiceHandlers } from './invoice';
|
||||||
|
|
||||||
// 可以在这里添加更多的 handlers
|
// 可以在这里添加更多的 handlers
|
||||||
// import { userHandlers } from './user';
|
// import { userHandlers } from './user';
|
||||||
@@ -42,5 +43,6 @@ export const handlers = [
|
|||||||
...bytedeskHandlers, // ⚡ Bytedesk 客服 Widget passthrough
|
...bytedeskHandlers, // ⚡ Bytedesk 客服 Widget passthrough
|
||||||
...predictionHandlers, // 预测市场
|
...predictionHandlers, // 预测市场
|
||||||
...forumHandlers, // 价值论坛帖子 (ES)
|
...forumHandlers, // 价值论坛帖子 (ES)
|
||||||
|
...invoiceHandlers, // 发票管理
|
||||||
// ...userHandlers,
|
// ...userHandlers,
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -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
|
// 隐私政策 - /home/privacy-policy
|
||||||
{
|
{
|
||||||
path: 'privacy-policy',
|
path: 'privacy-policy',
|
||||||
|
|||||||
@@ -17,6 +17,7 @@ export const lazyComponents = {
|
|||||||
ForumMyPoints: React.lazy(() => import('@views/Profile')),
|
ForumMyPoints: React.lazy(() => import('@views/Profile')),
|
||||||
SettingsPage: React.lazy(() => import('@views/Settings/SettingsPage')),
|
SettingsPage: React.lazy(() => import('@views/Settings/SettingsPage')),
|
||||||
Subscription: React.lazy(() => import('@views/Pages/Account/Subscription')),
|
Subscription: React.lazy(() => import('@views/Pages/Account/Subscription')),
|
||||||
|
Invoice: React.lazy(() => import('@views/Pages/Account/Invoice')),
|
||||||
PrivacyPolicy: React.lazy(() => import('@views/Pages/PrivacyPolicy')),
|
PrivacyPolicy: React.lazy(() => import('@views/Pages/PrivacyPolicy')),
|
||||||
UserAgreement: React.lazy(() => import('@views/Pages/UserAgreement')),
|
UserAgreement: React.lazy(() => import('@views/Pages/UserAgreement')),
|
||||||
WechatCallback: React.lazy(() => import('@views/Pages/WechatCallback')),
|
WechatCallback: React.lazy(() => import('@views/Pages/WechatCallback')),
|
||||||
@@ -64,6 +65,7 @@ export const {
|
|||||||
ForumMyPoints,
|
ForumMyPoints,
|
||||||
SettingsPage,
|
SettingsPage,
|
||||||
Subscription,
|
Subscription,
|
||||||
|
Invoice,
|
||||||
PrivacyPolicy,
|
PrivacyPolicy,
|
||||||
UserAgreement,
|
UserAgreement,
|
||||||
WechatCallback,
|
WechatCallback,
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ import {
|
|||||||
PinInput,
|
PinInput,
|
||||||
PinInputField
|
PinInputField
|
||||||
} from '@chakra-ui/react';
|
} 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 { WechatOutlined } from '@ant-design/icons';
|
||||||
import { useAuth } from '../../contexts/AuthContext';
|
import { useAuth } from '../../contexts/AuthContext';
|
||||||
import { getApiBase } from '../../utils/apiConfig';
|
import { getApiBase } from '../../utils/apiConfig';
|
||||||
@@ -224,6 +224,7 @@ export default function SettingsPage() {
|
|||||||
<Tabs variant="enclosed" colorScheme="blue">
|
<Tabs variant="enclosed" colorScheme="blue">
|
||||||
<TabList>
|
<TabList>
|
||||||
<Tab color={textColor} _selected={{ color: 'blue.500', borderColor: 'blue.500' }}>账户绑定</Tab>
|
<Tab color={textColor} _selected={{ color: 'blue.500', borderColor: 'blue.500' }}>账户绑定</Tab>
|
||||||
|
<Tab color={textColor} _selected={{ color: 'blue.500', borderColor: 'blue.500' }}>账单与发票</Tab>
|
||||||
</TabList>
|
</TabList>
|
||||||
|
|
||||||
<TabPanels>
|
<TabPanels>
|
||||||
@@ -405,6 +406,71 @@ export default function SettingsPage() {
|
|||||||
|
|
||||||
</VStack>
|
</VStack>
|
||||||
</TabPanel>
|
</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>
|
</TabPanels>
|
||||||
</Tabs>
|
</Tabs>
|
||||||
</VStack>
|
</VStack>
|
||||||
|
|||||||
Reference in New Issue
Block a user