Skip to content

Commit f4ebe61

Browse files
committed
优化股票价格显示格式
1 parent e0d3284 commit f4ebe61

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/services/stock.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ export async function getStockData(symbol: string): Promise<string> {
161161

162162
let text = `${quote?.name}: ${quote.current} (${isGrowing ? '📈' : '📉'}${quote.percent.toFixed(2)}%)`
163163
// 盘前数据
164-
if (quote.current_ext && quote.current !== quote.current_ext && market.status_id !== 5) {
164+
if (quote.current_ext && quote.percent_ext && quote.current !== quote.current_ext && market.status_id !== 5) {
165165
const isGrowing = quote.percent_ext > 0
166166
let extText = `盘前交易:${quote.current_ext} (${isGrowing ? '📈' : '📉'}${quote.percent_ext.toFixed(2)}%)`
167167
text = `${text}\n${extText}`

0 commit comments

Comments
 (0)