|
@@ -19,7 +19,7 @@
|
|
|
:cJson="courseTypeJson"
|
|
|
:tName="Tname"
|
|
|
></course-message>
|
|
|
- <course-chap :chInfo="chapInfo" :brief="courseDetail.brief" @goCourse="goToStudy"></course-chap>
|
|
|
+ <course-chap :chInfo="chapInfo" :brief="courseDetail.brief" @goCourse="goToStage"></course-chap>
|
|
|
</div>
|
|
|
<div class="studyCss">
|
|
|
<div style="stuButton" @click="goToStudy">点击学习</div>
|
|
@@ -54,9 +54,12 @@ export default {
|
|
|
back() {
|
|
|
this.$router.push({ path: '/home' })
|
|
|
},
|
|
|
+ goToStage(val) {
|
|
|
+ this.$router.push({ path: '/course', query: { courseid: this.courseid, stage: val } })
|
|
|
+ },
|
|
|
goToStudy() {
|
|
|
// eslint-disable-next-line object-curly-spacing
|
|
|
- this.$router.push({ path: '/course', query: { courseid: this.courseid } })
|
|
|
+ this.$router.push({ path: '/course', query: { courseid: this.courseid, stage: 0 } })
|
|
|
},
|
|
|
getCourse() {
|
|
|
const params = {
|
|
@@ -94,6 +97,7 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
created() {
|
|
|
+
|
|
|
console.log('type', this.$route.query)
|
|
|
if (this.$route.query.urlType) {
|
|
|
sessionStorage.setItem('urlType', this.$route.query.urlType)
|
|
@@ -101,13 +105,14 @@ export default {
|
|
|
|
|
|
this.routeType = sessionStorage.getItem('urlType')
|
|
|
if (this.routeType == 1) {
|
|
|
+ // 跳转到登录界面之后,不让其回退。就直接添加下面这段代码即可实现
|
|
|
history.pushState(null, null, document.URL)
|
|
|
window.addEventListener('popstate', function() {
|
|
|
history.pushState(null, null, document.URL)
|
|
|
})
|
|
|
}
|
|
|
- // 跳转到登录界面之后,不让其回退。就直接添加下面这段代码即可实现
|
|
|
},
|
|
|
+
|
|
|
mounted() {
|
|
|
this.getCourse()
|
|
|
}
|