Browse Source

调整请求方法

lite
453530270@qq.com 3 years ago
parent
commit
915b805ccd
  1. 5
      src/utils/request.js

5
src/utils/request.js

@ -6,12 +6,11 @@ import axios from 'axios'
const service = axios.create({
// baseURL: 'http://btgym.xingtongworld.com/', // 所有的请求地址前缀部分
baseURL: publicConfig.BASE_API,
//baseURL:ahost,
timeout: 60000, // 请求超时时间毫秒
withCredentials: true, // 异步请求携带cookie
withCredentials: false, // 异步请求携带cookie
headers: {
// 设置后端需要的传参类型
'Content-Type': 'application/json',
'Content-Type': 'application/json;charset=utf-8',
},
})

Loading…
Cancel
Save