103 lines
2.1 KiB
Vue
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<template>
<view class="fullHeight">
<headers :showBack="true">
<view class="headerName">
课程学习
</view>
</headers>
<video :src="url_config+'image/'+courseDetail.eduVideo" controls class="videoBox"></video>
<view class="courseTitle">
{{courseDetail.eduCourseName}}
</view>
<view class="desc">
课程类型{{educateTypeList[courseDetail.eduType-1]}}
</view>
<view class="desc">
试卷总分{{courseDetail.totalScore}}
</view>
<view class="desc">
及格分数{{courseDetail.passScore}}
</view>
<view class="desc">
创建时间{{courseDetail.addTime}}
</view>
<button type="primary" class="btn submitBtn big" @click="gotoTest" v-if="courseDetail.questionList.length>0">开始考试</button>
</view>
</template>
<script>
export default {
data() {
return {
courseDetail:{
eduAddr: "",
eduClasshour: "",
eduContent: "",
eduCourseName: "",
eduPhoto: "",
eduTeacher: "",
eduTime: "",
eduType: 1,
eduVideo: "",
passScore: "",
projectSn: "",
questionList: [],
totalScore: "",
addTime: ""
},
educateTypeList: ['入场三级教育','定期安全教育','安全技术交底','VR安全教育'],
eduId:'',
workerId:''
}
},
onLoad(options) {
this.eduId=options.eduId
this.workerId=options.workerId
this.getDetailData()
},
methods: {
gotoTest(){
uni.navigateTo({
url:'./test?eduId='+this.eduId+'&workerId='+this.workerId
})
},
//获取课程详细数据
getDetailData(){
var that = this
this.sendRequest({
url: "xmgl/safeEducationQuestion/selectSafeEducationQuestionInfo",
data: {eduId:this.eduId},
method: "post",
success(res) {
that.courseDetail=res.result.safeEducation
}
})
}
}
}
</script>
<style scoped>
.videoBox{
width: 100%;
height: 300px;
margin: 20rpx 0;
}
.courseTitle{
padding: 0 30rpx;
}
.desc{
font-size: 24rpx;
opacity: 0.6;
padding: 10rpx 0 0 30rpx;
}
.submitBtn{
/* margin: 30rpx 40rpx; */
position: fixed;
bottom: 40rpx;
left: 40rpx;
width: calc(100% - 40px);
}
</style>