feat: 重构Company和Concept页面
This commit is contained in:
@@ -10,7 +10,7 @@ import {
|
|||||||
} from "@chakra-ui/react";
|
} from "@chakra-ui/react";
|
||||||
import { FaQrcode } from "react-icons/fa";
|
import { FaQrcode } from "react-icons/fa";
|
||||||
import { useNavigate } from "react-router-dom";
|
import { useNavigate } from "react-router-dom";
|
||||||
import { authService, WECHAT_STATUS, STATUS_MESSAGES } from "../../services/authService";
|
import { authService, WECHAT_STATUS } from "../../services/authService";
|
||||||
import { logger } from "../../utils/logger";
|
import { logger } from "../../utils/logger";
|
||||||
|
|
||||||
// 配置常量
|
// 配置常量
|
||||||
@@ -332,20 +332,17 @@ export default function WechatRegister() {
|
|||||||
};
|
};
|
||||||
}, [wechatStatus]); // 当状态变化时重新计算
|
}, [wechatStatus]); // 当状态变化时重新计算
|
||||||
|
|
||||||
/**
|
// 渲染状态提示文本 - 已注释掉,如需使用可取消注释
|
||||||
* 渲染状态提示文本
|
// const renderStatusText = () => {
|
||||||
*/
|
// if (!wechatAuthUrl || wechatStatus === WECHAT_STATUS.NONE || wechatStatus === WECHAT_STATUS.EXPIRED) {
|
||||||
const renderStatusText = () => {
|
// return null;
|
||||||
if (!wechatAuthUrl || wechatStatus === WECHAT_STATUS.NONE || wechatStatus === WECHAT_STATUS.EXPIRED) {
|
// }
|
||||||
return null;
|
// return (
|
||||||
}
|
// <Text fontSize="xs" color="gray.500">
|
||||||
|
// {STATUS_MESSAGES[wechatStatus]}
|
||||||
return (
|
// </Text>
|
||||||
<Text fontSize="xs" color="gray.500">
|
// );
|
||||||
{STATUS_MESSAGES[wechatStatus]}
|
// };
|
||||||
</Text>
|
|
||||||
);
|
|
||||||
};
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<VStack spacing={2} display="flex" alignItems="center" justifyContent="center">
|
<VStack spacing={2} display="flex" alignItems="center" justifyContent="center">
|
||||||
|
|||||||
@@ -36,6 +36,7 @@ import {
|
|||||||
} from '@chakra-ui/icons';
|
} from '@chakra-ui/icons';
|
||||||
|
|
||||||
import ReactECharts from 'echarts-for-react';
|
import ReactECharts from 'echarts-for-react';
|
||||||
|
import { logger } from '../../../utils/logger';
|
||||||
|
|
||||||
// API配置
|
// API配置
|
||||||
const API_BASE_URL = process.env.NODE_ENV === 'production' ? "" : (process.env.REACT_APP_API_URL || 'http://localhost:5001');
|
const API_BASE_URL = process.env.NODE_ENV === 'production' ? "" : (process.env.REACT_APP_API_URL || 'http://localhost:5001');
|
||||||
@@ -762,13 +763,16 @@ const CompanyAnalysisComplete = ({ stockCode: propStockCode }) => {
|
|||||||
|
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
setError(err.message);
|
setError(err.message);
|
||||||
toast({
|
logger.error('CompanyOverview', 'loadData', err, { stockCode });
|
||||||
title: '数据加载失败',
|
|
||||||
description: err.message,
|
// ❌ 移除数据加载失败toast
|
||||||
status: 'error',
|
// toast({
|
||||||
duration: 3000,
|
// title: '数据加载失败',
|
||||||
isClosable: true,
|
// description: err.message,
|
||||||
});
|
// status: 'error',
|
||||||
|
// duration: 3000,
|
||||||
|
// isClosable: true,
|
||||||
|
// });
|
||||||
} finally {
|
} finally {
|
||||||
setLoading(false);
|
setLoading(false);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user