From 9dc01eeb46279888fd70032444377851d998bc90 Mon Sep 17 00:00:00 2001 From: dmy Date: Thu, 15 Jan 2026 23:31:05 +0800 Subject: [PATCH] fix(api): increase request timeout and format latest update date - Update API request timeout from 60 seconds to 120 seconds for improved performance. - Format latest update date to append 'Z' if it exists, ensuring consistency in date handling. --- frontend/src/utils/api.ts | 2 +- src/bids/services/bid.service.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/src/utils/api.ts b/frontend/src/utils/api.ts index ffa8e6d..17a31bc 100644 --- a/frontend/src/utils/api.ts +++ b/frontend/src/utils/api.ts @@ -6,7 +6,7 @@ import axios from 'axios' */ const api = axios.create({ baseURL: 'http://localhost:3000', // 设置后端服务地址 - timeout: 60000, // 请求超时时间(60秒) + timeout: 120000, // 请求超时时间(120秒) }) // 请求拦截器 diff --git a/src/bids/services/bid.service.ts b/src/bids/services/bid.service.ts index 98fc096..b32e7cc 100644 --- a/src/bids/services/bid.service.ts +++ b/src/bids/services/bid.service.ts @@ -180,7 +180,7 @@ export class BidsService { return results.map((item) => ({ source: String(item.source), count: Number(item.count), - latestUpdate: item.latestUpdate, + latestUpdate: item.latestUpdate ? item.latestUpdate + 'Z' : null, latestPublishDate: item.latestPublishDate, // 确保 error 字段正确处理:null 或空字符串都转换为 null,非空字符串保留 error: