报错 property 'this.data.id' closes the circle

来源:19-7 使用缓存实现文章收藏功能

慕UI2478098

2020-04-28

postsCollected[this.data.id]=postsCollected 这句话报错

Converting circular structure to JSON
    --> starting at object with constructor 'Object'
    --- property 'this.data.id' closes the circle; [Component] Event Handler Error @ pages/posts/post-detail/post-detail#bound collectedTap
TypeError: Converting circular structure to JSON
    --> starting at object with constructor 'Object'
    --- property 'this.data.id' closes the circle
    at JSON.stringify (<anonymous>)
写回答

1回答

7七月

2020-04-29

这个仔细看一下视频吧,从这个简单的代码里看不出问题。报的错也很奇怪,closes the circle?

0
0

微信小程序入门与实战(全新版) 超20000人学习的好课

4年同步微信官方迭代,累计20000+人学习, 比微信官方更火爆!

23989 学习 · 6934 问题

查看课程