update pay ui
This commit is contained in:
@@ -6,6 +6,7 @@ import React, { useEffect, useRef, useState, useMemo } from 'react';
|
||||
import { Box, Spinner, Center, Text } from '@chakra-ui/react';
|
||||
import * as echarts from 'echarts';
|
||||
import type { ECharts, EChartsOption } from 'echarts';
|
||||
import { getApiBase } from '@utils/apiConfig';
|
||||
|
||||
import type { MiniTimelineChartProps, TimelineDataPoint } from '../types';
|
||||
|
||||
@@ -82,8 +83,8 @@ const MiniTimelineChart: React.FC<MiniTimelineChartProps> = ({
|
||||
|
||||
try {
|
||||
const apiPath = isIndex
|
||||
? `/api/index/${code}/kline?type=minute`
|
||||
: `/api/stock/${code}/kline?type=minute`;
|
||||
? `${getApiBase()}/api/index/${code}/kline?type=minute`
|
||||
: `${getApiBase()}/api/stock/${code}/kline?type=minute`;
|
||||
|
||||
const response = await fetch(apiPath);
|
||||
const result: KLineApiResponse = await response.json();
|
||||
|
||||
@@ -180,7 +180,7 @@ const StockOverview = () => {
|
||||
const fetchTopConcepts = async (date = null) => {
|
||||
setLoadingConcepts(true);
|
||||
try {
|
||||
const url = date ? `/api/concepts/daily-top?limit=6&date=${date}` : '/api/concepts/daily-top?limit=6';
|
||||
const url = date ? `${getApiBase()}/api/concepts/daily-top?limit=6&date=${date}` : `${getApiBase()}/api/concepts/daily-top?limit=6`;
|
||||
const response = await fetch(url);
|
||||
const data = await response.json();
|
||||
|
||||
@@ -223,7 +223,7 @@ const StockOverview = () => {
|
||||
const fetchHeatmapData = async (date = null) => {
|
||||
setLoadingHeatmap(true);
|
||||
try {
|
||||
const url = date ? `/api/market/heatmap?limit=500&date=${date}` : '/api/market/heatmap?limit=500';
|
||||
const url = date ? `${getApiBase()}/api/market/heatmap?limit=500&date=${date}` : `${getApiBase()}/api/market/heatmap?limit=500`;
|
||||
const response = await fetch(url);
|
||||
const data = await response.json();
|
||||
|
||||
@@ -255,7 +255,7 @@ const StockOverview = () => {
|
||||
// 获取市场统计数据
|
||||
const fetchMarketStats = async (date = null) => {
|
||||
try {
|
||||
const url = date ? `/api/market/statistics?date=${date}` : '/api/market/statistics';
|
||||
const url = date ? `${getApiBase()}/api/market/statistics?date=${date}` : `${getApiBase()}/api/market/statistics`;
|
||||
const response = await fetch(url);
|
||||
const data = await response.json();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user