diff --git a/src/utils/request.js b/src/utils/request.js index 4b371dc..e51bf41 100644 --- a/src/utils/request.js +++ b/src/utils/request.js @@ -24,7 +24,7 @@ const instance = axios.create({ const tokenDomains = ['api.locyanfrp.cn', 'api-v2.locyanfrp.cn', 'localhost'] // post请求的时候,我们需要加上一个请求头,所以可以在这里进行一个默认的设置,即设置post的请求头为 -axios.defaults.headers.post['Content-Type'] = 'application/x-www-form-urlencoded;charset=UTF-8' +axios.defaults.headers.post['Content-Type'] = 'multipart/form-data;charset=UTF-8' // 添加请求拦截器 instance.interceptors.request.use( async (config) => {