第 1 阶段:用户与认证, mock登陆ok

This commit is contained in:
yml
2026-05-22 15:21:36 +08:00
parent 8e7f1f17f0
commit 9a79603e10
21 changed files with 780 additions and 4 deletions
+8
View File
@@ -4,3 +4,11 @@ export const apiClient = axios.create({
baseURL: '/api',
timeout: 10000,
})
apiClient.interceptors.request.use((config) => {
const token = localStorage.getItem('access_token')
if (token) {
config.headers.Authorization = `Bearer ${token}`
}
return config
})