update pay function
This commit is contained in:
@@ -17,8 +17,8 @@ import {
|
||||
|
||||
import {
|
||||
FaBuilding, FaMapMarkerAlt, FaChartLine, FaLightbulb, FaRocket,
|
||||
FaNetworkWired, FaChevronDown, FaChevronUp, FaCog, FaTrophy,
|
||||
FaShieldAlt, FaBrain, FaChartPie, FaHistory, FaCheckCircle,
|
||||
FaNetworkWired, FaChevronDown, FaChevronUp, FaChevronLeft, FaChevronRight,
|
||||
FaCog, FaTrophy, FaShieldAlt, FaBrain, FaChartPie, FaHistory, FaCheckCircle,
|
||||
FaExclamationCircle, FaArrowUp, FaArrowDown, FaLink, FaStar,
|
||||
FaUserTie, FaIndustry, FaDollarSign, FaBalanceScale, FaChartBar,
|
||||
FaEye, FaFlask, FaHandshake, FaUsers, FaClock, FaCalendarAlt,
|
||||
@@ -26,7 +26,7 @@ import {
|
||||
FaUniversity, FaGraduationCap, FaVenusMars, FaPassport, FaFileAlt,
|
||||
FaNewspaper, FaBullhorn, FaUserShield, FaShareAlt, FaSitemap,
|
||||
FaSearch, FaDownload, FaExternalLinkAlt, FaInfoCircle, FaCrown,
|
||||
FaCertificate, FaAward, FaExpandAlt, FaCompressAlt
|
||||
FaCertificate, FaAward, FaExpandAlt, FaCompressAlt, FaGavel, FaFire
|
||||
} from 'react-icons/fa';
|
||||
|
||||
import {
|
||||
@@ -797,6 +797,14 @@ const CompanyAnalysisComplete = ({ stockCode: propStockCode }) => {
|
||||
const [newsEvents, setNewsEvents] = useState([]);
|
||||
const [newsLoading, setNewsLoading] = useState(false);
|
||||
const [newsSearchQuery, setNewsSearchQuery] = useState('');
|
||||
const [newsPagination, setNewsPagination] = useState({
|
||||
page: 1,
|
||||
per_page: 10,
|
||||
total: 0,
|
||||
pages: 0,
|
||||
has_next: false,
|
||||
has_prev: false
|
||||
});
|
||||
|
||||
const [error, setError] = useState(null);
|
||||
|
||||
@@ -886,38 +894,53 @@ const CompanyAnalysisComplete = ({ stockCode: propStockCode }) => {
|
||||
}, [stockCode]);
|
||||
|
||||
// 加载新闻事件
|
||||
const loadNewsEvents = async (searchQuery = '') => {
|
||||
const loadNewsEvents = async (page = 1, searchQuery = '') => {
|
||||
setNewsLoading(true);
|
||||
try {
|
||||
// 构建查询参数
|
||||
const params = new URLSearchParams({
|
||||
per_page: '20',
|
||||
page: page.toString(),
|
||||
per_page: '10',
|
||||
sort: 'new',
|
||||
include_creator: 'false',
|
||||
include_creator: 'true',
|
||||
include_stats: 'true'
|
||||
});
|
||||
|
||||
// 如果有搜索关键词,添加搜索参数
|
||||
if (searchQuery) {
|
||||
params.append('q', searchQuery);
|
||||
params.append('search_fields', 'title,description,content');
|
||||
}
|
||||
|
||||
// 如果有股票代码,添加相关筛选(这里假设事件表有stock_code字段)
|
||||
// 如果没有直接的stock_code字段,可以通过tags或keywords搜索
|
||||
if (basicInfo?.SECNAME) {
|
||||
params.append('keywords', basicInfo.SECNAME);
|
||||
// 搜索关键词优先级:
|
||||
// 1. 用户输入的搜索关键词
|
||||
// 2. 股票简称
|
||||
const queryText = searchQuery || basicInfo?.SECNAME || '';
|
||||
if (queryText) {
|
||||
params.append('q', queryText);
|
||||
}
|
||||
|
||||
const response = await fetch(`${API_BASE_URL}/api/events?${params.toString()}`);
|
||||
const data = await response.json();
|
||||
|
||||
// API可能返回 data.data.events 或 data.events
|
||||
// API返回 data.data.events
|
||||
const events = data.data?.events || data.events || [];
|
||||
const pagination = data.data?.pagination || {
|
||||
page: 1,
|
||||
per_page: 10,
|
||||
total: 0,
|
||||
pages: 0,
|
||||
has_next: false,
|
||||
has_prev: false
|
||||
};
|
||||
|
||||
setNewsEvents(events);
|
||||
setNewsPagination(pagination);
|
||||
} catch (err) {
|
||||
logger.error('CompanyOverview', 'loadNewsEvents', err, { stockCode, searchQuery });
|
||||
logger.error('CompanyOverview', 'loadNewsEvents', err, { stockCode, searchQuery, page });
|
||||
setNewsEvents([]);
|
||||
setNewsPagination({
|
||||
page: 1,
|
||||
per_page: 10,
|
||||
total: 0,
|
||||
pages: 0,
|
||||
has_next: false,
|
||||
has_prev: false
|
||||
});
|
||||
} finally {
|
||||
setNewsLoading(false);
|
||||
}
|
||||
@@ -926,13 +949,20 @@ const CompanyAnalysisComplete = ({ stockCode: propStockCode }) => {
|
||||
// 当基本信息加载完成后,加载新闻事件
|
||||
useEffect(() => {
|
||||
if (basicInfo) {
|
||||
loadNewsEvents();
|
||||
loadNewsEvents(1);
|
||||
}
|
||||
}, [basicInfo]);
|
||||
|
||||
// 处理搜索
|
||||
const handleNewsSearch = () => {
|
||||
loadNewsEvents(newsSearchQuery);
|
||||
loadNewsEvents(1, newsSearchQuery);
|
||||
};
|
||||
|
||||
// 处理分页
|
||||
const handleNewsPageChange = (newPage) => {
|
||||
loadNewsEvents(newPage, newsSearchQuery);
|
||||
// 滚动到新闻列表顶部
|
||||
document.getElementById('news-list-top')?.scrollIntoView({ behavior: 'smooth' });
|
||||
};
|
||||
|
||||
// 管理层职位分类
|
||||
@@ -2183,172 +2213,319 @@ const CompanyAnalysisComplete = ({ stockCode: propStockCode }) => {
|
||||
|
||||
{/* 新闻动态标签页 */}
|
||||
<TabPanel p={0} pt={6}>
|
||||
<Card bg={cardBg} shadow="md">
|
||||
<CardBody>
|
||||
<VStack spacing={4} align="stretch">
|
||||
{/* 搜索框 */}
|
||||
<HStack>
|
||||
<InputGroup>
|
||||
<InputLeftElement pointerEvents="none">
|
||||
<SearchIcon color="gray.400" />
|
||||
</InputLeftElement>
|
||||
<Input
|
||||
placeholder="搜索相关新闻..."
|
||||
value={newsSearchQuery}
|
||||
onChange={(e) => setNewsSearchQuery(e.target.value)}
|
||||
onKeyPress={(e) => e.key === 'Enter' && handleNewsSearch()}
|
||||
/>
|
||||
</InputGroup>
|
||||
<Button
|
||||
colorScheme="blue"
|
||||
onClick={handleNewsSearch}
|
||||
isLoading={newsLoading}
|
||||
>
|
||||
搜索
|
||||
</Button>
|
||||
</HStack>
|
||||
<VStack spacing={4} align="stretch">
|
||||
<Card bg={cardBg} shadow="md">
|
||||
<CardBody>
|
||||
<VStack spacing={4} align="stretch">
|
||||
{/* 搜索框和统计信息 */}
|
||||
<HStack justify="space-between" flexWrap="wrap">
|
||||
<HStack flex={1} minW="300px">
|
||||
<InputGroup>
|
||||
<InputLeftElement pointerEvents="none">
|
||||
<SearchIcon color="gray.400" />
|
||||
</InputLeftElement>
|
||||
<Input
|
||||
placeholder="搜索相关新闻..."
|
||||
value={newsSearchQuery}
|
||||
onChange={(e) => setNewsSearchQuery(e.target.value)}
|
||||
onKeyPress={(e) => e.key === 'Enter' && handleNewsSearch()}
|
||||
/>
|
||||
</InputGroup>
|
||||
<Button
|
||||
colorScheme="blue"
|
||||
onClick={handleNewsSearch}
|
||||
isLoading={newsLoading}
|
||||
minW="80px"
|
||||
>
|
||||
搜索
|
||||
</Button>
|
||||
</HStack>
|
||||
|
||||
{/* 新闻列表 */}
|
||||
{newsLoading ? (
|
||||
<Center h="300px">
|
||||
<VStack spacing={3}>
|
||||
<Spinner size="xl" color="blue.500" thickness="4px" />
|
||||
<Text>正在加载新闻...</Text>
|
||||
</VStack>
|
||||
</Center>
|
||||
) : newsEvents.length > 0 ? (
|
||||
<VStack spacing={3} align="stretch">
|
||||
{newsEvents.map((event, idx) => {
|
||||
const importanceColor = {
|
||||
'S': 'red',
|
||||
'A': 'orange',
|
||||
'B': 'yellow',
|
||||
'C': 'green'
|
||||
}[event.importance] || 'gray';
|
||||
{newsPagination.total > 0 && (
|
||||
<HStack spacing={2}>
|
||||
<Icon as={FaNewspaper} color="blue.500" />
|
||||
<Text fontSize="sm" color="gray.600">
|
||||
共找到 <Text as="span" fontWeight="bold" color="blue.600">{newsPagination.total}</Text> 条新闻
|
||||
</Text>
|
||||
</HStack>
|
||||
)}
|
||||
</HStack>
|
||||
|
||||
return (
|
||||
<Card
|
||||
key={idx}
|
||||
variant="outline"
|
||||
size="sm"
|
||||
cursor="pointer"
|
||||
_hover={{ bg: 'gray.50', shadow: 'md' }}
|
||||
transition="all 0.2s"
|
||||
>
|
||||
<CardBody p={4}>
|
||||
<VStack align="stretch" spacing={3}>
|
||||
<HStack justify="space-between" align="start">
|
||||
<VStack align="start" spacing={1} flex={1}>
|
||||
<HStack>
|
||||
<Icon as={FaNewspaper} color="blue.500" boxSize={4} />
|
||||
<Text fontWeight="bold" fontSize="md" noOfLines={2}>
|
||||
{event.title}
|
||||
</Text>
|
||||
</HStack>
|
||||
<HStack spacing={2} flexWrap="wrap">
|
||||
{event.importance && (
|
||||
<Badge colorScheme={importanceColor} size="sm">
|
||||
重要度: {event.importance}
|
||||
</Badge>
|
||||
)}
|
||||
{event.event_type && (
|
||||
<Badge colorScheme="blue" size="sm">
|
||||
{event.event_type}
|
||||
</Badge>
|
||||
)}
|
||||
{event.tags && event.tags.length > 0 && (
|
||||
<>
|
||||
{event.tags.slice(0, 3).map((tag, tidx) => (
|
||||
<Tag key={tidx} size="sm" variant="subtle">
|
||||
{tag}
|
||||
</Tag>
|
||||
))}
|
||||
</>
|
||||
)}
|
||||
</HStack>
|
||||
</VStack>
|
||||
<VStack align="end" spacing={1}>
|
||||
<Text fontSize="xs" color="gray.500">
|
||||
{event.created_at ? new Date(event.created_at).toLocaleDateString('zh-CN') : ''}
|
||||
</Text>
|
||||
{event.view_count && (
|
||||
<HStack spacing={1}>
|
||||
<Icon as={FaEye} boxSize={3} color="gray.400" />
|
||||
<div id="news-list-top" />
|
||||
|
||||
{/* 新闻列表 */}
|
||||
{newsLoading ? (
|
||||
<Center h="400px">
|
||||
<VStack spacing={3}>
|
||||
<Spinner size="xl" color="blue.500" thickness="4px" />
|
||||
<Text color="gray.600">正在加载新闻...</Text>
|
||||
</VStack>
|
||||
</Center>
|
||||
) : newsEvents.length > 0 ? (
|
||||
<>
|
||||
<VStack spacing={3} align="stretch">
|
||||
{newsEvents.map((event, idx) => {
|
||||
const importanceColor = {
|
||||
'S': 'red',
|
||||
'A': 'orange',
|
||||
'B': 'yellow',
|
||||
'C': 'green'
|
||||
}[event.importance] || 'gray';
|
||||
|
||||
const eventTypeIcon = {
|
||||
'企业公告': FaBullhorn,
|
||||
'政策': FaGavel,
|
||||
'技术突破': FaFlask,
|
||||
'企业融资': FaDollarSign,
|
||||
'政策监管': FaShieldAlt,
|
||||
'政策动态': FaFileAlt,
|
||||
'行业事件': FaIndustry
|
||||
}[event.event_type] || FaNewspaper;
|
||||
|
||||
return (
|
||||
<Card
|
||||
key={event.id || idx}
|
||||
variant="outline"
|
||||
_hover={{ bg: useColorModeValue('gray.50', 'gray.700'), shadow: 'md', borderColor: 'blue.300' }}
|
||||
transition="all 0.2s"
|
||||
>
|
||||
<CardBody p={4}>
|
||||
<VStack align="stretch" spacing={3}>
|
||||
{/* 标题栏 */}
|
||||
<HStack justify="space-between" align="start">
|
||||
<VStack align="start" spacing={2} flex={1}>
|
||||
<HStack>
|
||||
<Icon as={eventTypeIcon} color="blue.500" boxSize={5} />
|
||||
<Text fontWeight="bold" fontSize="lg" lineHeight="1.3">
|
||||
{event.title}
|
||||
</Text>
|
||||
</HStack>
|
||||
|
||||
{/* 标签栏 */}
|
||||
<HStack spacing={2} flexWrap="wrap">
|
||||
{event.importance && (
|
||||
<Badge colorScheme={importanceColor} variant="solid" px={2}>
|
||||
{event.importance}级
|
||||
</Badge>
|
||||
)}
|
||||
{event.event_type && (
|
||||
<Badge colorScheme="blue" variant="outline">
|
||||
{event.event_type}
|
||||
</Badge>
|
||||
)}
|
||||
{event.invest_score && (
|
||||
<Badge colorScheme="purple" variant="subtle">
|
||||
投资分: {event.invest_score}
|
||||
</Badge>
|
||||
)}
|
||||
{event.keywords && event.keywords.length > 0 && (
|
||||
<>
|
||||
{event.keywords.slice(0, 4).map((keyword, kidx) => (
|
||||
<Tag key={kidx} size="sm" colorScheme="cyan" variant="subtle">
|
||||
{keyword}
|
||||
</Tag>
|
||||
))}
|
||||
</>
|
||||
)}
|
||||
</HStack>
|
||||
</VStack>
|
||||
|
||||
{/* 右侧信息栏 */}
|
||||
<VStack align="end" spacing={1} minW="100px">
|
||||
<Text fontSize="xs" color="gray.500">
|
||||
{event.view_count}
|
||||
{event.created_at ? new Date(event.created_at).toLocaleDateString('zh-CN', {
|
||||
year: 'numeric',
|
||||
month: '2-digit',
|
||||
day: '2-digit'
|
||||
}) : ''}
|
||||
</Text>
|
||||
</HStack>
|
||||
<HStack spacing={3}>
|
||||
{event.view_count !== undefined && (
|
||||
<HStack spacing={1}>
|
||||
<Icon as={FaEye} boxSize={3} color="gray.400" />
|
||||
<Text fontSize="xs" color="gray.500">{event.view_count}</Text>
|
||||
</HStack>
|
||||
)}
|
||||
{event.hot_score !== undefined && (
|
||||
<HStack spacing={1}>
|
||||
<Icon as={FaFire} boxSize={3} color="orange.400" />
|
||||
<Text fontSize="xs" color="gray.500">{event.hot_score.toFixed(1)}</Text>
|
||||
</HStack>
|
||||
)}
|
||||
</HStack>
|
||||
{event.creator && (
|
||||
<Text fontSize="xs" color="gray.400">
|
||||
@{event.creator.username}
|
||||
</Text>
|
||||
)}
|
||||
</VStack>
|
||||
</HStack>
|
||||
|
||||
{/* 描述 */}
|
||||
{event.description && (
|
||||
<Text fontSize="sm" color="gray.700" lineHeight="1.6">
|
||||
{event.description}
|
||||
</Text>
|
||||
)}
|
||||
|
||||
{/* 收益率数据 */}
|
||||
{(event.related_avg_chg !== null || event.related_max_chg !== null || event.related_week_chg !== null) && (
|
||||
<Box pt={2} borderTop="1px" borderColor="gray.200">
|
||||
<HStack spacing={6} flexWrap="wrap">
|
||||
<HStack spacing={1}>
|
||||
<Icon as={FaChartLine} boxSize={3} color="gray.500" />
|
||||
<Text fontSize="xs" color="gray.500" fontWeight="medium">相关涨跌:</Text>
|
||||
</HStack>
|
||||
{event.related_avg_chg !== null && event.related_avg_chg !== undefined && (
|
||||
<HStack spacing={1}>
|
||||
<Text fontSize="xs" color="gray.500">平均</Text>
|
||||
<Text
|
||||
fontSize="sm"
|
||||
fontWeight="bold"
|
||||
color={event.related_avg_chg > 0 ? 'red.500' : 'green.500'}
|
||||
>
|
||||
{event.related_avg_chg > 0 ? '+' : ''}{event.related_avg_chg.toFixed(2)}%
|
||||
</Text>
|
||||
</HStack>
|
||||
)}
|
||||
{event.related_max_chg !== null && event.related_max_chg !== undefined && (
|
||||
<HStack spacing={1}>
|
||||
<Text fontSize="xs" color="gray.500">最大</Text>
|
||||
<Text
|
||||
fontSize="sm"
|
||||
fontWeight="bold"
|
||||
color={event.related_max_chg > 0 ? 'red.500' : 'green.500'}
|
||||
>
|
||||
{event.related_max_chg > 0 ? '+' : ''}{event.related_max_chg.toFixed(2)}%
|
||||
</Text>
|
||||
</HStack>
|
||||
)}
|
||||
{event.related_week_chg !== null && event.related_week_chg !== undefined && (
|
||||
<HStack spacing={1}>
|
||||
<Text fontSize="xs" color="gray.500">周</Text>
|
||||
<Text
|
||||
fontSize="sm"
|
||||
fontWeight="bold"
|
||||
color={event.related_week_chg > 0 ? 'red.500' : 'green.500'}
|
||||
>
|
||||
{event.related_week_chg > 0 ? '+' : ''}{event.related_week_chg.toFixed(2)}%
|
||||
</Text>
|
||||
</HStack>
|
||||
)}
|
||||
</HStack>
|
||||
</Box>
|
||||
)}
|
||||
</VStack>
|
||||
</HStack>
|
||||
</CardBody>
|
||||
</Card>
|
||||
);
|
||||
})}
|
||||
</VStack>
|
||||
|
||||
{event.description && (
|
||||
<Text fontSize="sm" color="gray.600" noOfLines={2}>
|
||||
{event.description}
|
||||
</Text>
|
||||
)}
|
||||
{/* 分页控件 */}
|
||||
{newsPagination.pages > 1 && (
|
||||
<Box pt={4}>
|
||||
<HStack justify="space-between" align="center" flexWrap="wrap">
|
||||
{/* 分页信息 */}
|
||||
<Text fontSize="sm" color="gray.600">
|
||||
第 {newsPagination.page} / {newsPagination.pages} 页
|
||||
</Text>
|
||||
|
||||
{(event.related_avg_chg !== null || event.related_max_chg !== null || event.related_week_chg !== null) && (
|
||||
<HStack spacing={4} pt={2} borderTop="1px" borderColor="gray.200">
|
||||
<Text fontSize="xs" color="gray.500">相关涨跌:</Text>
|
||||
{event.related_avg_chg !== null && event.related_avg_chg !== undefined && (
|
||||
<HStack spacing={1}>
|
||||
<Text fontSize="xs" color="gray.500">平均:</Text>
|
||||
<Text
|
||||
fontSize="xs"
|
||||
fontWeight="bold"
|
||||
color={event.related_avg_chg > 0 ? 'red.500' : 'green.500'}
|
||||
>
|
||||
{event.related_avg_chg > 0 ? '+' : ''}{event.related_avg_chg}%
|
||||
</Text>
|
||||
</HStack>
|
||||
)}
|
||||
{event.related_max_chg !== null && event.related_max_chg !== undefined && (
|
||||
<HStack spacing={1}>
|
||||
<Text fontSize="xs" color="gray.500">最大:</Text>
|
||||
<Text
|
||||
fontSize="xs"
|
||||
fontWeight="bold"
|
||||
color={event.related_max_chg > 0 ? 'red.500' : 'green.500'}
|
||||
>
|
||||
{event.related_max_chg > 0 ? '+' : ''}{event.related_max_chg}%
|
||||
</Text>
|
||||
</HStack>
|
||||
)}
|
||||
{event.related_week_chg !== null && event.related_week_chg !== undefined && (
|
||||
<HStack spacing={1}>
|
||||
<Text fontSize="xs" color="gray.500">周涨幅:</Text>
|
||||
<Text
|
||||
fontSize="xs"
|
||||
fontWeight="bold"
|
||||
color={event.related_week_chg > 0 ? 'red.500' : 'green.500'}
|
||||
>
|
||||
{event.related_week_chg > 0 ? '+' : ''}{event.related_week_chg}%
|
||||
</Text>
|
||||
</HStack>
|
||||
)}
|
||||
</HStack>
|
||||
)}
|
||||
</VStack>
|
||||
</CardBody>
|
||||
</Card>
|
||||
);
|
||||
})}
|
||||
</VStack>
|
||||
) : (
|
||||
<Center h="300px">
|
||||
<VStack spacing={3}>
|
||||
<Icon as={FaNewspaper} boxSize={16} color="gray.300" />
|
||||
<Text color="gray.500">暂无相关新闻</Text>
|
||||
<Text fontSize="sm" color="gray.400">
|
||||
{newsSearchQuery ? '尝试修改搜索关键词' : '该公司暂无新闻动态'}
|
||||
</Text>
|
||||
</VStack>
|
||||
</Center>
|
||||
)}
|
||||
</VStack>
|
||||
</CardBody>
|
||||
</Card>
|
||||
{/* 分页按钮 */}
|
||||
<HStack spacing={2}>
|
||||
<Button
|
||||
size="sm"
|
||||
onClick={() => handleNewsPageChange(1)}
|
||||
isDisabled={!newsPagination.has_prev || newsLoading}
|
||||
leftIcon={<Icon as={FaChevronLeft} />}
|
||||
>
|
||||
首页
|
||||
</Button>
|
||||
<Button
|
||||
size="sm"
|
||||
onClick={() => handleNewsPageChange(newsPagination.page - 1)}
|
||||
isDisabled={!newsPagination.has_prev || newsLoading}
|
||||
>
|
||||
上一页
|
||||
</Button>
|
||||
|
||||
{/* 页码按钮 */}
|
||||
{(() => {
|
||||
const currentPage = newsPagination.page;
|
||||
const totalPages = newsPagination.pages;
|
||||
const pageButtons = [];
|
||||
|
||||
// 显示当前页及前后各2页
|
||||
let startPage = Math.max(1, currentPage - 2);
|
||||
let endPage = Math.min(totalPages, currentPage + 2);
|
||||
|
||||
// 如果开始页大于1,显示省略号
|
||||
if (startPage > 1) {
|
||||
pageButtons.push(
|
||||
<Text key="start-ellipsis" fontSize="sm" color="gray.400">...</Text>
|
||||
);
|
||||
}
|
||||
|
||||
for (let i = startPage; i <= endPage; i++) {
|
||||
pageButtons.push(
|
||||
<Button
|
||||
key={i}
|
||||
size="sm"
|
||||
variant={i === currentPage ? 'solid' : 'outline'}
|
||||
colorScheme={i === currentPage ? 'blue' : 'gray'}
|
||||
onClick={() => handleNewsPageChange(i)}
|
||||
isDisabled={newsLoading}
|
||||
>
|
||||
{i}
|
||||
</Button>
|
||||
);
|
||||
}
|
||||
|
||||
// 如果结束页小于总页数,显示省略号
|
||||
if (endPage < totalPages) {
|
||||
pageButtons.push(
|
||||
<Text key="end-ellipsis" fontSize="sm" color="gray.400">...</Text>
|
||||
);
|
||||
}
|
||||
|
||||
return pageButtons;
|
||||
})()}
|
||||
|
||||
<Button
|
||||
size="sm"
|
||||
onClick={() => handleNewsPageChange(newsPagination.page + 1)}
|
||||
isDisabled={!newsPagination.has_next || newsLoading}
|
||||
>
|
||||
下一页
|
||||
</Button>
|
||||
<Button
|
||||
size="sm"
|
||||
onClick={() => handleNewsPageChange(newsPagination.pages)}
|
||||
isDisabled={!newsPagination.has_next || newsLoading}
|
||||
rightIcon={<Icon as={FaChevronRight} />}
|
||||
>
|
||||
末页
|
||||
</Button>
|
||||
</HStack>
|
||||
</HStack>
|
||||
</Box>
|
||||
)}
|
||||
</>
|
||||
) : (
|
||||
<Center h="400px">
|
||||
<VStack spacing={3}>
|
||||
<Icon as={FaNewspaper} boxSize={16} color="gray.300" />
|
||||
<Text color="gray.500" fontSize="lg" fontWeight="medium">暂无相关新闻</Text>
|
||||
<Text fontSize="sm" color="gray.400">
|
||||
{newsSearchQuery ? '尝试修改搜索关键词' : '该公司暂无新闻动态'}
|
||||
</Text>
|
||||
</VStack>
|
||||
</Center>
|
||||
)}
|
||||
</VStack>
|
||||
</CardBody>
|
||||
</Card>
|
||||
</VStack>
|
||||
</TabPanel>
|
||||
</TabPanels>
|
||||
</Tabs>
|
||||
|
||||
Reference in New Issue
Block a user