diff --git a/page_user/changeCar.vue b/page_user/changeCar.vue index 1c4f2a5..c7a0bc3 100644 --- a/page_user/changeCar.vue +++ b/page_user/changeCar.vue @@ -9,27 +9,27 @@ - + + v-if="checkIdx == 1"> 电量不足 - + + v-if="checkIdx == 2"> 车辆损坏 - SN:{{orderinfo.sn}} + SN:{{ orderinfo.sn }} - + 请选择车辆故障部位 @@ -43,7 +43,7 @@ :class="item.checked === true ? 'act1' : ''" @click="toggleCheckbox(index)"> {{ item.dictLabel }} + v-if="item.checked === true"> @@ -54,7 +54,7 @@ :class="item.checked === true ? 'act1' : ''" @click="csCheckbox(index)"> {{ item.dictLabel }} + v-if="item.checked === true"> @@ -66,7 +66,7 @@ :class="item.checked === true ? 'act1' : ''" @click="tsCheckbox(index)"> {{ item.dictLabel }} + v-if="item.checked === true"> @@ -76,7 +76,7 @@ {{ currentCount }}/500 - + 请对故障部位拍照 @@ -84,7 +84,7 @@ - + @@ -95,20 +95,20 @@ - + 保持车辆录像的完整清晰,不要随意拍摄,确保视频中车辆出境,并且出现车牌号 + v-if="videoUrl == ''"> - - + + + v-if="videoUrl != ''"> @@ -127,7 +127,7 @@ - 可继续行驶{{deviceinfo.remainingMileage}}公里 + 可继续行驶{{ deviceinfo.remainingMileage }}公里 @@ -135,7 +135,7 @@ - NO.{{deviceinfo.sn}} + NO.{{ deviceinfo.sn }} @@ -147,7 +147,7 @@ 已骑行 - {{timeString}} + {{ timeString }} @@ -155,7 +155,7 @@ 预估金额 - {{ parseFloat(money).toFixed(2)}}元 + {{ parseFloat(money).toFixed(2) }}元 @@ -183,25 +183,25 @@ 提交 - + - {{toploadtxt}} + {{ toploadtxt }} - {{tiptxt}} + {{ tiptxt }} - + - {{buletxt}} + {{ buletxt }} @@ -213,7 +213,7 @@ - + @@ -248,460 +248,469 @@ \ No newline at end of file diff --git a/pages/index/index.vue b/pages/index/index.vue index 4797d20..500ce47 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -1501,82 +1501,87 @@ export default { }, deviceInfo(num) { - if (!this.sn) return; + setTimeout(() => { + if (!this.sn) return; - // 检查是否有进行中的订单 - if (this.orderinfo.sn) { - if (this.orderinfo.sn != this.sn) { - uni.showToast({ - title: '您有正在进行的订单,请先完成当前订单', - icon: 'none', - duration: 2000 - }); - return; + // 检查是否有进行中的订单 + if (this.orderinfo.sn) { + if (this.orderinfo.sn != this.sn) { + uni.showToast({ + title: '您有正在进行的订单,请先完成当前订单', + icon: 'none', + duration: 2000 + }); + 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 (res.code === 200) { - 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; + if (!this.orderinfo.sn) { + this.mac = res.data.mac } - } 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) { + // 区域不同,需要切换区域 uni.setStorageSync('areaId', res.data.areaId); this.gps.sn = this.sn; this.isqrcode = false; // 重置标志以允许新区域的设备信息获取 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.type = 1; this.deviceIndex = 1; - }, 600); + } } else { - this.showdevice = true; - this.type = 1; - this.deviceIndex = 1; + this.$refs.uToast.show({ + title: this.getStatusMessage(this.deviceInfos.status), + 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; - uni.showToast({ - title: res.msg, - icon: 'none', - duration: 2000 - }); - } - }); + }); + + + }, 700); + }, // 新增辅助方法处理状态消息 getStatusMessage(status) { @@ -2082,8 +2087,6 @@ export default { console.error("Error fetching parking data:", error); }); }, - - totxtpage() { this.seeDetail = true uni.navigateTo({ @@ -4577,7 +4580,7 @@ export default { }, convertBoundaryToPolylines(boundaries, num) { if (num == 1) { - console.log('判断1'); + return boundaries.map(boundary => { if (!boundary) return null; let coords;