mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-11 03:46:44 +08:00
在线课bug修改
This commit is contained in:
@@ -72,7 +72,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div style="text-align: center; margin-bottom: 15px">
|
<div style="text-align: center; margin-bottom: 15px">
|
||||||
<el-button :disabled="curIndex==0" type="primary" @click="prevSub()">上一题</el-button>
|
<el-button :disabled="curIndex==0" type="primary" @click="prevSub()">上一题</el-button>
|
||||||
<el-button type="success" icon="el-icon-check" @click="present()">提 交</el-button>
|
<el-button type="success" icon="el-icon-check" @click="debouncedPresent">提 交</el-button>
|
||||||
<el-button :disabled="curIndex>=(total-1)" type="primary" @click="nextSub()">下一题</el-button>
|
<el-button :disabled="curIndex>=(total-1)" type="primary" @click="nextSub()">下一题</el-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -408,24 +408,34 @@ export default {
|
|||||||
this.curIndex++;
|
this.curIndex++;
|
||||||
this.curItem=this.paper.items[this.curIndex];
|
this.curItem=this.paper.items[this.curIndex];
|
||||||
},
|
},
|
||||||
|
debounce(func, delay) {
|
||||||
|
let timerId;
|
||||||
|
return function (...args) {
|
||||||
|
if (timerId) clearTimeout(timerId);
|
||||||
|
timerId = setTimeout(() => {
|
||||||
|
func.apply(this, args);
|
||||||
|
timerId = null;
|
||||||
|
}, delay);
|
||||||
|
};
|
||||||
|
},
|
||||||
present(){ //提交前处理
|
present(){ //提交前处理
|
||||||
let $this=this;
|
let $this=this;
|
||||||
let score=this.countTest();
|
let score=this.countTest();
|
||||||
console.log('score='+score);
|
console.log('score='+score);
|
||||||
if(this.noAnswers.length>0){
|
// if(this.noAnswers.length>0){
|
||||||
this.$confirm('还有未答试题,您确定要提交吗?', '提示', {
|
// this.$confirm('还有未答试题,您确定要提交吗?', '提示', {
|
||||||
confirmButtonText: '确定',
|
// confirmButtonText: '确定',
|
||||||
cancelButtonText: '取消',
|
// cancelButtonText: '取消',
|
||||||
showClose:false,
|
// showClose:false,
|
||||||
type: 'warning'
|
// type: 'warning'
|
||||||
}).then(() => {
|
// }).then(() => {
|
||||||
this.submitTest(score);
|
// this.submitTest(score);
|
||||||
}).catch(()=>{
|
// }).catch(()=>{
|
||||||
|
|
||||||
})
|
// })
|
||||||
}else{
|
// }else{
|
||||||
this.submitTest(score);
|
// this.submitTest(score);
|
||||||
}
|
// }
|
||||||
},
|
},
|
||||||
countTest(){ //计算考试的分数
|
countTest(){ //计算考试的分数
|
||||||
//console.log(this.paper.items);
|
//console.log(this.paper.items);
|
||||||
@@ -588,7 +598,10 @@ export default {
|
|||||||
});
|
});
|
||||||
|
|
||||||
},
|
},
|
||||||
}
|
},
|
||||||
|
created() {
|
||||||
|
this.debouncedPresent = this.debounce(this.present, 500);
|
||||||
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
@@ -40,7 +40,7 @@
|
|||||||
:biBarrageXml="biBarrageXml"
|
:biBarrageXml="biBarrageXml"
|
||||||
/>
|
/>
|
||||||
<!-- 加载动画 -->
|
<!-- 加载动画 -->
|
||||||
<div v-show="isShowLoading && isCrowd" class="player-loading" @click="videoDom.focus({preventScroll: true})">
|
<div v-show="isShowLoading && isCrowd && isShowPlayer" class="player-loading" @click="videoDom.focus({preventScroll: true})">
|
||||||
<img src="@/components/VideoPlayer/images/loading.svg" alt="loading"/>
|
<img src="@/components/VideoPlayer/images/loading.svg" alt="loading"/>
|
||||||
</div>
|
</div>
|
||||||
<!-- 控制栏 -->
|
<!-- 控制栏 -->
|
||||||
@@ -274,6 +274,7 @@ export default {
|
|||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
isShowPlayer: true,//增加一个状态,判断加载动画
|
||||||
timeFastBack : 15, //单位秒,每次增减15秒
|
timeFastBack : 15, //单位秒,每次增减15秒
|
||||||
videoDom: null, //视频dom
|
videoDom: null, //视频dom
|
||||||
isShowCover: true, // 是否显示封面
|
isShowCover: true, // 是否显示封面
|
||||||
@@ -568,6 +569,7 @@ export default {
|
|||||||
},
|
},
|
||||||
currentProgress: function () {
|
currentProgress: function () {
|
||||||
// 进度条到终点时修改播放状态
|
// 进度条到终点时修改播放状态
|
||||||
|
this.isShowPlayer = false
|
||||||
this.$emit('onPlayerPlaying', this.videoDom.currentTime,this.videoDom.duration)
|
this.$emit('onPlayerPlaying', this.videoDom.currentTime,this.videoDom.duration)
|
||||||
if (this.currentProgress === 1) {
|
if (this.currentProgress === 1) {
|
||||||
this.isPlaying = false;
|
this.isPlaying = false;
|
||||||
|
|||||||
@@ -1607,7 +1607,7 @@
|
|||||||
//height: 100%;
|
//height: 100%;
|
||||||
border: 1px solid #ffffff;
|
border: 1px solid #ffffff;
|
||||||
padding-right: 20px;
|
padding-right: 20px;
|
||||||
overflow: auto;
|
// overflow: auto;
|
||||||
}
|
}
|
||||||
.course-control{ //内容控制区域
|
.course-control{ //内容控制区域
|
||||||
width: 420px;
|
width: 420px;
|
||||||
|
|||||||
Reference in New Issue
Block a user