IE接口缓存

  config.headers['Pragma'] = 'no-cache';// 解决id缓存

 

const baseRequest = (config) => {
    config.headers = {
      Pragma: 'no-cache',
      ...authHeader()
    
  }
 
 
export default {
  get (url, params, config) {
    return baseRequest({
      method: 'get',
      url,
      params,
      ...config
    })
  },
  post (url, data, config) {
    return baseRequest({
      method: 'post',
      url,
      data,
      ...config
    })
  },
  put (url, data, config) {
    return baseRequest({
      method: 'put',
      url,
      data,
      ...config
    })
  },
  delete (url, data, config) {
    return baseRequest({
      method: 'delete',
      url,
      data,
      ...config
    })
  }
}

 

posted @ 2020-09-24 14:01  ThisCall  阅读(190)  评论(0编辑  收藏  举报