refactor: 集中管理配置常量并优化样式一致性

This commit is contained in:
zhang1106
2026-03-06 14:39:52 +08:00
parent 0cd0107008
commit 885ac47fd2
19 changed files with 348 additions and 64 deletions
+3 -4
View File
@@ -1,10 +1,9 @@
import axios from 'axios';
const API_BASE_URL = '/api';
import { API_CONFIG } from '../config/api';
const api = axios.create({
baseURL: API_BASE_URL,
timeout: 30000,
baseURL: API_CONFIG.baseURL,
timeout: API_CONFIG.timeout,
headers: {
'Content-Type': 'application/json',
},