wx.request 清除缓存
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()依旧无法刷新新的数据!这个缓存该怎么清除…