|
|
|
@ -1,7 +1,7 @@ |
|
|
|
<template> |
|
|
|
<view class="video-wrapper" id="video-container"> |
|
|
|
<view style="position:relative;width:100%;" :style="{'height':videoHeight+'px'}"> |
|
|
|
<video id="video_play" :controls="false" :src="videoObj.videoUrl" @ended="videoEnded()" :autoplay="auto" :show-fullscreen-btn="false" :loop="isLoop" style="width: 100%;height: 90%;"></video> |
|
|
|
<video id="video_play" :controls="false" :src="videoObj.videoUrl" @ended="videoEnded()" :autoplay="auto" :show-fullscreen-btn="false" :loop="isLoop" style="width: 100%;height: 100%;" object-fit="cover"></video> |
|
|
|
<view class="question"></view> |
|
|
|
<view class="popup-layer-back" v-if="!start" v-show="question"> |
|
|
|
<!-- <view class="popup-layer-close" @click="question=false">关闭</view> --> |
|
|
|
@ -24,7 +24,10 @@ |
|
|
|
</view> --> |
|
|
|
<view class="popup-layer-back" v-show="resCheck"> |
|
|
|
<view class="popup-layer" style="color: red;" @click="toResVideo()"> |
|
|
|
<p>重新选择逃生路线</p> |
|
|
|
<view class="anitem1"> |
|
|
|
<image class="animg1" src="/static/videos/skin_bg_v1.png"></image> |
|
|
|
<!-- <view class="antxt1">重新选择逃生路线</view> --> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
@ -54,7 +57,6 @@ |
|
|
|
end: false, |
|
|
|
auto: true, |
|
|
|
question: false, |
|
|
|
questionFreId: "", |
|
|
|
preQuestionId: "", |
|
|
|
correct: "", |
|
|
|
ask: "", |
|
|
|
@ -71,12 +73,25 @@ |
|
|
|
handler:function(){ |
|
|
|
this.getBindJson(); |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
questionFreId: { |
|
|
|
handler: function() { |
|
|
|
this.queryQAByFreId(); |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
props:{ |
|
|
|
jsonId: { |
|
|
|
type: String, |
|
|
|
default: "", |
|
|
|
}, |
|
|
|
sceneId: { |
|
|
|
type: String, |
|
|
|
default: "", |
|
|
|
}, |
|
|
|
questionFreId: { |
|
|
|
type: String, |
|
|
|
default: "", |
|
|
|
} |
|
|
|
}, |
|
|
|
created() { |
|
|
|
@ -88,7 +103,7 @@ |
|
|
|
|
|
|
|
this.videoContext = uni.createVideoContext("video_play"); |
|
|
|
this.videoContext.requestFullScreen(); |
|
|
|
this.queryQAByFreId(); |
|
|
|
// this.queryQAByFreId(); |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
videoEnded() { |
|
|
|
@ -118,9 +133,9 @@ |
|
|
|
this.end = true; |
|
|
|
this.answerList = []; |
|
|
|
this.question = false; |
|
|
|
uni.navigateTo({ |
|
|
|
url: '/subpkg/complete/complete?questionFreId='+this.questionFreId+'&roleId='+this.jsonId |
|
|
|
}) |
|
|
|
// uni.navigateTo({ |
|
|
|
// url: '/subpkg/complete/complete?questionFreId='+this.questionFreId+'&roleId='+this.jsonId |
|
|
|
// }) |
|
|
|
} else { |
|
|
|
// 不为空表示答题错误展示返回重新选择 |
|
|
|
this.resCheck = true; |
|
|
|
@ -232,7 +247,7 @@ |
|
|
|
}).catch((e) => console.log(e)); //捕获异常 |
|
|
|
}, |
|
|
|
queryQAByFreId() { |
|
|
|
this.$api.queryQAByFreId('084ddf84e4be4b02acdcfad396c28f98') |
|
|
|
this.$api.queryQAByFreId(this.questionFreId) |
|
|
|
.then(res => { |
|
|
|
this.autoAnswerList.push(...res.data); |
|
|
|
}).catch((e) => console.log(e)); //捕获异常 |
|
|
|
@ -261,9 +276,9 @@ |
|
|
|
this.end = true; |
|
|
|
this.answerList = []; |
|
|
|
this.question = false; |
|
|
|
uni.navigateTo({ |
|
|
|
url: '/subpkg/complete/complete?questionFreId='+this.questionFreId+'&roleId='+this.jsonId |
|
|
|
}) |
|
|
|
// uni.navigateTo({ |
|
|
|
// url: '/subpkg/complete/complete?questionFreId='+this.questionFreId+'&roleId='+this.jsonId |
|
|
|
// }) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
@ -271,6 +286,22 @@ |
|
|
|
</script> |
|
|
|
|
|
|
|
<style> |
|
|
|
/* 设置弹出层 */ |
|
|
|
.marsk { |
|
|
|
position: absolute; |
|
|
|
z-index: 999; |
|
|
|
width: 100%; |
|
|
|
height: 100%; |
|
|
|
background-color: rgba(0, 0, 0, .35); |
|
|
|
} |
|
|
|
.animg { |
|
|
|
position:absolute; |
|
|
|
top:0;left:0;right:0;bottom:0; |
|
|
|
margin:auto; |
|
|
|
width: 100px; |
|
|
|
height: 100px; |
|
|
|
} |
|
|
|
|
|
|
|
/* 首先设置背景层 */ |
|
|
|
.popup-layer-back { |
|
|
|
position: absolute; |
|
|
|
@ -293,7 +324,28 @@ |
|
|
|
padding: 20px; |
|
|
|
z-index: 9999; |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.popup-layer .anitem1 { |
|
|
|
position: relative; |
|
|
|
/* margin: 80rpx; */ |
|
|
|
width: 650rpx; |
|
|
|
height: 200rpx; |
|
|
|
/* text-align: center; */ |
|
|
|
} |
|
|
|
|
|
|
|
.popup-layer .anitem1 .animg1 { |
|
|
|
width: 100%; |
|
|
|
height: 100%; |
|
|
|
} |
|
|
|
|
|
|
|
.popup-layer .anitem1 .antxt1 { |
|
|
|
position: absolute; |
|
|
|
top: 45%; |
|
|
|
left: 10%; |
|
|
|
width: 100%; |
|
|
|
font-size: 1.2rem; |
|
|
|
} |
|
|
|
|
|
|
|
.popup-layer .anitem { |
|
|
|
position: relative; |
|
|
|
margin: 80rpx; |
|
|
|
@ -301,27 +353,19 @@ |
|
|
|
height: 100rpx; |
|
|
|
text-align: center; |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.popup-layer .anitem .animg { |
|
|
|
width: 100%; |
|
|
|
height: 160rpx; |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.popup-layer .anitem .antxt { |
|
|
|
position: absolute; |
|
|
|
top: 60%; |
|
|
|
top: 30%; |
|
|
|
width: 100%; |
|
|
|
font-size: 1.2rem; |
|
|
|
} |
|
|
|
|
|
|
|
.antxtCheck { |
|
|
|
position: absolute; |
|
|
|
top: 60%; |
|
|
|
width: 100%; |
|
|
|
font-size: 1.2rem; |
|
|
|
color: red; |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.judd { |
|
|
|
position: absolute; |
|
|
|
top: -20rpx; |
|
|
|
@ -330,15 +374,15 @@ |
|
|
|
height: 100rpx; |
|
|
|
border-radius: 50%; |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.jdok { |
|
|
|
background-color: rgba(3, 173, 55, .35); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.jderr { |
|
|
|
background-color: rgba(249, 21, 43, .35); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.judd .judimg { |
|
|
|
position: absolute; |
|
|
|
top: 50%; |
|
|
|
@ -348,7 +392,6 @@ |
|
|
|
width: 50%; |
|
|
|
height: 50%; |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/* 设置关闭按钮 */ |
|
|
|
.popup-layer-close { |
|
|
|
|