存在可能没有对请求进行缓存的情况?
发布于 5 年前 作者 changjie 3053 次浏览 来自 官方Issues

使用微信开发工具性能调试出现这种问题,怎么解决对同样的请求进行缓存

powerRefresh: function () {

var that = this;

//提交到服务器

wx.request({

url: that.data.apiUrl + ‘/WxPower.action’,//后端接口地址,需要改成自己的接口地址

data: {

IMEI: that.data.IMEI,

openid: app.globalData.openid,

},

method: ‘GET’,

success: function (res) {//后端返回数据

console.log(res.data);

var tmp = res.data;

that.setData({

powerlist: tmp,

})

},

fail: function (res) {

console.log(res.data);

console.log(‘is failed’)

}

})

},

1 回复
回到顶部