电动车

This commit is contained in:
吴鹏 2025-06-06 16:53:36 +08:00
parent f27b74eeab
commit b465d27040
13 changed files with 158 additions and 189 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.89:4101', //键辉本地 // baseUrl: 'http://192.168.160.197: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

@ -52,11 +52,12 @@
bgc: { bgc: {
backgroundColor: "#F7F8FA", backgroundColor: "#F7F8FA",
}, },
list:[] list:[],
areaId:''
} }
}, },
onLoad() { onLoad(option) {
this.areaId = option.areaId
}, },
onShow() { onShow() {
this.getlist() this.getlist()
@ -64,7 +65,7 @@
methods: { methods: {
// //
getlist(){ getlist(){
this.$u.get("/bst/vip/list?pageNum=1&pageSize=999").then(res =>{ this.$u.get(`/bst/vip/list?pageNum=1&pageSize=999&areaId=${this.areaId}`).then(res =>{
if(res.code == 200){ if(res.code == 200){
this.list = res.rows this.list = res.rows
} }

View File

@ -13,7 +13,6 @@
placeholder-style="color:#C7CDD3"> placeholder-style="color:#C7CDD3">
</view> </view>
</view> </view>
</view> </view>
</view> </view>
<view class="card"> <view class="card">
@ -28,7 +27,6 @@
<view class="card_right"> <view class="card_right">
<u-switch v-model="timeflag"></u-switch> <u-switch v-model="timeflag"></u-switch>
</view> </view>
</view> </view>
<view class="tips"> <view class="tips">
关闭后用户将不能使用运营区及车辆 关闭后用户将不能使用运营区及车辆
@ -42,7 +40,6 @@
<view class="card_right"> <view class="card_right">
<u-switch v-model="shimflag"></u-switch> <u-switch v-model="shimflag"></u-switch>
</view> </view>
</view> </view>
<view class="tips"> <view class="tips">
开启后用户必须先进行实名认证才可使用 开启后用户必须先进行实名认证才可使用
@ -69,7 +66,6 @@
<view class="card_right"> <view class="card_right">
<u-switch v-model="form.msgSwitch"></u-switch> <u-switch v-model="form.msgSwitch"></u-switch>
</view> </view>
</view> </view>
<view class="tips"> <view class="tips">
开启短信通知短信费用0.1/从余额中扣除 开启短信通知短信费用0.1/从余额中扣除
@ -103,7 +99,6 @@
运营时间 运营时间
</view> </view>
<view class="card_right"> <view class="card_right">
</view> </view>
</view> </view>
<view class="tips" style="display: flex;justify-content: space-between;margin-top: 20rpx;align-items: center;"> <view class="tips" style="display: flex;justify-content: space-between;margin-top: 20rpx;align-items: center;">
@ -144,7 +139,6 @@
运营区外断电距离() 运营区外断电距离()
</view> </view>
</view> </view>
<view class="card_li"> <view class="card_li">
<view class="tops"> <view class="tops">
<view class="card_left"> <view class="card_left">
@ -153,7 +147,6 @@
<view class="card_right"> <view class="card_right">
<u-switch v-model="form.noRidingOutage"></u-switch> <u-switch v-model="form.noRidingOutage"></u-switch>
</view> </view>
</view> </view>
<view class="tips"> <view class="tips">
开启后当进入禁行区内将进行断电 开启后当进入禁行区内将进行断电
@ -167,7 +160,6 @@
<view class="card_right"> <view class="card_right">
<u-switch v-model="form.areaOutOutage"></u-switch> <u-switch v-model="form.areaOutOutage"></u-switch>
</view> </view>
</view> </view>
<view class="tips"> <view class="tips">
开启后当进入运营区域外内将进行断电 开启后当进入运营区域外内将进行断电
@ -179,11 +171,9 @@
低于电量(%)不得骑行 低于电量(%)不得骑行
</view> </view>
<view class="card_right"> <view class="card_right">
<input type="number" v-model="form.undercharge" placeholder=" " class="input" <input type="number" v-model="form.undercharge" placeholder=" " class="input"
placeholder-style="color:#C7CDD3" style="width: 100rpx;">% placeholder-style="color:#C7CDD3" style="width: 100rpx;">%
</view> </view>
</view> </view>
<view class="tips" style="text-align: left;"> <view class="tips" style="text-align: left;">
当车辆电量低于多少时无法解锁用车 当车辆电量低于多少时无法解锁用车
@ -200,7 +190,6 @@
<view class="card_right"> <view class="card_right">
<u-switch v-model="form.returnVerify"></u-switch> <u-switch v-model="form.returnVerify"></u-switch>
</view> </view>
</view> </view>
<view class="tips"> <view class="tips">
开启后则需用户拍摄视频后审核订单方可退还押金 开启后则需用户拍摄视频后审核订单方可退还押金
@ -227,7 +216,6 @@
<view class="card_right"> <view class="card_right">
<u-switch v-model="form.areaOutReturn"></u-switch> <u-switch v-model="form.areaOutReturn"></u-switch>
</view> </view>
</view> </view>
<view class="tips"> <view class="tips">
开启后可以在运营区范围外还车 开启后可以在运营区范围外还车
@ -239,11 +227,9 @@
运营区外调度费 运营区外调度费
</view> </view>
<view class="card_right"> <view class="card_right">
<input type="number" v-model="form.dispatchFee" placeholder=" " class="input" <input type="number" v-model="form.dispatchFee" placeholder=" " class="input"
placeholder-style="color:#C7CDD3" style="width: 100rpx;"> placeholder-style="color:#C7CDD3" style="width: 100rpx;">
</view> </view>
</view> </view>
<view class="tips" style="text-align: left;"> <view class="tips" style="text-align: left;">
设置车辆超出运营区外产生的调度费用 设置车辆超出运营区外产生的调度费用
@ -255,11 +241,9 @@
停车点外调度费 停车点外调度费
</view> </view>
<view class="card_right"> <view class="card_right">
<input type="number" v-model="form.vehicleManagementFee" placeholder=" " class="input" <input type="number" v-model="form.vehicleManagementFee" placeholder=" " class="input"
placeholder-style="color:#C7CDD3" style="width: 100rpx;"> placeholder-style="color:#C7CDD3" style="width: 100rpx;">
</view> </view>
</view> </view>
<view class="tips" style="text-align: left;"> <view class="tips" style="text-align: left;">
设置车辆超出停车点外产生的调度费用 设置车辆超出停车点外产生的调度费用
@ -271,11 +255,9 @@
还车误差 还车误差
</view> </view>
<view class="card_right"> <view class="card_right">
<input type="number" v-model="form.error" placeholder=" " class="input" <input type="number" v-model="form.error" placeholder=" " class="input"
placeholder-style="color:#C7CDD3" style="width: 100rpx;"> placeholder-style="color:#C7CDD3" style="width: 100rpx;">
</view> </view>
</view> </view>
<view class="tips" style="text-align: left;"> <view class="tips" style="text-align: left;">
允许用户在规划的停车点外多少米还车 允许用户在规划的停车点外多少米还车
@ -288,10 +270,8 @@
</view> </view>
<view class="card_right"> <view class="card_right">
<view class="iconfont icon-xiangyou1"> <view class="iconfont icon-xiangyou1">
</view> </view>
</view> </view>
</view> </view>
<view class="tips" style="text-align: left;"> <view class="tips" style="text-align: left;">
设置车辆可以正常行驶的区域 设置车辆可以正常行驶的区域
@ -301,8 +281,6 @@
<!-- 时间选择器 --> <!-- 时间选择器 -->
<u-picker v-model="showTimeSelect" mode="time" @confirm="timeConfirm" :params="params" <u-picker v-model="showTimeSelect" mode="time" @confirm="timeConfirm" :params="params"
:default-time='00'></u-picker> :default-time='00'></u-picker>
<view class="btn_box"> <view class="btn_box">
<view class="btn1" @click="backpage()"> <view class="btn1" @click="backpage()">
取消 取消
@ -321,15 +299,11 @@
bgc: { bgc: {
backgroundColor: "#fff", backgroundColor: "#fff",
}, },
list: [], list: [],
form: { form: {},
},
deptInfo: {}, deptInfo: {},
areaId: '', areaId: '',
customServices: [], customServices: [],
params: { params: {
year: false, year: false,
month: false, month: false,
@ -345,7 +319,6 @@
timeflag:false, timeflag:false,
shimflag:false, shimflag:false,
jiasflag:false jiasflag:false
} }
}, },
onLoad(e) { onLoad(e) {
@ -356,16 +329,13 @@
this.areaId = uni.getStorageSync('adminAreaid') this.areaId = uni.getStorageSync('adminAreaid')
} }
this.getAreaInfo() this.getAreaInfo()
// this.getdept()
}, },
methods: { methods: {
// //
showTimePicker(type) { showTimePicker(type) {
this.timeType = type this.timeType = type
this.showTimeSelect = true this.showTimeSelect = true
}, },
// //
timeConfirm(e) { timeConfirm(e) {
const time = `${e.hour}:${e.minute}:${e.second}` const time = `${e.hour}:${e.minute}:${e.second}`
@ -385,14 +355,14 @@
this.customServices.push({ this.customServices.push({
name: "", name: "",
phone: "" phone: ""
}); })
} }
}, },
removeService(index) { removeService(index) {
if (index > 0 && this.customServices.length > 1) { if (index > 0 && this.customServices.length > 1) {
this.$delete(this.customServices, index); this.$delete(this.customServices, index);
this.$set(this.form, `serviceName${index + 1}`, ""); this.$set(this.form, `serviceName${index + 1}`, "")
this.$set(this.form, `servicePhone${index + 1}`, ""); this.$set(this.form, `servicePhone${index + 1}`, "")
} }
}, },
getAreaInfo() { getAreaInfo() {
@ -424,7 +394,7 @@
this.customServices.push({ this.customServices.push({
name: res.data[`serviceName${i}`] || "", name: res.data[`serviceName${i}`] || "",
phone: res.data[`servicePhone${i}`] || "", phone: res.data[`servicePhone${i}`] || "",
}); })
} }
} }
// customServices // customServices
@ -432,24 +402,23 @@
this.customServices.push({ this.customServices.push({
name: "", name: "",
phone: "" phone: ""
}); })
} }
} else { } else {
uni.showToast({ uni.showToast({
title: res.msg, title: res.msg,
icon: 'none', icon: 'none',
duration: 2000 duration: 2000
}); })
} }
}) })
}, },
backpage() { backpage() {
uni.navigateBack() uni.navigateBack()
}, },
// radioradio-group // radioradio-group
radioGroupChange(e) { radioGroupChange(e) {
console.log(e); console.log(e)
if (e == '按分钟') { if (e == '按分钟') {
this.data.rentalUnit = 'minutes' this.data.rentalUnit = 'minutes'
} else { } else {
@ -480,7 +449,7 @@
title: '保存成功', title: '保存成功',
icon: 'success', icon: 'success',
duration: 1000 duration: 1000
}); })
setTimeout(() => { setTimeout(() => {
uni.navigateBack() uni.navigateBack()
}, 1100) }, 1100)

