Unexpected token c in JSON at position 0 报错信息及解决
问题产生:mpvue编译过程报错Unexpected token c in JSON at position 0,且是websocket返回实时数据时。问题产生原因:js中json 解析失败解决:添加判断字符串是否是json格式方法isJson,并调用一下isJson(str) { if (typeof str == 'string') { try { ...