feat: 更新部署配置和API类型定义
将部署配置更改为生产环境服务器设置 将AxiosRequestConfig替换为InternalAxiosRequestConfig
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import axios, { type AxiosRequestConfig, type AxiosError } from 'axios';
|
||||
import axios, { type InternalAxiosRequestConfig, type AxiosError } from 'axios';
|
||||
|
||||
/**
|
||||
* API配置
|
||||
@@ -12,7 +12,7 @@ const api = axios.create({
|
||||
|
||||
// 请求拦截器
|
||||
api.interceptors.request.use(
|
||||
(config: AxiosRequestConfig) => {
|
||||
(config: InternalAxiosRequestConfig) => {
|
||||
// 如果 baseURL 不是 localhost,自动添加 API Key
|
||||
const baseURL =
|
||||
(config.baseURL as string) ||
|
||||
|
||||
Reference in New Issue
Block a user