update pay ui

This commit is contained in:
2025-12-13 15:44:31 +08:00
parent 108204653a
commit ed9d49da01
6 changed files with 18 additions and 14 deletions

View File

@@ -21,6 +21,7 @@ import SimpleConceptCard from './SimpleConceptCard';
import DetailedConceptCard from './DetailedConceptCard';
import TradingDateInfo from './TradingDateInfo';
import { logger } from '@utils/logger';
import { getApiBase } from '@utils/apiConfig';
/**
* 相关概念区组件
@@ -109,13 +110,14 @@ const RelatedConceptsSection = ({
trade_date: formattedTradeDate
};
const apiUrl = `${getApiBase()}/concept-api/search`;
console.log('[RelatedConceptsSection] 发送请求', {
url: '/concept-api/search',
url: apiUrl,
requestBody
});
logger.debug('RelatedConceptsSection', '搜索概念', requestBody);
const response = await fetch('/concept-api/search', {
const response = await fetch(apiUrl, {
method: 'POST',
headers: {
'Content-Type': 'application/json',

View File

@@ -61,7 +61,7 @@ export const fetchCategoryTree = async (
): Promise<CategoryTreeResponse> => {
try {
const response = await fetch(
`/category-api/api/category-tree?source=${source}&max_depth=${maxDepth}`,
`${getApiBase()}/category-api/api/category-tree?source=${source}&max_depth=${maxDepth}`,
{
method: 'GET',
headers: {
@@ -98,7 +98,7 @@ export const fetchCategoryNode = async (
try {
const encodedPath = encodeURIComponent(path);
const response = await fetch(
`/category-api/api/category-tree/node?path=${encodedPath}&source=${source}&max_depth=${maxDepth}`,
`${getApiBase()}/category-api/api/category-tree/node?path=${encodedPath}&source=${source}&max_depth=${maxDepth}`,
{
method: 'GET',
headers: {
@@ -160,7 +160,7 @@ export const searchMetrics = async (
if (source) params.append('source', source);
if (frequency) params.append('frequency', frequency);
const response = await fetch(`/category-api/api/search?${params.toString()}`, {
const response = await fetch(`${getApiBase()}/category-api/api/search?${params.toString()}`, {
method: 'GET',
headers: {
'Content-Type': 'application/json',
@@ -261,7 +261,7 @@ export const fetchMetricData = async (
if (startDate) params.append('start_date', startDate);
if (endDate) params.append('end_date', endDate);
const response = await fetch(`/category-api/api/metric-data?${params.toString()}`, {
const response = await fetch(`${getApiBase()}/category-api/api/metric-data?${params.toString()}`, {
method: 'GET',
headers: {
'Content-Type': 'application/json',

View File

@@ -28,6 +28,7 @@ import {
import { AlertCircle, Clock, TrendingUp, Info, RefreshCw } from 'lucide-react';
import ReactECharts from 'echarts-for-react';
import { logger } from '@utils/logger';
import { getApiBase } from '@utils/apiConfig';
import { useIndexQuote } from '@hooks/useIndexQuote';
// 定义动画
@@ -77,7 +78,7 @@ const fetchIndexKline = async (indexCode) => {
*/
const fetchPopularConcepts = async () => {
try {
const response = await fetch('/concept-api/search', {
const response = await fetch(`${getApiBase()}/concept-api/search`, {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ query: '', size: 60, page: 1, sort_by: 'change_pct' })

View File

@@ -33,6 +33,7 @@ import { FaEye, FaExternalLinkAlt, FaChartLine, FaCalendarAlt } from 'react-icon
import dayjs from 'dayjs';
import tradingDayUtils from '../../../utils/tradingDayUtils'; // 引入交易日工具
import { logger } from '../../../utils/logger';
import { getApiBase } from '../../../utils/apiConfig';
import { PROFESSIONAL_COLORS } from '../../../constants/professionalTheme';
// 增强版 ConceptCard 组件 - 展示更多数据细节
@@ -347,7 +348,7 @@ const RelatedConcepts = ({ eventTitle, eventTime, eventId, loading: externalLoad
logger.debug('RelatedConcepts', '搜索概念', requestBody);
const response = await fetch('/concept-api/search', {
const response = await fetch(`${getApiBase()}/concept-api/search`, {
method: 'POST',
headers: {
'Content-Type': 'application/json',