Cocos creator 上传微信小游戏时报这个错误:Unexpected end of JSON input,
我在一个地方存入一个数组 cc.sys.localStorage.setItem(“headPicture”, JSON.stringify(array))
然后再另一个地方取出:let index = JSON.parse(cc.sys.localStorage.getItem(“headPicture”));
百度了说在JSON.parse里面加decodeURIComponent()在JSON.stringify外面加encodeURIComponent(),但是都没有用依然报错,这要怎么解决啊
