From fdd58634e605cfd14e55c9e0e91c7d71d72b8f50 Mon Sep 17 00:00:00 2001 From: zzlgreat Date: Thu, 20 Nov 2025 15:24:57 +0800 Subject: [PATCH 1/3] update pay function --- src/views/DataBrowser/TradingViewChart.tsx | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/src/views/DataBrowser/TradingViewChart.tsx b/src/views/DataBrowser/TradingViewChart.tsx index 598d3f06..a26b2cc9 100644 --- a/src/views/DataBrowser/TradingViewChart.tsx +++ b/src/views/DataBrowser/TradingViewChart.tsx @@ -118,14 +118,8 @@ const TradingViewChart: React.FC = ({ visible: true, }, localization: { - timeFormatter: (time: any) => { - // 格式化时间显示 - const date = new Date(time * 1000); - const year = date.getFullYear(); - const month = String(date.getMonth() + 1).padStart(2, '0'); - const day = String(date.getDate()).padStart(2, '0'); - return `${year}-${month}-${day}`; - }, + locale: 'zh-CN', + dateFormat: 'yyyy-MM-dd', }, handleScroll: { mouseWheel: true, @@ -174,9 +168,6 @@ const TradingViewChart: React.FC = ({ return timeA - timeB; }); - console.log('📊 转换后的图表数据(前3条):', chartData.slice(0, 3)); - console.log('📊 数据总数:', chartData.length); - // 设置数据 lineSeries.setData(chartData); From 0818eeedf1a0ad59b586520e295c6d12e05de038 Mon Sep 17 00:00:00 2001 From: zzlgreat Date: Thu, 20 Nov 2025 15:34:10 +0800 Subject: [PATCH 2/3] update pay function --- src/bytedesk-integration/config/bytedesk.config.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/bytedesk-integration/config/bytedesk.config.js b/src/bytedesk-integration/config/bytedesk.config.js index 727123ff..af1a008d 100644 --- a/src/bytedesk-integration/config/bytedesk.config.js +++ b/src/bytedesk-integration/config/bytedesk.config.js @@ -44,9 +44,9 @@ export const bytedeskConfig = { // 聊天配置(必需) chatConfig: { - org: df_org_uid, // 组织ID + org: process.env.REACT_APP_BYTEDESK_ORG || 'df_org_uid', // 组织ID t: '1', // 类型: 1=人工客服, 2=机器人 - sid: df_wg_uid, // 工作组ID + sid: process.env.REACT_APP_BYTEDESK_SID || 'df_wg_uid', // 工作组ID }, }; From 6b9291a4f939afe3f327c672485311b57530f88d Mon Sep 17 00:00:00 2001 From: zzlgreat Date: Thu, 20 Nov 2025 15:44:57 +0800 Subject: [PATCH 3/3] update pay function --- src/views/DataBrowser/TradingViewChart.tsx | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/src/views/DataBrowser/TradingViewChart.tsx b/src/views/DataBrowser/TradingViewChart.tsx index a26b2cc9..336d0756 100644 --- a/src/views/DataBrowser/TradingViewChart.tsx +++ b/src/views/DataBrowser/TradingViewChart.tsx @@ -110,16 +110,27 @@ const TradingViewChart: React.FC = ({ timeVisible: true, secondsVisible: false, rightOffset: 12, - barSpacing: 3, + barSpacing: 6, // 增加条形间距,减少拥挤 fixLeftEdge: false, lockVisibleTimeRangeOnResize: true, rightBarStaysOnScroll: true, borderVisible: true, visible: true, + // 控制时间标签的最小间距(像素) + tickMarkMaxCharacterLength: 8, }, localization: { locale: 'zh-CN', - dateFormat: 'yyyy-MM-dd', + // 自定义时间格式化,根据时间范围智能显示 + timeFormatter: (time) => { + const date = new Date(time); + const year = date.getFullYear(); + const month = String(date.getMonth() + 1).padStart(2, '0'); + const day = String(date.getDate()).padStart(2, '0'); + + // 只显示年-月-日,简洁明了 + return `${year}-${month}-${day}`; + }, }, handleScroll: { mouseWheel: true,