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.
This commit is contained in:
dmy
2026-01-15 23:31:05 +08:00
parent 811ad927f3
commit 9dc01eeb46
2 changed files with 2 additions and 2 deletions

View File

@@ -6,7 +6,7 @@ import axios from 'axios'
*/ */
const api = axios.create({ const api = axios.create({
baseURL: 'http://localhost:3000', // 设置后端服务地址 baseURL: 'http://localhost:3000', // 设置后端服务地址
timeout: 60000, // 请求超时时间(60秒 timeout: 120000, // 请求超时时间(120秒
}) })
// 请求拦截器 // 请求拦截器

View File

@@ -180,7 +180,7 @@ export class BidsService {
return results.map((item) => ({ return results.map((item) => ({
source: String(item.source), source: String(item.source),
count: Number(item.count), count: Number(item.count),
latestUpdate: item.latestUpdate, latestUpdate: item.latestUpdate ? item.latestUpdate + 'Z' : null,
latestPublishDate: item.latestPublishDate, latestPublishDate: item.latestPublishDate,
// 确保 error 字段正确处理null 或空字符串都转换为 null非空字符串保留 // 确保 error 字段正确处理null 或空字符串都转换为 null非空字符串保留
error: error: