11
This commit is contained in:
parent
00cb6ab410
commit
c4bd835fff
|
@ -116,7 +116,7 @@
|
||||||
设备位置
|
设备位置
|
||||||
</view>
|
</view>
|
||||||
<view class="info_li_right">
|
<view class="info_li_right">
|
||||||
嵛山岛芦竹村三沙路68号
|
{{info.address}}
|
||||||
</view>
|
</view>
|
||||||
<image src="https://lxnapi.ccttiot.com/bike/img/static/uklW7KIegcLR6E7DTOGO" mode=""></image>
|
<image src="https://lxnapi.ccttiot.com/bike/img/static/uklW7KIegcLR6E7DTOGO" mode=""></image>
|
||||||
</view>
|
</view>
|
||||||
|
@ -225,20 +225,20 @@
|
||||||
|
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
<view class="bot_btn">
|
<view class="bot_btn" v-if="info.status!=4">
|
||||||
<view class="btn">
|
<view class="btn" @click="btn(0)">
|
||||||
开锁
|
开锁
|
||||||
</view>
|
</view>
|
||||||
<view class="btn">
|
<view class="btn" @click="btn(1)">
|
||||||
关锁
|
关锁
|
||||||
</view>
|
</view>
|
||||||
<view class="btn">
|
<view class="btn" @click="btn(2)">
|
||||||
车辆禁用
|
车辆禁用
|
||||||
</view>
|
</view>
|
||||||
<view class="btn">
|
<view class="btn" @click="btn(3)">
|
||||||
车辆解禁
|
车辆解禁
|
||||||
</view>
|
</view>
|
||||||
<view class="btn">
|
<view class="btn" @click="btn(4)">
|
||||||
响铃寻车
|
响铃寻车
|
||||||
</view>
|
</view>
|
||||||
<view class="btn" @click="tipshow=true" v-if="info.type==1">
|
<view class="btn" @click="tipshow=true" v-if="info.type==1">
|
||||||
|
@ -296,7 +296,7 @@
|
||||||
bgc: {
|
bgc: {
|
||||||
backgroundColor: "#fff",
|
backgroundColor: "#fff",
|
||||||
},
|
},
|
||||||
curtitidx:1,
|
curtitidx:0,
|
||||||
latitude: 0,
|
latitude: 0,
|
||||||
longitude: 0,
|
longitude: 0,
|
||||||
info:'',
|
info:'',
|
||||||
|
@ -334,6 +334,51 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
btn(num){
|
||||||
|
if(num==0){
|
||||||
|
this.$u.post('/appVerify/admin/unlocking?sn='+this.info.sn).then((res) => {
|
||||||
|
if (res.code === 200) {
|
||||||
|
// 处理接口返回的数据,将边界数据转换为地图组件需要的折线结构
|
||||||
|
this.deviceInfo()
|
||||||
|
}
|
||||||
|
}).catch(error => {
|
||||||
|
console.error("Error fetching area data:", error);
|
||||||
|
});
|
||||||
|
}else if(num==1){
|
||||||
|
this.$u.post('/appVerify/admin/lock?sn='+this.info.sn).then((res) => {
|
||||||
|
if (res.code === 200) {
|
||||||
|
// 处理接口返回的数据,将边界数据转换为地图组件需要的折线结构
|
||||||
|
this.deviceInfo()
|
||||||
|
}
|
||||||
|
}).catch(error => {
|
||||||
|
console.error("Error fetching area data:", error);
|
||||||
|
});
|
||||||
|
}else if(num==2){
|
||||||
|
this.$u.post('/appVerify/device/offline?sn='+this.info.sn).then((res) => {
|
||||||
|
if (res.code === 200) {
|
||||||
|
// 处理接口返回的数据,将边界数据转换为地图组件需要的折线结构
|
||||||
|
this.deviceInfo()
|
||||||
|
}
|
||||||
|
}).catch(error => {
|
||||||
|
console.error("Error fetching area data:", error);
|
||||||
|
});
|
||||||
|
}else if(num==3){
|
||||||
|
this.$u.post('/appVerify/device/online?sn='+this.info.sn).then((res) => {
|
||||||
|
if (res.code === 200) {
|
||||||
|
// 处理接口返回的数据,将边界数据转换为地图组件需要的折线结构
|
||||||
|
this.deviceInfo()
|
||||||
|
}
|
||||||
|
}).catch(error => {
|
||||||
|
console.error("Error fetching area data:", error);
|
||||||
|
});
|
||||||
|
}else if(num==4){
|
||||||
|
this.$u.post('/app/device/ring?sn=' + this.info.sn).then((res) => {
|
||||||
|
if (res.code === 200) {
|
||||||
|
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
historyList(){
|
historyList(){
|
||||||
this.$u.get(`/appVerify/admiOrder/historyList?orderNo` + 111).then((res) => {
|
this.$u.get(`/appVerify/admiOrder/historyList?orderNo` + 111).then((res) => {
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
|
@ -405,8 +450,8 @@
|
||||||
//纬度 - 目的地/坐标点
|
//纬度 - 目的地/坐标点
|
||||||
longitude: this.longitude,
|
longitude: this.longitude,
|
||||||
//经度 - 目的地/坐标点
|
//经度 - 目的地/坐标点
|
||||||
name: "荆门市",
|
// name: "荆门市",
|
||||||
address: "一夜城"
|
address: this.info.address
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
|
@ -67,8 +67,10 @@
|
||||||
</view>
|
</view>
|
||||||
<view class="card_bot">
|
<view class="card_bot">
|
||||||
<image src="https://lxnapi.ccttiot.com/bike/img/static/uklW7KIegcLR6E7DTOGO" mode=""></image>
|
<image src="https://lxnapi.ccttiot.com/bike/img/static/uklW7KIegcLR6E7DTOGO" mode=""></image>
|
||||||
|
<view class="card_bot_txt">
|
||||||
{{item.address}}
|
{{item.address}}
|
||||||
<view class="stause" v-if="item.status==4" >
|
</view>
|
||||||
|
<view class="stause" v-if="item.status==4" style="background-color: #3BBBA1 ;">
|
||||||
已完成
|
已完成
|
||||||
</view>
|
</view>
|
||||||
<view class="stause" v-if="item.status==2&&item.type==2" style="background-color: #F76D6D ;">
|
<view class="stause" v-if="item.status==2&&item.type==2" style="background-color: #F76D6D ;">
|
||||||
|
@ -184,19 +186,19 @@
|
||||||
<view class="card_bot">
|
<view class="card_bot">
|
||||||
<image src="https://lxnapi.ccttiot.com/bike/img/static/uklW7KIegcLR6E7DTOGO" mode=""></image>
|
<image src="https://lxnapi.ccttiot.com/bike/img/static/uklW7KIegcLR6E7DTOGO" mode=""></image>
|
||||||
嵛山岛芦竹村三沙路68号
|
嵛山岛芦竹村三沙路68号
|
||||||
<view class="stause" v-if="item.status==4">
|
<view class="stause" v-if="item.status==4" style="background-color: #3BBBA1 ;">
|
||||||
已完成
|
已完成
|
||||||
</view>
|
</view>
|
||||||
<view class="stause" v-if="item.status==2&&item.type==2">
|
<view class="stause" v-if="item.status==2&&item.type==2" style="background-color: #F76D6D ;">
|
||||||
待换电
|
待换电
|
||||||
</view>
|
</view>
|
||||||
<view class="stause" v-if="item.status==2&&item.type==1">
|
<view class="stause" v-if="item.status==2&&item.type==1" style="background-color: #F76D6D ;">
|
||||||
待维修
|
待维修
|
||||||
</view>
|
</view>
|
||||||
<view class="stause" v-if="item.status==3&&item.type==2">
|
<view class="stause" v-if="item.status==3&&item.type==2" style="background-color: #4C97E7 ;">
|
||||||
换电中
|
换电中
|
||||||
</view>
|
</view>
|
||||||
<view class="stause" v-if="item.status==3&&item.type==1">
|
<view class="stause" v-if="item.status==3&&item.type==1" style="background-color: #4C97E7 ;">
|
||||||
维修中
|
维修中
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
@ -242,19 +244,20 @@
|
||||||
<view class="card_bot">
|
<view class="card_bot">
|
||||||
<image src="https://lxnapi.ccttiot.com/bike/img/static/uklW7KIegcLR6E7DTOGO" mode=""></image>
|
<image src="https://lxnapi.ccttiot.com/bike/img/static/uklW7KIegcLR6E7DTOGO" mode=""></image>
|
||||||
嵛山岛芦竹村三沙路68号
|
嵛山岛芦竹村三沙路68号
|
||||||
<view class="stause" v-if="item.status==4">
|
|
||||||
|
<view class="stause" v-if="item.status==4" style="background-color: #3BBBA1 ;">
|
||||||
已完成
|
已完成
|
||||||
</view>
|
</view>
|
||||||
<view class="stause" v-if="item.status==2&&item.type==2">
|
<view class="stause" v-if="item.status==2&&item.type==2" style="background-color: #F76D6D ;">
|
||||||
待换电
|
待换电
|
||||||
</view>
|
</view>
|
||||||
<view class="stause" v-if="item.status==2&&item.type==1">
|
<view class="stause" v-if="item.status==2&&item.type==1" style="background-color: #F76D6D ;">
|
||||||
待维修
|
待维修
|
||||||
</view>
|
</view>
|
||||||
<view class="stause" v-if="item.status==3&&item.type==2">
|
<view class="stause" v-if="item.status==3&&item.type==2" style="background-color: #4C97E7 ;">
|
||||||
换电中
|
换电中
|
||||||
</view>
|
</view>
|
||||||
<view class="stause" v-if="item.status==3&&item.type==1">
|
<view class="stause" v-if="item.status==3&&item.type==1" style="background-color: #4C97E7 ;">
|
||||||
维修中
|
维修中
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
@ -527,6 +530,17 @@ page{
|
||||||
width: 41.66rpx;
|
width: 41.66rpx;
|
||||||
height: 48rpx;
|
height: 48rpx;
|
||||||
}
|
}
|
||||||
|
.card_bot_txt{
|
||||||
|
width: 80%;
|
||||||
|
white-space: nowrap;
|
||||||
|
/* 禁止换行 */
|
||||||
|
overflow: hidden;
|
||||||
|
/* 超出部分隐藏 */
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
font-weight: 400;
|
||||||
|
font-size: 28rpx;
|
||||||
|
color: #3D3D3D;
|
||||||
|
}
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
color: #3D3D3D;
|
color: #3D3D3D;
|
||||||
|
|
|
@ -10,9 +10,9 @@
|
||||||
</view>
|
</view>
|
||||||
<view class="ipt">
|
<view class="ipt">
|
||||||
|
|
||||||
<input type="text" class="ips" v-model="sn" placeholder="请输入车辆二维码下方编号" placeholder-style='font-weight: 400;font-size: 36rpx;color: #808080;' />
|
<input type="number" class="ips" v-model="sn" placeholder="请输入车辆二维码下方编号" placeholder-style='font-weight: 400;font-size: 36rpx;color: #808080;' />
|
||||||
</view>
|
</view>
|
||||||
<view class="btn" @click="sub">
|
<view class="btn" @click="sub" :class="istrue?'act1':''">
|
||||||
确认开锁
|
确认开锁
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
@ -27,7 +27,14 @@
|
||||||
bgc: {
|
bgc: {
|
||||||
backgroundColor: "#fff",
|
backgroundColor: "#fff",
|
||||||
},
|
},
|
||||||
sn:''
|
sn:'',
|
||||||
|
istrue:false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
sn(newVal) {
|
||||||
|
const regex = /^\d{8}$/;
|
||||||
|
this.istrue = regex.test(newVal);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
@ -44,7 +51,7 @@
|
||||||
this.$u.get('/app/device/info?sn=' + this.sn).then((res) => {
|
this.$u.get('/app/device/info?sn=' + this.sn).then((res) => {
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url:'/pages/index/index?sn='+this.code
|
url:'/pages/index/index?sn='+this.sn
|
||||||
})
|
})
|
||||||
}else{
|
}else{
|
||||||
|
|
||||||
|
@ -72,7 +79,7 @@
|
||||||
that.$u.get('/app/device/info?sn=' + that.sn).then((res) => {
|
that.$u.get('/app/device/info?sn=' + that.sn).then((res) => {
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url:'/pages/index/index?sn='+this.code
|
url:'/pages/index/index?sn='+that.sn
|
||||||
})
|
})
|
||||||
}else{
|
}else{
|
||||||
|
|
||||||
|
@ -166,6 +173,9 @@ page{
|
||||||
font-size: 36rpx;
|
font-size: 36rpx;
|
||||||
color: #FFFFFF;
|
color: #FFFFFF;
|
||||||
}
|
}
|
||||||
|
.act1{
|
||||||
|
background: #02CBAF;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,8 +8,8 @@
|
||||||
|
|
||||||
</map>
|
</map>
|
||||||
<view class="my-location">
|
<view class="my-location">
|
||||||
<view class="img" src="https://course.jchen.art/static/images/icon-location.png"
|
<image class="img" src="https://lxnapi.ccttiot.com/bike/img/static/u0Kyr2HWPvHq7CMHIv5r"
|
||||||
@click="getMyLocation"></view>
|
@click="getMyLocation"></image>
|
||||||
</view>
|
</view>
|
||||||
<view class="botmbox2" v-if="showdevice">
|
<view class="botmbox2" v-if="showdevice">
|
||||||
<view class="close" @click="close()">
|
<view class="close" @click="close()">
|
||||||
|
@ -51,7 +51,7 @@
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="bot">
|
<view class="bot">
|
||||||
<view class="left_btn" @click="qrCode()">
|
<view class="left_btn" @click="qecodelock()">
|
||||||
扫码用车
|
扫码用车
|
||||||
</view>
|
</view>
|
||||||
<view class="right_btn" @click="Reserve()">
|
<view class="right_btn" @click="Reserve()">
|
||||||
|
@ -824,9 +824,7 @@
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
if (!this.orderinfo.status) {
|
if (!this.orderinfo.status) {
|
||||||
this.deviceInfo()
|
this.deviceInfo()
|
||||||
this.showdevice = true
|
|
||||||
this.deviceIndex = 1
|
|
||||||
this.type = 1
|
|
||||||
}
|
}
|
||||||
}, 1000)
|
}, 1000)
|
||||||
|
|
||||||
|
@ -3034,7 +3032,7 @@
|
||||||
background: linear-gradient(180deg, #EEF5FD 20%, rgba(255, 255, 255, 0)30%), #FFFFFF;
|
background: linear-gradient(180deg, #EEF5FD 20%, rgba(255, 255, 255, 0)30%), #FFFFFF;
|
||||||
border-radius: 30rpx;
|
border-radius: 30rpx;
|
||||||
padding: 48rpx 36rpx;
|
padding: 48rpx 36rpx;
|
||||||
|
z-index: 30;
|
||||||
.close {
|
.close {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
right: 32rpx;
|
right: 32rpx;
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
<view class="tit">
|
<view class="tit">
|
||||||
电量区间
|
电量区间
|
||||||
</view>
|
</view>
|
||||||
<view style="width: 650rpx;">
|
<view style="width: 650rpx;margin: 0 auto;">
|
||||||
<slider-range :value="rangeValue" :min="rangeMin" :max="rangMax" :step="1" :bar-height="3" :block-size="20"
|
<slider-range :value="rangeValue" :min="rangeMin" :max="rangMax" :step="1" :bar-height="3" :block-size="20"
|
||||||
background-color="#EEEEF6" active-color="#4C97E7" :format="format" :decorationVisible="true"
|
background-color="#EEEEF6" active-color="#4C97E7" :format="format" :decorationVisible="true"
|
||||||
@change="handleRangeChange"></slider-range>
|
@change="handleRangeChange"></slider-range>
|
||||||
|
@ -24,7 +24,7 @@
|
||||||
|
|
||||||
<view @touchmove.stop.prevent="() => {}">
|
<view @touchmove.stop.prevent="() => {}">
|
||||||
<view class="btn_box">
|
<view class="btn_box">
|
||||||
<view class="btn1">
|
<view class="btn1" @click="qecodelock()">
|
||||||
车辆扫码
|
车辆扫码
|
||||||
</view>
|
</view>
|
||||||
<view class="btn2" @click="topage()">
|
<view class="btn2" @click="topage()">
|
||||||
|
@ -173,6 +173,41 @@
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
qecodelock() {
|
||||||
|
uni.scanCode({
|
||||||
|
onlyFromCamera: true,
|
||||||
|
scanType: ['qrCode'],
|
||||||
|
success: res => {
|
||||||
|
|
||||||
|
let sn = null;
|
||||||
|
let queryParams = res.result.split('?')[1];
|
||||||
|
if (queryParams) {
|
||||||
|
let params = queryParams.split('&');
|
||||||
|
params.forEach(param => {
|
||||||
|
let [key, value] = param.split('=');
|
||||||
|
if (key === 'sn') {
|
||||||
|
sn = value;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
this.sn = sn
|
||||||
|
if (this.sn != '') {
|
||||||
|
uni.navigateTo({
|
||||||
|
url:'/pages_admin/order/device_detail?id='+this.sn
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
},
|
||||||
|
fail: err => {
|
||||||
|
console.error('扫描失败:', err);
|
||||||
|
uni.showToast({
|
||||||
|
title: '扫描失败',
|
||||||
|
icon: 'none'
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
topage(){
|
topage(){
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url:'/pages_admin/order/search_device'
|
url:'/pages_admin/order/search_device'
|
||||||
|
|
|
@ -230,14 +230,11 @@
|
||||||
console.error("Error fetching area data:", error);
|
console.error("Error fetching area data:", error);
|
||||||
});
|
});
|
||||||
}else if(num==4){
|
}else if(num==4){
|
||||||
this.$u.get('/appVerify/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) {
|
||||||
// 处理接口返回的数据,将边界数据转换为地图组件需要的折线结构
|
|
||||||
this.deviceInfo()
|
|
||||||
}
|
}
|
||||||
}).catch(error => {
|
})
|
||||||
console.error("Error fetching area data:", error);
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
status(){
|
status(){
|
||||||
|
|
Loading…
Reference in New Issue
Block a user