电动车
This commit is contained in:
parent
f27b74eeab
commit
b465d27040
|
@ -1,7 +1,7 @@
|
|||
const install = (Vue, vm) => {
|
||||
uni.setStorageSync('deptId', 100);
|
||||
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: 'https://ele.ccttiot.com/prod-api', //线上
|
||||
// baseUrl: 'https://cc.ccttiot.com/prod-api', //叉车线上
|
||||
|
|
|
@ -52,11 +52,12 @@
|
|||
bgc: {
|
||||
backgroundColor: "#F7F8FA",
|
||||
},
|
||||
list:[]
|
||||
list:[],
|
||||
areaId:''
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
|
||||
onLoad(option) {
|
||||
this.areaId = option.areaId
|
||||
},
|
||||
onShow() {
|
||||
this.getlist()
|
||||
|
@ -64,7 +65,7 @@
|
|||
methods: {
|
||||
// 请求会员列表
|
||||
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){
|
||||
this.list = res.rows
|
||||
}
|
||||
|
|
|
@ -13,7 +13,6 @@
|
|||
placeholder-style="color:#C7CDD3">
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
<view class="card">
|
||||
|
@ -28,7 +27,6 @@
|
|||
<view class="card_right">
|
||||
<u-switch v-model="timeflag"></u-switch>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
<view class="tips">
|
||||
关闭后用户将不能使用运营区及车辆
|
||||
|
@ -42,7 +40,6 @@
|
|||
<view class="card_right">
|
||||
<u-switch v-model="shimflag"></u-switch>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
<view class="tips">
|
||||
开启后用户必须先进行实名认证才可使用
|
||||
|
@ -69,7 +66,6 @@
|
|||
<view class="card_right">
|
||||
<u-switch v-model="form.msgSwitch"></u-switch>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
<view class="tips">
|
||||
开启短信通知,短信费用0.1元/条,从余额中扣除
|
||||
|
@ -103,7 +99,6 @@
|
|||
运营时间
|
||||
</view>
|
||||
<view class="card_right">
|
||||
|
||||
</view>
|
||||
</view>
|
||||
<view class="tips" style="display: flex;justify-content: space-between;margin-top: 20rpx;align-items: center;">
|
||||
|
@ -144,7 +139,6 @@
|
|||
运营区外断电距离(米)
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="card_li">
|
||||
<view class="tops">
|
||||
<view class="card_left">
|
||||
|
@ -153,7 +147,6 @@
|
|||
<view class="card_right">
|
||||
<u-switch v-model="form.noRidingOutage"></u-switch>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
<view class="tips">
|
||||
开启后当进入禁行区内将进行断电
|
||||
|
@ -167,7 +160,6 @@
|
|||
<view class="card_right">
|
||||
<u-switch v-model="form.areaOutOutage"></u-switch>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
<view class="tips">
|
||||
开启后当进入运营区域外内将进行断电
|
||||
|
@ -179,14 +171,12 @@
|
|||
低于电量(%)不得骑行
|
||||
</view>
|
||||
<view class="card_right">
|
||||
|
||||
<input type="number" v-model="form.undercharge" placeholder=" " class="input"
|
||||
placeholder-style="color:#C7CDD3" style="width: 100rpx;">%
|
||||
</view>
|
||||
|
||||
</view>
|
||||
<view class="tips" style="text-align: left;">
|
||||
当车辆电量低于多少时无法解锁用车
|
||||
当车辆电量低于多少时无法解锁用车
|
||||
</view>
|
||||
</view>
|
||||
<view class="biaoti">
|
||||
|
@ -200,7 +190,6 @@
|
|||
<view class="card_right">
|
||||
<u-switch v-model="form.returnVerify"></u-switch>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
<view class="tips">
|
||||
开启后则需用户拍摄视频后审核订单方可退还押金
|
||||
|
@ -227,7 +216,6 @@
|
|||
<view class="card_right">
|
||||
<u-switch v-model="form.areaOutReturn"></u-switch>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
<view class="tips">
|
||||
开启后可以在运营区范围外还车
|
||||
|
@ -239,11 +227,9 @@
|
|||
运营区外调度费
|
||||
</view>
|
||||
<view class="card_right">
|
||||
|
||||
<input type="number" v-model="form.dispatchFee" placeholder=" " class="input"
|
||||
placeholder-style="color:#C7CDD3" style="width: 100rpx;">元
|
||||
</view>
|
||||
|
||||
</view>
|
||||
<view class="tips" style="text-align: left;">
|
||||
设置车辆超出运营区外产生的调度费用
|
||||
|
@ -255,11 +241,9 @@
|
|||
停车点外调度费
|
||||
</view>
|
||||
<view class="card_right">
|
||||
|
||||
<input type="number" v-model="form.vehicleManagementFee" placeholder=" " class="input"
|
||||
placeholder-style="color:#C7CDD3" style="width: 100rpx;">元
|
||||
</view>
|
||||
|
||||
</view>
|
||||
<view class="tips" style="text-align: left;">
|
||||
设置车辆超出停车点外产生的调度费用
|
||||
|
@ -271,11 +255,9 @@
|
|||
还车误差
|
||||
</view>
|
||||
<view class="card_right">
|
||||
|
||||
<input type="number" v-model="form.error" placeholder=" " class="input"
|
||||
placeholder-style="color:#C7CDD3" style="width: 100rpx;">米
|
||||
</view>
|
||||
|
||||
</view>
|
||||
<view class="tips" style="text-align: left;">
|
||||
允许用户在规划的停车点外多少米还车
|
||||
|
@ -288,10 +270,8 @@
|
|||
</view>
|
||||
<view class="card_right">
|
||||
<view class="iconfont icon-xiangyou1">
|
||||
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
<view class="tips" style="text-align: left;">
|
||||
设置车辆可以正常行驶的区域
|
||||
|
@ -301,8 +281,6 @@
|
|||
<!-- 时间选择器 -->
|
||||
<u-picker v-model="showTimeSelect" mode="time" @confirm="timeConfirm" :params="params"
|
||||
:default-time='00'></u-picker>
|
||||
|
||||
|
||||
<view class="btn_box">
|
||||
<view class="btn1" @click="backpage()">
|
||||
取消
|
||||
|
@ -321,15 +299,11 @@
|
|||
bgc: {
|
||||
backgroundColor: "#fff",
|
||||
},
|
||||
|
||||
list: [],
|
||||
form: {
|
||||
|
||||
},
|
||||
form: {},
|
||||
deptInfo: {},
|
||||
areaId: '',
|
||||
customServices: [],
|
||||
|
||||
params: {
|
||||
year: false,
|
||||
month: false,
|
||||
|
@ -345,7 +319,6 @@
|
|||
timeflag:false,
|
||||
shimflag:false,
|
||||
jiasflag:false
|
||||
|
||||
}
|
||||
},
|
||||
onLoad(e) {
|
||||
|
@ -356,16 +329,13 @@
|
|||
this.areaId = uni.getStorageSync('adminAreaid')
|
||||
}
|
||||
this.getAreaInfo()
|
||||
// this.getdept()
|
||||
},
|
||||
|
||||
methods: {
|
||||
// 显示时间选择器
|
||||
showTimePicker(type) {
|
||||
this.timeType = type
|
||||
this.showTimeSelect = true
|
||||
},
|
||||
|
||||
// 时间选择确认
|
||||
timeConfirm(e) {
|
||||
const time = `${e.hour}:${e.minute}:${e.second}`
|
||||
|
@ -385,14 +355,14 @@
|
|||
this.customServices.push({
|
||||
name: "",
|
||||
phone: ""
|
||||
});
|
||||
})
|
||||
}
|
||||
},
|
||||
removeService(index) {
|
||||
if (index > 0 && this.customServices.length > 1) {
|
||||
this.$delete(this.customServices, index);
|
||||
this.$set(this.form, `serviceName${index + 1}`, "");
|
||||
this.$set(this.form, `servicePhone${index + 1}`, "");
|
||||
this.$set(this.form, `serviceName${index + 1}`, "")
|
||||
this.$set(this.form, `servicePhone${index + 1}`, "")
|
||||
}
|
||||
},
|
||||
getAreaInfo() {
|
||||
|
@ -424,7 +394,7 @@
|
|||
this.customServices.push({
|
||||
name: res.data[`serviceName${i}`] || "",
|
||||
phone: res.data[`servicePhone${i}`] || "",
|
||||
});
|
||||
})
|
||||
}
|
||||
}
|
||||
// 如果 customServices 为空,添加一个默认的服务
|
||||
|
@ -432,24 +402,23 @@
|
|||
this.customServices.push({
|
||||
name: "",
|
||||
phone: ""
|
||||
});
|
||||
})
|
||||
}
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
});
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
backpage() {
|
||||
uni.navigateBack()
|
||||
},
|
||||
|
||||
// 选中任一radio时,由radio-group触发
|
||||
radioGroupChange(e) {
|
||||
console.log(e);
|
||||
console.log(e)
|
||||
if (e == '按分钟') {
|
||||
this.data.rentalUnit = 'minutes'
|
||||
} else {
|
||||
|
@ -480,7 +449,7 @@
|
|||
title: '保存成功',
|
||||
icon: 'success',
|
||||
duration: 1000
|
||||
});
|
||||
})
|
||||
setTimeout(() => {
|
||||
uni.navigateBack()
|
||||
}, 1100)
|
||||
|
|
|
@ -73,7 +73,7 @@
|
|||
<view class="info_li">
|
||||
<view class="half_infoli">
|
||||
电量:
|
||||
<span> {{ item.remainingPower }}%</span>
|
||||
<span> {{ item.remainingPower == null ? 0 : item.remainingPower}}%</span>
|
||||
</view>
|
||||
<view class="half_infoli">
|
||||
型号:
|
||||
|
|
|
@ -130,7 +130,6 @@
|
|||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
|
||||
<u-select v-model="shows" :list="list" title='添加方式' @confirm="searchconfirm"></u-select>
|
||||
<TabBar :indexs='3' style=""></TabBar>
|
||||
</view>
|
||||
|
@ -221,14 +220,12 @@
|
|||
computed: {
|
||||
formattedPayedAmount() {
|
||||
// 假设item是组件的一个响应式对象
|
||||
if (!this.item) return '¥0.00';
|
||||
|
||||
const payedAmount = parseFloat(this.item.payedAmount) || 0;
|
||||
const payRefunded = parseFloat(this.item.payRefunded) || 0;
|
||||
const payRefunding = parseFloat(this.item.payRefunding) || 0;
|
||||
|
||||
const actualAmount = payedAmount - (payRefunded + payRefunding);
|
||||
return `¥${actualAmount.toFixed(2)}`;
|
||||
if (!this.item) return '¥0.00'
|
||||
const payedAmount = parseFloat(this.item.payedAmount) || 0
|
||||
const payRefunded = parseFloat(this.item.payRefunded) || 0
|
||||
const payRefunding = parseFloat(this.item.payRefunding) || 0
|
||||
const actualAmount = payedAmount - (payRefunded + payRefunding)
|
||||
return `¥${actualAmount.toFixed(2)}`
|
||||
}
|
||||
},
|
||||
onReachBottom() {
|
||||
|
@ -246,50 +243,43 @@
|
|||
},
|
||||
|
||||
formatPayedAmount(payedAmount, payRefunded, payRefunding) {
|
||||
if (!payedAmount) return '0.00元';
|
||||
|
||||
const amount = parseFloat(payedAmount) || 0;
|
||||
const refunded = parseFloat(payRefunded) || 0;
|
||||
const refunding = parseFloat(payRefunding) || 0;
|
||||
|
||||
const actualAmount = amount - (refunded + refunding);
|
||||
return `${actualAmount.toFixed(2)}元`;
|
||||
if (!payedAmount) return '0.00元'
|
||||
const amount = parseFloat(payedAmount) || 0
|
||||
const refunded = parseFloat(payRefunded) || 0
|
||||
const refunding = parseFloat(payRefunding) || 0
|
||||
const actualAmount = amount - (refunded + refunding)
|
||||
return `${actualAmount.toFixed(2)}元`
|
||||
},
|
||||
handqixing() {
|
||||
console.log(this.total,this.allList.length);
|
||||
console.log(this.total,this.allList.length)
|
||||
if(this.total > this.allList.length){
|
||||
this.orderList()
|
||||
}
|
||||
},
|
||||
formatDatess(startTime, endTime) {
|
||||
if (!startTime) return "0秒"; // 如果没有开始时间,返回0
|
||||
|
||||
if (!startTime) return "0秒" // 如果没有开始时间,返回0
|
||||
// 解析时间(无效时间则返回0)
|
||||
const start = new Date(startTime);
|
||||
const end = endTime ? new Date(endTime) : new Date();
|
||||
if (isNaN(start.getTime()) || isNaN(end.getTime())) return "0秒";
|
||||
|
||||
const start = new Date(startTime)
|
||||
const end = endTime ? new Date(endTime) : new Date()
|
||||
if (isNaN(start.getTime()) || isNaN(end.getTime())) return "0秒"
|
||||
// 计算时间差(毫秒)
|
||||
let diffMs = end - start;
|
||||
if (diffMs < 0) return "0秒"; // 结束时间早于开始时间
|
||||
|
||||
let diffMs = end - start
|
||||
if (diffMs < 0) return "0秒" // 结束时间早于开始时间
|
||||
// 计算各时间单位
|
||||
const diffDays = Math.floor(diffMs / 86400000); // 天
|
||||
diffMs %= 86400000;
|
||||
const diffHours = Math.floor(diffMs / 3600000); // 小时
|
||||
diffMs %= 3600000;
|
||||
const diffMinutes = Math.floor(diffMs / 60000); // 分钟
|
||||
diffMs %= 60000;
|
||||
const diffSeconds = Math.floor(diffMs / 1000); // 秒
|
||||
|
||||
const diffDays = Math.floor(diffMs / 86400000) // 天
|
||||
diffMs %= 86400000
|
||||
const diffHours = Math.floor(diffMs / 3600000) // 小时
|
||||
diffMs %= 3600000
|
||||
const diffMinutes = Math.floor(diffMs / 60000) // 分钟
|
||||
diffMs %= 60000
|
||||
const diffSeconds = Math.floor(diffMs / 1000) // 秒
|
||||
// 智能拼接结果(忽略0值单位,但至少显示"X秒")
|
||||
const parts = [];
|
||||
if (diffDays > 0) parts.push(`${diffDays}天`);
|
||||
if (diffHours > 0) parts.push(`${diffHours}时`);
|
||||
if (diffMinutes > 0) parts.push(`${diffMinutes}分`);
|
||||
parts.push(`${diffSeconds}秒`); // 始终显示秒
|
||||
|
||||
return parts.join("");
|
||||
const parts = []
|
||||
if (diffDays > 0) parts.push(`${diffDays}天`)
|
||||
if (diffHours > 0) parts.push(`${diffHours}时`)
|
||||
if (diffMinutes > 0) parts.push(`${diffMinutes}分`)
|
||||
parts.push(`${diffSeconds}秒`) // 始终显示秒
|
||||
return parts.join("")
|
||||
},
|
||||
formatDate(value) {
|
||||
if (!value) return ''
|
||||
|
|
|
@ -247,7 +247,7 @@ export default {
|
|||
// 点击跳转到会员列表
|
||||
btnhy(){
|
||||
uni.navigateTo({
|
||||
url:'/page_fenbao/huiyuan/huiyuanlist'
|
||||
url:'/page_fenbao/huiyuan/huiyuanlist?areaId='+this.areaId
|
||||
})
|
||||
},
|
||||
|
||||
|
|
|
@ -527,6 +527,10 @@
|
|||
},
|
||||
// 选择彩铃
|
||||
shengyinaniu(e){
|
||||
uni.showLoading({
|
||||
title: '加载中...',
|
||||
mask: true
|
||||
})
|
||||
this.$u.put(`/bst/device/iot/music?id=${this.sn}&music=${e.value}`).then(res => {
|
||||
if (res.code == 200) {
|
||||
this.jytxt = e.label
|
||||
|
@ -537,7 +541,11 @@
|
|||
icon: 'success',
|
||||
duration: 2000
|
||||
})
|
||||
setTimeout(()=>{
|
||||
uni.hideLoading()
|
||||
},2000)
|
||||
}else{
|
||||
uni.hideLoading()
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
icon: 'none',
|
||||
|
|
|
@ -182,6 +182,9 @@
|
|||
this.$u.post(`/app/commandLog/bluetooth`,data).then(res => {
|
||||
console.log(res,'蓝牙')
|
||||
})
|
||||
xBlufi.notifySendCustomData({
|
||||
customData: "11reboot@"
|
||||
})
|
||||
}
|
||||
}else if(res.msg == null) {
|
||||
uni.hideLoading()
|
||||
|
|
|
@ -39,7 +39,9 @@
|
|||
确认添加
|
||||
</view>
|
||||
<view class="bot_btn">
|
||||
|
||||
<!-- <view class="btn1" @click="btngx()">
|
||||
设备更新
|
||||
</view> -->
|
||||
<view class="btn1" @click="Binddevice()">
|
||||
蓝牙链接
|
||||
</view>
|
||||
|
@ -172,16 +174,30 @@
|
|||
},
|
||||
watch: {
|
||||
|
||||
|
||||
|
||||
},
|
||||
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) {
|
||||
// console.log(e);
|
||||
uni.setStorageSync('hardwareVersionId', e[0].value);
|
||||
this.hardwareVersionId = e[0].value
|
||||
const hardwareVersionId =this.hardwareVersionId
|
||||
|
||||
if (hardwareVersionId) {
|
||||
const matchedVersion = this.Versionlist.find(version => version.id ===
|
||||
hardwareVersionId);
|
||||
|
@ -189,7 +205,6 @@
|
|||
this.hardwareInfo = matchedVersion;
|
||||
}
|
||||
}
|
||||
|
||||
},
|
||||
getlist() {
|
||||
this.$u.get('/bst/hardwareVersion/all').then((res) => {
|
||||
|
@ -205,17 +220,16 @@
|
|||
this.hardwareInfo = matchedVersion;
|
||||
}
|
||||
}
|
||||
|
||||
this.list = res.data.map(item => ({
|
||||
value: item.id,
|
||||
label: item.version
|
||||
}));
|
||||
}))
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
});
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
|
@ -228,7 +242,7 @@
|
|||
title: res.msg,
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
});
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
|
@ -253,14 +267,14 @@
|
|||
title: res.msg,
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
});
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
backpage() {
|
||||
uni.navigateBack({
|
||||
delta: 1 // delta值为1时表示返回的页面层数
|
||||
});
|
||||
})
|
||||
},
|
||||
bind() {
|
||||
// if(this.sn!='' && this.sn.length === 7 && /^\d+$/.test(this.sn)){
|
||||
|
@ -293,7 +307,6 @@
|
|||
// this.showbind=true
|
||||
// }else{
|
||||
|
||||
|
||||
// }
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
|
@ -304,14 +317,12 @@
|
|||
}
|
||||
})
|
||||
// }
|
||||
|
||||
},
|
||||
qrcode() {
|
||||
uni.scanCode({
|
||||
onlyFromCamera: true,
|
||||
scanType: ['qrCode'],
|
||||
success: res => {
|
||||
|
||||
let sn = null;
|
||||
let queryParams = res.result.split('?')[1];
|
||||
if (queryParams) {
|
||||
|
@ -321,9 +332,8 @@
|
|||
if (key === 's') {
|
||||
sn = value;
|
||||
}
|
||||
});
|
||||
})
|
||||
}
|
||||
|
||||
this.sn = sn
|
||||
console.log(res.result);
|
||||
if (this.sn != '') {
|
||||
|
@ -404,7 +414,7 @@
|
|||
console.log('手机未连接网络')
|
||||
}
|
||||
}
|
||||
});
|
||||
})
|
||||
},
|
||||
open() {
|
||||
let vm = this // 将外部的 this 绑定到 vm 上
|
||||
|
@ -422,7 +432,7 @@
|
|||
uni.hideLoading()
|
||||
console.error('获取已连接蓝牙设备信息失败:', err)
|
||||
}
|
||||
});
|
||||
})
|
||||
} else {
|
||||
console.log('手机未连接网络')
|
||||
}
|
||||
|
@ -710,25 +720,6 @@
|
|||
btnhd() {
|
||||
this.tishiflag = false
|
||||
},
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
@ -738,7 +729,6 @@
|
|||
overflow-x: hidden;
|
||||
background-color: #F3F3F3;
|
||||
}
|
||||
|
||||
.page {
|
||||
padding-bottom: 250rpx;
|
||||
width: 750rpx;
|
||||
|
@ -747,28 +737,23 @@
|
|||
left: 72rpx;
|
||||
top: 628rpx;
|
||||
width: 610rpx;
|
||||
// height: 282rpx;
|
||||
background: #FFFFFF;
|
||||
border-radius: 30rpx 30rpx 30rpx 30rpx;
|
||||
z-index: 110;
|
||||
padding-bottom: 100rpx;
|
||||
|
||||
.top {
|
||||
padding: 52rpx 38rpx 42rpx 36rpx;
|
||||
|
||||
.ipt_box {
|
||||
margin-top: 22rpx;
|
||||
display: flex;
|
||||
flex-wrap: nowrap;
|
||||
align-items: center;
|
||||
|
||||
.text {
|
||||
width: 350rpx;
|
||||
font-weight: 400;
|
||||
font-size: 32rpx;
|
||||
color: #3D3D3D;
|
||||
}
|
||||
|
||||
.ipt {
|
||||
padding: 10rpx 18rpx;
|
||||
display: flex;
|
||||
|
@ -779,13 +764,11 @@
|
|||
height: 64rpx;
|
||||
border-radius: 0rpx 0rpx 0rpx 0rpx;
|
||||
border: 2rpx solid #979797;
|
||||
|
||||
.input {
|
||||
width: 80%;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.tip {
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
|
@ -793,7 +776,6 @@
|
|||
font-size: 32rpx;
|
||||
color: #3D3D3D;
|
||||
}
|
||||
|
||||
.txt {
|
||||
margin-top: 32rpx;
|
||||
width: 100%;
|
||||
|
@ -803,17 +785,12 @@
|
|||
color: #3D3D3D;
|
||||
}
|
||||
}
|
||||
|
||||
.bots {
|
||||
position: absolute;
|
||||
|
||||
width: 610rpx;
|
||||
// border-top: 2rpx solid #D8D8D8;
|
||||
display: flex;
|
||||
flex-wrap: nowrap;
|
||||
// height: 100%;
|
||||
bottom: -20rpx;
|
||||
|
||||
.bot_left {
|
||||
border-radius: 0rpx 0rpx 0rpx 30rpx;
|
||||
width: 50%;
|
||||
|
@ -826,7 +803,6 @@
|
|||
color: #3D3D3D;
|
||||
background: #EEEEEE;
|
||||
}
|
||||
|
||||
.bot_right {
|
||||
border-radius: 0rpx 0rpx 30rpx 0rpx;
|
||||
width: 50%;
|
||||
|
@ -836,13 +812,9 @@
|
|||
align-items: center;
|
||||
justify-content: center;
|
||||
color: #FFFFFF;
|
||||
// border-left: 2rpx solid #D8D8D8;
|
||||
font-weight: 500;
|
||||
font-size: 32rpx;
|
||||
// color: #4C97E7;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -858,20 +830,15 @@
|
|||
}
|
||||
}
|
||||
.btn {
|
||||
|
||||
margin: 160rpx auto;
|
||||
margin-top: 30rpx;
|
||||
// position: fixed;
|
||||
margin-top: 30rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
// bottom: 100rpx;
|
||||
// left: 46rpx;
|
||||
width: 658rpx;
|
||||
height: 88rpx;
|
||||
background: #27c2fd;
|
||||
border-radius: 20rpx 20rpx 20rpx 20rpx;
|
||||
|
||||
font-weight: 500;
|
||||
font-size: 32rpx;
|
||||
color: #FFFFFF;
|
||||
|
|
|
@ -11,7 +11,6 @@
|
|||
</view>
|
||||
<input type="text" class="ips" v-model="sn" placeholder="请扫描设备上的二维码" style="margin-left: 32rpx;"
|
||||
placeholder-class="my-placeholder" @input="search()" />
|
||||
|
||||
</view>
|
||||
<view class="txt">
|
||||
MAC:{{carInfo.mac == undefined ? '--' : carInfo.mac}}
|
||||
|
@ -43,8 +42,13 @@
|
|||
<view class="txt">
|
||||
硬件版本:{{carInfo.hardwareVersion == undefined ? '--' : carInfo.hardwareVersion}}
|
||||
</view>
|
||||
<view class="txt">
|
||||
软件版本:{{carInfo.softwareVersion == undefined ? '--' : carInfo.softwareVersion}}
|
||||
<view class="txt" style="display: flex;justify-content: space-between;align-items: center;">
|
||||
<view class="">
|
||||
软件版本:{{carInfo.softwareVersion == undefined ? '--' : carInfo.softwareVersion}}
|
||||
</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">
|
||||
声音:
|
||||
|
@ -60,10 +64,6 @@
|
|||
</view>
|
||||
<view class="btnbox">
|
||||
<view class="btn_box" style="margin-bottom: 20rpx;">
|
||||
<!-- <view class="btn1" @click="btn(5)">
|
||||
清空校准
|
||||
</view> -->
|
||||
|
||||
</view>
|
||||
<view class="btn_box">
|
||||
<view class="btn1" @click="btn(0)">
|
||||
|
@ -87,15 +87,10 @@
|
|||
更新
|
||||
</view>
|
||||
</view>
|
||||
<!-- <view class="btn_box" style="margin-top: 20rpx;">
|
||||
|
||||
|
||||
</view> -->
|
||||
<view class="btn2" style="margin-top: 20rpx;" @click="back()">
|
||||
返回扫描
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
|
@ -109,7 +104,6 @@
|
|||
},
|
||||
sn: '',
|
||||
carInfo:{}
|
||||
|
||||
}
|
||||
},
|
||||
onLoad(e) {
|
||||
|
@ -117,16 +111,38 @@
|
|||
this.sn = e.sn
|
||||
this.deviceInfo()
|
||||
}
|
||||
|
||||
},
|
||||
onShow() {
|
||||
|
||||
},
|
||||
|
||||
mounted() {
|
||||
// this.videoContext = uni.createVideoContext('myVideo', this)
|
||||
},
|
||||
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(){
|
||||
uni.redirectTo({
|
||||
url:'/page_user/luru/index'
|
||||
|
|
|
@ -426,7 +426,7 @@
|
|||
if(that.ver_dataflag != 3){
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '设备离线,请等待设备连接',
|
||||
content: '设备离线,请点击右上角连接车辆',
|
||||
showCancel: false,
|
||||
success: function(res) {
|
||||
if (res.confirm) {
|
||||
|
@ -775,7 +775,7 @@
|
|||
let data = {
|
||||
mac:that.mac,
|
||||
reason:'解锁',
|
||||
command:'11open',
|
||||
command:'11opensub5@',
|
||||
longitude:that.lslon,
|
||||
latitude:that.lslat,
|
||||
result:'成功'
|
||||
|
@ -812,7 +812,7 @@
|
|||
let data = {
|
||||
mac:that.mac,
|
||||
reason:'解锁',
|
||||
command:'close',
|
||||
command:'11opensub5@',
|
||||
longitude:that.lslon,
|
||||
latitude:that.lslat,
|
||||
result:'蓝牙未连接'
|
||||
|
@ -835,7 +835,7 @@
|
|||
if(that.ver_dataflag != 3){
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '设备离线,请等待设备连接',
|
||||
content: '设备离线,请点击右上角连接车辆',
|
||||
showCancel: false,
|
||||
success: function(res) {
|
||||
if (res.confirm) {
|
||||
|
@ -915,7 +915,7 @@
|
|||
let data = {
|
||||
mac:that.mac,
|
||||
reason:'临时锁车',
|
||||
command:'close',
|
||||
command:'11llosesub300@',
|
||||
longitude:that.lon,
|
||||
latitude:that.lat,
|
||||
result:'成功'
|
||||
|
@ -924,6 +924,9 @@
|
|||
console.log(res,'蓝牙')
|
||||
})
|
||||
setTimeout(()=>{
|
||||
xBlufi.notifySendCustomData({
|
||||
customData: "11reboot@"
|
||||
})
|
||||
uni.hideLoading()
|
||||
},2000)
|
||||
} else {
|
||||
|
@ -973,12 +976,12 @@
|
|||
that.deivceobj.deviceLockStatus = 0
|
||||
that.getorderdevice()
|
||||
}
|
||||
} else if(res.code == 20001){aaaaaaaa
|
||||
} else if(res.code == 20001){
|
||||
uni.hideLoading()
|
||||
if(that.ver_dataflag != 3){
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '设备离线,请等待设备连接',
|
||||
content: '设备离线,请点击右上角连接车辆',
|
||||
showCancel: false,
|
||||
success: function(res) {
|
||||
if (res.confirm) {
|
||||
|
@ -1280,6 +1283,20 @@
|
|||
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({
|
||||
|
@ -1289,17 +1306,6 @@
|
|||
})
|
||||
that.getorderdevice()
|
||||
},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) {
|
||||
uni.hideLoading()
|
||||
|
@ -1368,6 +1374,9 @@
|
|||
customData: "11llosesub300@"
|
||||
})
|
||||
setTimeout(()=>{
|
||||
xBlufi.notifySendCustomData({
|
||||
customData: "11reboot@"
|
||||
})
|
||||
uni.hideLoading()
|
||||
that.getorderdevice()
|
||||
},1000)
|
||||
|
|
|
@ -23,9 +23,9 @@
|
|||
@click="btntap(1)" mode=""></image>
|
||||
<image v-if="rtindex == 1" src="https://api.ccttiot.com/smartmeter/img/static/u8zXd0xYhLKD0BvgZDVv"
|
||||
@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>
|
||||
<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>
|
||||
<image v-if="rtindex != 3" src="https://api.ccttiot.com/smartmeter/img/static/uwIWeuTVbjFLNmLTGPOh"
|
||||
@click="btntap(3)" mode=""></image>
|
||||
|
@ -1009,7 +1009,7 @@
|
|||
if (this.rtindex == 1) {
|
||||
this.iconPath = 'https://api.ccttiot.com/smartmeter/img/static/upX2lLilhrRi4tttdHlo'
|
||||
} 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¢er=${this.jingweidu}&areaId=${this.user.areaId == undefined ? null : this.user.areaId}`).then((res) => {
|
||||
if (res.code == 200) {
|
||||
this.covers = []
|
||||
|
@ -1370,7 +1370,7 @@
|
|||
if (this.rtindex == 1) {
|
||||
return 'https://api.ccttiot.com/smartmeter/img/static/upX2lLilhrRi4tttdHlo'
|
||||
} else if (this.rtindex == 2) {
|
||||
return 'https://api.ccttiot.com/smartmeter/img/static/uX0FBv86yDIR5tIqjoe2'
|
||||
return this.iconobj.mappic
|
||||
} else if (this.rtindex == 3) {
|
||||
return 'https://api.ccttiot.com/smartmeter/img/static/un7ecyEN8vsJhlEnXfD4'
|
||||
}
|
||||
|
|
|
@ -20,6 +20,9 @@ const store = new Vuex.Store({
|
|||
orderlistimg:'https://api.ccttiot.com/smartmeter/img/static/u6uVoMfLXtkWyF9gg2mY',//订单列表图片
|
||||
huancheimgone:'https://api.ccttiot.com/smartmeter/img/static/unL4myQWRXAKWCmKof4j',//还车审核第一张图片
|
||||
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:{
|
||||
|
@ -32,6 +35,9 @@ const store = new Vuex.Store({
|
|||
// orderlistimg:'https://api.ccttiot.com/smartmeter/img/static/uK99lod2FY4ivycyokS7',//订单列表图片
|
||||
// huancheimgone:'https://api.ccttiot.com/smartmeter/img/static/uVsHtwoWIGve7IRkXRia',//还车审核第一张图片
|
||||
// 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:{
|
||||
|
|
Loading…
Reference in New Issue
Block a user