服务器返回一下字符串
{“state”:“true”,“name”:“123”}
小程序上使用
var result = JSON.parse(res.data)
无法解析
直接使用res.data.state一直提示undifine
eval("("+res.data+")")
使用就会报错
WAService.js:3 thirdScriptError
eval is not a function;at pages/index/index onReady function;at api request success callback function
TypeError: eval is not a function
at success (http://767280604.appservice.open.weixin.qq.com/app.js:33:26)
at Object.success (http://767280604.appservice.open.weixin.qq.com/WAService.js:3:7222)
at .<anonymous> (http://767280604.appservice.open.weixin.qq.com/WAService.js:4:20167)
at .<anonymous> (http://767280604.appservice.open.weixin.qq.com/asdebug.js:1:15029)
at http://767280604.appservice.open.weixin.qq.com/WAService.js:3:7222