报错信息
[Vue warn]: Error in created hook: “SyntaxError: Unexpected token f in JSON at position 2”
vue.runtime.esm.js?a593:1888 SyntaxError: Unexpected token f in JSON at position 2
问题原因
浏览器兼容性(未识别到该方法)
解决方法
index.html文件中引入
<script src="//cdnjs.cloudflare.com/ajax/libs/json3/3.3.2/json3.min.js"></script>
现版本用的json3
附上链接https://bestiejs.github.io/json3/
----------------------- 分界线--------------------------------
后续反馈还是有的机型会报错 继续查找原因 发现是 移动端调试器 vconsole导致的 重新cdn了最新版本的包 上述报错的问题就解决了(为了减少负担同时去掉了json3)
最后-------> 工作了这么久我才知道!!
这个网站收录了许多的CDN 直接搜索你想引入的包就可以了! 还有版本提示
超好用 https://www.bootcdn.cn/