标签:== ken function urlencode www env ISE default enc
import axios from 'axios'
axios.defaults.headers.post['Content-Type'] =
'application/x-www-form-urlencoded'
// axios.defaults.baseURL = process.env.NODE_ENV === 'production' ? 'https://gitee.com' : '/apk' //配置url
axios.interceptors.request.use(config => {
//参数和header配置
return config
})
axios.interceptors.response.use(
function (response) {
//token过时判断等
return response
},
function (error) {
// Do something with request error
return Promise.reject(error)
}
)
export default axios
标签:== ken function urlencode www env ISE default enc
原文地址:https://www.cnblogs.com/ak-b/p/10566810.html