bug修复

This commit is contained in:
tx 2024-12-30 14:31:59 +08:00
parent f8675832cc
commit f1eee059b6
2 changed files with 1695 additions and 1639 deletions

File diff suppressed because it is too large Load Diff

View File

@ -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;