ie中各种兼容问题

191 阅读1分钟

ie中各种兼容问题

1. babel-pollyfill

2. get请求缓存中获取问题使用axios拦截

        axiosIns.interceptors.request.use(config=>{
         if (config.method === 'get') {
             config.params = {
               t: Date.parse(new Date()) / 1000,
              ...config.params
            }
          }
          return config
       })

3. 时间的格式化

后台返回格式为‘-’连接,chrome能解析。ie不行
需要获取的时间+ .replace(/-/g, "/")

4. 地址需要拼接中文时,要将中文进行encodeURIComponent编码