停止学习课程
This commit is contained in:
@@ -123,9 +123,24 @@ export default {
|
|||||||
this.$u.toast(err.msg)
|
this.$u.toast(err.msg)
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
stop() {
|
||||||
|
this.$instance.post(`/app/appcourseinfo/stopLearnById`,null,{
|
||||||
|
params: {
|
||||||
|
id: this.data.id,
|
||||||
|
recordId: this.data.recordId
|
||||||
|
}
|
||||||
|
}).then(res=> {
|
||||||
|
if(res.code==0) {
|
||||||
|
console.log(res.msg);
|
||||||
|
}
|
||||||
|
}).catch(err=> this.$u.toast(err.msg))
|
||||||
|
},
|
||||||
keyboard(e) {
|
keyboard(e) {
|
||||||
console.log(e.detail.height);
|
console.log(e.detail.height);
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
onUnload() {
|
||||||
|
this.stop()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -14,24 +14,24 @@
|
|||||||
<!-- 题目 -->
|
<!-- 题目 -->
|
||||||
<div>{{ item.title }}</div>
|
<div>{{ item.title }}</div>
|
||||||
<!-- 单选 -->
|
<!-- 单选 -->
|
||||||
<div class="answer_list" v-if="item.type==0">
|
<!-- <div class="answer_list" v-if="item.type==0">
|
||||||
<!-- 'succeed': clickIndex==inx && opt.checked == 1, 'item-error': clickIndex == inx && item.checked == 0 -->
|
|
||||||
<div class="answer_item" v-for="(opt,inx) in item.items" :key="inx"
|
<div class="answer_item" v-for="(opt,inx) in item.items" :key="inx"
|
||||||
:class="{'Checked': clickIndex == inx}">
|
:class="{'Checked': clickIndex == inx}">
|
||||||
{{ opt.sort }}: {{ opt.content}}
|
{{ opt.sort }}: {{ opt.content}}
|
||||||
</div>
|
</div>
|
||||||
|
</div> -->
|
||||||
|
<!-- 判断 -->
|
||||||
|
<div class="answer_list" v-if="item.type==0 || item.type==2">
|
||||||
|
<div class="answer_item" v-for="(opt,inx) in item.items" :key="inx"
|
||||||
|
:class="{'Checked': clickIndex === inx, 'Succeed': showAnalysis && opt.checked == 1, 'Error': showAnalysis && clickIndex === inx && opt.checked == 0}"
|
||||||
|
@click="itemClick(inx)">
|
||||||
|
{{ opt.sort }}: {{ opt.content}}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- 多选 -->
|
<!-- 多选 -->
|
||||||
<div class="answer_list" v-if="item.type==1">
|
<div class="answer_list" v-if="item.type==1">
|
||||||
<div class="answer_item" v-for="(opt,inx) in item.items" :key="inx"
|
<div class="answer_item" v-for="(opt,inx) in item.items" :key="inx"
|
||||||
@click="itemClick(inx)">
|
:class="{'Checked': item.isCheked,'Succeed': showAnalysis && opt.checked == 1, 'Error': showAnalysis && item.isCheked && opt.checked == 0}"
|
||||||
{{ opt.sort }}: {{ opt.content}}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<!-- 判断 -->
|
|
||||||
<div class="answer_list" v-if="item.type==2">
|
|
||||||
<div class="answer_item" v-for="(opt,inx) in item.items" :key="inx"
|
|
||||||
:class="{'Checked': clickIndex == inx, 'Succeed': showAnalysis && opt.checked == 1, 'Error': showAnalysis && clickIndex == inx && opt.checked == 0}"
|
|
||||||
@click="itemClick(inx)">
|
@click="itemClick(inx)">
|
||||||
{{ opt.sort }}: {{ opt.content}}
|
{{ opt.sort }}: {{ opt.content}}
|
||||||
</div>
|
</div>
|
||||||
@@ -91,17 +91,25 @@ export default {
|
|||||||
if(this.list[this.activeIndex].type==0) { // 单选
|
if(this.list[this.activeIndex].type==0) { // 单选
|
||||||
|
|
||||||
} else if(this.list[this.activeIndex].type==1) { // 多选
|
} else if(this.list[this.activeIndex].type==1) { // 多选
|
||||||
|
this.list[this.activeIndex].items[i].isCheked = !this.list[this.index].items[i].isCheked
|
||||||
|
this.list[this.activeIndex].items.map((item) => {
|
||||||
|
if (item.isCheked) {
|
||||||
|
// this.showTopBtn = true
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
} else if(this.list[this.activeIndex].type==2) { // 判断
|
} else if(this.list[this.activeIndex].type==2) { // 判断
|
||||||
this.clickIndex = i
|
this.clickIndex = i
|
||||||
this.showConfirm = true
|
this.showConfirm = true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
// 下一题
|
||||||
nextTopic() {
|
nextTopic() {
|
||||||
this.activeIndex ++;
|
this.activeIndex ++;
|
||||||
this.clickIndex = ''
|
this.clickIndex = ''
|
||||||
this.showAnalysis = false
|
this.showAnalysis = false
|
||||||
},
|
},
|
||||||
|
// 确定
|
||||||
confirm() {
|
confirm() {
|
||||||
|
|
||||||
this.showAnalysis = true;
|
this.showAnalysis = true;
|
||||||
|
|||||||
Reference in New Issue
Block a user