小程序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:获取失败' ) } }) }, |
这个该怎么解决呀