- 小程序getStorage获取不到缓存的值
[代码]var[代码] [代码]id=that.data.course_id[代码][代码] [代码][代码]wx.setStorage({[代码][代码] [代码][代码]key:id,[代码][代码] [代码][代码]data:{[代码][代码] [代码][代码]id:that.data.course_id,[代码][代码] [代码][代码]score:that.data.score[代码][代码] [代码][代码]}[代码][代码] [代码][代码]})[代码][代码]onShow: [代码][代码]function[代码] [代码]() {[代码][代码] [代码][代码]var[代码] [代码]that=[代码][代码]this[代码][代码] [代码][代码]wx.getStorage({[代码][代码] [代码][代码]key:[代码][代码]'id'[代码][代码],[代码][代码] [代码][代码]success: [代码][代码]function[代码] [代码](res) {[代码][代码] [代码][代码]console.log([代码][代码]'s:'[代码] [代码]+ res.data)[代码][代码] [代码][代码]},[代码][代码] [代码][代码]fail:[代码][代码]function[代码][代码](res){[代码][代码] [代码][代码]console.log([代码][代码]'s:获取失败'[代码] [代码])[代码][代码] [代码][代码]}[代码][代码] [代码][代码]})[代码][代码] [代码][代码]},[代码]这个该怎么解决呀
2019-05-11 - 数据存储调用
小程序中用wx.setStorage存储,key:that.data.id;在另一页调用所存数据时的key是什么呀
2019-04-28