From ae1a562bcb9455acd391906cfd92a6a62ed0f1fc Mon Sep 17 00:00:00 2001 From: qibin <1134087124@qq.com> Date: Sat, 31 May 2025 21:21:33 +0800 Subject: [PATCH] fixbug --- src/store/stock-quote/index.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/store/stock-quote/index.js b/src/store/stock-quote/index.js index 77ca7fe..239d046 100644 --- a/src/store/stock-quote/index.js +++ b/src/store/stock-quote/index.js @@ -48,13 +48,13 @@ const getLastTradingDay = () => { if (dayOfWeek === 0) { // 周日 // 返回本周五16:00 - lastTradingDay = now.day(-2).hour(16).minute(0).second(0).millisecond(0) + lastTradingDay = now.day(5).hour(16).minute(0).second(0).millisecond(0) } else if (dayOfWeek === 6) { // 周六 // 返回本周五16:00 - lastTradingDay = now.day(-1).hour(16).minute(0).second(0).millisecond(0) + lastTradingDay = now.day(5).hour(16).minute(0).second(0).millisecond(0); } else if (dayOfWeek === 1 && isBeforeClose) { // 周一16:00前 - // 返回上周五16:00 - lastTradingDay = now.day(-2).hour(16).minute(0).second(0).millisecond(0) + // 返回上周五16:00,使用 subtract 方法减去 3 天 + lastTradingDay = now.subtract(3, 'day').hour(16).minute(0).second(0).millisecond(0) } else if (isBeforeClose) { // 工作日16:00前 // 返回前一天16:00 lastTradingDay = now.subtract(1, 'day').hour(16).minute(0).second(0).millisecond(0)