提交 ef6b2d57 authored 作者: 王鹏飞's avatar 王鹏飞

chore:知识点相关视频跳转优化

上级 63759efa
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
<div class="inner"> <div class="inner">
<ul> <ul>
<li @click="toExamPage">去测试</li> <li @click="toExamPage">去测试</li>
<li @click="toExamPage" v-if="detail.has_video">相关视频</li> <li @click="toCourseVideo" v-if="detail.has_video">相关视频</li>
</ul> </ul>
<ul> <ul>
<li @click="getCourseTag(detail.last)" v-if="detail.last">上一点</li> <li @click="getCourseTag(detail.last)" v-if="detail.last">上一点</li>
...@@ -74,6 +74,16 @@ export default { ...@@ -74,6 +74,16 @@ export default {
} else { } else {
this.$router.push({ path }) this.$router.push({ path })
} }
},
// 去课程视频页面
toCourseVideo() {
if (this.isWeapp) {
wx.miniProgram.navigateTo({
url: `/pages/course/item?id=${this.detail.course_id}&chapter_id=${this.detail.section_id}`
})
} else {
window.alert('请在微信小程序中打开')
}
} }
}, },
beforeMount() { beforeMount() {
......
...@@ -89,7 +89,7 @@ export default { ...@@ -89,7 +89,7 @@ export default {
toCourseVideo() { toCourseVideo() {
if (this.isWeapp) { if (this.isWeapp) {
wx.miniProgram.navigateTo({ wx.miniProgram.navigateTo({
url: `/pages/course/item?id=${this.courseId}` url: `/pages/course/item?id=${this.data.course_id}&chapter_id=${this.data.section_id}`
}) })
} else { } else {
window.alert('请在微信小程序中打开') window.alert('请在微信小程序中打开')
......
...@@ -103,6 +103,7 @@ export default { ...@@ -103,6 +103,7 @@ export default {
font-size: 15px; font-size: 15px;
background-color: #2b7ce9; background-color: #2b7ce9;
border-radius: 6px; border-radius: 6px;
border: 0;
} }
} }
</style> </style>
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论