小鹿骑行
This commit is contained in:
parent
b0d8e74c40
commit
9b9e24e65c
|
@ -1272,7 +1272,7 @@ function init() {
|
|||
|
||||
if (isnotexist) {
|
||||
devicesList.push(devices.devices[0]);
|
||||
console.log("devicesList",devicesList);
|
||||
// console.log("devicesList",devicesList);
|
||||
// let obj = {
|
||||
// 'type': mDeviceEvent.XBLUFI_TYPE.TYPE_GET_DEVICE_LISTS,
|
||||
// 'result': true,
|
||||
|
@ -1295,7 +1295,7 @@ function init() {
|
|||
|
||||
if (isnotexist) {
|
||||
devicesList.push(devices[0]);
|
||||
console.log("devicesList",devicesList);
|
||||
// console.log("devicesList",devicesList);
|
||||
// let obj = {
|
||||
// 'type': mDeviceEvent.XBLUFI_TYPE.TYPE_GET_DEVICE_LISTS,
|
||||
// 'result': true,
|
||||
|
|
|
@ -176,7 +176,7 @@ function listenSendRouterSsidAndPassword(isSetListener, funtion) {
|
|||
|
||||
|
||||
function notifySendCustomData(options) {
|
||||
console.log("设备数据",options)
|
||||
// console.log("设备数据",options)
|
||||
mOnFire.fire(OnFireEvent.EVENT_NOFITY_SEND_CUSTON_DATA, options);
|
||||
}
|
||||
/**
|
||||
|
|
|
@ -507,6 +507,10 @@
|
|||
},
|
||||
onLoad(option) {
|
||||
xBlufi.initXBlufi(1)
|
||||
xBlufi.notifyStartDiscoverBle({
|
||||
'isStart': true
|
||||
})
|
||||
xBlufi.listenDeviceMsgEvent(true, this.funListenDeviceMsgEvent)
|
||||
this.$u.get("/app/orderDevice/mineUsing").then((res) => {
|
||||
if (res.code == 200) {
|
||||
if (res.data) {
|
||||
|
@ -677,15 +681,21 @@
|
|||
},1500)
|
||||
},
|
||||
onShow() {
|
||||
xBlufi.notifyConnectBle({
|
||||
isStart: false,
|
||||
deviceId: this.deviceId,
|
||||
name: this.name
|
||||
})
|
||||
|
||||
},
|
||||
onHide() {
|
||||
xBlufi.notifyStartDiscoverBle({
|
||||
'isStart': true
|
||||
'isStart': false
|
||||
})
|
||||
xBlufi.listenDeviceMsgEvent(true, this.funListenDeviceMsgEvent)
|
||||
xBlufi.listenDeviceMsgEvent(false, this.funListenDeviceMsgEvent)
|
||||
console.log('likai00');
|
||||
},
|
||||
onUnload() {
|
||||
xBlufi.notifyStartDiscoverBle({
|
||||
'isStart': false
|
||||
})
|
||||
xBlufi.listenDeviceMsgEvent(false, this.funListenDeviceMsgEvent)
|
||||
console.log('likai11');
|
||||
},
|
||||
methods: {
|
||||
getQiniuToken() {
|
||||
|
@ -879,7 +889,7 @@
|
|||
// 判断离线连接蓝牙
|
||||
findDevice() {
|
||||
// 使用 find 方法查找匹配的设备
|
||||
console.log(this.devicesarr);
|
||||
// console.log(this.devicesarr);
|
||||
const matchedDevice = this.devicesarr.find(device => {
|
||||
// console.log(device.name, this.mac, '111')
|
||||
return device.name.slice(-12) == this.mac.slice(-12)
|
||||
|
|
|
@ -21,35 +21,40 @@
|
|||
<view class="new_infocard">
|
||||
<view class="topsn">
|
||||
<view class="lt" style="display: flex;align-items: center;">
|
||||
<text style="width: 14rpx;height: 14rpx;border-radius: 50%;background-color: #28c445;margin-right: 10rpx;" v-if="deviceInfos.onlineStatus == 1"></text>
|
||||
<text style="width: 14rpx;height: 14rpx;border-radius: 50%;background-color: red;margin-right: 10rpx;" v-if="deviceInfos.onlineStatus == 0"></text>
|
||||
<text
|
||||
style="width: 14rpx;height: 14rpx;border-radius: 50%;background-color: #28c445;margin-right: 10rpx;"
|
||||
v-if="deviceInfos.onlineStatus == 1"></text>
|
||||
<text
|
||||
style="width: 14rpx;height: 14rpx;border-radius: 50%;background-color: red;margin-right: 10rpx;"
|
||||
v-if="deviceInfos.onlineStatus == 0"></text>
|
||||
车牌:{{deviceInfos.vehicleNum == null ? '--' : deviceInfos.vehicleNum}}
|
||||
</view>
|
||||
<view class="" style="display: flex;justify-content: space-between;">
|
||||
<view class="cent">
|
||||
<view class="lypic" v-if="deviceInfos.music == 0" @click="btnsy">
|
||||
<image src="https://api.ccttiot.com/smartmeter/img/static/uDORYeTuc2EQ1lSI2dbe" mode=""></image>
|
||||
<image src="https://api.ccttiot.com/smartmeter/img/static/uDORYeTuc2EQ1lSI2dbe" mode="">
|
||||
</image>
|
||||
</view>
|
||||
<view class="lypic" v-if="deviceInfos.music == 1" @click="btnsy">
|
||||
<image src="https://api.ccttiot.com/smartmeter/img/static/u8ii1aiUgREfYyMVIjpO" mode=""></image>
|
||||
<image src="https://api.ccttiot.com/smartmeter/img/static/u8ii1aiUgREfYyMVIjpO" mode="">
|
||||
</image>
|
||||
</view>
|
||||
<view class="lypic" v-if="deviceInfos.music == 2" @click="btnsy">
|
||||
<image src="https://api.ccttiot.com/smartmeter/img/static/uP7BOVsjvWaGItgHtoKV" mode=""></image>
|
||||
<image src="https://api.ccttiot.com/smartmeter/img/static/uP7BOVsjvWaGItgHtoKV" mode="">
|
||||
</image>
|
||||
</view>
|
||||
|
||||
<view class="lypic" v-if="ver_dataflag == 3" @click="btnly">
|
||||
<image src="https://api.ccttiot.com/smartmeter/img/static/uLw46jus4X9fposAvVD7" mode=""></image>
|
||||
<image src="https://api.ccttiot.com/smartmeter/img/static/uLw46jus4X9fposAvVD7" mode="">
|
||||
</image>
|
||||
</view>
|
||||
<!-- <view class="lypic" v-if="ver_dataflag == 1" @click="btnly">
|
||||
<image src="https://api.ccttiot.com/smartmeter/img/static/uCdHjNaNfD9aikVg9Cuk" mode=""></image>
|
||||
</view> -->
|
||||
<view class="lypic" v-if="ver_dataflag == 1" @click="btnly">
|
||||
<image
|
||||
class="glow-image"
|
||||
<image class="glow-image"
|
||||
src="https://api.ccttiot.com/smartmeter/img/static/uCdHjNaNfD9aikVg9Cuk"
|
||||
mode="aspectFit"
|
||||
:class="{ 'visible': isVisible, 'hidden': !isVisible }"
|
||||
/>
|
||||
mode="aspectFit" :class="{ 'visible': isVisible, 'hidden': !isVisible }" />
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
@ -67,7 +72,8 @@
|
|||
<view class="issuo" v-if="deviceInfos.lockStatus == 0">
|
||||
锁已关
|
||||
</view>
|
||||
<view class="issuo" style="background-color: #4C97E7;color: #fff;" v-if="deviceInfos.lockStatus == 1">
|
||||
<view class="issuo" style="background-color: #4C97E7;color: #fff;"
|
||||
v-if="deviceInfos.lockStatus == 1">
|
||||
锁已开
|
||||
</view>
|
||||
</view>
|
||||
|
@ -86,30 +92,43 @@
|
|||
</view>
|
||||
<view class="bikexx">
|
||||
<view class="dianliang">
|
||||
<image v-if="deviceInfos.remainingPower >= 0 && deviceInfos.remainingPower < 20 " src="https://api.ccttiot.com/smartmeter/img/static/u8M9KmIfHXpmeifTwCzj" mode=""></image>
|
||||
<image v-if="deviceInfos.remainingPower >= 20 && deviceInfos.remainingPower < 50 " src="https://api.ccttiot.com/smartmeter/img/static/u2gp2pE9kPGwaJ4MKUxE" mode=""></image>
|
||||
<image v-if="deviceInfos.remainingPower >= 50 && deviceInfos.remainingPower < 80 " src="https://api.ccttiot.com/smartmeter/img/static/umm5Ruc5vhNSjeacslwX" mode=""></image>
|
||||
<image v-if="deviceInfos.remainingPower >= 80 && deviceInfos.remainingPower <= 100 " src="https://api.ccttiot.com/smartmeter/img/static/uo75cOfYZiQoxZQAI3FH" mode=""></image>
|
||||
<image v-if="deviceInfos.remainingPower >= 0 && deviceInfos.remainingPower < 20 "
|
||||
src="https://api.ccttiot.com/smartmeter/img/static/u8M9KmIfHXpmeifTwCzj" mode=""></image>
|
||||
<image v-if="deviceInfos.remainingPower >= 20 && deviceInfos.remainingPower < 50 "
|
||||
src="https://api.ccttiot.com/smartmeter/img/static/u2gp2pE9kPGwaJ4MKUxE" mode=""></image>
|
||||
<image v-if="deviceInfos.remainingPower >= 50 && deviceInfos.remainingPower < 80 "
|
||||
src="https://api.ccttiot.com/smartmeter/img/static/umm5Ruc5vhNSjeacslwX" mode=""></image>
|
||||
<image v-if="deviceInfos.remainingPower >= 80 && deviceInfos.remainingPower <= 100 "
|
||||
src="https://api.ccttiot.com/smartmeter/img/static/uo75cOfYZiQoxZQAI3FH" mode=""></image>
|
||||
<view class="">
|
||||
<view class="dl">
|
||||
电量:<span style="font-size: 30rpx;color: #333;font-weight: 600;">{{deviceInfos.remainingPower == null ? '--' : deviceInfos.remainingPower.toFixed(1)}}</span><span style="color: #847f7f;font-size: 22rpx;">%</span>
|
||||
电量:<span
|
||||
style="font-size: 30rpx;color: #333;font-weight: 600;">{{deviceInfos.remainingPower == null ? '--' : deviceInfos.remainingPower.toFixed(1)}}</span><span
|
||||
style="color: #847f7f;font-size: 22rpx;">%</span>
|
||||
</view>
|
||||
<view class="dy">
|
||||
电压:<span style="font-size: 30rpx;color: #333;font-weight: 600;">{{deviceInfos.voltage == null ? '--' : deviceInfos.voltage.toFixed(1)}}</span><span style="color: #847f7f;font-size: 22rpx;">V</span>
|
||||
电压:<span
|
||||
style="font-size: 30rpx;color: #333;font-weight: 600;">{{deviceInfos.voltage == null ? '--' : deviceInfos.voltage.toFixed(1)}}</span><span
|
||||
style="color: #847f7f;font-size: 22rpx;">V</span>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="xuhang">
|
||||
<view class="">
|
||||
<image src="https://api.ccttiot.com/smartmeter/img/static/uxFLA73NZnGm7gD5yxQK" mode=""></image> 续航:<span style="font-size: 30rpx;color: #333;font-weight: 600;">{{deviceInfos.remainEndurance == null ? '--' : deviceInfos.remainEndurance}}</span> km
|
||||
<image src="https://api.ccttiot.com/smartmeter/img/static/uxFLA73NZnGm7gD5yxQK" mode=""></image>
|
||||
续航:<span
|
||||
style="font-size: 30rpx;color: #333;font-weight: 600;">{{deviceInfos.remainEndurance == null ? '--' : deviceInfos.remainEndurance}}</span>
|
||||
km
|
||||
</view>
|
||||
</view>
|
||||
<view class="ewm">
|
||||
<view class="" @click="toTrack">
|
||||
<image src="https://api.ccttiot.com/smartmeter/img/static/uJtMZ16iR2q8agQ4iLm3" mode=""></image> 轨迹
|
||||
<image src="https://api.ccttiot.com/smartmeter/img/static/uJtMZ16iR2q8agQ4iLm3" mode=""></image>
|
||||
轨迹
|
||||
</view>
|
||||
<view class="" style="margin-top: 14rpx;" @click="btndaohang">
|
||||
<image src="https://api.ccttiot.com/smartmeter/img/static/u3De0EsfW6ZctTFCH9p7" mode=""></image> 导航
|
||||
<image src="https://api.ccttiot.com/smartmeter/img/static/u3De0EsfW6ZctTFCH9p7" mode=""></image>
|
||||
导航
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
@ -132,7 +151,9 @@
|
|||
</view>
|
||||
响铃寻车
|
||||
</view>
|
||||
<view class="dangeanniu" v-if="this.deviceInfos.hardwareVersion && this.deviceInfos.hardwareVersion.toLowerCase().includes('x')" @click="btn(9)">
|
||||
<view class="dangeanniu"
|
||||
v-if="this.deviceInfos.hardwareVersion && this.deviceInfos.hardwareVersion.toLowerCase().includes('x')"
|
||||
@click="btn(9)">
|
||||
<view class="pic">
|
||||
<image src="https://api.ccttiot.com/smartmeter/img/static/ujhsaJeL6KVrYgFSEKkj" mode=""></image>
|
||||
</view>
|
||||
|
@ -247,28 +268,36 @@
|
|||
运营区域:<span>{{deviceInfos.areaName == null ? '--' : deviceInfos.areaName}}</span>
|
||||
</view>
|
||||
<view class="one">
|
||||
最后租车客户: <span @click="btntel" style="color: #4C97E7;"><image src="https://api.ccttiot.com/smartmeter/img/static/uCa86z0tr5WHiymtRJYt" mode=""></image>{{deviceInfos.orderUserPhone == null ? '--' : deviceInfos.orderUserPhone}}</span>
|
||||
最后租车客户: <span @click="btntel" style="color: #4C97E7;">
|
||||
<image src="https://api.ccttiot.com/smartmeter/img/static/uCa86z0tr5WHiymtRJYt" mode=""></image>
|
||||
{{deviceInfos.orderUserPhone == null ? '--' : deviceInfos.orderUserPhone}}
|
||||
</span>
|
||||
</view>
|
||||
<view class="one" @click="btndd">
|
||||
最后租车订单: <span style="color: #4C97E7;">{{deviceInfos.orderNo == null ? '--' : deviceInfos.orderNo}}</span>
|
||||
最后租车订单: <span
|
||||
style="color: #4C97E7;">{{deviceInfos.orderNo == null ? '--' : deviceInfos.orderNo}}</span>
|
||||
</view>
|
||||
<view class="one">
|
||||
最后用车时间: <span v-if="deviceInfos.orderDeviceStatus == 'USING'">使用中</span> <span v-else>{{deviceInfos.orderDeviceEndTime == null ? '--' : deviceInfos.orderDeviceEndTime}}</span>
|
||||
最后用车时间: <span v-if="deviceInfos.orderDeviceStatus == 'USING'">使用中</span> <span
|
||||
v-else>{{deviceInfos.orderDeviceEndTime == null ? '--' : deviceInfos.orderDeviceEndTime}}</span>
|
||||
</view>
|
||||
<view class="one" style="display: flex;justify-content: space-between;align-items: center;">
|
||||
<view class="one" style="margin-bottom: 0;">
|
||||
最后定位时间:<image src="https://api.ccttiot.com/smartmeter/img/static/uesvOKQAO4eIFWSTIuQD" mode=""></image> {{deviceInfos.satellites == null ? '--' : deviceInfos.satellites}}
|
||||
最后定位时间:<image src="https://api.ccttiot.com/smartmeter/img/static/uesvOKQAO4eIFWSTIuQD" mode="">
|
||||
</image> {{deviceInfos.satellites == null ? '--' : deviceInfos.satellites}}
|
||||
</view>
|
||||
<span>{{deviceInfos.lastLocationTime == null ? '--' : deviceInfos.lastLocationTime}}</span>
|
||||
</view>
|
||||
<view class="one" style="display: flex;justify-content: space-between;align-items: center;">
|
||||
<view class="one" style="margin-bottom: 0;">
|
||||
最后在线时间:<image src="https://api.ccttiot.com/smartmeter/img/static/u5ouYhbxDvAVM6pImusK" mode=""></image> {{deviceInfos.signalStrength == null ? '--' : deviceInfos.signalStrength}}
|
||||
最后在线时间:<image src="https://api.ccttiot.com/smartmeter/img/static/u5ouYhbxDvAVM6pImusK" mode="">
|
||||
</image> {{deviceInfos.signalStrength == null ? '--' : deviceInfos.signalStrength}}
|
||||
</view>
|
||||
<span>{{deviceInfos.lastOnlineTime == null ? '--' : deviceInfos.lastOnlineTime}}</span>
|
||||
</view>
|
||||
<view class="one">
|
||||
手机定位时间: <span>{{deviceInfos.mobileLocationTime == null ? '--' : deviceInfos.mobileLocationTime}}</span>
|
||||
手机定位时间:
|
||||
<span>{{deviceInfos.mobileLocationTime == null ? '--' : deviceInfos.mobileLocationTime}}</span>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
@ -343,21 +372,24 @@
|
|||
</view>
|
||||
</view>
|
||||
<view class="sound-options">
|
||||
<view class="sound-item" :class="{ active: deviceInfos.music == 0 }" @click="shengyinaniu({value:0,label:'静音'})">
|
||||
<view class="sound-item" :class="{ active: deviceInfos.music == 0 }"
|
||||
@click="shengyinaniu({value:0,label:'静音'})">
|
||||
<view class="icon">
|
||||
<image src="https://api.ccttiot.com/smartmeter/img/static/uDORYeTuc2EQ1lSI2dbe" mode=""></image>
|
||||
</view>
|
||||
<view class="label">静音模式</view>
|
||||
<view class="desc">将模块所有声音全部设为静音</view>
|
||||
</view>
|
||||
<view class="sound-item" :class="{ active: deviceInfos.music == 1 }" @click="shengyinaniu({value:1,label:'语音'})">
|
||||
<view class="sound-item" :class="{ active: deviceInfos.music == 1 }"
|
||||
@click="shengyinaniu({value:1,label:'语音'})">
|
||||
<view class="icon">
|
||||
<image src="https://api.ccttiot.com/smartmeter/img/static/u8ii1aiUgREfYyMVIjpO" mode=""></image>
|
||||
</view>
|
||||
<view class="label">语音模式</view>
|
||||
<view class="desc">将模块所有声音设为语音播报</view>
|
||||
</view>
|
||||
<view class="sound-item" :class="{ active: deviceInfos.music == 2 }" @click="shengyinaniu({value:2,label:'彩铃'})">
|
||||
<view class="sound-item" :class="{ active: deviceInfos.music == 2 }"
|
||||
@click="shengyinaniu({value:2,label:'彩铃'})">
|
||||
<view class="icon">
|
||||
<image src="https://api.ccttiot.com/smartmeter/img/static/uP7BOVsjvWaGItgHtoKV" mode=""></image>
|
||||
</view>
|
||||
|
@ -370,7 +402,9 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import { showLoading } from "../../components/blufi/util"
|
||||
import {
|
||||
showLoading
|
||||
} from "../../components/blufi/util"
|
||||
|
||||
const app = getApp()
|
||||
var xBlufi = require("@/components/blufi/xBlufi.js")
|
||||
|
@ -379,7 +413,16 @@ import { showLoading } from "../../components/blufi/util"
|
|||
data() {
|
||||
return {
|
||||
shengyin: false,
|
||||
shengyinlist:[{label:'静音',value:0},{label:'语音',value:1},{label:'彩铃',value:2}],
|
||||
shengyinlist: [{
|
||||
label: '静音',
|
||||
value: 0
|
||||
}, {
|
||||
label: '语音',
|
||||
value: 1
|
||||
}, {
|
||||
label: '彩铃',
|
||||
value: 2
|
||||
}],
|
||||
|
||||
devicesList: [],
|
||||
searching: false,
|
||||
|
@ -457,7 +500,9 @@ import { showLoading } from "../../components/blufi/util"
|
|||
isMarkerVisible: true,
|
||||
|
||||
isVisible: true,
|
||||
glowInterval: null
|
||||
glowInterval: null,
|
||||
lat:'',
|
||||
lon:''
|
||||
}
|
||||
},
|
||||
onLoad(e) {
|
||||
|
@ -467,7 +512,21 @@ import { showLoading } from "../../components/blufi/util"
|
|||
},
|
||||
onShow() {
|
||||
this.getyunying()
|
||||
|
||||
uni.getLocation({
|
||||
type: 'gcj02', // 国内地图更兼容
|
||||
isHighAccuracy: true,
|
||||
accuracy:'best',
|
||||
success: (res) => {
|
||||
console.log('精确坐标:', res)
|
||||
this.lat = res.latitude
|
||||
this.lon = res.longitude
|
||||
},
|
||||
fail: (err) => {
|
||||
this.lat = null
|
||||
this.lon = null
|
||||
console.error('获取位置失败:', err)
|
||||
}
|
||||
})
|
||||
},
|
||||
mounted() {
|
||||
// 开启呼吸灯效果
|
||||
|
@ -483,6 +542,10 @@ import { showLoading } from "../../components/blufi/util"
|
|||
deviceId: this.deviceid,
|
||||
name: this.name
|
||||
})
|
||||
xBlufi.notifyStartDiscoverBle({
|
||||
'isStart': false
|
||||
})
|
||||
xBlufi.listenDeviceMsgEvent(false, this.funListenDeviceMsgEvent)
|
||||
if (this.findDeviceTimer) {
|
||||
clearTimeout(this.findDeviceTimer)
|
||||
this.findDeviceTimer = null
|
||||
|
@ -516,7 +579,8 @@ import { showLoading } from "../../components/blufi/util"
|
|||
// 点击跳转到订单详情
|
||||
btndd() {
|
||||
uni.navigateTo({
|
||||
url:'/page_shanghu/guanli/order_detail?orid=' + this.deviceInfos.orderId + '&id=' + this.deviceInfos.sn
|
||||
url: '/page_shanghu/guanli/order_detail?orid=' + this.deviceInfos.orderId + '&id=' + this
|
||||
.deviceInfos.sn
|
||||
})
|
||||
},
|
||||
// 点击提示什么声音模式
|
||||
|
@ -746,6 +810,7 @@ import { showLoading } from "../../components/blufi/util"
|
|||
case xBlufi.XBLUFI_TYPE.TYPE_RECIEVE_CUSTON_DATA:
|
||||
this.ver_dataflag = 3
|
||||
console.log("1收到设备发来的自定义数据结果:", options.data)
|
||||
this.getlysj(options.data)
|
||||
break;
|
||||
case xBlufi.XBLUFI_TYPE.TYPE_GET_DEVICE_LISTS_START:
|
||||
if (!options.result) {
|
||||
|
@ -757,6 +822,146 @@ import { showLoading } from "../../components/blufi/util"
|
|||
break;
|
||||
}
|
||||
},
|
||||
getlysj(data) {
|
||||
if (!data) return;
|
||||
// 1. 更健壮的数据解析
|
||||
const dataStr = data.toString();
|
||||
// console.log('原始数据:', dataStr);
|
||||
const dataObj = {};
|
||||
|
||||
// 判断数据格式:检查是否包含@或,分隔符
|
||||
let separator = ',';
|
||||
if (dataStr.includes('@')) {
|
||||
separator = '@';
|
||||
}
|
||||
|
||||
// console.log('使用分隔符:', separator);
|
||||
|
||||
dataStr.split(separator).forEach(part => {
|
||||
if (!part) return; // 忽略空字符串
|
||||
|
||||
let key, value;
|
||||
|
||||
// 如果使用@分隔符,数据格式为 key-value 对,例如: status0@csq0@bat125@...
|
||||
if (separator === '@') {
|
||||
// 使用正则表达式分离键(字母)和值(数字)
|
||||
const match = part.match(/^([a-zA-Z]+)(.*)$/);
|
||||
if (!match) return;
|
||||
|
||||
key = match[1];
|
||||
value = match[2];
|
||||
} else {
|
||||
// 如果使用,分隔符,数据格式为 key:value 对,例如: status:0,csq:0,bat:125,...
|
||||
const [keyPart, valuePart] = part.split(':').map(item => item.trim());
|
||||
if (!keyPart || valuePart === undefined) return;
|
||||
|
||||
key = keyPart;
|
||||
value = valuePart;
|
||||
}
|
||||
|
||||
if (key && value !== undefined) {
|
||||
switch (key) {
|
||||
case 'status':
|
||||
dataObj.status = value;
|
||||
break;
|
||||
case 'bat':
|
||||
dataObj.bat = parseFloat(value);
|
||||
break;
|
||||
case 'csq':
|
||||
dataObj.csq = parseInt(value, 10);
|
||||
break;
|
||||
case 'lat':
|
||||
dataObj.lat = parseFloat(value);
|
||||
break;
|
||||
case 'lon':
|
||||
dataObj.lon = parseFloat(value);
|
||||
break;
|
||||
case 'q':
|
||||
dataObj.q = parseInt(value, 10);
|
||||
break;
|
||||
case 's':
|
||||
dataObj.s = parseInt(value, 10);
|
||||
break;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
// console.log('解析后的数据对象:', dataObj);
|
||||
|
||||
// 2. 获取定位
|
||||
uni.getLocation({
|
||||
type: 'gcj02',
|
||||
isHighAccuracy: true,
|
||||
success: (res) => {
|
||||
this.submitData({
|
||||
...dataObj,
|
||||
lon: res.longitude,
|
||||
lat: res.latitude
|
||||
})
|
||||
},
|
||||
fail: () => {
|
||||
this.submitData({
|
||||
...dataObj,
|
||||
lon: dataObj.lon || 0,
|
||||
lat: dataObj.lat || 0
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
// 3. 单独封装数据提交
|
||||
submitData(data) {
|
||||
const payload = {
|
||||
mac: this.mac,
|
||||
sys: {
|
||||
bat: data.bat !== undefined && data.bat !== null ? Number(data.bat) : 0,
|
||||
csq: data.csq !== undefined && data.csq !== null ? Number(data.csq) : 0,
|
||||
s: data.s !== undefined && data.s !== null ? Number(data.s) : null,
|
||||
q: data.q !== undefined && data.q !== null ? Number(data.q) : null,
|
||||
status: String(data.status || '0'),
|
||||
lon: data.lon !== undefined && data.lon !== null ? Number(data.lon) : 0,
|
||||
lat: data.lat !== undefined && data.lat !== null ? Number(data.lat) : 0
|
||||
}
|
||||
}
|
||||
this.bluetoothData = payload
|
||||
this.throttledUpload()
|
||||
},
|
||||
// 节流上传控制
|
||||
throttledUpload() {
|
||||
const now = Date.now()
|
||||
const throttleInterval = 10000 // 10秒
|
||||
// 清除之前的定时器
|
||||
clearTimeout(this.uploadTimer)
|
||||
// 如果距离上次上传超过10秒且没有正在上传的请求
|
||||
if (now - this.lastUploadTime >= throttleInterval && !this.isUploading) {
|
||||
this.doUpload()
|
||||
} else {
|
||||
// 否则设置定时器,在剩余时间后执行
|
||||
const remainingTime = throttleInterval - (now - this.lastUploadTime)
|
||||
this.uploadTimer = setTimeout(() => {
|
||||
this.doUpload()
|
||||
}, remainingTime)
|
||||
}
|
||||
},
|
||||
|
||||
// 实际执行上传
|
||||
doUpload() {
|
||||
if (!this.bluetoothData || this.isUploading) return
|
||||
this.isUploading = true
|
||||
this.lastUploadTime = Date.now()
|
||||
// console.log(this.bluetoothData,'this.bluetoothDatathis.bluetoothData')
|
||||
this.$u.put(`/app/device/iot/bltUpload`, this.bluetoothData).then(res => {
|
||||
if(res.code == 200) {
|
||||
console.log('上传蓝牙数据成功',this.bluetoothData, new Date().toLocaleTimeString())
|
||||
} else {
|
||||
console.log('上传蓝牙数据失败', res.msg)
|
||||
}
|
||||
}).catch(err => {
|
||||
console.error('上传异常:', err)
|
||||
}).finally(() => {
|
||||
this.isUploading = false
|
||||
})
|
||||
},
|
||||
|
||||
// 静音
|
||||
btnjingyin() {
|
||||
|
@ -947,33 +1152,27 @@ import { showLoading } from "../../components/blufi/util"
|
|||
title: '加载中...'
|
||||
})
|
||||
console.log('点击了....1')
|
||||
this.$u.put('/bst/device/iot/unlock?id=' + this.sn).then((res) => {
|
||||
if (res.code == 200) {
|
||||
// 处理接口返回的数据,将边界数据转换为地图组件需要的折线结构
|
||||
this.deviceInfo()
|
||||
setTimeout(()=>{
|
||||
this.jieliuflag = true
|
||||
},2000)
|
||||
} else if(res.code == 20001){
|
||||
if (this.ver_dataflag == 3) {
|
||||
xBlufi.notifySendCustomData({
|
||||
customData: "11opensub5@"
|
||||
})
|
||||
}else{
|
||||
this.lanya(0)
|
||||
let that = this
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: res.msg,
|
||||
showCancel: false,
|
||||
success: function(res) {
|
||||
if (res.confirm) {
|
||||
} else if (res.cancel) {
|
||||
|
||||
}
|
||||
}
|
||||
this.$u.put(`/bst/device/iot/unlock?id=${this.sn}&requiredIot=false`).then((res) => {
|
||||
if (res.code == 200) {
|
||||
this.deviceInfo()
|
||||
uni.showToast({
|
||||
title: '操作成功',
|
||||
icon: 'success',
|
||||
duration: 3000
|
||||
})
|
||||
let data = {
|
||||
mac:this.mac,
|
||||
reason:'商户开锁',
|
||||
command:'11opensub5@',
|
||||
longitude:this.lon,
|
||||
latitude:this.lat,
|
||||
result:'成功'
|
||||
}
|
||||
this.$u.post(`/app/commandLog/bluetooth`,data).then(res => {})
|
||||
setTimeout(() => {
|
||||
this.jieliuflag = true
|
||||
}, 2000)
|
||||
|
@ -989,14 +1188,9 @@ import { showLoading } from "../../components/blufi/util"
|
|||
}, 2000)
|
||||
}
|
||||
})
|
||||
} else if (num == 1) {
|
||||
uni.showLoading({
|
||||
title: '加载中...'
|
||||
})
|
||||
console.log('点击了....2')
|
||||
this.$u.put('/bst/device/iot/lock?id=' + this.sn).then((res) => {
|
||||
} else {
|
||||
this.$u.put(`/bst/device/iot/unlock?id=${this.sn}&requiredIot=true`).then((res) => {
|
||||
if (res.code == 200) {
|
||||
// 处理接口返回的数据,将边界数据转换为地图组件需要的折线结构
|
||||
this.deviceInfo()
|
||||
uni.showToast({
|
||||
title: '操作成功',
|
||||
|
@ -1007,25 +1201,92 @@ import { showLoading } from "../../components/blufi/util"
|
|||
this.jieliuflag = true
|
||||
}, 2000)
|
||||
}else if(res.code == 20001){
|
||||
if(this.ver_dataflag == 3){
|
||||
xBlufi.notifySendCustomData({
|
||||
customData: "11closesub200@"
|
||||
})
|
||||
}else{
|
||||
this.lanya(0)
|
||||
let that = this
|
||||
uni.hideLoading()
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: res.msg,
|
||||
content: '设备离线,请进行连接蓝牙开锁',
|
||||
showCancel: false,
|
||||
success: function(res) {
|
||||
if (res.confirm) {
|
||||
} else if (res.cancel) {
|
||||
|
||||
}
|
||||
}
|
||||
})
|
||||
} else {
|
||||
uni.hideLoading()
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
})
|
||||
setTimeout(() => {
|
||||
this.jieliuflag = true
|
||||
}, 2000)
|
||||
}
|
||||
})
|
||||
}
|
||||
} else if (num == 1) {
|
||||
uni.showLoading({
|
||||
title: '加载中...'
|
||||
})
|
||||
if (this.ver_dataflag == 3) {
|
||||
xBlufi.notifySendCustomData({
|
||||
customData: "11closesub200@"
|
||||
})
|
||||
this.$u.put(`/bst/device/iot/lock?id=${this.sn}&requiredIot=false`).then((res) => {
|
||||
if (res.code == 200) {
|
||||
this.deviceInfo()
|
||||
uni.showToast({
|
||||
title: '操作成功',
|
||||
icon: 'success',
|
||||
duration: 3000
|
||||
})
|
||||
let data = {
|
||||
mac:this.mac,
|
||||
reason:'商户关锁',
|
||||
command:'11',
|
||||
result:'成功'
|
||||
}
|
||||
this.$u.post(`/app/commandLog/bluetooth`,data).then(res => {})
|
||||
setTimeout(() => {
|
||||
// closesub200@',
|
||||
// longitude:this.lon,
|
||||
// latitude:this.lat,
|
||||
this.jieliuflag = true
|
||||
}, 2000)
|
||||
}else if(res.code == 20001){
|
||||
uni.hideLoading()
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '设备离线,请进行连接蓝牙关锁',
|
||||
showCancel: false,
|
||||
success: function(res) {
|
||||
if (res.confirm) {
|
||||
|
||||
}
|
||||
}
|
||||
})
|
||||
} else{
|
||||
uni.hideLoading()
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
})
|
||||
setTimeout(() => {
|
||||
this.jieliuflag = true
|
||||
}, 2000)
|
||||
}
|
||||
})
|
||||
} else {
|
||||
this.$u.put(`/bst/device/iot/lock?id=${this.sn}&requiredIot=true`).then((res) => {
|
||||
if (res.code == 200) {
|
||||
this.deviceInfo()
|
||||
uni.showToast({
|
||||
title: '操作成功',
|
||||
icon: 'success',
|
||||
duration: 3000
|
||||
})
|
||||
setTimeout(() => {
|
||||
this.jieliuflag = true
|
||||
}, 2000)
|
||||
|
@ -1041,6 +1302,7 @@ import { showLoading } from "../../components/blufi/util"
|
|||
}, 2000)
|
||||
}
|
||||
})
|
||||
}
|
||||
} else if (num == 2) {
|
||||
uni.showLoading({
|
||||
title: '加载中...'
|
||||
|
@ -1684,7 +1946,7 @@ import { showLoading } from "../../components/blufi/util"
|
|||
|
||||
.new_infocard {
|
||||
width: 750rpx;
|
||||
height: 80vh;
|
||||
max-height: 100vh;
|
||||
background: #FFFFFF;
|
||||
border-radius: 30rpx;
|
||||
padding: 30rpx;
|
||||
|
@ -1692,59 +1954,72 @@ import { showLoading } from "../../components/blufi/util"
|
|||
position: absolute;
|
||||
z-index: 99;
|
||||
top: 800rpx;
|
||||
|
||||
.zuche {
|
||||
margin-top: 26rpx;
|
||||
|
||||
.one {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
image {
|
||||
width: 32rpx;
|
||||
height: 32rpx;
|
||||
margin-right: 4rpx;
|
||||
}
|
||||
|
||||
span {
|
||||
font-size: 28rpx;
|
||||
color: #3D3D3D;
|
||||
}
|
||||
}
|
||||
|
||||
view {
|
||||
font-size: 28rpx;
|
||||
color: #808080;
|
||||
margin-bottom: 26rpx;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
|
||||
span {
|
||||
color: #3D3D3D;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.bikejcxx {
|
||||
margin-top: 26rpx;
|
||||
border-bottom: 1rpx solid #D8D8D8;
|
||||
|
||||
.wai {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
margin-bottom: 26rpx;
|
||||
|
||||
.lt {
|
||||
width: 46%;
|
||||
text-align: left;
|
||||
font-size: 24rpx;
|
||||
color: #808080;
|
||||
|
||||
span {
|
||||
color: #3D3D3D;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.caozuoanniu {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
margin-top: 26rpx;
|
||||
border-bottom: 1rpx solid #D8D8D8;
|
||||
|
||||
.dangeanniu {
|
||||
width: 20%;
|
||||
text-align: center;
|
||||
margin-bottom: 28rpx;
|
||||
|
||||
.pic {
|
||||
width: 88rpx;
|
||||
height: 88rpx;
|
||||
|
@ -1752,6 +2027,7 @@ import { showLoading } from "../../components/blufi/util"
|
|||
border-radius: 6rpx 6rpx 6rpx 6rpx;
|
||||
margin: auto;
|
||||
margin-bottom: 14rpx;
|
||||
|
||||
image {
|
||||
width: 42rpx;
|
||||
height: 42rpx;
|
||||
|
@ -1760,6 +2036,7 @@ import { showLoading } from "../../components/blufi/util"
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
.ewm {
|
||||
view {
|
||||
width: 140rpx;
|
||||
|
@ -1774,6 +2051,7 @@ import { showLoading } from "../../components/blufi/util"
|
|||
padding-left: 18rpx !important;
|
||||
text-align: center;
|
||||
box-sizing: border-box;
|
||||
|
||||
image {
|
||||
width: 26rpx;
|
||||
height: 26rpx;
|
||||
|
@ -1781,6 +2059,7 @@ import { showLoading } from "../../components/blufi/util"
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
.xuhang {
|
||||
view {
|
||||
width: 284rpx;
|
||||
|
@ -1793,6 +2072,7 @@ import { showLoading } from "../../components/blufi/util"
|
|||
color: #847f7f;
|
||||
padding-left: 18rpx;
|
||||
box-sizing: border-box;
|
||||
|
||||
image {
|
||||
width: 46rpx;
|
||||
height: 46rpx;
|
||||
|
@ -1800,6 +2080,7 @@ import { showLoading } from "../../components/blufi/util"
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
.bikesn {
|
||||
font-size: 24rpx;
|
||||
color: #7C7C7C;
|
||||
|
@ -1809,38 +2090,46 @@ import { showLoading } from "../../components/blufi/util"
|
|||
border-bottom: 1rpx solid #D8D8D8;
|
||||
padding-bottom: 26rpx;
|
||||
}
|
||||
|
||||
.cent {
|
||||
display: flex;
|
||||
|
||||
.lypic {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
image {
|
||||
width: 36rpx;
|
||||
height: 36rpx;
|
||||
margin-right: 8rpx;
|
||||
}
|
||||
|
||||
.glow-image {
|
||||
width: 36rpx;
|
||||
height: 36rpx;
|
||||
margin-right: 8rpx;
|
||||
transition: all 1s ease-in-out;
|
||||
filter: drop-shadow(0 0 5px rgba(255, 0, 0, 0.7)); /* 青色外发光 */
|
||||
filter: drop-shadow(0 0 5px rgba(255, 0, 0, 0.7));
|
||||
/* 青色外发光 */
|
||||
}
|
||||
|
||||
.visible {
|
||||
opacity: 1;
|
||||
transform: scale(1);
|
||||
filter: drop-shadow(0 0 5px rgba(255, 50, 50, 1)); /* 增强发光 */
|
||||
filter: drop-shadow(0 0 5px rgba(255, 50, 50, 1));
|
||||
/* 增强发光 */
|
||||
}
|
||||
|
||||
.hidden {
|
||||
opacity: 0.3;
|
||||
transform: scale(0.95);
|
||||
filter: drop-shadow(0 0 5px rgba(255, 0, 0, 0.3)); /* 减弱发光 */
|
||||
filter: drop-shadow(0 0 5px rgba(255, 0, 0, 0.3));
|
||||
/* 减弱发光 */
|
||||
}
|
||||
}
|
||||
|
||||
.bikexx {
|
||||
margin-top: 26rpx;
|
||||
display: flex;
|
||||
|
@ -1848,6 +2137,7 @@ import { showLoading } from "../../components/blufi/util"
|
|||
border-bottom: 1rpx solid #D8D8D8;
|
||||
padding-bottom: 26rpx;
|
||||
box-sizing: border-box;
|
||||
|
||||
.dianliang {
|
||||
position: relative;
|
||||
background: linear-gradient(to right, #c0dfff, #fff);
|
||||
|
@ -1857,38 +2147,45 @@ import { showLoading } from "../../components/blufi/util"
|
|||
justify-content: space-between;
|
||||
padding: 0 20rpx;
|
||||
box-sizing: border-box;
|
||||
|
||||
.dl {
|
||||
margin-top: 10rpx;
|
||||
box-sizing: border-box;
|
||||
color: #847f7f;
|
||||
font-size: 24rpx;
|
||||
}
|
||||
|
||||
.dy {
|
||||
margin-top: 2rpx;
|
||||
box-sizing: border-box;
|
||||
color: #847f7f;
|
||||
font-size: 24rpx;
|
||||
}
|
||||
|
||||
view {
|
||||
padding-left: 14rpx;
|
||||
box-sizing: border-box;
|
||||
font-size: 24rpx;
|
||||
color: #3D3D3D;
|
||||
|
||||
span {
|
||||
font-size: 28rpx;
|
||||
}
|
||||
}
|
||||
|
||||
image {
|
||||
width: 22rpx;
|
||||
height: 48rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.topsn {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
padding-bottom: 13rpx;
|
||||
box-sizing: border-box;
|
||||
|
||||
.lt {
|
||||
font-weight: 600;
|
||||
font-size: 30rpx;
|
||||
|
@ -1896,8 +2193,10 @@ import { showLoading } from "../../components/blufi/util"
|
|||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.rt {
|
||||
display: flex;
|
||||
|
||||
.issuo {
|
||||
width: 104rpx;
|
||||
height: 42rpx;
|
||||
|
@ -1909,6 +2208,7 @@ import { showLoading } from "../../components/blufi/util"
|
|||
font-size: 24rpx;
|
||||
color: #3D3D3D;
|
||||
}
|
||||
|
||||
.stutas {
|
||||
span {
|
||||
display: inline-block;
|
||||
|
@ -1925,6 +2225,7 @@ import { showLoading } from "../../components/blufi/util"
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
.tip_box {
|
||||
position: fixed;
|
||||
left: 72rpx;
|
||||
|
@ -1934,6 +2235,7 @@ import { showLoading } from "../../components/blufi/util"
|
|||
border-radius: 30rpx 30rpx 30rpx 30rpx;
|
||||
z-index: 110;
|
||||
padding-bottom: 100rpx;
|
||||
|
||||
.saveQr {
|
||||
margin: 0 auto;
|
||||
margin-top: 30rpx;
|
||||
|
@ -1948,8 +2250,10 @@ import { showLoading } from "../../components/blufi/util"
|
|||
font-size: 36rpx;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
|
||||
.top {
|
||||
padding: 52rpx 38rpx 42rpx 36rpx;
|
||||
|
||||
.ipt_box {
|
||||
margin-top: 22rpx;
|
||||
display: flex;
|
||||
|
@ -2069,16 +2373,19 @@ import { showLoading } from "../../components/blufi/util"
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes slideUp {
|
||||
from {
|
||||
transform: translateY(100%);
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
to {
|
||||
transform: translateY(0);
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
|
||||
/* 添加声音选择组件样式 */
|
||||
.sound-select {
|
||||
position: fixed;
|
||||
|
@ -2091,6 +2398,7 @@ import { showLoading } from "../../components/blufi/util"
|
|||
padding: 30rpx;
|
||||
box-sizing: border-box;
|
||||
animation: slideUp 0.3s ease-out forwards;
|
||||
|
||||
.sound-header {
|
||||
position: relative;
|
||||
text-align: center;
|
||||
|
@ -2123,6 +2431,7 @@ import { showLoading } from "../../components/blufi/util"
|
|||
&.active {
|
||||
background: #ECF5FF;
|
||||
border: 2rpx solid #4C97E7;
|
||||
|
||||
&::after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
|
|
|
@ -47,6 +47,7 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
var xBlufi = require("@/components/blufi/xBlufi.js")
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
|
@ -145,6 +146,7 @@
|
|||
})
|
||||
},
|
||||
gethc(){
|
||||
if(this.flag == true){
|
||||
let data = {
|
||||
orderId:this.orderId,
|
||||
picture:this.videoUrl,
|
||||
|
@ -154,7 +156,6 @@
|
|||
}
|
||||
this.$u.put(`/app/order/end`,data).then(res =>{
|
||||
if (res.code == 200) {
|
||||
if(res.data.iot == true){
|
||||
this.fjflag = false
|
||||
uni.hideLoading()
|
||||
uni.showToast({
|
||||
|
@ -167,25 +168,6 @@
|
|||
url:'/page_user/yongche/orderxq?id=' + this.orderId
|
||||
})
|
||||
},1000)
|
||||
}else{
|
||||
xBlufi.notifySendCustomData({
|
||||
customData: "11closesub300@"
|
||||
})
|
||||
let data = {
|
||||
mac:this.mac,
|
||||
reason:'还车',
|
||||
command:'11closesub300@',
|
||||
longitude:this.lon,
|
||||
latitude:this.lat,
|
||||
result:'成功'
|
||||
}
|
||||
this.$u.post(`/app/commandLog/bluetooth`,data).then(res => {
|
||||
console.log(res,'蓝牙')
|
||||
})
|
||||
xBlufi.notifySendCustomData({
|
||||
customData: "11reboot@"
|
||||
})
|
||||
}
|
||||
}else if(res.msg == null) {
|
||||
uni.hideLoading()
|
||||
uni.showToast({
|
||||
|
@ -202,6 +184,57 @@
|
|||
})
|
||||
}
|
||||
})
|
||||
}else{
|
||||
xBlufi.notifySendCustomData({
|
||||
customData: "11closesub300@"
|
||||
})
|
||||
let data = {
|
||||
orderId:this.orderId,
|
||||
picture:this.videoUrl,
|
||||
lon:this.lon,
|
||||
lat:this.lat,
|
||||
requiredIot: this.flag
|
||||
}
|
||||
this.$u.put(`/app/order/end`,data).then(res =>{
|
||||
if (res.code == 200) {
|
||||
this.fjflag = false
|
||||
uni.hideLoading()
|
||||
setTimeout(()=>{
|
||||
uni.redirectTo({
|
||||
url:'/page_user/yongche/orderxq?id=' + this.orderId
|
||||
})
|
||||
},1000)
|
||||
let data = {
|
||||
mac:this.mac,
|
||||
reason:'还车',
|
||||
command:'11closesub300@',
|
||||
longitude:this.lon,
|
||||
latitude:this.lat,
|
||||
result:'成功'
|
||||
}
|
||||
this.$u.post(`/app/commandLog/bluetooth`,data).then(res => {
|
||||
console.log(res,'蓝牙')
|
||||
})
|
||||
xBlufi.notifySendCustomData({
|
||||
customData: "11reboot@"
|
||||
})
|
||||
}else if(res.msg == null) {
|
||||
uni.hideLoading()
|
||||
uni.showToast({
|
||||
title: '未知错误',
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
})
|
||||
} else {
|
||||
uni.hideLoading()
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
getisInOrder() {
|
||||
|
|
|
@ -258,7 +258,9 @@ export default {
|
|||
deviceId: this.deviceid,
|
||||
name: this.devicename
|
||||
})
|
||||
uni.navigateBack()
|
||||
uni.reLaunch({
|
||||
url:'/pages/myorder/returned/index'
|
||||
})
|
||||
},1000)
|
||||
}else{
|
||||
uni.hideLoading()
|
||||
|
|
|
@ -227,10 +227,16 @@
|
|||
<text v-if="selectedCoupon">{{selectedCoupon.name.length > 4 ? selectedCoupon.name.slice(0,4) + '...' : selectedCoupon.name}}(优惠¥{{youhuiobj.discountAmount}})</text>
|
||||
</view>
|
||||
<view class="kefu" @click="getyajin" v-if="info.suitDepositDeduction && info.isCredit == false">
|
||||
押金抵扣<text style="font-weight: 400;">(¥{{info.totalFee}})</text>
|
||||
押金抵扣<text style="font-weight: 400;"></text>
|
||||
<text class="xiao">
|
||||
抵扣完成,剩余押金返回账户
|
||||
</text>
|
||||
</view>
|
||||
<view class="kefu" @click="getzhifu">
|
||||
{{channelobj[0].name}}<text style="font-weight: 400;">(¥{{info.totalFee}})</text>
|
||||
<text class="xiao">
|
||||
支付完成,全部押金返回账户
|
||||
</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
@ -288,7 +294,10 @@
|
|||
</view>
|
||||
</view>
|
||||
<view class="mask" v-if="kefuflag"></view>
|
||||
<view class="kfrens">
|
||||
<image class="kfren" @click="btntel" src="https://api.ccttiot.com/smartmeter/img/static/uJd9ccJt76zc7r2Nlpb8" mode=""></image>
|
||||
联系客服
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
|
@ -885,17 +894,25 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
.kfren{
|
||||
.kfrens{
|
||||
position: fixed;
|
||||
right: 30rpx;
|
||||
top: 40%;
|
||||
z-index: 99;
|
||||
width: 140rpx;
|
||||
height: 140rpx;
|
||||
.kfren{
|
||||
width: 80rpx;
|
||||
height: 80rpx;
|
||||
border-radius: 50%;
|
||||
display: block;
|
||||
box-shadow: 0 0 20rpx rgba(124, 124, 124, 0.3);
|
||||
-webkit-box-shadow: 0 0 20rpx #7C7C7C;
|
||||
-moz-box-shadow: 0 0 20rpx #7C7C7C;
|
||||
border-radius: 50%;
|
||||
margin: auto;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
text-align: center;
|
||||
}
|
||||
.kefutc{
|
||||
animation: fadeIn 0.5s ease-in-out forwards;
|
||||
|
@ -974,17 +991,17 @@
|
|||
border-radius: 0rpx 0rpx 0rpx 0rpx;
|
||||
padding-bottom: 250rpx;
|
||||
box-sizing: border-box;
|
||||
.kefu{
|
||||
width: 48%;
|
||||
height: 100rpx;
|
||||
line-height: 100rpx;
|
||||
background-color: #4C97E7;
|
||||
color: #fff;
|
||||
font-size: 36rpx;
|
||||
font-weight: 600;
|
||||
text-align: center;
|
||||
border-radius: 20rpx;
|
||||
}
|
||||
// .kefu{
|
||||
// width: 48%;
|
||||
// height: 100rpx;
|
||||
// line-height: 100rpx;
|
||||
// background-color: #4C97E7;
|
||||
// color: #fff;
|
||||
// font-size: 36rpx;
|
||||
// font-weight: 600;
|
||||
// text-align: center;
|
||||
// border-radius: 20rpx;
|
||||
// }
|
||||
.qixing{
|
||||
width: 702rpx;
|
||||
height: 466rpx;
|
||||
|
@ -1130,13 +1147,19 @@
|
|||
.kefu {
|
||||
width: 100%;
|
||||
height: 100rpx;
|
||||
line-height: 100rpx;
|
||||
background-color: #4C97E7;
|
||||
color: #fff;
|
||||
font-size: 36rpx;
|
||||
font-weight: 600;
|
||||
text-align: center;
|
||||
border-radius: 20rpx;
|
||||
padding-top: 10rpx;
|
||||
box-sizing: border-box;
|
||||
.xiao{
|
||||
font-size: 20rpx;
|
||||
color: #efefef;
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
}
|
||||
.coupon-popup {
|
||||
|
|
|
@ -278,6 +278,31 @@
|
|||
this.getorderdevice()
|
||||
},
|
||||
methods: {
|
||||
// 请求查询是否有未支付订单
|
||||
getzhifu(){
|
||||
this.$u.get("/app/order/unpaid").then((res) => {
|
||||
if (res.code == 200) {
|
||||
if(res.data){
|
||||
let id = res.data.id
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '您当前还有未支付订单,是否前去支付?',
|
||||
showCancel: true,
|
||||
success: function (res) {
|
||||
if (res.confirm) {
|
||||
uni.navigateTo({
|
||||
url:'/page_user/yongche/orderxq?id=' + id
|
||||
})
|
||||
} else if (res.cancel) {
|
||||
console.log('取消'); // 用户点击取消
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
// 点击跳转到车辆
|
||||
btntz() {
|
||||
uni.switchTab({
|
||||
|
@ -608,6 +633,7 @@
|
|||
getinfo(){
|
||||
this.$u.get("/getInfo").then(res => {
|
||||
if(res.code == 200){
|
||||
this.getzhifu()
|
||||
this.info = res.user
|
||||
this.getMyLocation()
|
||||
this.getgonggao()
|
||||
|
|
|
@ -87,7 +87,7 @@
|
|||
<image src="https://api.ccttiot.com/smartmeter/img/static/uTgSwUguPEJ56MSeZo4c" mode=""></image>
|
||||
<view class="zuqi">
|
||||
<view class="one">
|
||||
您已骑行<text>{{getRemainingTimeText}}</text>
|
||||
您已骑行<text>{{getRemainingTimeText == '-1分钟' ? '1分钟' : getRemainingTimeText}}</text>
|
||||
</view>
|
||||
<view class="two">
|
||||
预计金额¥{{qixingobj.rideFee}}
|
||||
|
@ -255,22 +255,26 @@
|
|||
}
|
||||
console.log(option);
|
||||
if(option.vate){
|
||||
this.ver_dataflag = 3
|
||||
this.devicesarr = option.vate
|
||||
// this.ver_dataflag = 3
|
||||
// this.devicesarr = option.vate
|
||||
setTimeout(()=>{
|
||||
this.ver_dataflag = 1
|
||||
},1000)
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
setTimeout(()=>{
|
||||
if(this.ver_dataflag == 3){
|
||||
// console.log('11')
|
||||
}else{
|
||||
xBlufi.initXBlufi(1)
|
||||
xBlufi.notifyStartDiscoverBle({
|
||||
'isStart': true
|
||||
})
|
||||
xBlufi.listenDeviceMsgEvent(true, this.funListenDeviceMsgEvent)
|
||||
if(this.devicesarr.length > 0){
|
||||
// console.log('11')
|
||||
}else{
|
||||
|
||||
}
|
||||
},500)
|
||||
xBlufi.listenDeviceMsgEvent(true, this.funListenDeviceMsgEvent)
|
||||
setTimeout(() => {
|
||||
this.getorderdevice()
|
||||
}, 100)
|
||||
|
@ -282,6 +286,11 @@
|
|||
}, 30000)
|
||||
},
|
||||
onHide() {
|
||||
xBlufi.notifyStartDiscoverBle({
|
||||
'isStart': false
|
||||
})
|
||||
xBlufi.listenDeviceMsgEvent(false, this.funListenDeviceMsgEvent)
|
||||
console.log('likai00');
|
||||
// 页面隐藏时清除定时器
|
||||
this.clearTimer();
|
||||
if (this.findDeviceTimer) {
|
||||
|
@ -291,6 +300,11 @@
|
|||
}
|
||||
},
|
||||
onUnload() {
|
||||
xBlufi.notifyStartDiscoverBle({
|
||||
'isStart': false
|
||||
})
|
||||
xBlufi.listenDeviceMsgEvent(false, this.funListenDeviceMsgEvent)
|
||||
console.log('likai00');
|
||||
// 页面卸载时清除定时器(防止内存泄漏)
|
||||
this.clearTimer();
|
||||
if (this.findDeviceTimer) {
|
||||
|
@ -319,6 +333,7 @@
|
|||
name: that.name
|
||||
})
|
||||
that.ver_dataflag = 1
|
||||
xBlufi.listenDeviceMsgEvent(false, that.funListenDeviceMsgEvent)
|
||||
} else if (res.cancel) {
|
||||
|
||||
}
|
||||
|
@ -589,8 +604,8 @@
|
|||
console.log("连接回调:" + JSON.stringify(options))
|
||||
if (options.result == true) {
|
||||
setTimeout(() => {
|
||||
this.ver_dataflag = 3
|
||||
this.ljflag = true
|
||||
this.ver_dataflag = 3
|
||||
}, 2000)
|
||||
xBlufi.notifyInitBleEsp32({
|
||||
deviceId: this.deviceid
|
||||
|
@ -795,6 +810,7 @@
|
|||
this.lslat = null
|
||||
}
|
||||
})
|
||||
if(this.ver_dataflag != 3){
|
||||
let that = this
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
|
@ -806,35 +822,78 @@
|
|||
title: '加载中...',
|
||||
mask: true
|
||||
})
|
||||
let flag = ''
|
||||
if(that.ver_dataflag == 3){
|
||||
flag = false
|
||||
}else{
|
||||
flag = true
|
||||
}
|
||||
let query = {
|
||||
orderId: that.deivceobj.orderId,
|
||||
lat: that.lslat,
|
||||
lon: that.lslon,
|
||||
requiredIot: flag
|
||||
requiredIot: true
|
||||
}
|
||||
|
||||
let url = '/app/order/openDevice?' + that.$tansParams(query)
|
||||
that.$u.put(url).then((res) => {
|
||||
console.log(res,'0202020202');
|
||||
if (res.code == 200 && res.data.db >= 1) {
|
||||
if (res.data.iot == false) {
|
||||
if (res.code == 200) {
|
||||
uni.showToast({
|
||||
title: '解锁成功',
|
||||
icon: 'success',
|
||||
duration: 2000
|
||||
})
|
||||
that.deivceobj.deviceLockStatus = 1
|
||||
that.getorderdevice()
|
||||
} else if(res.code == 20001){
|
||||
uni.hideLoading()
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '设备离线,请点击右上角连接车辆',
|
||||
showCancel: false,
|
||||
success: function(res) {
|
||||
if (res.confirm) {
|
||||
|
||||
}
|
||||
}
|
||||
})
|
||||
} else {
|
||||
uni.hideLoading()
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
}else{
|
||||
let that = this
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '您是否要解锁车辆?',
|
||||
showCancel: true,
|
||||
success: function(res) {
|
||||
if (res.confirm) {
|
||||
xBlufi.notifySendCustomData({
|
||||
customData: "11opensub5@"
|
||||
})
|
||||
uni.showLoading({
|
||||
title: '加载中...',
|
||||
mask: true
|
||||
})
|
||||
console.log(that.lslat,that.lslon,'临时解锁');
|
||||
console.log(that.ver_dataflag,'thatthat');
|
||||
if (that.ver_dataflag == 3) {
|
||||
xBlufi.notifySendCustomData({
|
||||
customData: "11opensub5@"
|
||||
let query = {
|
||||
orderId: that.deivceobj.orderId,
|
||||
lat: that.lslat,
|
||||
lon: that.lslon,
|
||||
requiredIot: false
|
||||
}
|
||||
let url = '/app/order/openDevice?' + that.$tansParams(query)
|
||||
that.$u.put(url).then((res) => {
|
||||
if (res.code == 200) {
|
||||
uni.showToast({
|
||||
title: '解锁成功',
|
||||
icon: 'success',
|
||||
duration: 2000
|
||||
})
|
||||
that.deivceobj.deviceLockStatus = 1
|
||||
that.getorderdevice()
|
||||
let data = {
|
||||
mac:that.mac,
|
||||
reason:'解锁',
|
||||
|
@ -844,48 +903,8 @@
|
|||
result:'成功'
|
||||
}
|
||||
that.$u.post(`/app/commandLog/bluetooth`,data).then(res => {})
|
||||
setTimeout(()=>{
|
||||
uni.hideLoading()
|
||||
},2000)
|
||||
} else {
|
||||
uni.hideLoading()
|
||||
let that = this
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '请点击右上角连接蓝牙控制,蓝牙连接需尽可能靠近车辆!',
|
||||
showCancel: false,
|
||||
success: function(res) {
|
||||
if (res.confirm) {
|
||||
|
||||
} else if (res.cancel) {
|
||||
|
||||
}
|
||||
}
|
||||
})
|
||||
let data = {
|
||||
mac:that.mac,
|
||||
reason:'解锁',
|
||||
command:'11opensub5@',
|
||||
longitude:that.lslon,
|
||||
latitude:that.lslat,
|
||||
result:'蓝牙未连接'
|
||||
}
|
||||
that.$u.post(`/app/commandLog/bluetooth`,data).then(res => {
|
||||
|
||||
})
|
||||
}
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: '解锁成功',
|
||||
icon: 'success',
|
||||
duration: 2000
|
||||
})
|
||||
that.deivceobj.deviceLockStatus = 1
|
||||
that.getorderdevice()
|
||||
}
|
||||
} else if(res.code == 20001){
|
||||
uni.hideLoading()
|
||||
if(that.ver_dataflag != 3){
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '设备离线,请点击右上角连接车辆',
|
||||
|
@ -893,12 +912,9 @@
|
|||
success: function(res) {
|
||||
if (res.confirm) {
|
||||
|
||||
} else if (res.cancel) {
|
||||
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
} else {
|
||||
uni.hideLoading()
|
||||
uni.showToast({
|
||||
|
@ -909,10 +925,11 @@
|
|||
}
|
||||
})
|
||||
} else if (res.cancel) {
|
||||
console.log('取消') // 用户点击取消
|
||||
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
} else if (this.deivceobj.deviceLockStatus == 1) {
|
||||
uni.getLocation({
|
||||
type: 'gcj02', // 国内地图更兼容
|
||||
|
@ -929,13 +946,8 @@
|
|||
console.error('获取位置失败:', err)
|
||||
}
|
||||
})
|
||||
if(this.ver_dataflag != 3){
|
||||
let that = this
|
||||
let flag = ''
|
||||
if(that.ver_dataflag == 3){
|
||||
flag = false
|
||||
}else{
|
||||
flag = true
|
||||
}
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '您是否要临时锁车?',
|
||||
|
@ -950,12 +962,66 @@
|
|||
orderId: that.deivceobj.orderId,
|
||||
lat: that.lat,
|
||||
lon: that.lon,
|
||||
requiredIot: flag
|
||||
requiredIot: true
|
||||
}
|
||||
let url = '/app/order/closeDevice?' + that.$tansParams(query)
|
||||
that.$u.put(url).then((res) => {
|
||||
if (res.code == 200 && res.data.db >= 1) {
|
||||
if(res.data.iot == false){
|
||||
if (res.code == 200) {
|
||||
uni.hideLoading()
|
||||
uni.showToast({
|
||||
title: '临时锁车成功',
|
||||
icon: 'success',
|
||||
duration: 2000
|
||||
})
|
||||
that.deivceobj.deviceLockStatus = 0
|
||||
that.getorderdevice()
|
||||
} else if(res.code == 20001){
|
||||
uni.hideLoading()
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '设备离线,请点击右上角连接车辆',
|
||||
showCancel: false,
|
||||
success: function(res) {
|
||||
if (res.confirm) {
|
||||
|
||||
}
|
||||
}
|
||||
})
|
||||
} else {
|
||||
uni.hideLoading()
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
})
|
||||
}
|
||||
})
|
||||
} else if (res.cancel) {
|
||||
console.log('取消') // 用户点击取消
|
||||
}
|
||||
}
|
||||
})
|
||||
}else{
|
||||
let that = this
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '您是否要临时锁车?',
|
||||
showCancel: true,
|
||||
success: function(res) {
|
||||
if (res.confirm) {
|
||||
uni.showLoading({
|
||||
title: '加载中...',
|
||||
mask: true
|
||||
})
|
||||
let query = {
|
||||
orderId: that.deivceobj.orderId,
|
||||
lat: that.lat,
|
||||
lon: that.lon,
|
||||
requiredIot: false
|
||||
}
|
||||
let url = '/app/order/closeDevice?' + that.$tansParams(query)
|
||||
that.$u.put(url).then((res) => {
|
||||
if (res.code == 200) {
|
||||
uni.showLoading({
|
||||
title: '加载中...',
|
||||
mask: true
|
||||
|
@ -992,8 +1058,6 @@
|
|||
success: function(res) {
|
||||
if (res.confirm) {
|
||||
|
||||
} else if (res.cancel) {
|
||||
|
||||
}
|
||||
}
|
||||
})
|
||||
|
@ -1009,19 +1073,8 @@
|
|||
console.log(res,'蓝牙')
|
||||
})
|
||||
}
|
||||
}else{
|
||||
uni.hideLoading()
|
||||
uni.showToast({
|
||||
title: '临时锁车成功',
|
||||
icon: 'success',
|
||||
duration: 2000
|
||||
})
|
||||
that.deivceobj.deviceLockStatus = 0
|
||||
that.getorderdevice()
|
||||
}
|
||||
} else if(res.code == 20001){
|
||||
uni.hideLoading()
|
||||
if(that.ver_dataflag != 3){
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '设备离线,请点击右上角连接车辆',
|
||||
|
@ -1029,12 +1082,9 @@
|
|||
success: function(res) {
|
||||
if (res.confirm) {
|
||||
|
||||
} else if (res.cancel) {
|
||||
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
} else {
|
||||
uni.hideLoading()
|
||||
uni.showToast({
|
||||
|
@ -1050,6 +1100,7 @@
|
|||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
},
|
||||
// 点击鸣笛寻车
|
||||
btnfm() {
|
||||
|
@ -1248,28 +1299,8 @@
|
|||
},
|
||||
// 还车统一调用
|
||||
gethuan() {
|
||||
if(this.deivceobj.deviceOnlineStatus == 0){
|
||||
if(this.ver_dataflag != 3){
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '请点击右上角连接蓝牙控制,蓝牙连接需尽可能靠近车辆!',
|
||||
showCancel: false,
|
||||
success: function(res) {
|
||||
if (res.confirm) {
|
||||
|
||||
} else if (res.cancel) {
|
||||
|
||||
}
|
||||
}
|
||||
})
|
||||
}else{
|
||||
let that = this
|
||||
let flag = ''
|
||||
if(that.ver_dataflag == 3){
|
||||
flag = false
|
||||
}else{
|
||||
flag = true
|
||||
}
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '您确定要还车吗?',
|
||||
|
@ -1285,11 +1316,10 @@
|
|||
picture: that.imgs,
|
||||
lon: that.lon,
|
||||
lat: that.lat,
|
||||
requiredIot: flag
|
||||
requiredIot: true
|
||||
}
|
||||
that.$u.put(`/app/order/end`, data).then(res => {
|
||||
if (res.code == 200) {
|
||||
if(res.data.iot == true){
|
||||
that.cheflag = true
|
||||
that.fjflag = false
|
||||
uni.hideLoading()
|
||||
|
@ -1303,39 +1333,6 @@
|
|||
url:'/page_user/yongche/orderxq?id=' + that.deivceobj.orderId
|
||||
})
|
||||
},1000)
|
||||
}else{
|
||||
xBlufi.notifySendCustomData({
|
||||
customData: "11closesub300@"
|
||||
})
|
||||
let data = {
|
||||
mac:that.mac,
|
||||
reason:'还车',
|
||||
command:'11closesub300@',
|
||||
longitude:that.lon,
|
||||
latitude:that.lat,
|
||||
result:'成功'
|
||||
}
|
||||
that.$u.post(`/app/commandLog/bluetooth`,data).then(res => {
|
||||
console.log(res,'蓝牙')
|
||||
})
|
||||
xBlufi.notifySendCustomData({
|
||||
customData: "11reboot@"
|
||||
})
|
||||
setTimeout(()=>{
|
||||
uni.hideLoading()
|
||||
xBlufi.notifyConnectBle({
|
||||
isStart: false,
|
||||
deviceId: that.deviceId,
|
||||
name: that.name
|
||||
})
|
||||
that.getorderdevice()
|
||||
setTimeout(()=>{
|
||||
uni.navigateTo({
|
||||
url:'/page_user/yongche/orderxq?id=' + that.deivceobj.orderId
|
||||
})
|
||||
},1000)
|
||||
},1000)
|
||||
}
|
||||
}else if(res.msg == null) {
|
||||
uni.hideLoading()
|
||||
uni.showToast({
|
||||
|
@ -1344,20 +1341,23 @@
|
|||
duration: 2000
|
||||
})
|
||||
} else {
|
||||
uni.hideLoading()
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
})
|
||||
}
|
||||
})
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: res.msg,
|
||||
showCancel: false,
|
||||
success: function(res) {
|
||||
if (res.confirm) {
|
||||
|
||||
} else if (res.cancel) {
|
||||
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
}else{
|
||||
let that = this
|
||||
uni.showModal({
|
||||
|
@ -1370,37 +1370,19 @@
|
|||
title: '还车中...',
|
||||
mask: true
|
||||
})
|
||||
xBlufi.notifySendCustomData({
|
||||
customData: "11llosesub300@"
|
||||
})
|
||||
that.fjflag = false
|
||||
let data = {
|
||||
orderId: that.deivceobj.orderId,
|
||||
picture: that.imgs,
|
||||
lon: that.lon,
|
||||
lat: that.lat
|
||||
lat: that.lat,
|
||||
requiredIot: false
|
||||
}
|
||||
that.$u.put(`/app/order/end`, data).then(res => {
|
||||
if (res.code == 200) {
|
||||
if(res.data.iot == true){
|
||||
that.cheflag = true
|
||||
that.fjflag = false
|
||||
uni.hideLoading()
|
||||
uni.showToast({
|
||||
title: '还车成功',
|
||||
icon: 'success',
|
||||
duration: 2000
|
||||
})
|
||||
xBlufi.notifyConnectBle({
|
||||
isStart: false,
|
||||
deviceId: that.deviceId,
|
||||
name: that.name
|
||||
})
|
||||
setTimeout(()=>{
|
||||
uni.navigateTo({
|
||||
url:'/page_user/yongche/orderxq?id=' + that.deivceobj.orderId
|
||||
})
|
||||
},1000)
|
||||
}else{
|
||||
xBlufi.notifySendCustomData({
|
||||
customData: "11llosesub300@"
|
||||
})
|
||||
setTimeout(()=>{
|
||||
xBlufi.notifySendCustomData({
|
||||
customData: "11reboot@"
|
||||
|
@ -1413,7 +1395,6 @@
|
|||
})
|
||||
},1000)
|
||||
},1000)
|
||||
}
|
||||
}else if(res.msg == null) {
|
||||
uni.hideLoading()
|
||||
uni.showToast({
|
||||
|
@ -1423,10 +1404,17 @@
|
|||
})
|
||||
} else {
|
||||
uni.hideLoading()
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: res.msg,
|
||||
showCancel: false,
|
||||
success: function(res) {
|
||||
if (res.confirm) {
|
||||
|
||||
} else if (res.cancel) {
|
||||
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
|
|
Loading…
Reference in New Issue
Block a user