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