diff --git a/page_fenbao/storedlist/trueorder.vue b/page_fenbao/storedlist/trueorder.vue index 7976ace..d59d6cf 100644 --- a/page_fenbao/storedlist/trueorder.vue +++ b/page_fenbao/storedlist/trueorder.vue @@ -148,6 +148,20 @@ + + + + 使用前请拍摄需要使用的车辆 + + + + + + + 保持车辆录像的完整清晰,不要随意拍摄,确保视频中车辆出境,并且出现车牌号 + + + @@ -484,11 +498,16 @@ huiyuanlist:[], huiyuanobj:{}, zfflag:true, - jieliuflag:true + jieliuflag:true, + videoUrl:'', + videoPath:'', + token:'', + areaNeedCheckVideo:false } }, onLoad(option) { xBlufi.initXBlufi(1) + this.getQiniuToken() console.log(option) if (option.modelId) { uni.showLoading({ @@ -549,6 +568,7 @@ if (res.data) { this.bikeobj = res.data this.modelId = res.data.modelId + this.areaNeedCheckVideo = res.data.areaNeedCheckVideo if(res.data.onlineStatus == 0){ this.mac = res.data.mac console.log(this.mac) @@ -601,6 +621,7 @@ if (res.data) { console.log(res.data); this.bikeobj = res.data + this.areaNeedCheckVideo = res.data.areaNeedCheckVideo this.modelId = res.data.modelId if(res.data.onlineStatus == 0){ this.mac = res.data.mac @@ -656,6 +677,54 @@ xBlufi.listenDeviceMsgEvent(true, this.funListenDeviceMsgEvent) }, 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', // 指定使用后置摄像头,可选值有front、back + 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) { const selectedId = e.detail.value; @@ -1130,7 +1199,8 @@ price: this.yucobj, appId: this.$store.state.appid, channelId: this.channelId, - creditUserId:this.selectedSubPayment + creditUserId:this.selectedSubPayment, + checkVideo:this.videoUrl } uni.showLoading({ title: '加载中...', @@ -1257,7 +1327,8 @@ price: this.yucobj, appId: this.$store.state.appid, channelId: this.channelId, - creditUserId:this.selectedSubPayment + creditUserId:this.selectedSubPayment, + checkVideo:this.videoUrl } uni.showLoading({ title: '加载中...', @@ -1357,6 +1428,7 @@ this.$u.get(`/app/device/availableDetail?sn=${this.sn}`).then((res) => { if (res.code == 200) { this.bikeobj = res.data + this.areaNeedCheckVideo = res.data.areaNeedCheckVideo if(res.data.onlineStatus == 0){ this.mac = res.data.mac this.findDevice() @@ -1368,6 +1440,7 @@ } else { this.$u.get(`/app/device/availableDetail?sn=${this.chesn}`).then((res) => { if (res.code == 200) { + this.areaNeedCheckVideo = res.data.areaNeedCheckVideo if(res.data.onlineStatus == 0){ this.mac = res.data.mac this.findDevice() @@ -1470,6 +1543,7 @@ if (res.code == 200) { wx.setStorageSync('token', res.token) this.gettaocan() + this.getQiniuToken() // this.fanganindex = 0 this.tit = '确认订单页' this.logoflag = false @@ -1500,6 +1574,46 @@ /deep/ .u-checkbox { 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 { padding: 20rpx; padding-bottom: 300rpx; @@ -1567,6 +1681,48 @@ font-size: 26rpx; 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 { padding: 0 46rpx; position: fixed; diff --git a/page_shanghu/fix_index.vue b/page_shanghu/fix_index.vue index 776c090..0c549a1 100644 --- a/page_shanghu/fix_index.vue +++ b/page_shanghu/fix_index.vue @@ -1,5 +1,4 @@ -复制代码