Commit a35a2d0e authored by xxx's avatar xxx

修改this指针

parent cea7d5df
......@@ -84,47 +84,48 @@ export default {
},
methods: {
plusReady(){
let that = this;
plus.device.getOAID({
success:function(e){
console.log(e.oaid);
this.deviceOAID = e.oaid;
that.deviceOAID = e.oaid;
//查询设备表是否存在该设备编号
httpGet(apiEquipmentQuery,{name:this.deviceOAID}).then((resSheiBei) => {
httpGet(apiEquipmentQuery,{name:that.deviceOAID}).then((resSheiBei) => {
if(resSheiBei.code == 200 && resSheiBei.data.totalElements != 0){
//查询车辆表中设备是否与车辆绑定
httpGet(vehicleInformationQuery,{equipmentName:this.deviceOAID}).then((resCar) => {
httpGet(vehicleInformationQuery,{equipmentName:that.deviceOAID}).then((resCar) => {
if(resCar.code == 200 && resCar.data.totalElements != 0){
this.$message({
that.$message({
message: "设备检索完毕,可进行登录!",
type: 'success'
});
this.bindingStatus = true;
that.bindingStatus = true;
}else{
this.$message({
that.$message({
message: "请在后台系统中将该设备与车辆绑定后再进行登录!",
type: 'error'
});
this.bindingStatus = false;
that.bindingStatus = false;
}
})
}else{
httpPostForJson(apiEquipmentQuery,{name:this.deviceOAID,status:'正常'}).then((res)=>{
this.$message({
httpPostForJson(apiEquipmentQuery,{name:that.deviceOAID,status:'正常'}).then((res)=>{
that.$message({
message: "请在后台系统中将该设备与车辆绑定后再进行登录!",
type: 'error'
});
this.bindingStatus = false;
that.bindingStatus = false;
})
}
});
},
fail:function(e){
console.log('getDeviceInfo failed: '+JSON.stringify(e));
this.$message({
that.$message({
message: "获取设备信息失败,请退出系统并且开启权限后重试!",
type: 'error'
});
this.bindingStatus = false;
that.bindingStatus = false;
}
})
},
......@@ -210,7 +211,7 @@ export default {
httpGet(personalCenterInforQuery,{userName:user.username}).then((respersonal) => {
if(respersonal.code == 200 && respersonal.data.totalElements != 0){
let lastpersonalData = respersonal.data.content[0];
lastpersonalData.car = this.bindingCar;
lastpersonalData.car = that.bindingCar;
putForJson(personalCenterInforQuery,lastpersonalData).then((res)=>{
that.$router.push({ path: '/MLargeScreen/index?' + user.username});
})
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment