Browse Source

答题优化

h5_css
yanyan 3 years ago
parent
commit
25a5ef7e2f
  1. 7
      components/s-video/s-video.vue
  2. 5
      subpkg/practice/practice.vue

7
components/s-video/s-video.vue

@ -3,12 +3,11 @@
<view style="position:relative;width:100%;" :style="{'height':videoHeight+'px'}">
<video id="video_play" :src="videoObj.videoUrl" @ended="videoEnded()" :autoplay="auto" style="width: 100%;height: 100%;"></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> -->
<view class="popup-layer">
<h2>答案填充</h2>
<p @click="nextQuestion(item.outs[0], item)" v-for="(item, index) in answerList">答题{{item.channel}}后跳转下一视频</p>
<h2>请选择</h2>
<p @click="nextQuestion(item.outs[0], item)" v-for="(item, index) in answerList">{{item.channel}}</p>
</view>
</view>
<view class="popup-layer-back" v-if="start">
@ -60,11 +59,13 @@
this.getBindJson();
},
methods: {
videoEnded() {
this.auto = false;
this.question = true;
//
if(this.videoObj.outs.length>0) {
this.answerList =[];
for(var i=0; i<this.videoObj.outs.length; i++) {
this.getAnswer(this.videoObj.outs[i])
}

5
subpkg/practice/practice.vue

@ -13,12 +13,13 @@
data() {
return {
page: "",
jsonId: "6215c8757e8947c8aae0fd0b3d2d503b",
jsonId: "d1d4007d09c24b84ab79fd9e7d2337c6",
roleId:"",
};
},
onLoad(options) {
this.roleId = options.roleId
this.jsonId = options.roleId
this.$emit('getJsonId',this.jsonId)
},
onReady() {
this.QR();

Loading…
Cancel
Save