wx.request 清除缓存

发布于 8 年前作者 xielei1054 次浏览最后编辑 8 年前来自 ask

wx.request

({

url: https://px…’,

data: ‘access_token=’ + access_token+‘&pagesize=’+ pagesize+ ‘&pageindex=’

  • pageindex + ‘&planFlag=’ + 0 + “&isMobile=” + 1 ,

//sjs加个随机参数为了清除缓存,+ “&sjs=”+(new Date()).getTime()

method: “post”,

header:

{

//json格式请求

// ‘Content-Type’: ‘application/json’

‘Content-Type’: ‘application/x-www-form-urlencoded’,

‘Cookie’: sessionStr,

},

success: function (res) {

}

,

fail: function (res) {

}

})

这样的请求,当我刷新的时候所有的数据都还是原来一样,在网上找资料多加参数“&sjs=”+(new Date()).getTime()依旧无法刷新新的数据!这个缓存该怎么清除…

1 回复
tao66
tao661 楼6 年前

已经变更,服务器只有一台,服务器也没有cache