data:{ datalist: [], } |
ensure() { var that = this ; var datalist=that.data.datalist; var roomName = that.data.roomName; console.log(roomName); if (roomName == '' || roomName == null ) { wx.showToast({ title: '请输入房间名称' , icon: 'none' }) return false ; } datalist.push(roomName); wx.setStorageSync( 'datalist' , datalist) that.setData({ datalist: datalist, addState: ! this .data.addState }) }, |
检查下是不是wx.getStorageSync取出datalist的时候是不是没有做反序列化,wx.getStorageSync得到的值是字符串
我也遇到了,同样的问题,请问解决了吗
没得问题。。。