var postsCollected = wx.getStorageSync('posts_collected') 被解析为字符串了,这应该师哥object的容器吧
报这样的错
Cannot assign to read only property '0' of string 'postCollected';at "pages/posts/posts-detail/post-detail" page onColletionTap function
TypeError: Cannot assign to read only property '0' of string 'postCollected'
4年同步微信官方迭代,累计20000+人学习, 比微信官方更火爆!
了解课程