收藏
回答

wx.request 清除缓存

框架类型 问题类型 API/组件名称 终端类型 操作系统 微信版本 基础库版本
小程序 Bug wx.request 微信iOS客户端 6.6.6 2.0.0

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 个回答

  • Mr. Sun²º¹⁹
    Mr. Sun²º¹⁹
    2018-04-25



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

    2018-04-25
    有用
    回复
登录 后发表内容