var postcoll = wx.getStorageInfoSync('post_coll'); if (postcoll) { var dqhczt = postcoll[postId]; this.setData({ coll: dqhczt }); } else { var postcoll = {}; postcoll[postId] = false; wx.setStorageSync('post_coll', postcoll); } }, //.........................以上是文章缓存状态的初始化.................................................................... hcztan: function (evert) { var postcoll = wx.getStorageInfoSync('post_coll'); var dqhczt = postcoll[this.data.jsidbl]; dqhczt = !dqhczt; postcoll[this.data.jsidbl] = dqhczt; wx.setStorageSync('post_coll', postcoll); this.setData({ coll: dqhczt }) }
添加回答
举报
0/150
提交
取消