前言
如题
代码
// 默认请求地址
Axios.defaults.baseURL = baseURL
// 超时时间
Axios.defaults.timeout = 5000
// 允许携带cookie请求
Axios.defaults.withCredentials = true
// 请求格式及编码
Axios.defaults.headers.post['Content-Type'] = 'application/x-www-form-urlencoded; charset=UTF-8'