update pay ui

This commit is contained in:
2025-12-13 16:30:50 +08:00
parent ed9d49da01
commit 4ccd43f025
17 changed files with 67 additions and 43 deletions

View File

@@ -3,6 +3,7 @@
import { useState, useEffect, useCallback, useRef } from 'react';
import { logger } from '../utils/logger';
import { getApiBase } from '../utils/apiConfig';
// 交易日数据会从后端获取,这里只做时间判断
const TRADING_SESSIONS = [
@@ -29,7 +30,7 @@ const isInTradingSession = () => {
*/
const fetchIndexRealtime = async (indexCode) => {
try {
const response = await fetch(`/api/index/${indexCode}/realtime`);
const response = await fetch(`${getApiBase()}/api/index/${indexCode}/realtime`);
if (!response.ok) {
throw new Error(`HTTP error! status: ${response.status}`);
}