|
@@ -41,8 +41,8 @@ export default {
|
|
|
data() {
|
|
|
return {
|
|
|
courseid: this.$route.query.courseid,
|
|
|
- routeType: '',
|
|
|
courseDetail: {},
|
|
|
+ routeType: 0,
|
|
|
courseTypeJson: {},
|
|
|
chapInfo: [],
|
|
|
courseType: [],
|
|
@@ -56,7 +56,7 @@ export default {
|
|
|
},
|
|
|
goToStudy() {
|
|
|
// eslint-disable-next-line object-curly-spacing
|
|
|
- this.$router.push({ path: '/course', query: { courseid: this.courseid, routeType: this.routeType } })
|
|
|
+ this.$router.push({ path: '/course', query: { courseid: this.courseid } })
|
|
|
},
|
|
|
getCourse() {
|
|
|
const params = {
|
|
@@ -93,21 +93,13 @@ export default {
|
|
|
})
|
|
|
}
|
|
|
},
|
|
|
- created() {
|
|
|
- const routeType = this.$route.query.routeType
|
|
|
- // console.log('routeType', routeType)
|
|
|
- if (!!routeType) {
|
|
|
- localStorage.setItem('routeType', routeType)
|
|
|
- }
|
|
|
- },
|
|
|
mounted() {
|
|
|
- // if (!this.$route.query.routeType) {
|
|
|
- // this.$router.push('/courseDetail', { replace: true })
|
|
|
- // }
|
|
|
- this.routeType = localStorage.getItem('routeType')
|
|
|
- // console.log('this.routeType', this.routeType==false)
|
|
|
-
|
|
|
- // console.log(this.$route.query.routeType, 'luo', this.routeType)
|
|
|
+ // console.log('hahahha',!localStorage.getItem('urlType'));
|
|
|
+ if (localStorage.getItem('urlType')==1) {
|
|
|
+ this.routeType = 1
|
|
|
+ } else {
|
|
|
+ this.routeType = 0
|
|
|
+ }
|
|
|
this.getCourse()
|
|
|
}
|
|
|
}
|