小鹿骑行

This commit is contained in:
3321822538@qq.com 2025-06-07 17:46:48 +08:00
parent 2350478404
commit 01824cbb97
6 changed files with 195 additions and 21 deletions

View File

@ -148,6 +148,20 @@
</view> </view>
</view> </view>
</view> </view>
<view class="cont" style="margin-top: 20rpx;" v-if="areaNeedCheckVideo == true">
<view class="tip_txt">
使用前请拍摄需要使用的车辆
</view>
<view class="vadio_png1">
<image @click="recordVideo" class="backimg" src="https://api.ccttiot.com/smartmeter/img/static/uTwV4aH6HbxqmM1ssvTs" mode="" v-if="videoUrl==''"></image>
<video class="vad" :src="videoUrl" controls="controls" style="width: 100%;" v-if="videoUrl!=''"></video>
</view>
<view class="tip_txt" style="font-weight: 500;font-size: 32rpx;color: #3D3D3D;margin-top: 30rpx;">
保持车辆录像的完整清晰,不要随意拍摄确保视频中车辆出境并且出现车牌号
</view>
</view>
<!-- 会员 --> <!-- 会员 -->
<view class="fee_box" @click="btnhuiyuan" v-if="huiyuanlist.length > 0"> <view class="fee_box" @click="btnhuiyuan" v-if="huiyuanlist.length > 0">
<view class="auto_box"> <view class="auto_box">
@ -484,11 +498,16 @@
huiyuanlist:[], huiyuanlist:[],
huiyuanobj:{}, huiyuanobj:{},
zfflag:true, zfflag:true,
jieliuflag:true jieliuflag:true,
videoUrl:'',
videoPath:'',
token:'',
areaNeedCheckVideo:false
} }
}, },
onLoad(option) { onLoad(option) {
xBlufi.initXBlufi(1) xBlufi.initXBlufi(1)
this.getQiniuToken()
console.log(option) console.log(option)
if (option.modelId) { if (option.modelId) {
uni.showLoading({ uni.showLoading({
@ -549,6 +568,7 @@
if (res.data) { if (res.data) {
this.bikeobj = res.data this.bikeobj = res.data
this.modelId = res.data.modelId this.modelId = res.data.modelId
this.areaNeedCheckVideo = res.data.areaNeedCheckVideo
if(res.data.onlineStatus == 0){ if(res.data.onlineStatus == 0){
this.mac = res.data.mac this.mac = res.data.mac
console.log(this.mac) console.log(this.mac)
@ -601,6 +621,7 @@
if (res.data) { if (res.data) {
console.log(res.data); console.log(res.data);
this.bikeobj = res.data this.bikeobj = res.data
this.areaNeedCheckVideo = res.data.areaNeedCheckVideo
this.modelId = res.data.modelId this.modelId = res.data.modelId
if(res.data.onlineStatus == 0){ if(res.data.onlineStatus == 0){
this.mac = res.data.mac this.mac = res.data.mac
@ -656,6 +677,54 @@
xBlufi.listenDeviceMsgEvent(true, this.funListenDeviceMsgEvent) xBlufi.listenDeviceMsgEvent(true, this.funListenDeviceMsgEvent)
}, },
methods: { methods: {
getQiniuToken() {
console.log('diaou');
this.$u.get("/common/qiniuToken").then((res) => {
if (res.code == 200) {
this.token=res.data
}
})
},
recordVideo() {
// API
uni.chooseVideo({
sourceType: ['camera'], // 使
camera: 'back', // 使frontback
maxDuration: 15, //
success: (res) => {
//
this.videoPath = res.tempFilePath;
console.log(res.tempFilePath);
this.upload()
},
fail: (err) => {
console.log('录像失败:', err);
}
})
},
upload(){
uni.showLoading({
title:'上传中'
})
let _this=this
let math='static/'+_this.$u.guid(20)
wx.uploadFile({
url: 'https://up-z2.qiniup.com',
name: 'file',
filePath: this.videoPath,
formData: {
token: _this.token, //token
key:'bike/video/'+math
},
success: function(res) {
uni.hideLoading()
console.log(res,'resres');
let str = JSON.parse(res.data)
console.log(str.key)
_this.videoUrl = 'https://api.ccttiot.com/' + str.key
}
})
},
// //
handlePaymentChange(e) { handlePaymentChange(e) {
const selectedId = e.detail.value; const selectedId = e.detail.value;
@ -1130,7 +1199,8 @@
price: this.yucobj, price: this.yucobj,
appId: this.$store.state.appid, appId: this.$store.state.appid,
channelId: this.channelId, channelId: this.channelId,
creditUserId:this.selectedSubPayment creditUserId:this.selectedSubPayment,
checkVideo:this.videoUrl
} }
uni.showLoading({ uni.showLoading({
title: '加载中...', title: '加载中...',
@ -1257,7 +1327,8 @@
price: this.yucobj, price: this.yucobj,
appId: this.$store.state.appid, appId: this.$store.state.appid,
channelId: this.channelId, channelId: this.channelId,
creditUserId:this.selectedSubPayment creditUserId:this.selectedSubPayment,
checkVideo:this.videoUrl
} }
uni.showLoading({ uni.showLoading({
title: '加载中...', title: '加载中...',
@ -1357,6 +1428,7 @@
this.$u.get(`/app/device/availableDetail?sn=${this.sn}`).then((res) => { this.$u.get(`/app/device/availableDetail?sn=${this.sn}`).then((res) => {
if (res.code == 200) { if (res.code == 200) {
this.bikeobj = res.data this.bikeobj = res.data
this.areaNeedCheckVideo = res.data.areaNeedCheckVideo
if(res.data.onlineStatus == 0){ if(res.data.onlineStatus == 0){
this.mac = res.data.mac this.mac = res.data.mac
this.findDevice() this.findDevice()
@ -1368,6 +1440,7 @@
} else { } else {
this.$u.get(`/app/device/availableDetail?sn=${this.chesn}`).then((res) => { this.$u.get(`/app/device/availableDetail?sn=${this.chesn}`).then((res) => {
if (res.code == 200) { if (res.code == 200) {
this.areaNeedCheckVideo = res.data.areaNeedCheckVideo
if(res.data.onlineStatus == 0){ if(res.data.onlineStatus == 0){
this.mac = res.data.mac this.mac = res.data.mac
this.findDevice() this.findDevice()
@ -1470,6 +1543,7 @@
if (res.code == 200) { if (res.code == 200) {
wx.setStorageSync('token', res.token) wx.setStorageSync('token', res.token)
this.gettaocan() this.gettaocan()
this.getQiniuToken()
// this.fanganindex = 0 // this.fanganindex = 0
this.tit = '确认订单页' this.tit = '确认订单页'
this.logoflag = false this.logoflag = false
@ -1500,6 +1574,46 @@
/deep/ .u-checkbox { /deep/ .u-checkbox {
width: 40rpx; width: 40rpx;
} }
.cont {
width: 100%;
padding: 0 39rpx;
.tip_txt {
width: 100%;
font-weight: 400;
font-size: 28rpx;
color: #3D3D3D;
}
.vadio_png {
margin-top: 52rpx;
image {
width: 672rpx;
height: 370rpx;
}
}
.btn {
position: fixed;
bottom: 100rpx;
left: 38rpx;
// margin-top: 128rpx;
display: flex;
align-items: center;
justify-content: center;
width: 680rpx;
height: 90rpx;
background: #4297F3;
border-radius: 54rpx 54rpx 54rpx 54rpx;
z-index: 10;
font-weight: 500;
font-size: 40rpx;
color: #FFFFFF;
}
.act1{
background: #4297F3;
}
}
.payment-container { .payment-container {
padding: 20rpx; padding: 20rpx;
padding-bottom: 300rpx; padding-bottom: 300rpx;
@ -1567,6 +1681,48 @@
font-size: 26rpx; font-size: 26rpx;
color: #666; color: #666;
} }
.vadio_png1{
position: relative;
width: 672rpx;
height: 370rpx;
margin-top: 30rpx;
.backimg{
width: 672rpx;
height: 370rpx;
}
.tip_img{
position: absolute;
top: 72rpx;
left: 210rpx;
width: 252rpx;
height: 194rpx;
z-index: 11;
}
.vad{
width: 672rpx;
height: 370rpx;
border-radius: 40rpx;
z-index: 1;
}
.glass{
position: absolute;
top: 0;
left: 0;
width: 672rpx;
height: 370rpx;
background: rgba(255, 255, 255, 0.2);
border-radius: 40rpx;
// box-shadow: 0 rgba(0, 0, 0, 0.1);
backdrop-filter: blur(10rpx);
-webkit-backdrop-filter: blur(10rpx); /* For Safari */
// border: 1rpx solid rgba(255, 255, 255, 0.3);
z-index: 10;
}
}
.buy_box { .buy_box {
padding: 0 46rpx; padding: 0 46rpx;
position: fixed; position: fixed;

View File

@ -1,5 +1,4 @@
复制代码
<template> <template>
<view class="page"> <view class="page">
<u-navbar title="运维" :border-bottom="false" :background="bgc" title-color='#2E4975' title-size='36' <u-navbar title="运维" :border-bottom="false" :background="bgc" title-color='#2E4975' title-size='36'
@ -484,8 +483,6 @@
} }
.bot { .bot {
padding: 40rpx 32rpx; padding: 40rpx 32rpx;
// position: fixed;
// bottom: 0;
width: 750rpx; width: 750rpx;
height: 30vh; height: 30vh;
background: #fff; background: #fff;

View File

@ -45,6 +45,19 @@
开启后用户必须先进行实名认证才可使用 开启后用户必须先进行实名认证才可使用
</view> </view>
</view> </view>
<view class="card_li">
<view class="tops">
<view class="card_left">
是否开启使用前上传视频
</view>
<view class="card_right">
<u-switch v-model="scspflag"></u-switch>
</view>
</view>
<view class="tips">
开启后用户必须先拍摄全车视频才能下单
</view>
</view>
<view class="card_li"> <view class="card_li">
<view class="tops"> <view class="tops">
<view class="card_left"> <view class="card_left">
@ -318,7 +331,8 @@
endTime:'', endTime:'',
timeflag:false, timeflag:false,
shimflag:false, shimflag:false,
jiasflag:false jiasflag:false,
scspflag:false
} }
}, },
onLoad(e) { onLoad(e) {
@ -379,6 +393,7 @@
this.jiasflag = true this.jiasflag = true
} }
}) })
this.scspflag = res.data.needCheckVideo
if(res.data.status == 1){ if(res.data.status == 1){
this.timeflag = false this.timeflag = false
}else if(res.data.status == 0){ }else if(res.data.status == 0){
@ -441,7 +456,8 @@
areaTimeStart:this.startTime, areaTimeStart:this.startTime,
areaTimeEnd:this.endTime, areaTimeEnd:this.endTime,
status:this.timeflag == true ? '0' : '1', status:this.timeflag == true ? '0' : '1',
authentication:authentication authentication:authentication,
needCheckVideo:this.scspflag
} }
this.$u.put(`/bst/area`, data).then((res) => { this.$u.put(`/bst/area`, data).then((res) => {
if (res.code == 200) { if (res.code == 200) {

View File

@ -259,6 +259,9 @@
</view> </view>
<span>{{deviceInfos.lastOnlineTime == null ? '--' : deviceInfos.lastOnlineTime}}</span> <span>{{deviceInfos.lastOnlineTime == null ? '--' : deviceInfos.lastOnlineTime}}</span>
</view> </view>
<view class="one">
手机定位时间 <span>{{deviceInfos.mobileLocationTime == null ? '--' : deviceInfos.mobileLocationTime}}</span>
</view>
</view> </view>
</view> </view>
<u-mask :show="false" @click="show = false" :z-index='100' /> <u-mask :show="false" @click="show = false" :z-index='100' />
@ -865,17 +868,11 @@
this.showbtntip = false this.showbtntip = false
}, },
checkbtn(num) { checkbtn(num) {
if(this.jieliuflag = true){ if (this.deviceInfos.status == 3 || this.deviceInfos.status == 2 || this.deviceInfos.status == 4) {
this.jieliuflag = false this.showbtntip = true
if (this.deviceInfos.status == 3 || this.deviceInfos.status == 2 || this.deviceInfos.status == 4) { this.btnnum = num
this.showbtntip = true } else {
this.btnnum = num this.btn(num)
} else {
this.btn(num)
}
setTimeout(()=>{
this.jieliuflag = true
},3000)
} }
}, },
putvehicle() { putvehicle() {

View File

@ -512,9 +512,13 @@
duration: 2000 duration: 2000
}) })
setTimeout(()=>{ setTimeout(()=>{
that.getorderdevice()
that.fjflag = false that.fjflag = false
that.orderflag = false that.orderflag = false
setTimeout(()=>{
uni.navigateTo({
url:'/page_user/yongche/orderxq?id=' + that.orderobj.orderId
})
},1000)
},1000) },1000)
} else { } else {
uni.showModal({ uni.showModal({

View File

@ -659,9 +659,13 @@
duration: 2000 duration: 2000
}) })
setTimeout(()=>{ setTimeout(()=>{
that.getorderdevice()
that.fjflag = false that.fjflag = false
that.orderflag = false that.orderflag = false
setTimeout(()=>{
uni.navigateTo({
url:'/page_user/yongche/orderxq?id=' + that.orderobj.orderId
})
},1000)
},1000) },1000)
} else { } else {
uni.showToast({ uni.showToast({