小鹿骑行
This commit is contained in:
parent
b0d8e74c40
commit
9b9e24e65c
|
|
@ -1272,7 +1272,7 @@ function init() {
|
||||||
|
|
||||||
if (isnotexist) {
|
if (isnotexist) {
|
||||||
devicesList.push(devices.devices[0]);
|
devicesList.push(devices.devices[0]);
|
||||||
console.log("devicesList",devicesList);
|
// console.log("devicesList",devicesList);
|
||||||
// let obj = {
|
// let obj = {
|
||||||
// 'type': mDeviceEvent.XBLUFI_TYPE.TYPE_GET_DEVICE_LISTS,
|
// 'type': mDeviceEvent.XBLUFI_TYPE.TYPE_GET_DEVICE_LISTS,
|
||||||
// 'result': true,
|
// 'result': true,
|
||||||
|
|
@ -1295,7 +1295,7 @@ function init() {
|
||||||
|
|
||||||
if (isnotexist) {
|
if (isnotexist) {
|
||||||
devicesList.push(devices[0]);
|
devicesList.push(devices[0]);
|
||||||
console.log("devicesList",devicesList);
|
// console.log("devicesList",devicesList);
|
||||||
// let obj = {
|
// let obj = {
|
||||||
// 'type': mDeviceEvent.XBLUFI_TYPE.TYPE_GET_DEVICE_LISTS,
|
// 'type': mDeviceEvent.XBLUFI_TYPE.TYPE_GET_DEVICE_LISTS,
|
||||||
// 'result': true,
|
// 'result': true,
|
||||||
|
|
|
||||||
|
|
@ -176,7 +176,7 @@ function listenSendRouterSsidAndPassword(isSetListener, funtion) {
|
||||||
|
|
||||||
|
|
||||||
function notifySendCustomData(options) {
|
function notifySendCustomData(options) {
|
||||||
console.log("设备数据",options)
|
// console.log("设备数据",options)
|
||||||
mOnFire.fire(OnFireEvent.EVENT_NOFITY_SEND_CUSTON_DATA, options);
|
mOnFire.fire(OnFireEvent.EVENT_NOFITY_SEND_CUSTON_DATA, options);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -507,6 +507,10 @@
|
||||||
},
|
},
|
||||||
onLoad(option) {
|
onLoad(option) {
|
||||||
xBlufi.initXBlufi(1)
|
xBlufi.initXBlufi(1)
|
||||||
|
xBlufi.notifyStartDiscoverBle({
|
||||||
|
'isStart': true
|
||||||
|
})
|
||||||
|
xBlufi.listenDeviceMsgEvent(true, this.funListenDeviceMsgEvent)
|
||||||
this.$u.get("/app/orderDevice/mineUsing").then((res) => {
|
this.$u.get("/app/orderDevice/mineUsing").then((res) => {
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
if (res.data) {
|
if (res.data) {
|
||||||
|
|
@ -677,15 +681,21 @@
|
||||||
},1500)
|
},1500)
|
||||||
},
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
xBlufi.notifyConnectBle({
|
|
||||||
isStart: false,
|
},
|
||||||
deviceId: this.deviceId,
|
onHide() {
|
||||||
name: this.name
|
|
||||||
})
|
|
||||||
xBlufi.notifyStartDiscoverBle({
|
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: {
|
methods: {
|
||||||
getQiniuToken() {
|
getQiniuToken() {
|
||||||
|
|
@ -879,7 +889,7 @@
|
||||||
// 判断离线连接蓝牙
|
// 判断离线连接蓝牙
|
||||||
findDevice() {
|
findDevice() {
|
||||||
// 使用 find 方法查找匹配的设备
|
// 使用 find 方法查找匹配的设备
|
||||||
console.log(this.devicesarr);
|
// console.log(this.devicesarr);
|
||||||
const matchedDevice = this.devicesarr.find(device => {
|
const matchedDevice = this.devicesarr.find(device => {
|
||||||
// console.log(device.name, this.mac, '111')
|
// console.log(device.name, this.mac, '111')
|
||||||
return device.name.slice(-12) == this.mac.slice(-12)
|
return device.name.slice(-12) == this.mac.slice(-12)
|
||||||
|
|
|
||||||
|
|
@ -21,35 +21,40 @@
|
||||||
<view class="new_infocard">
|
<view class="new_infocard">
|
||||||
<view class="topsn">
|
<view class="topsn">
|
||||||
<view class="lt" style="display: flex;align-items: center;">
|
<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
|
||||||
<text style="width: 14rpx;height: 14rpx;border-radius: 50%;background-color: red;margin-right: 10rpx;" v-if="deviceInfos.onlineStatus == 0"></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}}
|
车牌:{{deviceInfos.vehicleNum == null ? '--' : deviceInfos.vehicleNum}}
|
||||||
</view>
|
</view>
|
||||||
<view class="" style="display: flex;justify-content: space-between;">
|
<view class="" style="display: flex;justify-content: space-between;">
|
||||||
<view class="cent">
|
<view class="cent">
|
||||||
<view class="lypic" v-if="deviceInfos.music == 0" @click="btnsy">
|
<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>
|
||||||
<view class="lypic" v-if="deviceInfos.music == 1" @click="btnsy">
|
<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>
|
||||||
<view class="lypic" v-if="deviceInfos.music == 2" @click="btnsy">
|
<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>
|
||||||
|
|
||||||
<view class="lypic" v-if="ver_dataflag == 3" @click="btnly">
|
<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>
|
||||||
<!-- <view class="lypic" v-if="ver_dataflag == 1" @click="btnly">
|
<!-- <view class="lypic" v-if="ver_dataflag == 1" @click="btnly">
|
||||||
<image src="https://api.ccttiot.com/smartmeter/img/static/uCdHjNaNfD9aikVg9Cuk" mode=""></image>
|
<image src="https://api.ccttiot.com/smartmeter/img/static/uCdHjNaNfD9aikVg9Cuk" mode=""></image>
|
||||||
</view> -->
|
</view> -->
|
||||||
<view class="lypic" v-if="ver_dataflag == 1" @click="btnly">
|
<view class="lypic" v-if="ver_dataflag == 1" @click="btnly">
|
||||||
<image
|
<image class="glow-image"
|
||||||
class="glow-image"
|
|
||||||
src="https://api.ccttiot.com/smartmeter/img/static/uCdHjNaNfD9aikVg9Cuk"
|
src="https://api.ccttiot.com/smartmeter/img/static/uCdHjNaNfD9aikVg9Cuk"
|
||||||
mode="aspectFit"
|
mode="aspectFit" :class="{ 'visible': isVisible, 'hidden': !isVisible }" />
|
||||||
:class="{ 'visible': isVisible, 'hidden': !isVisible }"
|
|
||||||
/>
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
@ -67,7 +72,8 @@
|
||||||
<view class="issuo" v-if="deviceInfos.lockStatus == 0">
|
<view class="issuo" v-if="deviceInfos.lockStatus == 0">
|
||||||
锁已关
|
锁已关
|
||||||
</view>
|
</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>
|
||||||
</view>
|
</view>
|
||||||
|
|
@ -86,30 +92,43 @@
|
||||||
</view>
|
</view>
|
||||||
<view class="bikexx">
|
<view class="bikexx">
|
||||||
<view class="dianliang">
|
<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 >= 0 && deviceInfos.remainingPower < 20 "
|
||||||
<image v-if="deviceInfos.remainingPower >= 20 && deviceInfos.remainingPower < 50 " src="https://api.ccttiot.com/smartmeter/img/static/u2gp2pE9kPGwaJ4MKUxE" mode=""></image>
|
src="https://api.ccttiot.com/smartmeter/img/static/u8M9KmIfHXpmeifTwCzj" 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 >= 20 && deviceInfos.remainingPower < 50 "
|
||||||
<image v-if="deviceInfos.remainingPower >= 80 && deviceInfos.remainingPower <= 100 " src="https://api.ccttiot.com/smartmeter/img/static/uo75cOfYZiQoxZQAI3FH" mode=""></image>
|
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="">
|
||||||
<view class="dl">
|
<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>
|
||||||
<view class="dy">
|
<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>
|
||||||
</view>
|
</view>
|
||||||
<view class="xuhang">
|
<view class="xuhang">
|
||||||
<view class="">
|
<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>
|
</view>
|
||||||
<view class="ewm">
|
<view class="ewm">
|
||||||
<view class="" @click="toTrack">
|
<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>
|
||||||
<view class="" style="margin-top: 14rpx;" @click="btndaohang">
|
<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>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
@ -132,7 +151,9 @@
|
||||||
</view>
|
</view>
|
||||||
响铃寻车
|
响铃寻车
|
||||||
</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">
|
<view class="pic">
|
||||||
<image src="https://api.ccttiot.com/smartmeter/img/static/ujhsaJeL6KVrYgFSEKkj" mode=""></image>
|
<image src="https://api.ccttiot.com/smartmeter/img/static/ujhsaJeL6KVrYgFSEKkj" mode=""></image>
|
||||||
</view>
|
</view>
|
||||||
|
|
@ -247,28 +268,36 @@
|
||||||
运营区域:<span>{{deviceInfos.areaName == null ? '--' : deviceInfos.areaName}}</span>
|
运营区域:<span>{{deviceInfos.areaName == null ? '--' : deviceInfos.areaName}}</span>
|
||||||
</view>
|
</view>
|
||||||
<view class="one">
|
<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>
|
||||||
<view class="one" @click="btndd">
|
<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>
|
||||||
<view class="one">
|
<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>
|
||||||
<view class="one" style="display: flex;justify-content: space-between;align-items: center;">
|
<view class="one" style="display: flex;justify-content: space-between;align-items: center;">
|
||||||
<view class="one" style="margin-bottom: 0;">
|
<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>
|
</view>
|
||||||
<span>{{deviceInfos.lastLocationTime == null ? '--' : deviceInfos.lastLocationTime}}</span>
|
<span>{{deviceInfos.lastLocationTime == null ? '--' : deviceInfos.lastLocationTime}}</span>
|
||||||
</view>
|
</view>
|
||||||
<view class="one" style="display: flex;justify-content: space-between;align-items: center;">
|
<view class="one" style="display: flex;justify-content: space-between;align-items: center;">
|
||||||
<view class="one" style="margin-bottom: 0;">
|
<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>
|
</view>
|
||||||
<span>{{deviceInfos.lastOnlineTime == null ? '--' : deviceInfos.lastOnlineTime}}</span>
|
<span>{{deviceInfos.lastOnlineTime == null ? '--' : deviceInfos.lastOnlineTime}}</span>
|
||||||
</view>
|
</view>
|
||||||
<view class="one">
|
<view class="one">
|
||||||
手机定位时间: <span>{{deviceInfos.mobileLocationTime == null ? '--' : deviceInfos.mobileLocationTime}}</span>
|
手机定位时间:
|
||||||
|
<span>{{deviceInfos.mobileLocationTime == null ? '--' : deviceInfos.mobileLocationTime}}</span>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
@ -343,21 +372,24 @@
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="sound-options">
|
<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">
|
<view class="icon">
|
||||||
<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>
|
||||||
<view class="label">静音模式</view>
|
<view class="label">静音模式</view>
|
||||||
<view class="desc">将模块所有声音全部设为静音</view>
|
<view class="desc">将模块所有声音全部设为静音</view>
|
||||||
</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">
|
<view class="icon">
|
||||||
<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>
|
||||||
<view class="label">语音模式</view>
|
<view class="label">语音模式</view>
|
||||||
<view class="desc">将模块所有声音设为语音播报</view>
|
<view class="desc">将模块所有声音设为语音播报</view>
|
||||||
</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">
|
<view class="icon">
|
||||||
<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>
|
||||||
|
|
@ -370,7 +402,9 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { showLoading } from "../../components/blufi/util"
|
import {
|
||||||
|
showLoading
|
||||||
|
} from "../../components/blufi/util"
|
||||||
|
|
||||||
const app = getApp()
|
const app = getApp()
|
||||||
var xBlufi = require("@/components/blufi/xBlufi.js")
|
var xBlufi = require("@/components/blufi/xBlufi.js")
|
||||||
|
|
@ -379,7 +413,16 @@ import { showLoading } from "../../components/blufi/util"
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
shengyin: false,
|
shengyin: false,
|
||||||
shengyinlist:[{label:'静音',value:0},{label:'语音',value:1},{label:'彩铃',value:2}],
|
shengyinlist: [{
|
||||||
|
label: '静音',
|
||||||
|
value: 0
|
||||||
|
}, {
|
||||||
|
label: '语音',
|
||||||
|
value: 1
|
||||||
|
}, {
|
||||||
|
label: '彩铃',
|
||||||
|
value: 2
|
||||||
|
}],
|
||||||
|
|
||||||
devicesList: [],
|
devicesList: [],
|
||||||
searching: false,
|
searching: false,
|
||||||
|
|
@ -457,7 +500,9 @@ import { showLoading } from "../../components/blufi/util"
|
||||||
isMarkerVisible: true,
|
isMarkerVisible: true,
|
||||||
|
|
||||||
isVisible: true,
|
isVisible: true,
|
||||||
glowInterval: null
|
glowInterval: null,
|
||||||
|
lat:'',
|
||||||
|
lon:''
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad(e) {
|
onLoad(e) {
|
||||||
|
|
@ -467,7 +512,21 @@ import { showLoading } from "../../components/blufi/util"
|
||||||
},
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
this.getyunying()
|
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() {
|
mounted() {
|
||||||
// 开启呼吸灯效果
|
// 开启呼吸灯效果
|
||||||
|
|
@ -483,6 +542,10 @@ import { showLoading } from "../../components/blufi/util"
|
||||||
deviceId: this.deviceid,
|
deviceId: this.deviceid,
|
||||||
name: this.name
|
name: this.name
|
||||||
})
|
})
|
||||||
|
xBlufi.notifyStartDiscoverBle({
|
||||||
|
'isStart': false
|
||||||
|
})
|
||||||
|
xBlufi.listenDeviceMsgEvent(false, this.funListenDeviceMsgEvent)
|
||||||
if (this.findDeviceTimer) {
|
if (this.findDeviceTimer) {
|
||||||
clearTimeout(this.findDeviceTimer)
|
clearTimeout(this.findDeviceTimer)
|
||||||
this.findDeviceTimer = null
|
this.findDeviceTimer = null
|
||||||
|
|
@ -516,7 +579,8 @@ import { showLoading } from "../../components/blufi/util"
|
||||||
// 点击跳转到订单详情
|
// 点击跳转到订单详情
|
||||||
btndd() {
|
btndd() {
|
||||||
uni.navigateTo({
|
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:
|
case xBlufi.XBLUFI_TYPE.TYPE_RECIEVE_CUSTON_DATA:
|
||||||
this.ver_dataflag = 3
|
this.ver_dataflag = 3
|
||||||
console.log("1收到设备发来的自定义数据结果:", options.data)
|
console.log("1收到设备发来的自定义数据结果:", options.data)
|
||||||
|
this.getlysj(options.data)
|
||||||
break;
|
break;
|
||||||
case xBlufi.XBLUFI_TYPE.TYPE_GET_DEVICE_LISTS_START:
|
case xBlufi.XBLUFI_TYPE.TYPE_GET_DEVICE_LISTS_START:
|
||||||
if (!options.result) {
|
if (!options.result) {
|
||||||
|
|
@ -757,6 +822,146 @@ import { showLoading } from "../../components/blufi/util"
|
||||||
break;
|
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() {
|
btnjingyin() {
|
||||||
|
|
@ -947,33 +1152,27 @@ import { showLoading } from "../../components/blufi/util"
|
||||||
title: '加载中...'
|
title: '加载中...'
|
||||||
})
|
})
|
||||||
console.log('点击了....1')
|
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) {
|
if (this.ver_dataflag == 3) {
|
||||||
xBlufi.notifySendCustomData({
|
xBlufi.notifySendCustomData({
|
||||||
customData: "11opensub5@"
|
customData: "11opensub5@"
|
||||||
})
|
})
|
||||||
}else{
|
this.$u.put(`/bst/device/iot/unlock?id=${this.sn}&requiredIot=false`).then((res) => {
|
||||||
this.lanya(0)
|
if (res.code == 200) {
|
||||||
let that = this
|
this.deviceInfo()
|
||||||
uni.showModal({
|
uni.showToast({
|
||||||
title: '提示',
|
title: '操作成功',
|
||||||
content: res.msg,
|
icon: 'success',
|
||||||
showCancel: false,
|
duration: 3000
|
||||||
success: function(res) {
|
|
||||||
if (res.confirm) {
|
|
||||||
} else if (res.cancel) {
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
|
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(() => {
|
setTimeout(() => {
|
||||||
this.jieliuflag = true
|
this.jieliuflag = true
|
||||||
}, 2000)
|
}, 2000)
|
||||||
|
|
@ -989,14 +1188,9 @@ import { showLoading } from "../../components/blufi/util"
|
||||||
}, 2000)
|
}, 2000)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
} else if (num == 1) {
|
} else {
|
||||||
uni.showLoading({
|
this.$u.put(`/bst/device/iot/unlock?id=${this.sn}&requiredIot=true`).then((res) => {
|
||||||
title: '加载中...'
|
|
||||||
})
|
|
||||||
console.log('点击了....2')
|
|
||||||
this.$u.put('/bst/device/iot/lock?id=' + this.sn).then((res) => {
|
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
// 处理接口返回的数据,将边界数据转换为地图组件需要的折线结构
|
|
||||||
this.deviceInfo()
|
this.deviceInfo()
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: '操作成功',
|
title: '操作成功',
|
||||||
|
|
@ -1007,25 +1201,92 @@ import { showLoading } from "../../components/blufi/util"
|
||||||
this.jieliuflag = true
|
this.jieliuflag = true
|
||||||
}, 2000)
|
}, 2000)
|
||||||
}else if(res.code == 20001){
|
}else if(res.code == 20001){
|
||||||
if(this.ver_dataflag == 3){
|
uni.hideLoading()
|
||||||
xBlufi.notifySendCustomData({
|
|
||||||
customData: "11closesub200@"
|
|
||||||
})
|
|
||||||
}else{
|
|
||||||
this.lanya(0)
|
|
||||||
let that = this
|
|
||||||
uni.showModal({
|
uni.showModal({
|
||||||
title: '提示',
|
title: '提示',
|
||||||
content: res.msg,
|
content: '设备离线,请进行连接蓝牙开锁',
|
||||||
showCancel: false,
|
showCancel: false,
|
||||||
success: function(res) {
|
success: function(res) {
|
||||||
if (res.confirm) {
|
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(() => {
|
setTimeout(() => {
|
||||||
this.jieliuflag = true
|
this.jieliuflag = true
|
||||||
}, 2000)
|
}, 2000)
|
||||||
|
|
@ -1041,6 +1302,7 @@ import { showLoading } from "../../components/blufi/util"
|
||||||
}, 2000)
|
}, 2000)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
}
|
||||||
} else if (num == 2) {
|
} else if (num == 2) {
|
||||||
uni.showLoading({
|
uni.showLoading({
|
||||||
title: '加载中...'
|
title: '加载中...'
|
||||||
|
|
@ -1684,7 +1946,7 @@ import { showLoading } from "../../components/blufi/util"
|
||||||
|
|
||||||
.new_infocard {
|
.new_infocard {
|
||||||
width: 750rpx;
|
width: 750rpx;
|
||||||
height: 80vh;
|
max-height: 100vh;
|
||||||
background: #FFFFFF;
|
background: #FFFFFF;
|
||||||
border-radius: 30rpx;
|
border-radius: 30rpx;
|
||||||
padding: 30rpx;
|
padding: 30rpx;
|
||||||
|
|
@ -1692,59 +1954,72 @@ import { showLoading } from "../../components/blufi/util"
|
||||||
position: absolute;
|
position: absolute;
|
||||||
z-index: 99;
|
z-index: 99;
|
||||||
top: 800rpx;
|
top: 800rpx;
|
||||||
|
|
||||||
.zuche {
|
.zuche {
|
||||||
margin-top: 26rpx;
|
margin-top: 26rpx;
|
||||||
|
|
||||||
.one {
|
.one {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|
||||||
image {
|
image {
|
||||||
width: 32rpx;
|
width: 32rpx;
|
||||||
height: 32rpx;
|
height: 32rpx;
|
||||||
margin-right: 4rpx;
|
margin-right: 4rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
span {
|
span {
|
||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
color: #3D3D3D;
|
color: #3D3D3D;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
view {
|
view {
|
||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
color: #808080;
|
color: #808080;
|
||||||
margin-bottom: 26rpx;
|
margin-bottom: 26rpx;
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
|
|
||||||
span {
|
span {
|
||||||
color: #3D3D3D;
|
color: #3D3D3D;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.bikejcxx {
|
.bikejcxx {
|
||||||
margin-top: 26rpx;
|
margin-top: 26rpx;
|
||||||
border-bottom: 1rpx solid #D8D8D8;
|
border-bottom: 1rpx solid #D8D8D8;
|
||||||
|
|
||||||
.wai {
|
.wai {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
margin-bottom: 26rpx;
|
margin-bottom: 26rpx;
|
||||||
|
|
||||||
.lt {
|
.lt {
|
||||||
width: 46%;
|
width: 46%;
|
||||||
text-align: left;
|
text-align: left;
|
||||||
font-size: 24rpx;
|
font-size: 24rpx;
|
||||||
color: #808080;
|
color: #808080;
|
||||||
|
|
||||||
span {
|
span {
|
||||||
color: #3D3D3D;
|
color: #3D3D3D;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.caozuoanniu {
|
.caozuoanniu {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
margin-top: 26rpx;
|
margin-top: 26rpx;
|
||||||
border-bottom: 1rpx solid #D8D8D8;
|
border-bottom: 1rpx solid #D8D8D8;
|
||||||
|
|
||||||
.dangeanniu {
|
.dangeanniu {
|
||||||
width: 20%;
|
width: 20%;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
margin-bottom: 28rpx;
|
margin-bottom: 28rpx;
|
||||||
|
|
||||||
.pic {
|
.pic {
|
||||||
width: 88rpx;
|
width: 88rpx;
|
||||||
height: 88rpx;
|
height: 88rpx;
|
||||||
|
|
@ -1752,6 +2027,7 @@ import { showLoading } from "../../components/blufi/util"
|
||||||
border-radius: 6rpx 6rpx 6rpx 6rpx;
|
border-radius: 6rpx 6rpx 6rpx 6rpx;
|
||||||
margin: auto;
|
margin: auto;
|
||||||
margin-bottom: 14rpx;
|
margin-bottom: 14rpx;
|
||||||
|
|
||||||
image {
|
image {
|
||||||
width: 42rpx;
|
width: 42rpx;
|
||||||
height: 42rpx;
|
height: 42rpx;
|
||||||
|
|
@ -1760,6 +2036,7 @@ import { showLoading } from "../../components/blufi/util"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.ewm {
|
.ewm {
|
||||||
view {
|
view {
|
||||||
width: 140rpx;
|
width: 140rpx;
|
||||||
|
|
@ -1774,6 +2051,7 @@ import { showLoading } from "../../components/blufi/util"
|
||||||
padding-left: 18rpx !important;
|
padding-left: 18rpx !important;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
|
|
||||||
image {
|
image {
|
||||||
width: 26rpx;
|
width: 26rpx;
|
||||||
height: 26rpx;
|
height: 26rpx;
|
||||||
|
|
@ -1781,6 +2059,7 @@ import { showLoading } from "../../components/blufi/util"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.xuhang {
|
.xuhang {
|
||||||
view {
|
view {
|
||||||
width: 284rpx;
|
width: 284rpx;
|
||||||
|
|
@ -1793,6 +2072,7 @@ import { showLoading } from "../../components/blufi/util"
|
||||||
color: #847f7f;
|
color: #847f7f;
|
||||||
padding-left: 18rpx;
|
padding-left: 18rpx;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
|
|
||||||
image {
|
image {
|
||||||
width: 46rpx;
|
width: 46rpx;
|
||||||
height: 46rpx;
|
height: 46rpx;
|
||||||
|
|
@ -1800,6 +2080,7 @@ import { showLoading } from "../../components/blufi/util"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.bikesn {
|
.bikesn {
|
||||||
font-size: 24rpx;
|
font-size: 24rpx;
|
||||||
color: #7C7C7C;
|
color: #7C7C7C;
|
||||||
|
|
@ -1809,38 +2090,46 @@ import { showLoading } from "../../components/blufi/util"
|
||||||
border-bottom: 1rpx solid #D8D8D8;
|
border-bottom: 1rpx solid #D8D8D8;
|
||||||
padding-bottom: 26rpx;
|
padding-bottom: 26rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.cent {
|
.cent {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|
||||||
.lypic {
|
.lypic {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
image {
|
image {
|
||||||
width: 36rpx;
|
width: 36rpx;
|
||||||
height: 36rpx;
|
height: 36rpx;
|
||||||
margin-right: 8rpx;
|
margin-right: 8rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.glow-image {
|
.glow-image {
|
||||||
width: 36rpx;
|
width: 36rpx;
|
||||||
height: 36rpx;
|
height: 36rpx;
|
||||||
margin-right: 8rpx;
|
margin-right: 8rpx;
|
||||||
transition: all 1s ease-in-out;
|
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 {
|
.visible {
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
transform: scale(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 {
|
.hidden {
|
||||||
opacity: 0.3;
|
opacity: 0.3;
|
||||||
transform: scale(0.95);
|
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 {
|
.bikexx {
|
||||||
margin-top: 26rpx;
|
margin-top: 26rpx;
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|
@ -1848,6 +2137,7 @@ import { showLoading } from "../../components/blufi/util"
|
||||||
border-bottom: 1rpx solid #D8D8D8;
|
border-bottom: 1rpx solid #D8D8D8;
|
||||||
padding-bottom: 26rpx;
|
padding-bottom: 26rpx;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
|
|
||||||
.dianliang {
|
.dianliang {
|
||||||
position: relative;
|
position: relative;
|
||||||
background: linear-gradient(to right, #c0dfff, #fff);
|
background: linear-gradient(to right, #c0dfff, #fff);
|
||||||
|
|
@ -1857,38 +2147,45 @@ import { showLoading } from "../../components/blufi/util"
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
padding: 0 20rpx;
|
padding: 0 20rpx;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
|
|
||||||
.dl {
|
.dl {
|
||||||
margin-top: 10rpx;
|
margin-top: 10rpx;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
color: #847f7f;
|
color: #847f7f;
|
||||||
font-size: 24rpx;
|
font-size: 24rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.dy {
|
.dy {
|
||||||
margin-top: 2rpx;
|
margin-top: 2rpx;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
color: #847f7f;
|
color: #847f7f;
|
||||||
font-size: 24rpx;
|
font-size: 24rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
view {
|
view {
|
||||||
padding-left: 14rpx;
|
padding-left: 14rpx;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
font-size: 24rpx;
|
font-size: 24rpx;
|
||||||
color: #3D3D3D;
|
color: #3D3D3D;
|
||||||
|
|
||||||
span {
|
span {
|
||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
image {
|
image {
|
||||||
width: 22rpx;
|
width: 22rpx;
|
||||||
height: 48rpx;
|
height: 48rpx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.topsn {
|
.topsn {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
padding-bottom: 13rpx;
|
padding-bottom: 13rpx;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
|
|
||||||
.lt {
|
.lt {
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
font-size: 30rpx;
|
font-size: 30rpx;
|
||||||
|
|
@ -1896,8 +2193,10 @@ import { showLoading } from "../../components/blufi/util"
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.rt {
|
.rt {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|
||||||
.issuo {
|
.issuo {
|
||||||
width: 104rpx;
|
width: 104rpx;
|
||||||
height: 42rpx;
|
height: 42rpx;
|
||||||
|
|
@ -1909,6 +2208,7 @@ import { showLoading } from "../../components/blufi/util"
|
||||||
font-size: 24rpx;
|
font-size: 24rpx;
|
||||||
color: #3D3D3D;
|
color: #3D3D3D;
|
||||||
}
|
}
|
||||||
|
|
||||||
.stutas {
|
.stutas {
|
||||||
span {
|
span {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
|
|
@ -1925,6 +2225,7 @@ import { showLoading } from "../../components/blufi/util"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.tip_box {
|
.tip_box {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
left: 72rpx;
|
left: 72rpx;
|
||||||
|
|
@ -1934,6 +2235,7 @@ import { showLoading } from "../../components/blufi/util"
|
||||||
border-radius: 30rpx 30rpx 30rpx 30rpx;
|
border-radius: 30rpx 30rpx 30rpx 30rpx;
|
||||||
z-index: 110;
|
z-index: 110;
|
||||||
padding-bottom: 100rpx;
|
padding-bottom: 100rpx;
|
||||||
|
|
||||||
.saveQr {
|
.saveQr {
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
margin-top: 30rpx;
|
margin-top: 30rpx;
|
||||||
|
|
@ -1948,8 +2250,10 @@ import { showLoading } from "../../components/blufi/util"
|
||||||
font-size: 36rpx;
|
font-size: 36rpx;
|
||||||
color: #FFFFFF;
|
color: #FFFFFF;
|
||||||
}
|
}
|
||||||
|
|
||||||
.top {
|
.top {
|
||||||
padding: 52rpx 38rpx 42rpx 36rpx;
|
padding: 52rpx 38rpx 42rpx 36rpx;
|
||||||
|
|
||||||
.ipt_box {
|
.ipt_box {
|
||||||
margin-top: 22rpx;
|
margin-top: 22rpx;
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|
@ -2069,16 +2373,19 @@ import { showLoading } from "../../components/blufi/util"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@keyframes slideUp {
|
@keyframes slideUp {
|
||||||
from {
|
from {
|
||||||
transform: translateY(100%);
|
transform: translateY(100%);
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
to {
|
to {
|
||||||
transform: translateY(0);
|
transform: translateY(0);
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 添加声音选择组件样式 */
|
/* 添加声音选择组件样式 */
|
||||||
.sound-select {
|
.sound-select {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
|
|
@ -2091,6 +2398,7 @@ import { showLoading } from "../../components/blufi/util"
|
||||||
padding: 30rpx;
|
padding: 30rpx;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
animation: slideUp 0.3s ease-out forwards;
|
animation: slideUp 0.3s ease-out forwards;
|
||||||
|
|
||||||
.sound-header {
|
.sound-header {
|
||||||
position: relative;
|
position: relative;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
|
@ -2123,6 +2431,7 @@ import { showLoading } from "../../components/blufi/util"
|
||||||
&.active {
|
&.active {
|
||||||
background: #ECF5FF;
|
background: #ECF5FF;
|
||||||
border: 2rpx solid #4C97E7;
|
border: 2rpx solid #4C97E7;
|
||||||
|
|
||||||
&::after {
|
&::after {
|
||||||
content: '';
|
content: '';
|
||||||
position: absolute;
|
position: absolute;
|
||||||
|
|
|
||||||
|
|
@ -47,6 +47,7 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
var xBlufi = require("@/components/blufi/xBlufi.js")
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
|
@ -145,6 +146,7 @@
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
gethc(){
|
gethc(){
|
||||||
|
if(this.flag == true){
|
||||||
let data = {
|
let data = {
|
||||||
orderId:this.orderId,
|
orderId:this.orderId,
|
||||||
picture:this.videoUrl,
|
picture:this.videoUrl,
|
||||||
|
|
@ -154,7 +156,6 @@
|
||||||
}
|
}
|
||||||
this.$u.put(`/app/order/end`,data).then(res =>{
|
this.$u.put(`/app/order/end`,data).then(res =>{
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
if(res.data.iot == true){
|
|
||||||
this.fjflag = false
|
this.fjflag = false
|
||||||
uni.hideLoading()
|
uni.hideLoading()
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
|
|
@ -167,25 +168,6 @@
|
||||||
url:'/page_user/yongche/orderxq?id=' + this.orderId
|
url:'/page_user/yongche/orderxq?id=' + this.orderId
|
||||||
})
|
})
|
||||||
},1000)
|
},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) {
|
}else if(res.msg == null) {
|
||||||
uni.hideLoading()
|
uni.hideLoading()
|
||||||
uni.showToast({
|
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() {
|
getisInOrder() {
|
||||||
|
|
|
||||||
|
|
@ -258,7 +258,9 @@ export default {
|
||||||
deviceId: this.deviceid,
|
deviceId: this.deviceid,
|
||||||
name: this.devicename
|
name: this.devicename
|
||||||
})
|
})
|
||||||
uni.navigateBack()
|
uni.reLaunch({
|
||||||
|
url:'/pages/myorder/returned/index'
|
||||||
|
})
|
||||||
},1000)
|
},1000)
|
||||||
}else{
|
}else{
|
||||||
uni.hideLoading()
|
uni.hideLoading()
|
||||||
|
|
|
||||||
|
|
@ -227,10 +227,16 @@
|
||||||
<text v-if="selectedCoupon">{{selectedCoupon.name.length > 4 ? selectedCoupon.name.slice(0,4) + '...' : selectedCoupon.name}}(优惠¥{{youhuiobj.discountAmount}})</text>
|
<text v-if="selectedCoupon">{{selectedCoupon.name.length > 4 ? selectedCoupon.name.slice(0,4) + '...' : selectedCoupon.name}}(优惠¥{{youhuiobj.discountAmount}})</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="kefu" @click="getyajin" v-if="info.suitDepositDeduction && info.isCredit == false">
|
<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>
|
||||||
<view class="kefu" @click="getzhifu">
|
<view class="kefu" @click="getzhifu">
|
||||||
{{channelobj[0].name}}<text style="font-weight: 400;">(¥{{info.totalFee}})</text>
|
{{channelobj[0].name}}<text style="font-weight: 400;">(¥{{info.totalFee}})</text>
|
||||||
|
<text class="xiao">
|
||||||
|
支付完成,全部押金返回账户
|
||||||
|
</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
@ -288,7 +294,10 @@
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="mask" v-if="kefuflag"></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>
|
<image class="kfren" @click="btntel" src="https://api.ccttiot.com/smartmeter/img/static/uJd9ccJt76zc7r2Nlpb8" mode=""></image>
|
||||||
|
联系客服
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
@ -885,17 +894,25 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.kfren{
|
.kfrens{
|
||||||
position: fixed;
|
position: fixed;
|
||||||
right: 30rpx;
|
right: 30rpx;
|
||||||
top: 40%;
|
top: 40%;
|
||||||
z-index: 99;
|
z-index: 99;
|
||||||
|
width: 140rpx;
|
||||||
|
height: 140rpx;
|
||||||
|
.kfren{
|
||||||
width: 80rpx;
|
width: 80rpx;
|
||||||
height: 80rpx;
|
height: 80rpx;
|
||||||
border-radius: 50%;
|
display: block;
|
||||||
box-shadow: 0 0 20rpx rgba(124, 124, 124, 0.3);
|
box-shadow: 0 0 20rpx rgba(124, 124, 124, 0.3);
|
||||||
-webkit-box-shadow: 0 0 20rpx #7C7C7C;
|
-webkit-box-shadow: 0 0 20rpx #7C7C7C;
|
||||||
-moz-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{
|
.kefutc{
|
||||||
animation: fadeIn 0.5s ease-in-out forwards;
|
animation: fadeIn 0.5s ease-in-out forwards;
|
||||||
|
|
@ -974,17 +991,17 @@
|
||||||
border-radius: 0rpx 0rpx 0rpx 0rpx;
|
border-radius: 0rpx 0rpx 0rpx 0rpx;
|
||||||
padding-bottom: 250rpx;
|
padding-bottom: 250rpx;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
.kefu{
|
// .kefu{
|
||||||
width: 48%;
|
// width: 48%;
|
||||||
height: 100rpx;
|
// height: 100rpx;
|
||||||
line-height: 100rpx;
|
// line-height: 100rpx;
|
||||||
background-color: #4C97E7;
|
// background-color: #4C97E7;
|
||||||
color: #fff;
|
// color: #fff;
|
||||||
font-size: 36rpx;
|
// font-size: 36rpx;
|
||||||
font-weight: 600;
|
// font-weight: 600;
|
||||||
text-align: center;
|
// text-align: center;
|
||||||
border-radius: 20rpx;
|
// border-radius: 20rpx;
|
||||||
}
|
// }
|
||||||
.qixing{
|
.qixing{
|
||||||
width: 702rpx;
|
width: 702rpx;
|
||||||
height: 466rpx;
|
height: 466rpx;
|
||||||
|
|
@ -1130,13 +1147,19 @@
|
||||||
.kefu {
|
.kefu {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100rpx;
|
height: 100rpx;
|
||||||
line-height: 100rpx;
|
|
||||||
background-color: #4C97E7;
|
background-color: #4C97E7;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
font-size: 36rpx;
|
font-size: 36rpx;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
border-radius: 20rpx;
|
border-radius: 20rpx;
|
||||||
|
padding-top: 10rpx;
|
||||||
|
box-sizing: border-box;
|
||||||
|
.xiao{
|
||||||
|
font-size: 20rpx;
|
||||||
|
color: #efefef;
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.coupon-popup {
|
.coupon-popup {
|
||||||
|
|
|
||||||
|
|
@ -278,6 +278,31 @@
|
||||||
this.getorderdevice()
|
this.getorderdevice()
|
||||||
},
|
},
|
||||||
methods: {
|
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() {
|
btntz() {
|
||||||
uni.switchTab({
|
uni.switchTab({
|
||||||
|
|
@ -608,6 +633,7 @@
|
||||||
getinfo(){
|
getinfo(){
|
||||||
this.$u.get("/getInfo").then(res => {
|
this.$u.get("/getInfo").then(res => {
|
||||||
if(res.code == 200){
|
if(res.code == 200){
|
||||||
|
this.getzhifu()
|
||||||
this.info = res.user
|
this.info = res.user
|
||||||
this.getMyLocation()
|
this.getMyLocation()
|
||||||
this.getgonggao()
|
this.getgonggao()
|
||||||
|
|
|
||||||
|
|
@ -87,7 +87,7 @@
|
||||||
<image src="https://api.ccttiot.com/smartmeter/img/static/uTgSwUguPEJ56MSeZo4c" mode=""></image>
|
<image src="https://api.ccttiot.com/smartmeter/img/static/uTgSwUguPEJ56MSeZo4c" mode=""></image>
|
||||||
<view class="zuqi">
|
<view class="zuqi">
|
||||||
<view class="one">
|
<view class="one">
|
||||||
您已骑行<text>{{getRemainingTimeText}}</text>
|
您已骑行<text>{{getRemainingTimeText == '-1分钟' ? '1分钟' : getRemainingTimeText}}</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="two">
|
<view class="two">
|
||||||
预计金额¥{{qixingobj.rideFee}}
|
预计金额¥{{qixingobj.rideFee}}
|
||||||
|
|
@ -255,22 +255,26 @@
|
||||||
}
|
}
|
||||||
console.log(option);
|
console.log(option);
|
||||||
if(option.vate){
|
if(option.vate){
|
||||||
this.ver_dataflag = 3
|
// this.ver_dataflag = 3
|
||||||
this.devicesarr = option.vate
|
// this.devicesarr = option.vate
|
||||||
|
setTimeout(()=>{
|
||||||
|
this.ver_dataflag = 1
|
||||||
|
},1000)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
setTimeout(()=>{
|
setTimeout(()=>{
|
||||||
if(this.ver_dataflag == 3){
|
|
||||||
// console.log('11')
|
|
||||||
}else{
|
|
||||||
xBlufi.initXBlufi(1)
|
xBlufi.initXBlufi(1)
|
||||||
xBlufi.notifyStartDiscoverBle({
|
xBlufi.notifyStartDiscoverBle({
|
||||||
'isStart': true
|
'isStart': true
|
||||||
})
|
})
|
||||||
|
xBlufi.listenDeviceMsgEvent(true, this.funListenDeviceMsgEvent)
|
||||||
|
if(this.devicesarr.length > 0){
|
||||||
|
// console.log('11')
|
||||||
|
}else{
|
||||||
|
|
||||||
}
|
}
|
||||||
},500)
|
},500)
|
||||||
xBlufi.listenDeviceMsgEvent(true, this.funListenDeviceMsgEvent)
|
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.getorderdevice()
|
this.getorderdevice()
|
||||||
}, 100)
|
}, 100)
|
||||||
|
|
@ -282,6 +286,11 @@
|
||||||
}, 30000)
|
}, 30000)
|
||||||
},
|
},
|
||||||
onHide() {
|
onHide() {
|
||||||
|
xBlufi.notifyStartDiscoverBle({
|
||||||
|
'isStart': false
|
||||||
|
})
|
||||||
|
xBlufi.listenDeviceMsgEvent(false, this.funListenDeviceMsgEvent)
|
||||||
|
console.log('likai00');
|
||||||
// 页面隐藏时清除定时器
|
// 页面隐藏时清除定时器
|
||||||
this.clearTimer();
|
this.clearTimer();
|
||||||
if (this.findDeviceTimer) {
|
if (this.findDeviceTimer) {
|
||||||
|
|
@ -291,6 +300,11 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onUnload() {
|
onUnload() {
|
||||||
|
xBlufi.notifyStartDiscoverBle({
|
||||||
|
'isStart': false
|
||||||
|
})
|
||||||
|
xBlufi.listenDeviceMsgEvent(false, this.funListenDeviceMsgEvent)
|
||||||
|
console.log('likai00');
|
||||||
// 页面卸载时清除定时器(防止内存泄漏)
|
// 页面卸载时清除定时器(防止内存泄漏)
|
||||||
this.clearTimer();
|
this.clearTimer();
|
||||||
if (this.findDeviceTimer) {
|
if (this.findDeviceTimer) {
|
||||||
|
|
@ -319,6 +333,7 @@
|
||||||
name: that.name
|
name: that.name
|
||||||
})
|
})
|
||||||
that.ver_dataflag = 1
|
that.ver_dataflag = 1
|
||||||
|
xBlufi.listenDeviceMsgEvent(false, that.funListenDeviceMsgEvent)
|
||||||
} else if (res.cancel) {
|
} else if (res.cancel) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
@ -589,8 +604,8 @@
|
||||||
console.log("连接回调:" + JSON.stringify(options))
|
console.log("连接回调:" + JSON.stringify(options))
|
||||||
if (options.result == true) {
|
if (options.result == true) {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.ver_dataflag = 3
|
|
||||||
this.ljflag = true
|
this.ljflag = true
|
||||||
|
this.ver_dataflag = 3
|
||||||
}, 2000)
|
}, 2000)
|
||||||
xBlufi.notifyInitBleEsp32({
|
xBlufi.notifyInitBleEsp32({
|
||||||
deviceId: this.deviceid
|
deviceId: this.deviceid
|
||||||
|
|
@ -795,6 +810,7 @@
|
||||||
this.lslat = null
|
this.lslat = null
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
if(this.ver_dataflag != 3){
|
||||||
let that = this
|
let that = this
|
||||||
uni.showModal({
|
uni.showModal({
|
||||||
title: '提示',
|
title: '提示',
|
||||||
|
|
@ -806,35 +822,78 @@
|
||||||
title: '加载中...',
|
title: '加载中...',
|
||||||
mask: true
|
mask: true
|
||||||
})
|
})
|
||||||
let flag = ''
|
|
||||||
if(that.ver_dataflag == 3){
|
|
||||||
flag = false
|
|
||||||
}else{
|
|
||||||
flag = true
|
|
||||||
}
|
|
||||||
let query = {
|
let query = {
|
||||||
orderId: that.deivceobj.orderId,
|
orderId: that.deivceobj.orderId,
|
||||||
lat: that.lslat,
|
lat: that.lslat,
|
||||||
lon: that.lslon,
|
lon: that.lslon,
|
||||||
requiredIot: flag
|
requiredIot: true
|
||||||
}
|
}
|
||||||
|
|
||||||
let url = '/app/order/openDevice?' + that.$tansParams(query)
|
let url = '/app/order/openDevice?' + that.$tansParams(query)
|
||||||
that.$u.put(url).then((res) => {
|
that.$u.put(url).then((res) => {
|
||||||
console.log(res,'0202020202');
|
if (res.code == 200) {
|
||||||
if (res.code == 200 && res.data.db >= 1) {
|
uni.showToast({
|
||||||
if (res.data.iot == false) {
|
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({
|
uni.showLoading({
|
||||||
title: '加载中...',
|
title: '加载中...',
|
||||||
mask: true
|
mask: true
|
||||||
})
|
})
|
||||||
console.log(that.lslat,that.lslon,'临时解锁');
|
let query = {
|
||||||
console.log(that.ver_dataflag,'thatthat');
|
orderId: that.deivceobj.orderId,
|
||||||
if (that.ver_dataflag == 3) {
|
lat: that.lslat,
|
||||||
xBlufi.notifySendCustomData({
|
lon: that.lslon,
|
||||||
customData: "11opensub5@"
|
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.deivceobj.deviceLockStatus = 1
|
||||||
|
that.getorderdevice()
|
||||||
let data = {
|
let data = {
|
||||||
mac:that.mac,
|
mac:that.mac,
|
||||||
reason:'解锁',
|
reason:'解锁',
|
||||||
|
|
@ -844,48 +903,8 @@
|
||||||
result:'成功'
|
result:'成功'
|
||||||
}
|
}
|
||||||
that.$u.post(`/app/commandLog/bluetooth`,data).then(res => {})
|
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){
|
} else if(res.code == 20001){
|
||||||
uni.hideLoading()
|
uni.hideLoading()
|
||||||
if(that.ver_dataflag != 3){
|
|
||||||
uni.showModal({
|
uni.showModal({
|
||||||
title: '提示',
|
title: '提示',
|
||||||
content: '设备离线,请点击右上角连接车辆',
|
content: '设备离线,请点击右上角连接车辆',
|
||||||
|
|
@ -893,12 +912,9 @@
|
||||||
success: function(res) {
|
success: function(res) {
|
||||||
if (res.confirm) {
|
if (res.confirm) {
|
||||||
|
|
||||||
} else if (res.cancel) {
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
uni.hideLoading()
|
uni.hideLoading()
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
|
|
@ -909,10 +925,11 @@
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
} else if (res.cancel) {
|
} else if (res.cancel) {
|
||||||
console.log('取消') // 用户点击取消
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
}
|
||||||
} else if (this.deivceobj.deviceLockStatus == 1) {
|
} else if (this.deivceobj.deviceLockStatus == 1) {
|
||||||
uni.getLocation({
|
uni.getLocation({
|
||||||
type: 'gcj02', // 国内地图更兼容
|
type: 'gcj02', // 国内地图更兼容
|
||||||
|
|
@ -929,13 +946,8 @@
|
||||||
console.error('获取位置失败:', err)
|
console.error('获取位置失败:', err)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
if(this.ver_dataflag != 3){
|
||||||
let that = this
|
let that = this
|
||||||
let flag = ''
|
|
||||||
if(that.ver_dataflag == 3){
|
|
||||||
flag = false
|
|
||||||
}else{
|
|
||||||
flag = true
|
|
||||||
}
|
|
||||||
uni.showModal({
|
uni.showModal({
|
||||||
title: '提示',
|
title: '提示',
|
||||||
content: '您是否要临时锁车?',
|
content: '您是否要临时锁车?',
|
||||||
|
|
@ -950,12 +962,66 @@
|
||||||
orderId: that.deivceobj.orderId,
|
orderId: that.deivceobj.orderId,
|
||||||
lat: that.lat,
|
lat: that.lat,
|
||||||
lon: that.lon,
|
lon: that.lon,
|
||||||
requiredIot: flag
|
requiredIot: true
|
||||||
}
|
}
|
||||||
let url = '/app/order/closeDevice?' + that.$tansParams(query)
|
let url = '/app/order/closeDevice?' + that.$tansParams(query)
|
||||||
that.$u.put(url).then((res) => {
|
that.$u.put(url).then((res) => {
|
||||||
if (res.code == 200 && res.data.db >= 1) {
|
if (res.code == 200) {
|
||||||
if(res.data.iot == false){
|
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({
|
uni.showLoading({
|
||||||
title: '加载中...',
|
title: '加载中...',
|
||||||
mask: true
|
mask: true
|
||||||
|
|
@ -992,8 +1058,6 @@
|
||||||
success: function(res) {
|
success: function(res) {
|
||||||
if (res.confirm) {
|
if (res.confirm) {
|
||||||
|
|
||||||
} else if (res.cancel) {
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
@ -1009,19 +1073,8 @@
|
||||||
console.log(res,'蓝牙')
|
console.log(res,'蓝牙')
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}else{
|
|
||||||
uni.hideLoading()
|
|
||||||
uni.showToast({
|
|
||||||
title: '临时锁车成功',
|
|
||||||
icon: 'success',
|
|
||||||
duration: 2000
|
|
||||||
})
|
|
||||||
that.deivceobj.deviceLockStatus = 0
|
|
||||||
that.getorderdevice()
|
|
||||||
}
|
|
||||||
} else if(res.code == 20001){
|
} else if(res.code == 20001){
|
||||||
uni.hideLoading()
|
uni.hideLoading()
|
||||||
if(that.ver_dataflag != 3){
|
|
||||||
uni.showModal({
|
uni.showModal({
|
||||||
title: '提示',
|
title: '提示',
|
||||||
content: '设备离线,请点击右上角连接车辆',
|
content: '设备离线,请点击右上角连接车辆',
|
||||||
|
|
@ -1029,12 +1082,9 @@
|
||||||
success: function(res) {
|
success: function(res) {
|
||||||
if (res.confirm) {
|
if (res.confirm) {
|
||||||
|
|
||||||
} else if (res.cancel) {
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
uni.hideLoading()
|
uni.hideLoading()
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
|
|
@ -1050,6 +1100,7 @@
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
// 点击鸣笛寻车
|
// 点击鸣笛寻车
|
||||||
btnfm() {
|
btnfm() {
|
||||||
|
|
@ -1248,28 +1299,8 @@
|
||||||
},
|
},
|
||||||
// 还车统一调用
|
// 还车统一调用
|
||||||
gethuan() {
|
gethuan() {
|
||||||
if(this.deivceobj.deviceOnlineStatus == 0){
|
|
||||||
if(this.ver_dataflag != 3){
|
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 that = this
|
||||||
let flag = ''
|
|
||||||
if(that.ver_dataflag == 3){
|
|
||||||
flag = false
|
|
||||||
}else{
|
|
||||||
flag = true
|
|
||||||
}
|
|
||||||
uni.showModal({
|
uni.showModal({
|
||||||
title: '提示',
|
title: '提示',
|
||||||
content: '您确定要还车吗?',
|
content: '您确定要还车吗?',
|
||||||
|
|
@ -1285,11 +1316,10 @@
|
||||||
picture: that.imgs,
|
picture: that.imgs,
|
||||||
lon: that.lon,
|
lon: that.lon,
|
||||||
lat: that.lat,
|
lat: that.lat,
|
||||||
requiredIot: flag
|
requiredIot: true
|
||||||
}
|
}
|
||||||
that.$u.put(`/app/order/end`, data).then(res => {
|
that.$u.put(`/app/order/end`, data).then(res => {
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
if(res.data.iot == true){
|
|
||||||
that.cheflag = true
|
that.cheflag = true
|
||||||
that.fjflag = false
|
that.fjflag = false
|
||||||
uni.hideLoading()
|
uni.hideLoading()
|
||||||
|
|
@ -1303,39 +1333,6 @@
|
||||||
url:'/page_user/yongche/orderxq?id=' + that.deivceobj.orderId
|
url:'/page_user/yongche/orderxq?id=' + that.deivceobj.orderId
|
||||||
})
|
})
|
||||||
},1000)
|
},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) {
|
}else if(res.msg == null) {
|
||||||
uni.hideLoading()
|
uni.hideLoading()
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
|
|
@ -1344,20 +1341,23 @@
|
||||||
duration: 2000
|
duration: 2000
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
uni.hideLoading()
|
uni.showModal({
|
||||||
uni.showToast({
|
title: '提示',
|
||||||
title: res.msg,
|
content: res.msg,
|
||||||
icon: 'none',
|
showCancel: false,
|
||||||
duration: 2000
|
success: function(res) {
|
||||||
})
|
if (res.confirm) {
|
||||||
}
|
|
||||||
})
|
|
||||||
} else if (res.cancel) {
|
} else if (res.cancel) {
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
}else{
|
}else{
|
||||||
let that = this
|
let that = this
|
||||||
uni.showModal({
|
uni.showModal({
|
||||||
|
|
@ -1370,37 +1370,19 @@
|
||||||
title: '还车中...',
|
title: '还车中...',
|
||||||
mask: true
|
mask: true
|
||||||
})
|
})
|
||||||
|
xBlufi.notifySendCustomData({
|
||||||
|
customData: "11llosesub300@"
|
||||||
|
})
|
||||||
|
that.fjflag = false
|
||||||
let data = {
|
let data = {
|
||||||
orderId: that.deivceobj.orderId,
|
orderId: that.deivceobj.orderId,
|
||||||
picture: that.imgs,
|
picture: that.imgs,
|
||||||
lon: that.lon,
|
lon: that.lon,
|
||||||
lat: that.lat
|
lat: that.lat,
|
||||||
|
requiredIot: false
|
||||||
}
|
}
|
||||||
that.$u.put(`/app/order/end`, data).then(res => {
|
that.$u.put(`/app/order/end`, data).then(res => {
|
||||||
if (res.code == 200) {
|
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(()=>{
|
setTimeout(()=>{
|
||||||
xBlufi.notifySendCustomData({
|
xBlufi.notifySendCustomData({
|
||||||
customData: "11reboot@"
|
customData: "11reboot@"
|
||||||
|
|
@ -1413,7 +1395,6 @@
|
||||||
})
|
})
|
||||||
},1000)
|
},1000)
|
||||||
},1000)
|
},1000)
|
||||||
}
|
|
||||||
}else if(res.msg == null) {
|
}else if(res.msg == null) {
|
||||||
uni.hideLoading()
|
uni.hideLoading()
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
|
|
@ -1423,10 +1404,17 @@
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
uni.hideLoading()
|
uni.hideLoading()
|
||||||
uni.showToast({
|
uni.showModal({
|
||||||
title: res.msg,
|
title: '提示',
|
||||||
icon: 'none',
|
content: res.msg,
|
||||||
duration: 2000
|
showCancel: false,
|
||||||
|
success: function(res) {
|
||||||
|
if (res.confirm) {
|
||||||
|
|
||||||
|
} else if (res.cancel) {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user