prod
校文 2 years ago
parent d0d6da191e
commit e7a3ef9704

@ -24,6 +24,7 @@ function filterRequestData(obj) {
//创建axios的实例
const httpService = axios.create({
baseURL: 'http://cloud.sws010.com',// TODO:具体的配置可以根据项目情况而来
// withCredentials: true
// timeout: 5000
})
@ -32,7 +33,8 @@ httpService.interceptors.request.use(config => {
// 请求成功处理
// if(localStorage.getItem('token')){//判断浏览器中的cookie中是否存在项目的token
// config.headers.token = localStorage.getItem('token')
// }
// }\
config.withCredentials = true;
const rqParams = filterRequestData(config.params);
const rqData = filterRequestData(config.data);
// post 'Content-Type' === 'application/x-www-form-urlencoded'

Loading…
Cancel
Save