Unexpected end of JSON input
发布于 6 年前 作者 guiyingwei 20137 次浏览 来自 问答

WAService.js:3 thirdScriptError

Unexpected end of JSON input;at “pages/StepByStepToSurplus/AnswerResult/AnswerResult_Error” page lifeCycleMethod onLoad function

SyntaxError: Unexpected end of JSON input

    at e.onLoad 

3 回复

我也遇见了这样的问题,求解

解决方案:一般获取的json数据先转换成string字符,如:JSON.stringify(json),然后用encodeURIComponent 编码,如encodeURIComponent(string), 就可以传参过去了,到接收页 ,先 decodeURIComponent(data),然后在 JSON.parse() 取得json数据 赋值!

怎么解决 大佬

回到顶部