提交 f4ce7d99 authored 作者: lihuihui's avatar lihuihui

updata

上级 d9c7cc55
<template>
<div>
{{$route.query.id}}
</div>
</template>
<script>
export default {
}
</script>
<style lang="scss" scoped>
</style>
......@@ -60,10 +60,12 @@ png图片,可以方便你直接应用到自己的设计作品中,我们
</div>
<div v-show="tabNav.navIndex === 2" class="tab3">
<ul>
<li>
<div class="tit">啊啊啊啊</div>
<van-icon name="arrow" class="arr"/>
</li>
<template v-for="(item, index) in courseList">
<li :key="index" @click="courseNodeDetail(item.course_id)">
<div class="tit">{{ item.course_name }}</div>
<van-icon name="arrow" class="arr"/>
</li>
</template>
</ul>
</div>
</div>
......@@ -92,6 +94,7 @@ png图片,可以方便你直接应用到自己的设计作品中,我们
<script>
import * as api from '@/api/courseExam.js'
import * as courseApi from '@/api/course.js'
import { Icon } from 'vant'
export default {
components: {
......@@ -105,7 +108,8 @@ export default {
navText: ['能力自测', '随堂小测', '知识点小测'],
navIndex: 0
},
CourseChapter: []
CourseChapter: [],
courseList: []
}
},
computed: {
......@@ -127,6 +131,19 @@ export default {
this.init()
},
methods: {
courseNodeDetail(id) {
this.$router.push({
path: '/exam/courseNode',
query: {
id: id
}
})
},
getCourseList() {
courseApi.getCourseList().then(response => {
this.courseList = response
})
},
async init() {
const param = {
type: 1
......@@ -200,7 +217,7 @@ export default {
const isLogin = await this.$store.dispatch('checkLogin')
console.log(isLogin)
if (e === 1 || e === 2) {
this.getCourseChapterList()
e === 1 ? this.getCourseChapterList() : this.getCourseList()
if (!isLogin) {
if (this.isWeapp) {
// 小程序
......
......@@ -20,6 +20,12 @@ export default [
name: 'examResult',
component: () => import('../pages/courseExam/answerResult.vue')
},
/* 能力自测答题结果 */
{
path: '/exam/courseNode',
name: 'courseNode',
component: () => import('../pages/courseExam/courseNode.vue')
},
/* 模拟考试 */
{
path: '/mock/index',
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论