|
@@ -97,23 +97,24 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
created() {
|
|
|
-
|
|
|
console.log('type', this.$route.query)
|
|
|
if (this.$route.query.urlType) {
|
|
|
sessionStorage.setItem('urlType', this.$route.query.urlType)
|
|
|
+ return this.routeType = sessionStorage.getItem('urlType')
|
|
|
}
|
|
|
|
|
|
this.routeType = sessionStorage.getItem('urlType')
|
|
|
- if (this.routeType == 1) {
|
|
|
- // 跳转到登录界面之后,不让其回退。就直接添加下面这段代码即可实现
|
|
|
+ },
|
|
|
+
|
|
|
+ mounted() {
|
|
|
+ if (this.routeType * 1 == 1) {
|
|
|
+ console.log('清空记录');
|
|
|
+ // 跳转到登录界面之后,不让其回退。就直接添加1下面这段代码即可实现
|
|
|
history.pushState(null, null, document.URL)
|
|
|
window.addEventListener('popstate', function() {
|
|
|
history.pushState(null, null, document.URL)
|
|
|
})
|
|
|
}
|
|
|
- },
|
|
|
-
|
|
|
- mounted() {
|
|
|
this.getCourse()
|
|
|
}
|
|
|
}
|