Merge branch 'zcwy-master' into 'master'

Zcwy master

See merge request !112
This commit is contained in:
joshen
2024-05-28 19:20:54 +08:00
4 changed files with 24 additions and 56 deletions

View File

@@ -60,10 +60,6 @@
content:{
type: Object,
default: ()=>{}
},
courseType:{
type: String,
default: 0
}
},
data(){
@@ -163,19 +159,6 @@
this.$message.error(res.message);
}
})
if(this.courseType == 20){
let params = {
studyId: this.studyId, //学习id,
courseId: this.content.courseId, //课程id,
contentId: this.content.id, //内容id,
contentType: '',
contentName: '', //内容名称
progress: 100,
status: 9,
contentTotal: ''
};
apiCourseStudy.studyContent(params)
}
}
}
}

View File

@@ -152,10 +152,6 @@ export default {
showTest:{
type:Boolean,
default:false
},
courseType:{
type: String,
default:0
}
},
data() {
@@ -516,33 +512,6 @@ export default {
},
submitTest(testScore){ //提交处理
//清空提示
if(this.courseType == 20){
if(testScore<80){
const params = {
studyId: this.studyId, //学习id,
courseId: this.content.courseId, //课程id,
contentId: this.content.id, //内容id,
contentType: '',
contentName: '', //内容名称
progress: 1,
status: 2,
contentTotal: ''
};
apiStudy.studyContent(params)
}else{
const params = {
studyId: this.studyId, //学习id,
courseId: this.content.courseId, //课程id,
contentId: this.content.id, //内容id,
contentType: '',
contentName: '', //内容名称
progress: 100,
status: 9,
contentTotal: ''
};
apiStudy.studyContent(params)
}
}
if(this.timer){
window.clearInterval(this.timer);
}

View File

@@ -1,7 +1,7 @@
<template>
<div class="box">
<div class="box" :class="{ incl: url.includes('projectdetails') }">
<portal-header style="background: #387DF7;" :hideSearch="true" textColor="#ffffff"></portal-header>
<iframe :src="url" style="width: 100%;height: 100%;" frameborder="0"></iframe>
<iframe :src="url" style="width: 100%;height: 100%;" frameborder="0" ref="iframe"></iframe>
<portal-footer></portal-footer>
</div>
</template>
@@ -27,9 +27,23 @@ import portalFooter from "@/components/PortalFooter.vue";
if(params){
this.url=this.url+'?'+params;
}
window.addEventListener('message', this.handleMessageFromChild);
},
beforeDestroy() {
window.removeEventListener('message', this.handleMessageFromChild);
},
methods:{
handleMessageFromChild(event) {
if (event.origin !== process.env.VUE_APP_BOE_MOBILE_URL) return;
if (event.data && event.data.type === 'navigate') {
this.navigate(event.data.path);
}
},
navigate(path) {
this.$router.push({
path:path
})
},
}
}
</script>
@@ -39,4 +53,8 @@ import portalFooter from "@/components/PortalFooter.vue";
//background: #387DF7;
height: 100%;
}
.incl{
overflow: hidden;
padding-bottom: 100px;
}
</style>

View File

@@ -102,10 +102,10 @@
<homework v-if="resType == 60 && studyId != ''" :studyId="studyId" :content="contentData"></homework>
</div>
<div v-if="resType == 61">
<exam v-if="resType == 61 && studyId != '' " :studyId="studyId" :courseType="courseType" :content="contentData"></exam>
<exam v-if="resType == 61 && studyId != '' " :studyId="studyId" :content="contentData"></exam>
</div>
<div v-if="resType == 62" style="padding:5px">
<assess v-if="resType == 62 && studyId != '' && contentData.id" :courseType="courseType" :studyId="studyId" :content="contentData">
<assess v-if="resType == 62 && studyId != '' && contentData.id" :studyId="studyId" :content="contentData">
</assess>
</div>
</div>
@@ -320,7 +320,6 @@
},
data() {
return {
courseType: 0,
trueFalse: true,
audiences:'',
isCrowd:false,
@@ -608,6 +607,7 @@
this.saveStudyDuration();
if (r.contentType == 10 || r.contentType == 20) {
this.trueFalse = true
if (r.content.startsWith('\{')) {
this.curriculumData = JSON.parse(r.content);
} else {
@@ -1191,8 +1191,6 @@
audiences:this.audiences
}).then(rs => {
if (rs.status == 200) {
this.courseType = rs.result.course.type
this.contentStudysLength = rs.result.contentStudys
if(rs.result.contents.length==0){
$this.$message.error('课程内容已删除或课程已不再使用');
return;