feat: 添加合规

This commit is contained in:
zdl
2025-10-20 21:25:33 +08:00
parent e1fe974262
commit 300c0a18a6
42 changed files with 7118 additions and 289 deletions

View File

@@ -37,9 +37,10 @@ import {
import ReactECharts from 'echarts-for-react';
import { logger } from '../../utils/logger';
import { getApiBase } from '../../utils/apiConfig';
// API配置
const API_BASE_URL = process.env.NODE_ENV === 'production' ? "" : (process.env.REACT_APP_API_URL || 'http://localhost:5001');
const API_BASE_URL = getApiBase();
// 格式化工具
const formatUtils = {

View File

@@ -1,6 +1,7 @@
// src/views/Market/MarketDataPro.jsx
import React, { useState, useEffect, useMemo } from 'react';
import { logger } from '../../utils/logger';
import { getApiBase } from '../../utils/apiConfig';
import {
Box,
Container,
@@ -97,8 +98,7 @@ import ReactECharts from 'echarts-for-react';
import ReactMarkdown from 'react-markdown';
// API服务配置
const isProduction = process.env.NODE_ENV === 'production';
const API_BASE_URL = isProduction ? "" : (process.env.REACT_APP_API_URL || 'http://localhost:5001');
const API_BASE_URL = getApiBase();
// 主题配置
const themes = {

View File

@@ -27,9 +27,9 @@ import {
} from '@chakra-ui/react';
import { SearchIcon, MoonIcon, SunIcon, StarIcon } from '@chakra-ui/icons';
import { FaChartLine, FaMoneyBillWave, FaChartBar, FaInfoCircle } from 'react-icons/fa';
import HomeNavbar from '../../components/Navbars/HomeNavbar';
import { useAuth } from '../../contexts/AuthContext';
import { logger } from '../../utils/logger';
import { getApiBase } from '../../utils/apiConfig';
import FinancialPanorama from './FinancialPanorama';
import ForecastReport from './ForecastReport';
import MarketDataView from './MarketDataView';
@@ -46,8 +46,7 @@ const CompanyIndex = () => {
const bgColor = useColorModeValue('white', 'gray.800');
const tabBg = useColorModeValue('gray.50', 'gray.700');
const activeBg = useColorModeValue('blue.500', 'blue.400');
const getApiBase = () => (process.env.NODE_ENV === 'production' ? '' : (process.env.REACT_APP_API_URL || 'http://49.232.185.254:5001'));
const [isInWatchlist, setIsInWatchlist] = useState(false);
const [isWatchlistLoading, setIsWatchlistLoading] = useState(false);
@@ -153,9 +152,7 @@ const CompanyIndex = () => {
};
return (
<>
<HomeNavbar />
<Container maxW="container.xl" py={5}>
<Container maxW="container.xl" py={5}>
{/* 页面标题和股票搜索 */}
<VStack align="stretch" spacing={5}>
<Card bg={bgColor} shadow="md">
@@ -308,8 +305,7 @@ const CompanyIndex = () => {
</CardBody>
</Card>
</VStack>
</Container>
</>
</Container>
);
};