bug修复
This commit is contained in:
parent
f8675832cc
commit
f1eee059b6
|
@ -9,27 +9,27 @@
|
|||
</view>
|
||||
<!-- https://lxnapi.ccttiot.com/bike/img/static/uZQYJi6D7tPy4CszHtau -->
|
||||
<view class="choose_li">
|
||||
<view class="li_cont" @click="checkIdx=1">
|
||||
<view class="li_cont" @click="checkIdx = 1">
|
||||
<view class="img_box">
|
||||
<image src="https://lxnapi.ccttiot.com/bike/img/static/uZQYJi6D7tPy4CszHtau" mode=""
|
||||
v-if="checkIdx==1"></image>
|
||||
v-if="checkIdx == 1"></image>
|
||||
</view>
|
||||
电量不足
|
||||
</view>
|
||||
<view class="li_cont" @click="checkIdx=2">
|
||||
<view class="li_cont" @click="checkIdx = 2">
|
||||
<view class="img_box">
|
||||
<image src="https://lxnapi.ccttiot.com/bike/img/static/uZQYJi6D7tPy4CszHtau" mode=""
|
||||
v-if="checkIdx==2"></image>
|
||||
v-if="checkIdx == 2"></image>
|
||||
</view>
|
||||
车辆损坏
|
||||
</view>
|
||||
</view>
|
||||
<view class="tit" style="margin-top: 20rpx;">
|
||||
|
||||
SN:{{orderinfo.sn}}
|
||||
SN:{{ orderinfo.sn }}
|
||||
</view>
|
||||
</view>
|
||||
<view class="cont_box" v-show="checkIdx==2">
|
||||
<view class="cont_box" v-show="checkIdx == 2">
|
||||
<view class="tit">
|
||||
<image src="https://lxnapi.ccttiot.com/bike/img/static/uByIrgaV23PDGZWReKHW" mode=""></image>
|
||||
请选择车辆故障部位
|
||||
|
@ -43,7 +43,7 @@
|
|||
:class="item.checked === true ? 'act1' : ''" @click="toggleCheckbox(index)">
|
||||
{{ item.dictLabel }}
|
||||
<image src="https://lxnapi.ccttiot.com/bike/img/static/ufYwbVclwhX64u4eGu6u" mode=""
|
||||
v-if="item.checked === true "></image>
|
||||
v-if="item.checked === true"></image>
|
||||
</view>
|
||||
</view>
|
||||
<view class="txt">
|
||||
|
@ -54,7 +54,7 @@
|
|||
:class="item.checked === true ? 'act1' : ''" @click="csCheckbox(index)">
|
||||
{{ item.dictLabel }}
|
||||
<image src="https://lxnapi.ccttiot.com/bike/img/static/ufYwbVclwhX64u4eGu6u" mode=""
|
||||
v-if="item.checked === true "></image>
|
||||
v-if="item.checked === true"></image>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
|
@ -66,7 +66,7 @@
|
|||
:class="item.checked === true ? 'act1' : ''" @click="tsCheckbox(index)">
|
||||
{{ item.dictLabel }}
|
||||
<image src="https://lxnapi.ccttiot.com/bike/img/static/ufYwbVclwhX64u4eGu6u" mode=""
|
||||
v-if="item.checked === true "></image>
|
||||
v-if="item.checked === true"></image>
|
||||
</view>
|
||||
</view>
|
||||
<view class="input-container">
|
||||
|
@ -76,7 +76,7 @@
|
|||
<text class="word-count">{{ currentCount }}/500</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="cont_box" v-if="checkIdx==2&&areainfo.returnVerify==0">
|
||||
<view class="cont_box" v-if="checkIdx == 2 && areainfo.returnVerify == 0">
|
||||
<view class="tit">
|
||||
<image src="https://lxnapi.ccttiot.com/bike/img/static/uByIrgaV23PDGZWReKHW" mode=""></image>
|
||||
请对故障部位拍照
|
||||
|
@ -84,7 +84,7 @@
|
|||
|
||||
<view class="icon">
|
||||
|
||||
<view class="imgbox" v-for="(item,index) in imglist " :key="index">
|
||||
<view class="imgbox" v-for="(item, index) in imglist " :key="index">
|
||||
<image :src="item" mode=""></image>
|
||||
</view>
|
||||
<view class="imgbox" @click="btn">
|
||||
|
@ -95,20 +95,20 @@
|
|||
<!-- https://lxnapi.ccttiot.com/bike/img/static/uZQYJi6D7tPy4CszHtau -->
|
||||
|
||||
</view>
|
||||
<view class="cont" v-if="areainfo.returnVerify==1">
|
||||
<view class="cont" v-if="areainfo.returnVerify == 1">
|
||||
<view class="tip_txt" style="font-weight: 500;font-size: 32rpx;color: #3D3D3D;">
|
||||
保持车辆录像的完整清晰,不要随意拍摄,确保视频中车辆出境,并且出现车牌号
|
||||
</view>
|
||||
<view class="vadio_png1" @click="recordVideo">
|
||||
<image class="backimg" src="https://lxnapi.ccttiot.com/bike/img/static/uEP0UPJw6a1WuxA7ZlMo" mode=""
|
||||
v-if="videoUrl==''">
|
||||
v-if="videoUrl == ''">
|
||||
<image class="tip_img" src="https://lxnapi.ccttiot.com/bike/img/static/uXFG7Vee8MWx5y7pha2U"
|
||||
mode=""></image>
|
||||
</image>
|
||||
<video class="vad" :src="videoUrl" controls="controls" style="width: 100%;" v-if="videoUrl!=''"></video>
|
||||
<view class="glass" v-if="videoUrl!=''"></view>
|
||||
<video class="vad" :src="videoUrl" controls="controls" style="width: 100%;" v-if="videoUrl != ''"></video>
|
||||
<view class="glass" v-if="videoUrl != ''"></view>
|
||||
<image class="tip_img" src="https://lxnapi.ccttiot.com/bike/img/static/uXFG7Vee8MWx5y7pha2U" mode=""
|
||||
v-if="videoUrl!=''"></image>
|
||||
v-if="videoUrl != ''"></image>
|
||||
</view>
|
||||
</view>
|
||||
<view class="tits">
|
||||
|
@ -127,7 +127,7 @@
|
|||
<view class="cont_li">
|
||||
<view class="left">
|
||||
<view class="km">
|
||||
可继续行驶{{deviceinfo.remainingMileage}}公里
|
||||
可继续行驶{{ deviceinfo.remainingMileage }}公里
|
||||
</view>
|
||||
<view class="speed">
|
||||
<view class="speeds" :style="{ width: deviceinfo.remainingPower + '%' }">
|
||||
|
@ -135,7 +135,7 @@
|
|||
</view>
|
||||
</view>
|
||||
<view class="NO">
|
||||
NO.{{deviceinfo.sn}}
|
||||
NO.{{ deviceinfo.sn }}
|
||||
</view>
|
||||
</view>
|
||||
<view class="right">
|
||||
|
@ -147,7 +147,7 @@
|
|||
已骑行
|
||||
</view>
|
||||
<view class="right" style="font-size: 32rpx;font-weight: 400;">
|
||||
{{timeString}}
|
||||
{{ timeString }}
|
||||
</view>
|
||||
</view>
|
||||
<view class="cont_li" style="margin-top: 10rpx;">
|
||||
|
@ -155,7 +155,7 @@
|
|||
预估金额
|
||||
</view>
|
||||
<view class="right" style="font-size: 32rpx;font-weight: 400;">
|
||||
{{ parseFloat(money).toFixed(2)}}元
|
||||
{{ parseFloat(money).toFixed(2) }}元
|
||||
</view>
|
||||
</view>
|
||||
<view class="txtss">
|
||||
|
@ -183,25 +183,25 @@
|
|||
提交
|
||||
</view>
|
||||
<view class="maskloadpage" v-if="maskloading">
|
||||
<view class="maskpage0" v-if="maskepage==0">
|
||||
<view class="maskpage0" v-if="maskepage == 0">
|
||||
<view class="top_info">
|
||||
<image :src="loadimg" mode=""></image>
|
||||
<view class="masktxt">
|
||||
{{toploadtxt}}
|
||||
{{ toploadtxt }}
|
||||
</view>
|
||||
</view>
|
||||
<view class="masktips">
|
||||
{{tiptxt}}
|
||||
{{ tiptxt }}
|
||||
</view>
|
||||
<view class="tipsimg">
|
||||
<image src="https://lxnapi.ccttiot.com/bike/img/static/ugvqmfB3QYujZ6SnfTia" mode=""></image>
|
||||
</view>
|
||||
</view>
|
||||
<view class="maskpage1" v-if="maskepage==4">
|
||||
<view class="maskpage1" v-if="maskepage == 4">
|
||||
<view class="top_info">
|
||||
<image :src="loadimg" mode=""></image>
|
||||
<view class="masktxt">
|
||||
{{buletxt}}
|
||||
{{ buletxt }}
|
||||
</view>
|
||||
</view>
|
||||
<view class="masktips" style="width: 100%;">
|
||||
|
@ -213,7 +213,7 @@
|
|||
|
||||
</view>
|
||||
<!-- 不允许停车点外还车 -->
|
||||
<view class="maskpage1" v-if="maskepage==5">
|
||||
<view class="maskpage1" v-if="maskepage == 5">
|
||||
<view class="top_info">
|
||||
<image src="https://lxnapi.ccttiot.com/bike/img/static/uG3cbPgvPDzwlq6IHHxK" mode=""></image>
|
||||
<view class="masktxt" v-if="orderinfo.sn">
|
||||
|
@ -248,10 +248,10 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
const app = getApp();
|
||||
var xBlufi = require("@/utils/blufi/xBlufi.js");
|
||||
let _this = null;
|
||||
export default {
|
||||
const app = getApp();
|
||||
var xBlufi = require("@/utils/blufi/xBlufi.js");
|
||||
let _this = null;
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
bgc: {
|
||||
|
@ -312,13 +312,22 @@
|
|||
|
||||
},
|
||||
watch: {
|
||||
sncode(newValue, oldValue) {
|
||||
sncode: {
|
||||
handler(newValue) {
|
||||
if (newValue && newValue.length === 7) {
|
||||
// 等待 orderinfo 加载完成后再获取设备信息
|
||||
if (this.orderinfo && this.orderinfo.areaId) {
|
||||
this.getdevice();
|
||||
} else {
|
||||
// 如果 orderinfo 还未加载完成,等待后再调用
|
||||
setTimeout(() => {
|
||||
this.getdevice();
|
||||
}, 500);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
},
|
||||
immediate: false
|
||||
}
|
||||
},
|
||||
|
||||
onHide() {
|
||||
|
@ -373,13 +382,13 @@
|
|||
let that = this
|
||||
uni.getLocation({
|
||||
type: 'gcj02',
|
||||
success: function(lb) {
|
||||
success: function (lb) {
|
||||
|
||||
that.gps.latitude = lb.latitude;
|
||||
that.gps.longitude = lb.longitude;
|
||||
|
||||
},
|
||||
fail: function(error) {
|
||||
fail: function (error) {
|
||||
uni.showToast({
|
||||
title: '未获取到定位信息,请点击设置勾选允许位置信息,即可使用全部功能',
|
||||
icon: 'none',
|
||||
|
@ -445,7 +454,7 @@
|
|||
token: _this.token, //后端返回的token
|
||||
key: 'smartmeter/img/' + math
|
||||
},
|
||||
success: function(res) {
|
||||
success: function (res) {
|
||||
console.log(res, 'resres');
|
||||
let str = JSON.parse(res.data)
|
||||
console.log(str.key)
|
||||
|
@ -484,7 +493,7 @@
|
|||
userId: this.orderinfo.userId,
|
||||
detail: this.textValue,
|
||||
sn: this.orderinfo.sn,
|
||||
orderNo:this.orderinfo.orderNo,
|
||||
orderNo: this.orderinfo.orderNo,
|
||||
types: [] // Initialize the type array
|
||||
};
|
||||
if (this.areainfo.returnVerify == 0) {
|
||||
|
@ -584,7 +593,7 @@
|
|||
token: _this.token, //后端返回的token
|
||||
key: 'bike/video/' + math
|
||||
},
|
||||
success: function(res) {
|
||||
success: function (res) {
|
||||
uni.hideLoading()
|
||||
console.log(res, 'resres');
|
||||
let str = JSON.parse(res.data)
|
||||
|
@ -596,7 +605,7 @@
|
|||
});
|
||||
},
|
||||
subs(num) {
|
||||
if(this.deviceinfo.onlineStatus==0){
|
||||
if (this.deviceinfo.onlineStatus == 0) {
|
||||
uni.showToast({
|
||||
title: '当前设备离线中,请使用其他车辆',
|
||||
icon: 'none',
|
||||
|
@ -665,9 +674,9 @@
|
|||
if (!this.isback) {
|
||||
this.changeback();
|
||||
} else if (!this.isopen) {
|
||||
setTimeout(()=>{
|
||||
setTimeout(() => {
|
||||
this.changeOpne();
|
||||
},300)
|
||||
}, 300)
|
||||
|
||||
}
|
||||
|
||||
|
@ -700,7 +709,7 @@
|
|||
// this.mac=this.orderinfo.mac
|
||||
// this.buleclose=true
|
||||
// this.Binddevice()
|
||||
this.$u.post('/appVerify/changeVehicle/lock?orderNo=' + this.orderinfo.orderNo + '&changeReason=' + this.checkIdx+"&newSn="+this
|
||||
this.$u.post('/appVerify/changeVehicle/lock?orderNo=' + this.orderinfo.orderNo + '&changeReason=' + this.checkIdx + "&newSn=" + this
|
||||
.deviceinfo.sn).then((res) => {
|
||||
|
||||
if (res.code == 200) {
|
||||
|
@ -772,26 +781,46 @@
|
|||
});
|
||||
},
|
||||
getdevice() {
|
||||
this.deviceinfo={}
|
||||
if (!this.sncode) {
|
||||
return;
|
||||
}
|
||||
|
||||
// 清空当前设备信息
|
||||
this.deviceinfo = {};
|
||||
|
||||
this.$u.get('/app/device/info?sn=' + this.sncode).then((res) => {
|
||||
if (res.code == 200) {
|
||||
if(this.orderinfo.areaId==res.data.areaId){
|
||||
this.deviceinfo = res.data
|
||||
// this.deviceinfo.onlineStatus=0
|
||||
}else{
|
||||
if (res.code === 200 && res.data) {
|
||||
console.log('当前区域ID:', this.orderinfo.areaId);
|
||||
console.log('设备区域ID:', res.data.areaId);
|
||||
|
||||
// 确保两个值都存在且为数字类型进行比较
|
||||
const currentAreaId = Number(this.orderinfo.areaId);
|
||||
const deviceAreaId = Number(res.data.areaId);
|
||||
|
||||
if (!isNaN(currentAreaId) && !isNaN(deviceAreaId) && currentAreaId === deviceAreaId) {
|
||||
this.deviceinfo = res.data;
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: '换车设备和当前运营区不同,请使用其他车辆换车',
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
});
|
||||
this.sncode = ''; // 清空输入的 sn
|
||||
}
|
||||
|
||||
|
||||
} else {
|
||||
// 处理接口返回错误的情况
|
||||
uni.showToast({
|
||||
title: res.msg || '获取设备信息失败',
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
});
|
||||
}
|
||||
}).catch(error => {
|
||||
// 处理接口请求失败的情况
|
||||
console.error('获取设备信息错误:', error);
|
||||
uni.showToast({
|
||||
title: '获取设备信息失败',
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
});
|
||||
});
|
||||
},
|
||||
qrcode() {
|
||||
|
@ -799,7 +828,7 @@
|
|||
onlyFromCamera: true,
|
||||
scanType: ['qrCode'],
|
||||
success: res => {
|
||||
|
||||
try {
|
||||
let sn = null;
|
||||
let queryParams = res.result.split('?')[1];
|
||||
if (queryParams) {
|
||||
|
@ -812,29 +841,53 @@
|
|||
});
|
||||
}
|
||||
|
||||
this.sncode = sn
|
||||
console.log(res.result);
|
||||
if (this.sncode != '') {
|
||||
|
||||
this.getdevice()
|
||||
if (!sn) {
|
||||
uni.showToast({
|
||||
title: '无效的二维码',
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
this.sncode = sn;
|
||||
if (this.sncode) {
|
||||
// 等待 orderinfo 加载完成后再获取设备信息
|
||||
if (this.orderinfo && this.orderinfo.areaId) {
|
||||
this.getdevice();
|
||||
} else {
|
||||
// 如果 orderinfo 还未加载完成,等待后再调用
|
||||
setTimeout(() => {
|
||||
this.getdevice();
|
||||
}, 500);
|
||||
}
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('二维码解析错误:', error);
|
||||
uni.showToast({
|
||||
title: '二维码格式错误',
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
});
|
||||
}
|
||||
},
|
||||
fail: err => {
|
||||
console.error('扫描失败:', err);
|
||||
uni.showToast({
|
||||
title: '扫描失败',
|
||||
icon: 'none'
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
Binddevice() {
|
||||
uni.getBluetoothAdapterState({
|
||||
success: function(res) {
|
||||
success: function (res) {
|
||||
console.log('蓝牙状态:', res.available)
|
||||
},
|
||||
fail: function(res) {
|
||||
fail: function (res) {
|
||||
console.log('获取蓝牙状态失败')
|
||||
}
|
||||
})
|
||||
|
@ -1000,7 +1053,7 @@
|
|||
}
|
||||
});
|
||||
},
|
||||
funListenDeviceMsgEvent: function(options) {
|
||||
funListenDeviceMsgEvent: function (options) {
|
||||
switch (options.type) {
|
||||
case xBlufi.XBLUFI_TYPE.TYPE_GET_DEVICE_LISTS:
|
||||
if (options.result) {
|
||||
|
@ -1230,7 +1283,7 @@
|
|||
// })
|
||||
this.orderinfo = {}
|
||||
if (this.userId) {
|
||||
this.$u.post('/app/user/isInOrder?userId=' + this.userId, ).then((res) => {
|
||||
this.$u.post('/app/user/isInOrder?userId=' + this.userId,).then((res) => {
|
||||
// uni.hideLoading()
|
||||
if (res.code === 200) {
|
||||
|
||||
|
@ -1376,14 +1429,14 @@
|
|||
});
|
||||
},
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="scss">
|
||||
page {
|
||||
page {
|
||||
background-color: #F7FAFE;
|
||||
}
|
||||
}
|
||||
|
||||
.page {
|
||||
.page {
|
||||
padding-bottom: 100rpx;
|
||||
// width: 750rpx;
|
||||
width: 750rpx;
|
||||
|
@ -1982,5 +2035,5 @@
|
|||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
</style>
|
|
@ -1501,6 +1501,7 @@ export default {
|
|||
|
||||
},
|
||||
deviceInfo(num) {
|
||||
setTimeout(() => {
|
||||
if (!this.sn) return;
|
||||
|
||||
// 检查是否有进行中的订单
|
||||
|
@ -1513,7 +1514,7 @@ export default {
|
|||
});
|
||||
return;
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
this.$u.get('/app/device/info?sn=' + this.sn).then((res) => {
|
||||
|
@ -1577,6 +1578,10 @@ export default {
|
|||
});
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
}, 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;
|
||||
|
|
Loading…
Reference in New Issue
Block a user