vue中 this失效
1、在回调函数之前将 vue 实例 this 赋值给一个变量,在回调函数中使用该变量
equestHistoryList (mobileNumber, channelIndex) { ...... var _that = this this.sendCommand(url, params,function (ret) { console.log(_that) if (ret.code == 0) { if (ret.data.sendResult == "SUCCESS") { var parse = JSON.parse(ret.data.params); _that.playBackVideoList = parse.infos console.log(_that.playBackVideoList) } }else { alert(ret.msg); } }) },