refactor(http): 重构 HTTP 请求模块使用 axios 替代 fetch

- 替换 fetch 为 axios 以提供更好的请求拦截和错误处理能力
- 添加请求拦截器自动处理 Authorization 头和时间戳
- 实现响应拦截器统一处理业务错误码和状态码
- 优化错误提示和认证失败后的跳转逻辑
- 新增 await-to-js 和 axios 依赖
This commit is contained in:
houakang
2026-04-10 10:05:54 +08:00
parent 22fe6e069c
commit d7d089cc2a
3 changed files with 137 additions and 42 deletions

View File

@@ -45,6 +45,8 @@
"element-plus": "^2.13.6",
"pinia": "^3.0.4",
"vue": "^3.5.32",
"vue-router": "^4.6.4"
"vue-router": "^4.6.4",
"await-to-js": "^3.0.0",
"axios": "^1.13.2"
}
}