This commit is contained in:
张良(004796)
2024-03-27 17:40:44 +08:00
parent 8df204e8cd
commit dc7fb6e059
17 changed files with 420 additions and 27 deletions

14
src/utils/request.js Normal file
View File

@@ -0,0 +1,14 @@
import axios from 'axios'
axios.defaults.headers['Content-Type'] = 'application/json;charset=utf-8'
// 对应国际化资源文件后缀
axios.defaults.headers['Content-Language'] = 'zh_CN'
// 创建axios实例
const service = axios.create({
// axios中请求配置有baseURL选项表示请求URL公共部分
// baseURL: process.env.VUE_APP_BASE_API,
// 超时
timeout: 10000
})
export default service