停止学习课程
This commit is contained in:
@@ -123,9 +123,24 @@ export default {
|
||||
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) {
|
||||
console.log(e.detail.height);
|
||||
}
|
||||
},
|
||||
onUnload() {
|
||||
this.stop()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -14,24 +14,24 @@
|
||||
<!-- 题目 -->
|
||||
<div>{{ item.title }}</div>
|
||||
<!-- 单选 -->
|
||||
<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_list" v-if="item.type==0">
|
||||
<div class="answer_item" v-for="(opt,inx) in item.items" :key="inx"
|
||||
:class="{'Checked': clickIndex == inx}">
|
||||
{{ opt.sort }}: {{ opt.content}}
|
||||
</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 class="answer_list" v-if="item.type==1">
|
||||
<div class="answer_item" v-for="(opt,inx) in item.items" :key="inx"
|
||||
@click="itemClick(inx)">
|
||||
{{ 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}"
|
||||
:class="{'Checked': item.isCheked,'Succeed': showAnalysis && opt.checked == 1, 'Error': showAnalysis && item.isCheked && opt.checked == 0}"
|
||||
@click="itemClick(inx)">
|
||||
{{ opt.sort }}: {{ opt.content}}
|
||||
</div>
|
||||
@@ -91,17 +91,25 @@ export default {
|
||||
if(this.list[this.activeIndex].type==0) { // 单选
|
||||
|
||||
} 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) { // 判断
|
||||
this.clickIndex = i
|
||||
this.showConfirm = true
|
||||
}
|
||||
},
|
||||
// 下一题
|
||||
nextTopic() {
|
||||
this.activeIndex ++;
|
||||
this.clickIndex = ''
|
||||
this.showAnalysis = false
|
||||
},
|
||||
// 确定
|
||||
confirm() {
|
||||
|
||||
this.showAnalysis = true;
|
||||
|
||||
Reference in New Issue
Block a user