在给后端传值时获取不到wx.setstorage()中的值
发布于 6 年前 作者 yyi 644 次浏览 来自 问答

在给后端传值时获取不到wx.setstorage()中的值

2 回复

for (var i = 0; i < that.data.arrayy.length; i++) {

if (i == e.target.dataset.in) {

wx.setStorage({

key: ‘indexchande’,

data: {

time: that.data.arrayy[i].pay_time,

address1: that.data.arrayy[i].address2,

address: that.data.arrayy[i].address2,

mid: that.data.arrayy[i].mid,

local:that.data.local

取值

wx.getStorage({

key: ‘indexchande’,

success: function (res) {

that.setData({

time: res.data.time,

address: res.data.address,

address1: res.data.address1,

mid: res.data.mid

});

that.listsa(1, res.data.local)

怎么设置的 缓存,然后怎么取的缓存,贴下代码

回到顶部