bug修复
This commit is contained in:
parent
f8675832cc
commit
f1eee059b6
File diff suppressed because it is too large
Load Diff
|
@ -1501,82 +1501,87 @@ export default {
|
||||||
|
|
||||||
},
|
},
|
||||||
deviceInfo(num) {
|
deviceInfo(num) {
|
||||||
if (!this.sn) return;
|
setTimeout(() => {
|
||||||
|
if (!this.sn) return;
|
||||||
|
|
||||||
// 检查是否有进行中的订单
|
// 检查是否有进行中的订单
|
||||||
if (this.orderinfo.sn) {
|
if (this.orderinfo.sn) {
|
||||||
if (this.orderinfo.sn != this.sn) {
|
if (this.orderinfo.sn != this.sn) {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: '您有正在进行的订单,请先完成当前订单',
|
title: '您有正在进行的订单,请先完成当前订单',
|
||||||
icon: 'none',
|
icon: 'none',
|
||||||
duration: 2000
|
duration: 2000
|
||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
this.$u.get('/app/device/info?sn=' + this.sn).then((res) => {
|
||||||
|
if (res.code === 200) {
|
||||||
|
this.isqrcode = true
|
||||||
|
this.deviceInfos = res.data;
|
||||||
|
this.getlist(res.data.modelId)
|
||||||
|
|
||||||
this.$u.get('/app/device/info?sn=' + this.sn).then((res) => {
|
if (!this.orderinfo.sn) {
|
||||||
if (res.code === 200) {
|
this.mac = res.data.mac
|
||||||
this.isqrcode = true
|
|
||||||
this.deviceInfos = res.data;
|
|
||||||
this.getlist(res.data.modelId)
|
|
||||||
|
|
||||||
if (!this.orderinfo.sn) {
|
|
||||||
this.mac = res.data.mac
|
|
||||||
}
|
|
||||||
|
|
||||||
// 检查区域是否需要切换
|
|
||||||
const areaChanged = this.areaInfo.areaId != res.data.areaId;
|
|
||||||
console.log(this.areaInfo.areaId, res.data.areaId, 'aaaaaaaaaaaaaaaaaaaaaa');
|
|
||||||
if (num == 0) {
|
|
||||||
if (areaChanged) {
|
|
||||||
|
|
||||||
// 区域不同,需要切换区域
|
|
||||||
uni.setStorageSync('areaId', res.data.areaId);
|
|
||||||
this.gps.sn = this.sn;
|
|
||||||
this.isqrcode = false; // 重置标志以允许新区域的设备信息获取
|
|
||||||
this.getArea(); // 重新获取区域信息
|
|
||||||
} else {
|
|
||||||
this.showdevice = true;
|
|
||||||
this.type = 0;
|
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
if (this.deviceInfos.status == 1) {
|
// 检查区域是否需要切换
|
||||||
|
const areaChanged = this.areaInfo.areaId != res.data.areaId;
|
||||||
|
console.log(this.areaInfo.areaId, res.data.areaId, 'aaaaaaaaaaaaaaaaaaaaaa');
|
||||||
|
if (num == 0) {
|
||||||
if (areaChanged) {
|
if (areaChanged) {
|
||||||
|
|
||||||
// 区域不同,需要切换区域
|
// 区域不同,需要切换区域
|
||||||
uni.setStorageSync('areaId', res.data.areaId);
|
uni.setStorageSync('areaId', res.data.areaId);
|
||||||
this.gps.sn = this.sn;
|
this.gps.sn = this.sn;
|
||||||
this.isqrcode = false; // 重置标志以允许新区域的设备信息获取
|
this.isqrcode = false; // 重置标志以允许新区域的设备信息获取
|
||||||
this.getArea(); // 重新获取区域信息
|
this.getArea(); // 重新获取区域信息
|
||||||
setTimeout(() => {
|
} else {
|
||||||
|
this.showdevice = true;
|
||||||
|
this.type = 0;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (this.deviceInfos.status == 1) {
|
||||||
|
if (areaChanged) {
|
||||||
|
// 区域不同,需要切换区域
|
||||||
|
uni.setStorageSync('areaId', res.data.areaId);
|
||||||
|
this.gps.sn = this.sn;
|
||||||
|
this.isqrcode = false; // 重置标志以允许新区域的设备信息获取
|
||||||
|
this.getArea(); // 重新获取区域信息
|
||||||
|
setTimeout(() => {
|
||||||
|
this.showdevice = true;
|
||||||
|
this.type = 1;
|
||||||
|
this.deviceIndex = 1;
|
||||||
|
}, 600);
|
||||||
|
} else {
|
||||||
this.showdevice = true;
|
this.showdevice = true;
|
||||||
this.type = 1;
|
this.type = 1;
|
||||||
this.deviceIndex = 1;
|
this.deviceIndex = 1;
|
||||||
}, 600);
|
}
|
||||||
} else {
|
} else {
|
||||||
this.showdevice = true;
|
this.$refs.uToast.show({
|
||||||
this.type = 1;
|
title: this.getStatusMessage(this.deviceInfos.status),
|
||||||
this.deviceIndex = 1;
|
duration: 2000
|
||||||
|
});
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
this.$refs.uToast.show({
|
|
||||||
title: this.getStatusMessage(this.deviceInfos.status),
|
|
||||||
duration: 2000
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
this.showdevice = false;
|
||||||
|
this.deviceIndex = 0;
|
||||||
|
this.type = 0;
|
||||||
|
uni.showToast({
|
||||||
|
title: res.msg,
|
||||||
|
icon: 'none',
|
||||||
|
duration: 2000
|
||||||
|
});
|
||||||
}
|
}
|
||||||
} else {
|
});
|
||||||
this.showdevice = false;
|
|
||||||
this.deviceIndex = 0;
|
|
||||||
this.type = 0;
|
}, 700);
|
||||||
uni.showToast({
|
|
||||||
title: res.msg,
|
|
||||||
icon: 'none',
|
|
||||||
duration: 2000
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
},
|
||||||
// 新增辅助方法处理状态消息
|
// 新增辅助方法处理状态消息
|
||||||
getStatusMessage(status) {
|
getStatusMessage(status) {
|
||||||
|
@ -2082,8 +2087,6 @@ export default {
|
||||||
console.error("Error fetching parking data:", error);
|
console.error("Error fetching parking data:", error);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
totxtpage() {
|
totxtpage() {
|
||||||
this.seeDetail = true
|
this.seeDetail = true
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
|
@ -4577,7 +4580,7 @@ export default {
|
||||||
},
|
},
|
||||||
convertBoundaryToPolylines(boundaries, num) {
|
convertBoundaryToPolylines(boundaries, num) {
|
||||||
if (num == 1) {
|
if (num == 1) {
|
||||||
console.log('判断1');
|
|
||||||
return boundaries.map(boundary => {
|
return boundaries.map(boundary => {
|
||||||
if (!boundary) return null;
|
if (!boundary) return null;
|
||||||
let coords;
|
let coords;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user