[]微信小游戏发布后,在开发者工具中报错,

报错如下:
VM819:1 gameThirdScriptError
Unexpected token in JSON at position 787;at api readFile success callback function
SyntaxError: Unexpected token in JSON at position 787
at JSON.parse (<anonymous>)
at Function.e.getJson (http://127.0.0.1:37389/game/code.js:1:461434)
at Function.e.onReadNativeCallBack (http://127.0.0.1:37389/game/code.js:1:514598)
at t.e.runWith (http://127.0.0.1:37389/game/code.js:1:11995)
at Function.success (http://127.0.0.1:37389/game/code.js:1:465882)
at Object.success (http://127.0.0.1:37389/game/__ ... 4:4078)
at u (http://127.0.0.1:37389/game/__ ... 5:9637)
at Function.<anonymous> (http://127.0.0.1:37389/game/__ ... 5:9820)
at n.function.setTimeout (http://127.0.0.1:37389/game/gamePage.html:1:42571)
at http://127.0.0.1:37389/game/__ ... :4078

Aar0n

赞同来自:

这个要么是库没引对,要么就是读取本地文件编码不是ascii 或者utf-8 解码的时候要用utf-8 或者ascii

要回复问题请先

商务合作
商务合作