|
@@ -93,20 +93,22 @@ export default {
|
|
|
})
|
|
|
}
|
|
|
},
|
|
|
- mounted() {
|
|
|
+ created() {
|
|
|
console.log('type', this.$route.query)
|
|
|
if (this.$route.query.urlType) {
|
|
|
- sessionStorage .setItem('urlType', this.$route.query.urlType)
|
|
|
+ sessionStorage.setItem('urlType', this.$route.query.urlType)
|
|
|
}
|
|
|
|
|
|
- this.routeType = sessionStorage .getItem('urlType')
|
|
|
- // console.log('hahahha',!localStorage.getItem('urlType'));
|
|
|
- // console.log('kakakaka', this.$store.getters.shareCourseId)
|
|
|
- // if (localStorage.getItem('urlType') == 1) {
|
|
|
- // this.routeType = 1
|
|
|
- // } else {
|
|
|
- // this.routeType = 0
|
|
|
- // }
|
|
|
+ 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()
|
|
|
}
|
|
|
}
|