综合演练三维驾驶返回bug

This commit is contained in:
sunzhenyu 2020-12-11 18:11:20 +08:00
parent 8287e984da
commit dcc1bb4506

View File

@ -163,12 +163,12 @@ export default {
this.jlmap3d.endsocket();
this.jlmap3d.dispose();
this.jlmap3d = null;
// window.removeEventListener('popstate', this.goBack, false);
// this.$destroy();
}
},
destroyed(){
window.removeEventListener('popstate', this.goBack, false);
},
computed: {
userId() {
@ -184,26 +184,26 @@ export default {
this.backmsg = "退出";
}
if (window.history && window.history.pushState) {
history.pushState(null, null, document.URL);
window.addEventListener('popstate', this.goBack, false);
}
// if (window.history && window.history.pushState) {
// history.pushState(null, null, document.URL);
// window.addEventListener('popstate', this.goBack, false);
// }
// this.$refs.mmiui.init();
},
methods: {
goBack(){
if(this.$route.query.type == "DRIVE"){
store.dispatch('LogOut').then(() => {
location.reload();
});
}else{
this.$emit('showdriving');
this.jlmap3d.eventoff();
this.jlmap3d.animateoff();
// this.jlmap3d = null;
}
// this.jlmap3d = null;
},
// goBack(){
// if(this.$route.query.type == "DRIVE"){
// store.dispatch('LogOut').then(() => {
// location.reload();
// });
// }else{
// this.$emit('showdriving');
// this.jlmap3d.eventoff();
// this.jlmap3d.animateoff();
// // this.jlmap3d = null;
// }
// // this.jlmap3d = null;
// },
show: function (skinCode,group,zindex) {
// console.log("show");
// console.log(skinCode);