update pay ui
This commit is contained in:
@@ -358,6 +358,37 @@ export const stockService = {
|
||||
throw error;
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* 批量获取多只股票的K线数据
|
||||
* @param {string[]} stockCodes - 股票代码数组
|
||||
* @param {string} chartType - 图表类型 (timeline/daily)
|
||||
* @param {string} eventTime - 事件时间
|
||||
* @returns {Promise<Object>} { [stockCode]: data[] }
|
||||
*/
|
||||
getBatchKlineData: async (stockCodes, chartType = 'timeline', eventTime = null) => {
|
||||
try {
|
||||
const requestBody = {
|
||||
codes: stockCodes,
|
||||
type: chartType
|
||||
};
|
||||
if (eventTime) {
|
||||
requestBody.event_time = eventTime;
|
||||
}
|
||||
|
||||
logger.debug('stockService', '批量获取K线数据', { stockCount: stockCodes.length, chartType, eventTime });
|
||||
|
||||
const response = await apiRequest('/api/stock/batch-kline', {
|
||||
method: 'POST',
|
||||
body: JSON.stringify(requestBody)
|
||||
});
|
||||
|
||||
return response;
|
||||
} catch (error) {
|
||||
logger.error('stockService', 'getBatchKlineData', error, { stockCodes, chartType });
|
||||
throw error;
|
||||
}
|
||||
},
|
||||
getTransmissionChainAnalysis: async (eventId) => {
|
||||
return await apiRequest(`/api/events/${eventId}/transmission`);
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user