View File

@ -73,7 +73,7 @@
<view class="info_li"> <view class="info_li">
<view class="half_infoli"> <view class="half_infoli">
电量 电量
<span> {{ item.remainingPower }}%</span> <span> {{ item.remainingPower == null ? 0 : item.remainingPower}}%</span>
</view> </view>
<view class="half_infoli"> <view class="half_infoli">
型号 型号

View File

@ -130,7 +130,6 @@
</view> </view>
</view> </view>
</scroll-view> </scroll-view>
<u-select v-model="shows" :list="list" title='添加方式' @confirm="searchconfirm"></u-select> <u-select v-model="shows" :list="list" title='添加方式' @confirm="searchconfirm"></u-select>
<TabBar :indexs='3' style=""></TabBar> <TabBar :indexs='3' style=""></TabBar>
</view> </view>
@ -221,14 +220,12 @@
computed: { computed: {
formattedPayedAmount() { formattedPayedAmount() {
// item // item
if (!this.item) return '¥0.00'; if (!this.item) return '¥0.00'
const payedAmount = parseFloat(this.item.payedAmount) || 0
const payedAmount = parseFloat(this.item.payedAmount) || 0; const payRefunded = parseFloat(this.item.payRefunded) || 0
const payRefunded = parseFloat(this.item.payRefunded) || 0; const payRefunding = parseFloat(this.item.payRefunding) || 0
const payRefunding = parseFloat(this.item.payRefunding) || 0; const actualAmount = payedAmount - (payRefunded + payRefunding)
return `${actualAmount.toFixed(2)}`
const actualAmount = payedAmount - (payRefunded + payRefunding);
return `${actualAmount.toFixed(2)}`;
} }
}, },
onReachBottom() { onReachBottom() {
@ -246,50 +243,43 @@
}, },
formatPayedAmount(payedAmount, payRefunded, payRefunding) { formatPayedAmount(payedAmount, payRefunded, payRefunding) {
if (!payedAmount) return '0.00元'; if (!payedAmount) return '0.00元'
const amount = parseFloat(payedAmount) || 0
const amount = parseFloat(payedAmount) || 0; 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)
return `${actualAmount.toFixed(2)}`
const actualAmount = amount - (refunded + refunding);
return `${actualAmount.toFixed(2)}`;
}, },
handqixing() { handqixing() {
console.log(this.total,this.allList.length); console.log(this.total,this.allList.length)
if(this.total > this.allList.length){ if(this.total > this.allList.length){
this.orderList() this.orderList()
} }
}, },
formatDatess(startTime, endTime) { formatDatess(startTime, endTime) {
if (!startTime) return "0秒"; // 0 if (!startTime) return "0秒" // 0
// 0 // 0
const start = new Date(startTime); const start = new Date(startTime)
const end = endTime ? new Date(endTime) : new Date(); const end = endTime ? new Date(endTime) : new Date()
if (isNaN(start.getTime()) || isNaN(end.getTime())) return "0秒"; if (isNaN(start.getTime()) || isNaN(end.getTime())) return "0秒"
// //
let diffMs = end - start; let diffMs = end - start
if (diffMs < 0) return "0秒"; // if (diffMs < 0) return "0秒" //
// //
const diffDays = Math.floor(diffMs / 86400000); // const diffDays = Math.floor(diffMs / 86400000) //
diffMs %= 86400000; diffMs %= 86400000
const diffHours = Math.floor(diffMs / 3600000); // const diffHours = Math.floor(diffMs / 3600000) //
diffMs %= 3600000; diffMs %= 3600000
const diffMinutes = Math.floor(diffMs / 60000); // const diffMinutes = Math.floor(diffMs / 60000) //
diffMs %= 60000; diffMs %= 60000
const diffSeconds = Math.floor(diffMs / 1000); // const diffSeconds = Math.floor(diffMs / 1000) //
// 0"X" // 0"X"
const parts = []; const parts = []
if (diffDays > 0) parts.push(`${diffDays}`); if (diffDays > 0) parts.push(`${diffDays}`)
if (diffHours > 0) parts.push(`${diffHours}`); if (diffHours > 0) parts.push(`${diffHours}`)
if (diffMinutes > 0) parts.push(`${diffMinutes}`); if (diffMinutes > 0) parts.push(`${diffMinutes}`)
parts.push(`${diffSeconds}`); // parts.push(`${diffSeconds}`) //
return parts.join("")
return parts.join("");
}, },
formatDate(value) { formatDate(value) {
if (!value) return '' if (!value) return ''

View File

@ -247,7 +247,7 @@ export default {
// //
btnhy(){ btnhy(){
uni.navigateTo({ uni.navigateTo({
url:'/page_fenbao/huiyuan/huiyuanlist' url:'/page_fenbao/huiyuan/huiyuanlist?areaId='+this.areaId
}) })
}, },

View File

@ -527,6 +527,10 @@
}, },
// //
shengyinaniu(e){ shengyinaniu(e){
uni.showLoading({
title: '加载中...',
mask: true
})
this.$u.put(`/bst/device/iot/music?id=${this.sn}&music=${e.value}`).then(res => { this.$u.put(`/bst/device/iot/music?id=${this.sn}&music=${e.value}`).then(res => {
if (res.code == 200) { if (res.code == 200) {
this.jytxt = e.label this.jytxt = e.label
@ -537,7 +541,11 @@
icon: 'success', icon: 'success',
duration: 2000 duration: 2000
}) })
setTimeout(()=>{
uni.hideLoading()
},2000)
}else{ }else{
uni.hideLoading()
uni.showToast({ uni.showToast({
title: res.msg, title: res.msg,
icon: 'none', icon: 'none',

View File

@ -182,6 +182,9 @@
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({
customData: "11reboot@"
})
} }
}else if(res.msg == null) { }else if(res.msg == null) {
uni.hideLoading() uni.hideLoading()

View File

@ -39,7 +39,9 @@
确认添加 确认添加
</view> </view>
<view class="bot_btn"> <view class="bot_btn">
<!-- <view class="btn1" @click="btngx()">
设备更新
</view> -->
<view class="btn1" @click="Binddevice()"> <view class="btn1" @click="Binddevice()">
蓝牙链接 蓝牙链接
</view> </view>
@ -172,16 +174,30 @@
}, },
watch: { watch: {
}, },
methods: { methods: {
btngx(){
// this.$u.post('/app/device/ring?sn=' + this.sn).then((res) => {
// if (res.code == 200) {
// uni.showToast({
// title: res.msg,
// icon: 'success',
// duration: 2000
// })
// } else {
// uni.showToast({
// title: res.msg,
// icon: 'none',
// duration: 3000
// })
// }
// })
},
confirm(e) { confirm(e) {
// console.log(e); // console.log(e);
uni.setStorageSync('hardwareVersionId', e[0].value); uni.setStorageSync('hardwareVersionId', e[0].value);
this.hardwareVersionId = e[0].value this.hardwareVersionId = e[0].value
const hardwareVersionId =this.hardwareVersionId const hardwareVersionId =this.hardwareVersionId
if (hardwareVersionId) { if (hardwareVersionId) {
const matchedVersion = this.Versionlist.find(version => version.id === const matchedVersion = this.Versionlist.find(version => version.id ===
hardwareVersionId); hardwareVersionId);
@ -189,7 +205,6 @@
this.hardwareInfo = matchedVersion; this.hardwareInfo = matchedVersion;
} }
} }
}, },
getlist() { getlist() {
this.$u.get('/bst/hardwareVersion/all').then((res) => { this.$u.get('/bst/hardwareVersion/all').then((res) => {
@ -205,17 +220,16 @@
this.hardwareInfo = matchedVersion; this.hardwareInfo = matchedVersion;
} }
} }
this.list = res.data.map(item => ({ this.list = res.data.map(item => ({
value: item.id, value: item.id,
label: item.version label: item.version
})); }))
} else { } else {
uni.showToast({ uni.showToast({
title: res.msg, title: res.msg,
icon: 'none', icon: 'none',
duration: 2000 duration: 2000
}); })
} }
}) })
}, },
@ -228,7 +242,7 @@
title: res.msg, title: res.msg,
icon: 'none', icon: 'none',
duration: 2000 duration: 2000
}); })
} }
}) })
}, },
@ -253,14 +267,14 @@
title: res.msg, title: res.msg,
icon: 'none', icon: 'none',
duration: 2000 duration: 2000
}); })
} }
}) })
}, },
backpage() { backpage() {
uni.navigateBack({ uni.navigateBack({
delta: 1 // delta1 delta: 1 // delta1
}); })
}, },
bind() { bind() {
// if(this.sn!='' && this.sn.length === 7 && /^\d+$/.test(this.sn)){ // if(this.sn!='' && this.sn.length === 7 && /^\d+$/.test(this.sn)){
@ -293,7 +307,6 @@
// this.showbind=true // this.showbind=true
// }else{ // }else{
// } // }
uni.showToast({ uni.showToast({
title: res.msg, title: res.msg,
@ -304,14 +317,12 @@
} }
}) })
// } // }
}, },
qrcode() { qrcode() {
uni.scanCode({ uni.scanCode({
onlyFromCamera: true, onlyFromCamera: true,
scanType: ['qrCode'], scanType: ['qrCode'],
success: res => { success: res => {
let sn = null; let sn = null;
let queryParams = res.result.split('?')[1]; let queryParams = res.result.split('?')[1];
if (queryParams) { if (queryParams) {
@ -321,9 +332,8 @@
if (key === 's') { if (key === 's') {
sn = value; sn = value;
} }
}); })
} }
this.sn = sn this.sn = sn
console.log(res.result); console.log(res.result);
if (this.sn != '') { if (this.sn != '') {
@ -404,7 +414,7 @@
console.log('手机未连接网络') console.log('手机未连接网络')
} }
} }
}); })
}, },
open() { open() {
let vm = this // this vm let vm = this // this vm
@ -422,7 +432,7 @@
uni.hideLoading() uni.hideLoading()
console.error('获取已连接蓝牙设备信息失败:', err) console.error('获取已连接蓝牙设备信息失败:', err)
} }
}); })
} else { } else {
console.log('手机未连接网络') console.log('手机未连接网络')
} }
@ -710,25 +720,6 @@
btnhd() { btnhd() {
this.tishiflag = false this.tishiflag = false
}, },
} }
} }
</script> </script>
@ -738,7 +729,6 @@
overflow-x: hidden; overflow-x: hidden;
background-color: #F3F3F3; background-color: #F3F3F3;
} }
.page { .page {
padding-bottom: 250rpx; padding-bottom: 250rpx;
width: 750rpx; width: 750rpx;
@ -747,28 +737,23 @@
left: 72rpx; left: 72rpx;
top: 628rpx; top: 628rpx;
width: 610rpx; width: 610rpx;
// height: 282rpx;
background: #FFFFFF; background: #FFFFFF;
border-radius: 30rpx 30rpx 30rpx 30rpx; border-radius: 30rpx 30rpx 30rpx 30rpx;
z-index: 110; z-index: 110;
padding-bottom: 100rpx; padding-bottom: 100rpx;
.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;
flex-wrap: nowrap; flex-wrap: nowrap;
align-items: center; align-items: center;
.text { .text {
width: 350rpx; width: 350rpx;
font-weight: 400; font-weight: 400;
font-size: 32rpx; font-size: 32rpx;
color: #3D3D3D; color: #3D3D3D;
} }
.ipt { .ipt {
padding: 10rpx 18rpx; padding: 10rpx 18rpx;
display: flex; display: flex;
@ -779,13 +764,11 @@
height: 64rpx; height: 64rpx;
border-radius: 0rpx 0rpx 0rpx 0rpx; border-radius: 0rpx 0rpx 0rpx 0rpx;
border: 2rpx solid #979797; border: 2rpx solid #979797;
.input { .input {
width: 80%; width: 80%;
} }
} }
} }
.tip { .tip {
width: 100%; width: 100%;
text-align: center; text-align: center;
@ -793,7 +776,6 @@
font-size: 32rpx; font-size: 32rpx;
color: #3D3D3D; color: #3D3D3D;
} }
.txt { .txt {
margin-top: 32rpx; margin-top: 32rpx;
width: 100%; width: 100%;
@ -803,17 +785,12 @@
color: #3D3D3D; color: #3D3D3D;
} }
} }
.bots { .bots {
position: absolute; position: absolute;
width: 610rpx; width: 610rpx;
// border-top: 2rpx solid #D8D8D8;
display: flex; display: flex;
flex-wrap: nowrap; flex-wrap: nowrap;
// height: 100%;
bottom: -20rpx; bottom: -20rpx;
.bot_left { .bot_left {
border-radius: 0rpx 0rpx 0rpx 30rpx; border-radius: 0rpx 0rpx 0rpx 30rpx;
width: 50%; width: 50%;
@ -826,7 +803,6 @@
color: #3D3D3D; color: #3D3D3D;
background: #EEEEEE; background: #EEEEEE;
} }
.bot_right { .bot_right {
border-radius: 0rpx 0rpx 30rpx 0rpx; border-radius: 0rpx 0rpx 30rpx 0rpx;
width: 50%; width: 50%;
@ -836,13 +812,9 @@
align-items: center; align-items: center;
justify-content: center; justify-content: center;
color: #FFFFFF; color: #FFFFFF;
// border-left: 2rpx solid #D8D8D8;
font-weight: 500; font-weight: 500;
font-size: 32rpx; font-size: 32rpx;
// color: #4C97E7;
} }
} }
} }
@ -858,20 +830,15 @@
} }
} }
.btn { .btn {
margin: 160rpx auto; margin: 160rpx auto;
margin-top: 30rpx; margin-top: 30rpx;
// position: fixed;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
// bottom: 100rpx;
// left: 46rpx;
width: 658rpx; width: 658rpx;
height: 88rpx; height: 88rpx;
background: #27c2fd; background: #27c2fd;
border-radius: 20rpx 20rpx 20rpx 20rpx; border-radius: 20rpx 20rpx 20rpx 20rpx;
font-weight: 500; font-weight: 500;
font-size: 32rpx; font-size: 32rpx;
color: #FFFFFF; color: #FFFFFF;

View File

@ -11,7 +11,6 @@
</view> </view>
<input type="text" class="ips" v-model="sn" placeholder="请扫描设备上的二维码" style="margin-left: 32rpx;" <input type="text" class="ips" v-model="sn" placeholder="请扫描设备上的二维码" style="margin-left: 32rpx;"
placeholder-class="my-placeholder" @input="search()" /> placeholder-class="my-placeholder" @input="search()" />
</view> </view>
<view class="txt"> <view class="txt">
MAC{{carInfo.mac == undefined ? '--' : carInfo.mac}} MAC{{carInfo.mac == undefined ? '--' : carInfo.mac}}
@ -43,9 +42,14 @@
<view class="txt"> <view class="txt">
硬件版本{{carInfo.hardwareVersion == undefined ? '--' : carInfo.hardwareVersion}} 硬件版本{{carInfo.hardwareVersion == undefined ? '--' : carInfo.hardwareVersion}}
</view> </view>
<view class="txt"> <view class="txt" style="display: flex;justify-content: space-between;align-items: center;">
<view class="">
软件版本{{carInfo.softwareVersion == undefined ? '--' : carInfo.softwareVersion}} 软件版本{{carInfo.softwareVersion == undefined ? '--' : carInfo.softwareVersion}}
</view> </view>
<view class="" @click="btnsj" style="font-size: 30rpx;background-color: #8883F0; color: #fff;padding: 6rpx 10rpx;border-radius: 10rpx;">
升级
</view>
</view>
<view class="txt"> <view class="txt">
声音 声音
<span v-if="carInfo.music==0">静音</span> <span v-if="carInfo.music==0">静音</span>
@ -60,10 +64,6 @@
</view> </view>
<view class="btnbox"> <view class="btnbox">
<view class="btn_box" style="margin-bottom: 20rpx;"> <view class="btn_box" style="margin-bottom: 20rpx;">
<!-- <view class="btn1" @click="btn(5)">
清空校准
</view> -->
</view> </view>
<view class="btn_box"> <view class="btn_box">
<view class="btn1" @click="btn(0)"> <view class="btn1" @click="btn(0)">
@ -87,15 +87,10 @@
更新 更新
</view> </view>
</view> </view>
<!-- <view class="btn_box" style="margin-top: 20rpx;">
</view> -->
<view class="btn2" style="margin-top: 20rpx;" @click="back()"> <view class="btn2" style="margin-top: 20rpx;" @click="back()">
返回扫描 返回扫描
</view> </view>
</view> </view>
</view> </view>
</template> </template>
@ -109,7 +104,6 @@
}, },
sn: '', sn: '',
carInfo:{} carInfo:{}
} }
}, },
onLoad(e) { onLoad(e) {
@ -117,16 +111,38 @@
this.sn = e.sn this.sn = e.sn
this.deviceInfo() this.deviceInfo()
} }
}, },
onShow() { onShow() {
}, },
mounted() { mounted() {
// this.videoContext = uni.createVideoContext('myVideo', this) // this.videoContext = uni.createVideoContext('myVideo', this)
}, },
methods: { methods: {
//
btnsj(){
uni.showLoading({
title: '加载中...',
mask: true
})
this.$u.put(`/bst/device/iot/update?sn=${this.sn}`).then((res) => {
if (res.code === 200) {
uni.hideLoading()
uni.showToast({
title: '操作成功',
icon: 'success',
duration:3000
})
}else{
uni.showToast({
title: res.msg,
icon: 'none',
duration:3000
})
}
})
},
backPage(){ backPage(){
uni.redirectTo({ uni.redirectTo({
url:'/page_user/luru/index' url:'/page_user/luru/index'

View File

@ -426,7 +426,7 @@
if(that.ver_dataflag != 3){ if(that.ver_dataflag != 3){
uni.showModal({ uni.showModal({
title: '提示', title: '提示',
content: '设备离线,请等待设备连接', content: '设备离线,请点击右上角连接车辆',
showCancel: false, showCancel: false,
success: function(res) { success: function(res) {
if (res.confirm) { if (res.confirm) {
@ -775,7 +775,7 @@
let data = { let data = {
mac:that.mac, mac:that.mac,
reason:'解锁', reason:'解锁',
command:'11open', command:'11opensub5@',
longitude:that.lslon, longitude:that.lslon,
latitude:that.lslat, latitude:that.lslat,
result:'成功' result:'成功'
@ -812,7 +812,7 @@
let data = { let data = {
mac:that.mac, mac:that.mac,
reason:'解锁', reason:'解锁',
command:'close', command:'11opensub5@',
longitude:that.lslon, longitude:that.lslon,
latitude:that.lslat, latitude:that.lslat,
result:'蓝牙未连接' result:'蓝牙未连接'
@ -835,7 +835,7 @@
if(that.ver_dataflag != 3){ if(that.ver_dataflag != 3){
uni.showModal({ uni.showModal({
title: '提示', title: '提示',
content: '设备离线,请等待设备连接', content: '设备离线,请点击右上角连接车辆',
showCancel: false, showCancel: false,
success: function(res) { success: function(res) {
if (res.confirm) { if (res.confirm) {
@ -915,7 +915,7 @@
let data = { let data = {
mac:that.mac, mac:that.mac,
reason:'临时锁车', reason:'临时锁车',
command:'close', command:'11llosesub300@',
longitude:that.lon, longitude:that.lon,
latitude:that.lat, latitude:that.lat,
result:'成功' result:'成功'
@ -924,6 +924,9 @@
console.log(res,'蓝牙') console.log(res,'蓝牙')
}) })
setTimeout(()=>{ setTimeout(()=>{
xBlufi.notifySendCustomData({
customData: "11reboot@"
})
uni.hideLoading() uni.hideLoading()
},2000) },2000)
} else { } else {
@ -973,12 +976,12 @@
that.deivceobj.deviceLockStatus = 0 that.deivceobj.deviceLockStatus = 0
that.getorderdevice() that.getorderdevice()
} }
} else if(res.code == 20001){aaaaaaaa } else if(res.code == 20001){
uni.hideLoading() uni.hideLoading()
if(that.ver_dataflag != 3){ if(that.ver_dataflag != 3){
uni.showModal({ uni.showModal({
title: '提示', title: '提示',
content: '设备离线,请等待设备连接', content: '设备离线,请点击右上角连接车辆',
showCancel: false, showCancel: false,
success: function(res) { success: function(res) {
if (res.confirm) { if (res.confirm) {
@ -1280,6 +1283,20 @@
xBlufi.notifySendCustomData({ xBlufi.notifySendCustomData({
customData: "11closesub300@" 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(()=>{ setTimeout(()=>{
uni.hideLoading() uni.hideLoading()
xBlufi.notifyConnectBle({ xBlufi.notifyConnectBle({
@ -1289,17 +1306,6 @@
}) })
that.getorderdevice() that.getorderdevice()
},1000) },1000)
let data = {
mac:that.mac,
reason:'还车',
command:'close',
longitude:that.lon,
latitude:that.lat,
result:'成功'
}
that.$u.post(`/app/commandLog/bluetooth`,data).then(res => {
console.log(res,'蓝牙')
})
} }
}else if(res.msg == null) { }else if(res.msg == null) {
uni.hideLoading() uni.hideLoading()
@ -1368,6 +1374,9 @@
customData: "11llosesub300@" customData: "11llosesub300@"
}) })
setTimeout(()=>{ setTimeout(()=>{
xBlufi.notifySendCustomData({
customData: "11reboot@"
})
uni.hideLoading() uni.hideLoading()
that.getorderdevice() that.getorderdevice()
},1000) },1000)

View File

@ -23,9 +23,9 @@
@click="btntap(1)" mode=""></image> @click="btntap(1)" mode=""></image>
<image v-if="rtindex == 1" src="https://api.ccttiot.com/smartmeter/img/static/u8zXd0xYhLKD0BvgZDVv" <image v-if="rtindex == 1" src="https://api.ccttiot.com/smartmeter/img/static/u8zXd0xYhLKD0BvgZDVv"
@click="btntap(1)" mode=""></image> @click="btntap(1)" mode=""></image>
<image v-if="rtindex != 2" src="https://api.ccttiot.com/smartmeter/img/static/unoWsjJjeFKVrivp7MMF" <image v-if="rtindex != 2" :src="iconobj.bikertpic"
@click="btntap(2)" mode=""></image> @click="btntap(2)" mode=""></image>
<image v-if="rtindex == 2" src="https://api.ccttiot.com/smartmeter/img/static/ukCjlSRsRoqMNNNxcFJ9" <image v-if="rtindex == 2" :src="iconobj.bikertpicgl"
@click="btntap(2)" mode=""></image> @click="btntap(2)" mode=""></image>
<image v-if="rtindex != 3" src="https://api.ccttiot.com/smartmeter/img/static/uwIWeuTVbjFLNmLTGPOh" <image v-if="rtindex != 3" src="https://api.ccttiot.com/smartmeter/img/static/uwIWeuTVbjFLNmLTGPOh"
@click="btntap(3)" mode=""></image> @click="btntap(3)" mode=""></image>
@ -1009,7 +1009,7 @@
if (this.rtindex == 1) { if (this.rtindex == 1) {
this.iconPath = 'https://api.ccttiot.com/smartmeter/img/static/upX2lLilhrRi4tttdHlo' this.iconPath = 'https://api.ccttiot.com/smartmeter/img/static/upX2lLilhrRi4tttdHlo'
} else if (this.rtindex == 2) { } else if (this.rtindex == 2) {
this.iconPath = 'https://api.ccttiot.com/smartmeter/img/static/uX0FBv86yDIR5tIqjoe2' this.iconPath = this.iconobj.mappic
this.$u.get(`/app/device/listNearBy?radius=10000&center=${this.jingweidu}&areaId=${this.user.areaId == undefined ? null : this.user.areaId}`).then((res) => { this.$u.get(`/app/device/listNearBy?radius=10000&center=${this.jingweidu}&areaId=${this.user.areaId == undefined ? null : this.user.areaId}`).then((res) => {
if (res.code == 200) { if (res.code == 200) {
this.covers = [] this.covers = []
@ -1370,7 +1370,7 @@
if (this.rtindex == 1) { if (this.rtindex == 1) {
return 'https://api.ccttiot.com/smartmeter/img/static/upX2lLilhrRi4tttdHlo' return 'https://api.ccttiot.com/smartmeter/img/static/upX2lLilhrRi4tttdHlo'
} else if (this.rtindex == 2) { } else if (this.rtindex == 2) {
return 'https://api.ccttiot.com/smartmeter/img/static/uX0FBv86yDIR5tIqjoe2' return this.iconobj.mappic
} else if (this.rtindex == 3) { } else if (this.rtindex == 3) {
return 'https://api.ccttiot.com/smartmeter/img/static/un7ecyEN8vsJhlEnXfD4' return 'https://api.ccttiot.com/smartmeter/img/static/un7ecyEN8vsJhlEnXfD4'
} }

View File

@ -20,6 +20,9 @@ const store = new Vuex.Store({
orderlistimg:'https://api.ccttiot.com/smartmeter/img/static/u6uVoMfLXtkWyF9gg2mY',//订单列表图片 orderlistimg:'https://api.ccttiot.com/smartmeter/img/static/u6uVoMfLXtkWyF9gg2mY',//订单列表图片
huancheimgone:'https://api.ccttiot.com/smartmeter/img/static/unL4myQWRXAKWCmKof4j',//还车审核第一张图片 huancheimgone:'https://api.ccttiot.com/smartmeter/img/static/unL4myQWRXAKWCmKof4j',//还车审核第一张图片
huancheimgtwo:'https://api.ccttiot.com/smartmeter/img/static/uDfEXjApmdS6ByM88pv3',//还车审核第二张图片 huancheimgtwo:'https://api.ccttiot.com/smartmeter/img/static/uDfEXjApmdS6ByM88pv3',//还车审核第二张图片
bikertpic:'https://api.ccttiot.com/smartmeter/img/static/unoWsjJjeFKVrivp7MMF',
bikertpicgl:'https://api.ccttiot.com/smartmeter/img/static/ukCjlSRsRoqMNNNxcFJ9',
mappic:'https://api.ccttiot.com/smartmeter/img/static/uX0FBv86yDIR5tIqjoe2',
}, },
// 铲车图标 // 铲车图标
// iconobj:{ // iconobj:{
@ -32,6 +35,9 @@ const store = new Vuex.Store({
// orderlistimg:'https://api.ccttiot.com/smartmeter/img/static/uK99lod2FY4ivycyokS7',//订单列表图片 // orderlistimg:'https://api.ccttiot.com/smartmeter/img/static/uK99lod2FY4ivycyokS7',//订单列表图片
// huancheimgone:'https://api.ccttiot.com/smartmeter/img/static/uVsHtwoWIGve7IRkXRia',//还车审核第一张图片 // huancheimgone:'https://api.ccttiot.com/smartmeter/img/static/uVsHtwoWIGve7IRkXRia',//还车审核第一张图片
// huancheimgtwo:'https://api.ccttiot.com/smartmeter/img/static/uovfS9eWVVb6zU9mIESt',//还车审核第二张图片 // huancheimgtwo:'https://api.ccttiot.com/smartmeter/img/static/uovfS9eWVVb6zU9mIESt',//还车审核第二张图片
// bikertpic:'https://api.ccttiot.com/smartmeter/img/static/uzwqHp9fFmjTkIJA4eDb',
// bikertpicgl:'https://api.ccttiot.com/smartmeter/img/static/uUVbGHELl2EUrTFaa3FW',
// mappic:'https://api.ccttiot.com/smartmeter/img/static/urQdA25KPzFFE266Qzxn',
// }, // },
}, },
mutations:{ mutations:{