场景
当请求后端接口参数一样时,ie浏览器会自动读取接口的缓存数据,导致数据不能实时回显到的页面上
解决方法:
在axios中参数加入时间戳,是每次调用接口的是参数不一致
get方式:
this.$axios({methods:'get',url:"",params:{date:Date.parse(new Date()) //加入时间戳}})
post方式:
this.$axios({method:'post',url:"",params:{date:Date.parse(new Date()) //将时间戳拼接到url后边},data:{}})