update pay ui

This commit is contained in:
2025-12-03 12:22:27 +08:00
parent 368af3f498
commit ae9904cd03

View File

@@ -126,9 +126,14 @@ export const useEventStocks = (eventId, eventTime, { autoLoad = true, autoLoadQu
// 自动加载行情数据(可通过 autoLoadQuotes 参数控制)
useEffect(() => {
if (stocks.length > 0 && autoLoadQuotes) {
refreshQuotes();
const codes = stocks.map(s => s.stock_code);
logger.debug('useEventStocks', '自动加载行情数据', {
stockCount: codes.length,
eventTime
});
dispatch(fetchStockQuotes({ codes, eventTime }));
}
}, [stocks.length, eventId, autoLoadQuotes]); // 注意:这里不依赖 refreshQuotes,避免重复请求
}, [stocks, eventTime, autoLoadQuotes, dispatch]); // 直接使用 stocks 而不是 refreshQuotes
// 计算股票行情合并数据
const stocksWithQuotes = useMemo(() => {