使用箭头函数,如
var lingling = cordova.plugins.linglingPlugin;
lingling.btOpenDoorMethod(
this.linglingKeys,
resultStatus=> {
// $scope.data2 = resultStatus;
console.log("======linglinglanyachenggong");
bluetoothSuccess = true;
//清除定时器
window.clearTimeout(bluetoothTimer);
showMsg("开门成功", "center");
// $scope.closePopup1();
getOpenDoorPoint = false;
// 获取数据令令门数据 并记录用户开门数据
// $scope.getllDoorInfo(resultStatus);
},message =>{
// 记录失败开门动作
console.log("开门失败"+message);
if(this.isRemote){
this.showRemotePopup();
}
// $scope.addRecord("无设备信息", "无设备信息", 1, 2, 0, "", 0, message);
}
);