This commit is contained in:
zlwu committed 2026-06-10 22:59:34 +08:00
1 parent 725774ef0c
commit c3be9d1dce
176 files changed
+41925 -6342

No files matched your search

+2 -4
View File
@@ -5,6 +5,7 @@
import axios, { type AxiosRequestConfig, type InternalAxiosRequestConfig } from 'axios'
import { ElMessage } from 'element-plus'
import { useUserStore } from '@/store/modules/user'
import { applyPortalAuthHeader } from '@/utils/http/portal-auth'
export interface BxApiResponse<T = unknown> {
code: number
@@ -19,10 +20,7 @@ const bxAxios = axios.create({
})
bxAxios.interceptors.request.use((config: InternalAxiosRequestConfig) => {
const token = useUserStore().accessToken
if (token) {
config.headers.Authorization = `Bearer ${token}`
}
applyPortalAuthHeader(config)
return config
})