axios|axios 拦截器统一在接口增加时间戳参数,防止走缓存。

request.interceptors.request.use( config => { if (config.method == 'post') { config.data = https://www.it610.com/article/{ ...config.data, _t: Date.parse(new Date()) / 1000 } } else if (config.method =='get') { config.params = { _t: Date.parse(new Date()) / 1000, ...config.params } } return config }, function (error) { return Promise.reject(error) } )

    推荐阅读