电动车

This commit is contained in:
3321822538@qq.com 2025-07-15 17:36:34 +08:00
parent 9b9e24e65c
commit 10eff1ab30
15 changed files with 5726 additions and 2493 deletions

View File

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

View File

@ -157,7 +157,7 @@
let sceneValue = res.result let sceneValue = res.result
let decodedValue = decodeURIComponent(sceneValue) let decodedValue = decodeURIComponent(sceneValue)
this.sn = getQueryParam(decodedValue, 's') this.sn = getQueryParam(decodedValue, 's')
this.$u.get("/app/orderDevice/mineUsing").then(res =>{ this.$u.get("/app/order/mineProcessing").then(res =>{
if(res.code == 200){ if(res.code == 200){
if(res.data){ if(res.data){
uni.switchTab({ uni.switchTab({

View File

@ -36,7 +36,7 @@
methods: { methods: {
// //
btnkaisuo(){ btnkaisuo(){
this.$u.get("/app/orderDevice/mineUsing").then(res =>{ this.$u.get("/app/order/mineProcessing").then(res =>{
if(res.code == 200){ if(res.code == 200){
if(res.data){ if(res.data){
uni.switchTab({ uni.switchTab({

File diff suppressed because it is too large Load Diff

View File

@ -54,7 +54,7 @@
<view class="lypic" v-if="ver_dataflag == 1" @click="btnly"> <view class="lypic" v-if="ver_dataflag == 1" @click="btnly">
<image class="glow-image" <image class="glow-image"
src="https://api.ccttiot.com/smartmeter/img/static/uCdHjNaNfD9aikVg9Cuk" src="https://api.ccttiot.com/smartmeter/img/static/uCdHjNaNfD9aikVg9Cuk"
mode="aspectFit" :class="{ 'visible': isVisible, 'hidden': !isVisible }" /> mode="aspectFit" />
</view> </view>
</view> </view>
</view> </view>
@ -226,7 +226,7 @@
二维码 二维码
</view> </view>
<!-- 蓝牙控制 --> <!-- 蓝牙控制 -->
<view class="dangeanniu" @click="lanya(0)" v-if="ver_dataflag != 3"> <!-- <view class="dangeanniu" @click="lanya(0)" v-if="ver_dataflag != 3">
<view class="pic"> <view class="pic">
<image src="https://api.ccttiot.com/smartmeter/img/static/uqUiYiMtGTjkPNgmCjvP" mode=""></image> <image src="https://api.ccttiot.com/smartmeter/img/static/uqUiYiMtGTjkPNgmCjvP" mode=""></image>
</view> </view>
@ -261,7 +261,7 @@
<image src="https://api.ccttiot.com/smartmeter/img/static/uqUiYiMtGTjkPNgmCjvP" mode=""></image> <image src="https://api.ccttiot.com/smartmeter/img/static/uqUiYiMtGTjkPNgmCjvP" mode=""></image>
</view> </view>
蓝牙开坐垫锁 蓝牙开坐垫锁
</view> </view> -->
</view> </view>
<view class="zuche"> <view class="zuche">
<view class=""> <view class="">
@ -502,7 +502,9 @@
isVisible: true, isVisible: true,
glowInterval: null, glowInterval: null,
lat:'', lat:'',
lon:'' lon:'',
shibainum:0,
jiance:false
} }
}, },
onLoad(e) { onLoad(e) {
@ -511,6 +513,11 @@
this.deptId = uni.getStorageSync('deptId') this.deptId = uni.getStorageSync('deptId')
}, },
onShow() { onShow() {
xBlufi.initXBlufi(1)
xBlufi.notifyStartDiscoverBle({
'isStart': true
})
xBlufi.listenDeviceMsgEvent(true, this.funListenDeviceMsgEvent)
this.getyunying() this.getyunying()
uni.getLocation({ uni.getLocation({
type: 'gcj02', // type: 'gcj02', //
@ -738,9 +745,7 @@
duration: 2000 duration: 2000
}) })
} }
setTimeout(() => {
this.jieliuflag = true this.jieliuflag = true
}, 3000)
} }
}, },
getlanya() { getlanya() {
@ -797,6 +802,7 @@
if (options.result == true) { if (options.result == true) {
setTimeout(() => { setTimeout(() => {
this.ver_dataflag = 3 this.ver_dataflag = 3
this.jiance = false
}, 2000) }, 2000)
xBlufi.notifyInitBleEsp32({ xBlufi.notifyInitBleEsp32({
deviceId: this.deviceid deviceId: this.deviceid
@ -815,6 +821,7 @@
case xBlufi.XBLUFI_TYPE.TYPE_GET_DEVICE_LISTS_START: case xBlufi.XBLUFI_TYPE.TYPE_GET_DEVICE_LISTS_START:
if (!options.result) { if (!options.result) {
console.log('蓝牙未开启') console.log('蓝牙未开启')
this.jiance = true
return return
} else { } else {
this.lanyaflag = false this.lanyaflag = false
@ -1143,15 +1150,21 @@
this.showvehicle = false this.showvehicle = false
}, },
btn(num) { btn(num) {
if(this.jiance == true){
xBlufi.initXBlufi(1)
xBlufi.notifyStartDiscoverBle({
'isStart': true
})
xBlufi.listenDeviceMsgEvent(true, this.funListenDeviceMsgEvent)
}
if (this.jieliuflag == true) { if (this.jieliuflag == true) {
this.jieliuflag = false this.jieliuflag = false
this.showbtntip = false this.showbtntip = false
let data = [this.sn] let data = [this.sn]
if (num == 0) { if (num == 0) {
uni.showLoading({ uni.showLoading({
title: '加载中...' title: '车辆开锁中...'
}) })
console.log('点击了....1')
if (this.ver_dataflag == 3) { if (this.ver_dataflag == 3) {
xBlufi.notifySendCustomData({ xBlufi.notifySendCustomData({
customData: "11opensub5@" customData: "11opensub5@"
@ -1173,9 +1186,7 @@
result:'成功' result:'成功'
} }
this.$u.post(`/app/commandLog/bluetooth`,data).then(res => {}) this.$u.post(`/app/commandLog/bluetooth`,data).then(res => {})
setTimeout(() => {
this.jieliuflag = true this.jieliuflag = true
}, 2000)
} else { } else {
uni.hideLoading() uni.hideLoading()
uni.showToast({ uni.showToast({
@ -1183,35 +1194,125 @@
icon: 'none', icon: 'none',
duration: 2000 duration: 2000
}) })
setTimeout(() => {
this.jieliuflag = true this.jieliuflag = true
}, 2000)
} }
}) })
} else { } else {
this.$u.put(`/bst/device/iot/unlock?id=${this.sn}&requiredIot=true`).then((res) => { this.$u.put(`/bst/device/iot/unlock?id=${this.sn}&requiredIot=true`).then((res) => {
if (res.code == 200) { if (res.code == 200) {
this.deviceInfo() if(res.data.db == 1 && res.data.iot == false){
uni.showToast({ uni.hideLoading()
title: '操作成功', uni.showLoading({
icon: 'success', title: '蓝牙开锁中...',
duration: 3000 mask: true
}) })
setTimeout(() => { const findDevice = () =>{
this.jieliuflag = true this.ver_dataflag = 2
}, 2000) const matchedDevice = this.devicesarr.find(device => {
}else if(res.code == 20001){ return device.name.slice(-12) == this.mac.slice(-12)
uni.hideLoading() })
uni.showModal({ if (matchedDevice) {
title: '提示', xBlufi.notifyStartDiscoverBle({
content: '设备离线,请进行连接蓝牙开锁', 'isStart': false
showCancel: false, })
success: function(res) { xBlufi.notifyConnectBle({
if (res.confirm) { isStart: true,
deviceId: matchedDevice.deviceId,
name: matchedDevice.name
})
this.deviceid = matchedDevice.deviceId
this.devicename = matchedDevice.name
setTimeout(()=>{
if(this.ver_dataflag == 3){
uni.hideLoading()
xBlufi.notifySendCustomData({
customData: "11opensub5@"
})
this.$u.put(`/bst/device/iot/unlock?id=${this.sn}&requiredIot=false`).then((res) => {
if (res.code == 200) {
this.deviceInfo()
uni.showToast({
title: '操作成功',
icon: 'success',
duration: 3000
})
let data = {
mac:this.mac,
reason:'商户开锁',
command:'11opensub5@',
longitude:this.lon,
latitude:this.lat,
result:'成功'
}
this.$u.post(`/app/commandLog/bluetooth`,data).then(res => {})
this.jieliuflag = true
} else {
uni.hideLoading()
uni.showToast({
title: res.msg,
icon: 'none',
duration: 2000
})
this.jieliuflag = true
}
})
}else{
this.ver_dataflag = 1
this.shibainum = 0
this.jieliuflag = true
uni.hideLoading()
uni.showModal({
title: '提示',
content: '车辆开锁失败,请检查手机蓝牙是否打开或微信蓝牙是否授权,开启手机定位',
showCancel: false,
success: function(res) {
if (res.confirm) {
} else if (res.cancel) {
}
}
})
}
},4000)
} else {
if(this.shibainum < 3){
this.shibainum++
this.findDeviceTimer = setTimeout(findDevice.bind(this), 1000) // 使 bind this
}else{
this.jieliuflag = true
this.ver_dataflag = 1
this.shibainum = 0
uni.hideLoading()
uni.showModal({
title: '提示',
content: '车辆开启失败,可让用户在车辆旁边点击解锁骑行',
showCancel: false,
success: function(res) {
if (res.confirm) {
} else if (res.cancel) {
}
}
})
}
} }
} }
}) findDevice()
}else{
this.deviceInfo()
uni.showToast({
title: '操作成功',
icon: 'success',
duration: 3000
})
}
this.jieliuflag = true
} else { } else {
uni.hideLoading() uni.hideLoading()
uni.showToast({ uni.showToast({
@ -1219,20 +1320,25 @@
icon: 'none', icon: 'none',
duration: 2000 duration: 2000
}) })
setTimeout(() => {
this.jieliuflag = true this.jieliuflag = true
}, 2000)
} }
}) })
} }
} else if (num == 1) { } else if (num == 1) {
uni.showLoading({ uni.showLoading({
title: '加载中...' title: '锁车中...'
}) })
if (this.ver_dataflag == 3) { if (this.ver_dataflag == 3) {
xBlufi.notifySendCustomData({ xBlufi.notifySendCustomData({
customData: "11closesub200@" customData: "11closesub200@"
}) })
setTimeout(()=>{
xBlufi.notifySendCustomData({
customData: "11reboot@"
})
},2000)
this.$u.put(`/bst/device/iot/lock?id=${this.sn}&requiredIot=false`).then((res) => { this.$u.put(`/bst/device/iot/lock?id=${this.sn}&requiredIot=false`).then((res) => {
if (res.code == 200) { if (res.code == 200) {
this.deviceInfo() this.deviceInfo()
@ -1244,38 +1350,21 @@
let data = { let data = {
mac:this.mac, mac:this.mac,
reason:'商户关锁', reason:'商户关锁',
command:'11', command:'11closesub200@',
result:'成功' result:'成功'
} }
this.$u.post(`/app/commandLog/bluetooth`,data).then(res => {}) this.$u.post(`/app/commandLog/bluetooth`,data).then(res => {})
setTimeout(() => {
// closesub200@',
// longitude:this.lon,
// latitude:this.lat,
this.jieliuflag = true this.jieliuflag = true
}, 2000) }else{
}else if(res.code == 20001){
uni.hideLoading()
uni.showModal({
title: '提示',
content: '设备离线,请进行连接蓝牙关锁',
showCancel: false,
success: function(res) {
if (res.confirm) {
}
}
})
} else{
uni.hideLoading() uni.hideLoading()
uni.showToast({ uni.showToast({
title: res.msg, title: res.msg,
icon: 'none', icon: 'none',
duration: 2000 duration: 2000
}) })
setTimeout(() => {
this.jieliuflag = true this.jieliuflag = true
}, 2000)
} }
}) })
} else { } else {
@ -1287,9 +1376,112 @@
icon: 'success', icon: 'success',
duration: 3000 duration: 3000
}) })
setTimeout(() => {
this.jieliuflag = true this.jieliuflag = true
}, 2000)
}else if(res.code == 20001){
uni.showLoading({
title: '蓝牙关锁中...',
mask: true
})
const findDevice = () =>{
this.ver_dataflag = 2
const matchedDevice = this.devicesarr.find(device => {
return device.name.slice(-12) == this.mac.slice(-12)
})
if (matchedDevice) {
xBlufi.notifyStartDiscoverBle({
'isStart': false
})
xBlufi.notifyConnectBle({
isStart: true,
deviceId: matchedDevice.deviceId,
name: matchedDevice.name
})
this.deviceid = matchedDevice.deviceId
this.devicename = matchedDevice.name
setTimeout(()=>{
if(this.ver_dataflag == 3){
uni.hideLoading()
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:'11closesub200@',
longitude:this.lon,
latitude:this.lat,
result:'成功'
}
this.$u.post(`/app/commandLog/bluetooth`,data).then(res => {})
this.jieliuflag = true
} else {
uni.hideLoading()
uni.showToast({
title: res.msg,
icon: 'none',
duration: 2000
})
this.jieliuflag = true
}
})
}else{
this.jieliuflag = true
this.ver_dataflag = 1
this.shibainum = 0
uni.hideLoading()
uni.showModal({
title: '提示',
content: '车辆开锁失败,请检查手机蓝牙是否打开或微信蓝牙是否授权,开启手机定位',
showCancel: false,
success: function(res) {
if (res.confirm) {
} else if (res.cancel) {
}
}
})
}
},4000)
} else {
if(this.shibainum < 3){
this.shibainum++
this.findDeviceTimer = setTimeout(findDevice.bind(this), 1000) // 使 bind this
}else{
this.jieliuflag = true
this.ver_dataflag = 1
this.shibainum = 0
uni.hideLoading()
uni.showModal({
title: '提示',
content: '车辆解锁失败,请检查手机蓝牙是否打开或微信蓝牙是否授权,开启手机定位',
showCancel: false,
success: function(res) {
if (res.confirm) {
} else if (res.cancel) {
}
}
})
}
}
}
findDevice()
} else{ } else{
uni.hideLoading() uni.hideLoading()
uni.showToast({ uni.showToast({
@ -1297,9 +1489,9 @@
icon: 'none', icon: 'none',
duration: 2000 duration: 2000
}) })
setTimeout(() => {
this.jieliuflag = true this.jieliuflag = true
}, 2000)
} }
}) })
} }
@ -1316,18 +1508,16 @@
}); });
// 线 // 线
this.deviceInfo() this.deviceInfo()
setTimeout(() => {
this.jieliuflag = true this.jieliuflag = true
}, 2000)
} else { } else {
uni.showToast({ uni.showToast({
title: res.msg, title: res.msg,
icon: 'none', icon: 'none',
duration: 2000 duration: 2000
}) })
setTimeout(() => {
this.jieliuflag = true this.jieliuflag = true
}, 2000)
} }
}) })
} else if (num == 3) { } else if (num == 3) {
@ -1343,9 +1533,7 @@
duration: 2000 duration: 2000
}) })
this.deviceInfo() this.deviceInfo()
setTimeout(() => {
this.jieliuflag = true this.jieliuflag = true
}, 2000)
} else { } else {
uni.showToast({ uni.showToast({
@ -1353,14 +1541,12 @@
icon: 'none', icon: 'none',
duration: 2000 duration: 2000
}) })
setTimeout(() => {
this.jieliuflag = true this.jieliuflag = true
}, 2000)
} }
}) })
} else if (num == 4) { } else if (num == 4) {
uni.showLoading({ uni.showLoading({
title: '加载中...' title: '响铃中...'
}) })
this.$u.put('/bst/device/iot/ring?id=' + this.sn).then((res) => { this.$u.put('/bst/device/iot/ring?id=' + this.sn).then((res) => {
if (res.code == 200) { if (res.code == 200) {
@ -1370,11 +1556,79 @@
icon: 'success', icon: 'success',
duration: 2000 duration: 2000
}) })
setTimeout(() => {
this.jieliuflag = true this.jieliuflag = true
}, 2000) } else if (res.code == 20001) {
} else if (res.code == 200001) { uni.showLoading({
title: '响铃中...',
mask: true
})
const findDevice = () =>{
this.ver_dataflag = 2
const matchedDevice = this.devicesarr.find(device => {
return device.name.slice(-12) == this.mac.slice(-12)
})
if (matchedDevice) {
xBlufi.notifyStartDiscoverBle({
'isStart': false
})
xBlufi.notifyConnectBle({
isStart: true,
deviceId: matchedDevice.deviceId,
name: matchedDevice.name
})
this.deviceid = matchedDevice.deviceId
this.devicename = matchedDevice.name
setTimeout(()=>{
if(this.ver_dataflag == 3){
xBlufi.notifySendCustomData({
customData: "11play1@"
})
this.jieliuflag = true
uni.hideLoading()
}else{
this.jieliuflag = true
this.ver_dataflag = 1
this.shibainum = 0
uni.hideLoading()
uni.showModal({
title: '提示',
content: '响铃失败,请检查手机蓝牙是否打开或微信蓝牙是否授权,开启手机定位',
showCancel: false,
success: function(res) {
if (res.confirm) {
} else if (res.cancel) {
}
}
})
}
},4000)
} else {
if(this.shibainum < 3){
this.shibainum++
this.findDeviceTimer = setTimeout(findDevice.bind(this), 1000) // 使 bind this
}else{
this.jieliuflag = true
this.ver_dataflag = 1
this.shibainum = 0
uni.hideLoading()
uni.showModal({
title: '提示',
content: '响铃失败,请检查手机蓝牙是否打开或微信蓝牙是否授权,开启手机定位',
showCancel: false,
success: function(res) {
if (res.confirm) {
} else if (res.cancel) {
}
}
})
}
}
}
findDevice()
} else { } else {
uni.hideLoading() uni.hideLoading()
uni.showToast({ uni.showToast({
@ -1382,9 +1636,7 @@
icon: 'none', icon: 'none',
duration: 2000 duration: 2000
}) })
setTimeout(() => {
this.jieliuflag = true this.jieliuflag = true
}, 2000)
} }
}) })
} else if (num == 5) { } else if (num == 5) {
@ -1399,18 +1651,14 @@
duration: 2000 duration: 2000
}); });
this.deviceInfo() this.deviceInfo()
setTimeout(() => {
this.jieliuflag = true this.jieliuflag = true
}, 2000)
} else { } else {
uni.showToast({ uni.showToast({
title: res.msg, title: res.msg,
icon: 'none', icon: 'none',
duration: 2000 duration: 2000
}) })
setTimeout(() => {
this.jieliuflag = true this.jieliuflag = true
}, 2000)
} }
}) })
} else if (num == 6) { } else if (num == 6) {
@ -1425,25 +1673,21 @@
icon: 'success', icon: 'success',
duration: 2000 duration: 2000
}) })
setTimeout(() => {
this.jieliuflag = true this.jieliuflag = true
}, 2000)
} else { } else {
uni.showToast({ uni.showToast({
title: res.msg, title: res.msg,
icon: 'none', icon: 'none',
duration: 2000 duration: 2000
}) })
setTimeout(() => {
this.jieliuflag = true this.jieliuflag = true
}, 2000)
} }
}) })
} else if (num == 7) { } else if (num == 7) {
this.showvehicle = true this.showvehicle = true
} else if (num == 8) { } else if (num == 8) {
uni.showLoading({ uni.showLoading({
title: '加载中...' title: '重启中...'
}) })
this.$u.put('/bst/device/iot/reboot?id=' + this.sn).then((res) => { this.$u.put('/bst/device/iot/reboot?id=' + this.sn).then((res) => {
if (res.code == 200) { if (res.code == 200) {
@ -1453,18 +1697,88 @@
icon: 'success', icon: 'success',
duration: 2000 duration: 2000
}) })
setTimeout(() => {
this.jieliuflag = true this.jieliuflag = true
}, 2000) }else if(res.code == 20001){
this.jieliuflag = true
uni.showLoading({
title: '重启中...',
mask: true
})
const findDevice = () =>{
this.ver_dataflag = 2
const matchedDevice = this.devicesarr.find(device => {
return device.name.slice(-12) == this.mac.slice(-12)
})
if (matchedDevice) {
xBlufi.notifyStartDiscoverBle({
'isStart': false
})
xBlufi.notifyConnectBle({
isStart: true,
deviceId: matchedDevice.deviceId,
name: matchedDevice.name
})
this.deviceid = matchedDevice.deviceId
this.devicename = matchedDevice.name
setTimeout(()=>{
if(this.ver_dataflag == 3){
xBlufi.notifySendCustomData({
customData: "11reboot@"
})
this.jieliuflag = true
uni.hideLoading()
}else{
this.jieliuflag = true
this.ver_dataflag = 1
this.shibainum = 0
uni.hideLoading()
uni.showModal({
title: '提示',
content: '重启失败,请检查手机蓝牙是否打开或微信蓝牙是否授权,开启手机定位',
showCancel: false,
success: function(res) {
if (res.confirm) {
} else if (res.cancel) {
}
}
})
}
},4000)
} else {
if(this.shibainum < 3){
this.shibainum++
this.findDeviceTimer = setTimeout(findDevice.bind(this), 1000) // 使 bind this
}else{
this.jieliuflag = true
this.ver_dataflag = 1
this.shibainum = 0
uni.hideLoading()
uni.showModal({
title: '提示',
content: '重启失败,请检查手机蓝牙是否打开或微信蓝牙是否授权,开启手机定位',
showCancel: false,
success: function(res) {
if (res.confirm) {
} else if (res.cancel) {
}
}
})
}
}
}
findDevice()
} else { } else {
uni.showToast({ uni.showToast({
title: res.msg, title: res.msg,
icon: 'none', icon: 'none',
duration: 3000 duration: 3000
}) })
setTimeout(() => {
this.jieliuflag = true this.jieliuflag = true
}, 2000)
} }
}) })
} else if (num == 9) { } else if (num == 9) {
@ -1479,18 +1793,14 @@
icon: 'success', icon: 'success',
duration: 2000 duration: 2000
}) })
setTimeout(() => {
this.jieliuflag = true this.jieliuflag = true
}, 2000)
} else { } else {
uni.showToast({ uni.showToast({
title: res.msg, title: res.msg,
icon: 'none', icon: 'none',
duration: 2000 duration: 2000
}) })
setTimeout(() => {
this.jieliuflag = true this.jieliuflag = true
}, 2000)
} }
}) })
} else if (num == 10) { } else if (num == 10) {
@ -1505,21 +1815,30 @@
icon: 'success', icon: 'success',
duration: 2000 duration: 2000
}) })
setTimeout(() => {
this.jieliuflag = true this.jieliuflag = true
}, 2000)
} else { } else {
uni.showToast({ uni.showToast({
title: res.msg, title: res.msg,
icon: 'none', icon: 'none',
duration: 2000 duration: 2000
}) })
setTimeout(() => {
this.jieliuflag = true this.jieliuflag = true
}, 2000)
} }
}) })
} }
}else{
this.jieliuflag = true
uni.hideLoading()
uni.showModal({
title: '提示',
content: '请不要频繁点击',
showCancel: false,
success: function(res) {
if (res.confirm) {
}
}
})
} }
}, },
btnyc() { btnyc() {
@ -1544,7 +1863,7 @@
this.deviceInfos = res.data this.deviceInfos = res.data
this.mac = res.data.mac this.mac = res.data.mac
if (this.ver_dataflag != 3) { if (this.ver_dataflag != 3) {
this.getlanya() // this.getlanya()
} }
if (this.getnum == 0) { if (this.getnum == 0) {
this.getArea() this.getArea()
@ -1943,7 +2262,6 @@
.page { .page {
padding-bottom: 400rpx; padding-bottom: 400rpx;
width: 750rpx; width: 750rpx;
.new_infocard { .new_infocard {
width: 750rpx; width: 750rpx;
max-height: 100vh; max-height: 100vh;

View File

@ -74,7 +74,9 @@
this.getQiniuToken() this.getQiniuToken()
}, },
onLoad(e) { onLoad(e) {
if(e.sn){
this.sn = e.sn
}
}, },
computed: { computed: {
appointmentServiceFee() { appointmentServiceFee() {

View File

@ -146,6 +146,10 @@
}) })
}, },
gethc(){ gethc(){
uni.showLoading({
title: '还车中...',
mask: true
})
if(this.flag == true){ if(this.flag == true){
let data = { let data = {
orderId:this.orderId, orderId:this.orderId,
@ -198,12 +202,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) {
this.fjflag = false this.fjflag = false
uni.hideLoading()
setTimeout(()=>{
uni.redirectTo({
url:'/page_user/yongche/orderxq?id=' + this.orderId
})
},1000)
let data = { let data = {
mac:this.mac, mac:this.mac,
reason:'还车', reason:'还车',
@ -215,9 +213,18 @@
this.$u.post(`/app/commandLog/bluetooth`,data).then(res => { this.$u.post(`/app/commandLog/bluetooth`,data).then(res => {
console.log(res,'蓝牙') console.log(res,'蓝牙')
}) })
xBlufi.notifySendCustomData({ setTimeout(()=>{
customData: "11reboot@" xBlufi.notifySendCustomData({
}) customData: "11reboot@"
})
setTimeout(()=>{
uni.hideLoading()
uni.redirectTo({
url:'/page_user/yongche/orderxq?id=' + this.orderId
})
},1000)
},2000)
}else if(res.msg == null) { }else if(res.msg == null) {
uni.hideLoading() uni.hideLoading()
uni.showToast({ uni.showToast({

View File

@ -1,7 +1,7 @@
<template> <template>
<view class="page"> <view class="page">
<u-navbar title="添加设备" :border-bottom="false" :background="bgc" title-color='#262B37' title-size='38' <u-navbar title="添加设备" :border-bottom="false" :background="bgc" title-color='#262B37' title-size='38'
height='50'></u-navbar> height='50' :custom-back="btnfh"></u-navbar>
<view class="iptbox" @click="backpage()"> <view class="iptbox" @click="backpage()">
<input type="text" class="ips" v-model="mac" placeholder=" " style="margin-left: 32rpx;" disabled <input type="text" class="ips" v-model="mac" placeholder=" " style="margin-left: 32rpx;" disabled
@ -39,9 +39,9 @@
确认添加 确认添加
</view> </view>
<view class="bot_btn"> <view class="bot_btn">
<!-- <view class="btn1" @click="btngx()"> <view class="btn1" @click="btnfh">
设备更新 返回
</view> --> </view>
<view class="btn1" @click="findDevice()"> <view class="btn1" @click="findDevice()">
蓝牙链接 蓝牙链接
</view> </view>
@ -181,6 +181,11 @@
}, },
methods: { methods: {
btnfh(){
uni.reLaunch({
url:'/page_user/luru/index'
})
},
btngx(){ btngx(){
// this.$u.post('/app/device/ring?sn=' + this.sn).then((res) => { // this.$u.post('/app/device/ring?sn=' + this.sn).then((res) => {
// if (res.code == 200) { // if (res.code == 200) {

View File

@ -3,10 +3,13 @@
<u-navbar :title="tit" :border-bottom="false" :background="bgc" back-icon-color="#262B37" title-color='#262B37' <u-navbar :title="tit" :border-bottom="false" :background="bgc" back-icon-color="#262B37" title-color='#262B37'
title-size='36' height='36' id="navbar"> title-size='36' height='36' id="navbar">
</u-navbar> </u-navbar>
<view style="padding: 20rpx;box-sizing: border-box;" v-html="obj"> <!-- <view style="padding: 20rpx;box-sizing: border-box;" v-html="obj">
</view> </view> -->
<view class="" v-if="obj == ''">
</view>
<u-parse v-else :html="obj" style="width: 100%;height: 100%;padding: 10rpx;box-sizing: border-box;"></u-parse>
</view> </view>
</template> </template>
@ -19,7 +22,7 @@
backgroundColor: "#fff", backgroundColor: "#fff",
}, },
type:'', type:'',
obj:{}, obj:'',
tit:'' tit:''
} }
}, },
@ -27,7 +30,9 @@
this.type = option.type this.type = option.type
if(option.type == 0){ if(option.type == 0){
this.tit = '租车指南' this.tit = '租车指南'
}else{ }else if(option.type == 2){
this.tit = '查看教程'
} else{
this.tit = '用车指南' this.tit = '用车指南'
} }
this.getqingqiu() this.getqingqiu()

View File

@ -336,8 +336,9 @@
channelobj:{} channelobj:{}
} }
}, },
onLoad(e) { onLoad(option) {
this.id = e.id this.id = option.id
console.log(option,this.id,'020202020');
this.getyouhui() this.getyouhui()
this.updateTrackData() this.updateTrackData()
this.orderInfo() this.orderInfo()
@ -579,7 +580,7 @@
const refunded = parseFloat(payRefunded) || 0; const refunded = parseFloat(payRefunded) || 0;
const refunding = parseFloat(payRefunding) || 0; const refunding = parseFloat(payRefunding) || 0;
const actualAmount = amount - (refunded + refunding); const actualAmount = amount - (refunded + refunding);
return `${actualAmount.toFixed(2)}`; return `${actualAmount}`;
}, },
// //
btnkefu(){ btnkefu(){

View File

@ -4,6 +4,13 @@
}, },
"lazyCodeLoading": "requiredComponents", "lazyCodeLoading": "requiredComponents",
"pages": [{ "pages": [{
"path": "pages/nearbystores/index",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": false,
"navigationStyle": "custom"
}
},{
"path": "pages/index/index", "path": "pages/index/index",
"style": { "style": {
"navigationBarTitleText": "首页", "navigationBarTitleText": "首页",
@ -12,13 +19,6 @@
"navigationBarTextStyle": "#FFFFFF", "navigationBarTextStyle": "#FFFFFF",
"navigationStyle": "custom" "navigationStyle": "custom"
} }
},{
"path": "pages/nearbystores/index",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": false,
"navigationStyle": "custom"
}
},{ },{
"path": "pages/login/login", "path": "pages/login/login",
"style": { "style": {

File diff suppressed because it is too large Load Diff

View File

@ -1,7 +1,7 @@
<template> <template>
<view class="page"> <view class="page">
<u-navbar :is-back="false" title="我的" :border-bottom="false" back-icon-color="000" :background="bgc" title-color='#000' title-size='36' <u-navbar title="我的" :border-bottom="false" back-icon-color="000" :background="bgc" title-color='#000' title-size='36'
height='44' id="navbar"> height='44' id="navbar" :custom-back="btnfh">
</u-navbar> </u-navbar>
<view class="dahezi"> <view class="dahezi">
<view class="caozuo"> <view class="caozuo">
@ -122,7 +122,7 @@
</scroll-view> </scroll-view>
</view> </view>
</view> </view>
<tab-bar :indexs='4'></tab-bar> <!-- <tab-bar :indexs='4'></tab-bar> -->
</view> </view>
</template> </template>
@ -157,6 +157,12 @@
// this.getlunbo() // this.getlunbo()
}, },
methods: { methods: {
//
btnfh(){
uni.reLaunch({
url:'/pages/nearbystores/index'
})
},
// //
btnshangjia(){ btnshangjia(){
uni.navigateTo({ uni.navigateTo({

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff