From 4aac5588e388d28eab190fcafc5bd934f78d1db4 Mon Sep 17 00:00:00 2001 From: Phoenix <64720302+Concur-max@users.noreply.github.com> Date: Fri, 23 May 2025 10:53:05 +0800 Subject: [PATCH] =?UTF-8?q?=E7=A7=BB=E9=99=A4=E9=94=99=E8=AF=AF=E4=BF=A1?= =?UTF-8?q?=E6=81=AF=E7=9A=84=E5=85=B7=E4=BD=93=E6=8F=8F=E8=BF=B0=EF=BC=8C?= =?UTF-8?q?=E7=AE=80=E5=8C=96=E9=94=99=E8=AF=AF=E5=93=8D=E5=BA=94=E5=86=85?= =?UTF-8?q?=E5=AE=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/server.js b/server.js index d7803fc..d34f2e1 100644 --- a/server.js +++ b/server.js @@ -6,7 +6,6 @@ const cors = require('cors'); const app = express(); const PORT = 3213; -// 引入并使用cors中间件,允许所有跨域访问 app.use(cors()); app.get('/api/minm/open', async (req, res) => { @@ -50,7 +49,6 @@ app.get('/api/minm/open', async (req, res) => { res.json({ Open: openValue, Volume: volumeValue, DaysRange: daysRangeValue, Week52Range: week52RangeValue, MarketCap: marketCapValue, change: changeValue }); } else { res.status(404).json({ - error: '未找到全部数据', Open: openValue, Volume: volumeValue, DaysRange: daysRangeValue, @@ -60,7 +58,7 @@ app.get('/api/minm/open', async (req, res) => { }); } } catch (err) { - res.status(500).json({ error: '请求或解析失败', detail: err.message }); + res.status(500).json({ error: '', detail: err.message }); } });