| | |
| | | import { ELocalStorageKey, ERouterName, EUserType } from '/@/types/enums' |
| | | export * from './type' |
| | | |
| | | const { baseUrl: { apiBaseUrl } } = window.globalApiConfig |
| | | |
| | | const REQUEST_ID = 'X-Request-Id' |
| | | function getAuthToken () { |
| | | return localStorage.getItem(ELocalStorageKey.Token) |
| | | } |
| | | console.log(import.meta.env.VITE_BASE_API, 'request.ts') |
| | | const instance = axios.create({ |
| | | // withCredentials: true, |
| | | headers: { |
| | | 'Content-Type': 'application/json', |
| | | }, |
| | | baseURL: import.meta.env.VITE_BASE_API, |
| | | baseURL: apiBaseUrl || import.meta.env.VITE_BASE_API, |
| | | // timeout: 12000, |
| | | }) |
| | | |