小鹿骑行

This commit is contained in:
吴鹏 2025-06-25 17:07:51 +08:00
parent b0d8e74c40
commit 9b9e24e65c
10 changed files with 1207 additions and 816 deletions

View File

@ -1,7 +1,7 @@
const install = (Vue, vm) => {
uni.setStorageSync('deptId', 100);
Vue.prototype.$u.http.setConfig({
// baseUrl: 'http://192.168.2.19:4101', //键辉本地
// baseUrl: 'http://192.168.2.19:4101', //键辉本地
// baseUrl: 'http://192.168.0.102:4101', //景森本地
baseUrl: 'https://ele.ccttiot.com/prod-api', //线上
// baseUrl: 'https://cc.ccttiot.com/prod-api', //叉车线上

View File

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

View File

@ -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);
}
/**

View File

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

File diff suppressed because it is too large Load Diff

View File

@ -47,6 +47,7 @@
</template>
<script>
var xBlufi = require("@/components/blufi/xBlufi.js")
export default {
data() {
return {
@ -145,63 +146,95 @@
})
},
gethc(){
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) {
if(res.data.iot == true){
this.fjflag = false
if(this.flag == true){
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()
uni.showToast({
title: '还车成功',
icon: 'success',
duration: 2000
})
setTimeout(()=>{
uni.redirectTo({
url:'/page_user/yongche/orderxq?id=' + this.orderId
})
},1000)
}else if(res.msg == null) {
uni.hideLoading()
uni.showToast({
title: '还车成功',
icon: 'success',
title: '未知错误',
icon: 'none',
duration: 2000
})
setTimeout(()=>{
uni.redirectTo({
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 {
uni.hideLoading()
uni.showToast({
title: res.msg,
icon: 'none',
duration: 2000
})
}
}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
})
})
}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() {

View File

@ -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()

View File

@ -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>
<image class="kfren" @click="btntel" src="https://api.ccttiot.com/smartmeter/img/static/uJd9ccJt76zc7r2Nlpb8" mode=""></image>
<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: 80rpx;
height: 80rpx;
border-radius: 50%;
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;
width: 140rpx;
height: 140rpx;
.kfren{
width: 80rpx;
height: 80rpx;
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 {

View File

@ -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()

View File

@ -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){
xBlufi.initXBlufi(1)
xBlufi.notifyStartDiscoverBle({
'isStart': true
})
xBlufi.listenDeviceMsgEvent(true, this.funListenDeviceMsgEvent)
if(this.devicesarr.length > 0){
// console.log('11')
}else{
xBlufi.initXBlufi(1)
xBlufi.notifyStartDiscoverBle({
'isStart': true
})
}
},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,86 +810,28 @@
this.lslat = null
}
})
let that = this
uni.showModal({
title: '提示',
content: '您是否要解锁车辆?',
showCancel: true,
success: function(res) {
if (res.confirm) {
uni.showLoading({
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
}
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) {
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@"
})
that.deivceobj.deviceLockStatus = 1
let data = {
mac:that.mac,
reason:'解锁',
command:'11opensub5@',
longitude:that.lslon,
latitude:that.lslat,
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 {
if(this.ver_dataflag != 3){
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.lslat,
lon: that.lslon,
requiredIot: true
}
let url = '/app/order/openDevice?' + that.$tansParams(query)
that.$u.put(url).then((res) => {
if (res.code == 200) {
uni.showToast({
title: '解锁成功',
icon: 'success',
@ -882,10 +839,8 @@
})
that.deivceobj.deviceLockStatus = 1
that.getorderdevice()
}
} else if(res.code == 20001){
uni.hideLoading()
if(that.ver_dataflag != 3){
} else if(res.code == 20001){
uni.hideLoading()
uni.showModal({
title: '提示',
content: '设备离线,请点击右上角连接车辆',
@ -893,26 +848,88 @@
success: function(res) {
if (res.confirm) {
} else if (res.cancel) {
}
}
})
} else {
uni.hideLoading()
uni.showToast({
title: res.msg,
icon: 'none',
duration: 2000
})
}
} 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) {
xBlufi.notifySendCustomData({
customData: "11opensub5@"
})
uni.showLoading({
title: '加载中...',
mask: true
})
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:'解锁',
command:'11opensub5@',
longitude:that.lslon,
latitude:that.lslat,
result:'成功'
}
that.$u.post(`/app/commandLog/bluetooth`,data).then(res => {})
} 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) {
}
}
})
}
} else if (this.deivceobj.deviceLockStatus == 1) {
uni.getLocation({
type: 'gcj02', //
@ -929,33 +946,82 @@
console.error('获取位置失败:', err)
}
})
let that = this
let flag = ''
if(that.ver_dataflag == 3){
flag = false
}else{
flag = true
}
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: flag
if(this.ver_dataflag != 3){
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: true
}
let url = '/app/order/closeDevice?' + that.$tansParams(query)
that.$u.put(url).then((res) => {
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('取消') //
}
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){
}
})
}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{
} else if(res.code == 20001){
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,26 +1082,24 @@
success: function(res) {
if (res.confirm) {
} else if (res.cancel) {
}
}
})
} else {
uni.hideLoading()
uni.showToast({
title: res.msg,
icon: 'none',
duration: 2000
})
}
} else {
uni.hideLoading()
uni.showToast({
title: res.msg,
icon: 'none',
duration: 2000
})
}
})
} else if (res.cancel) {
console.log('取消') //
})
} else if (res.cancel) {
console.log('取消') //
}
}
}
})
})
}
}
},
//
@ -1248,117 +1299,7 @@
},
//
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: '您确定要还车吗?',
showCancel: true,
success: function(res) {
if (res.confirm) {
uni.showLoading({
title: '还车中...',
mask: true
})
let data = {
orderId: that.deivceobj.orderId,
picture: that.imgs,
lon: that.lon,
lat: that.lat,
requiredIot: flag
}
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
})
setTimeout(()=>{
uni.navigateTo({
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({
title: '未知错误',
icon: 'none',
duration: 2000
})
} else {
uni.hideLoading()
uni.showToast({
title: res.msg,
icon: 'none',
duration: 2000
})
}
})
} else if (res.cancel) {
}
}
})
}
}else{
if(this.ver_dataflag != 3){
let that = this
uni.showModal({
title: '提示',
@ -1374,46 +1315,86 @@
orderId: that.deivceobj.orderId,
picture: that.imgs,
lon: that.lon,
lat: that.lat
lat: that.lat,
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
that.cheflag = true
that.fjflag = false
uni.hideLoading()
uni.showToast({
title: '还车成功',
icon: 'success',
duration: 2000
})
setTimeout(()=>{
uni.navigateTo({
url:'/page_user/yongche/orderxq?id=' + that.deivceobj.orderId
})
},1000)
}else if(res.msg == null) {
uni.hideLoading()
uni.showToast({
title: '未知错误',
icon: 'none',
duration: 2000
})
} else {
uni.showModal({
title: '提示',
content: res.msg,
showCancel: false,
success: function(res) {
if (res.confirm) {
} else if (res.cancel) {
}
}
})
}
})
}
}
})
}else{
let that = this
uni.showModal({
title: '提示',
content: '您确定要还车吗?',
showCancel: true,
success: function(res) {
if (res.confirm) {
uni.showLoading({
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,
requiredIot: false
}
that.$u.put(`/app/order/end`, data).then(res => {
if (res.code == 200) {
setTimeout(()=>{
xBlufi.notifySendCustomData({
customData: "11reboot@"
})
uni.hideLoading()
uni.showToast({
title: '还车成功',
icon: 'success',
duration: 2000
})
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)
}else{
xBlufi.notifySendCustomData({
customData: "11llosesub300@"
})
setTimeout(()=>{
xBlufi.notifySendCustomData({
customData: "11reboot@"
})
uni.hideLoading()
that.getorderdevice()
setTimeout(()=>{
uni.navigateTo({
url:'/page_user/yongche/orderxq?id=' + that.deivceobj.orderId
})
},1000)
},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) {
}
}
})
}
})