综合演练三维驾驶返回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.endsocket();
this.jlmap3d.dispose(); this.jlmap3d.dispose();
this.jlmap3d = null; this.jlmap3d = null;
// window.removeEventListener('popstate', this.goBack, false);
// this.$destroy(); // this.$destroy();
} }
}, },
destroyed(){ destroyed(){
window.removeEventListener('popstate', this.goBack, false);
}, },
computed: { computed: {
userId() { userId() {
@ -184,26 +184,26 @@ export default {
this.backmsg = "退出"; this.backmsg = "退出";
} }
if (window.history && window.history.pushState) { // if (window.history && window.history.pushState) {
history.pushState(null, null, document.URL); // history.pushState(null, null, document.URL);
window.addEventListener('popstate', this.goBack, false); // window.addEventListener('popstate', this.goBack, false);
} // }
// this.$refs.mmiui.init(); // this.$refs.mmiui.init();
}, },
methods: { methods: {
goBack(){ // goBack(){
if(this.$route.query.type == "DRIVE"){ // if(this.$route.query.type == "DRIVE"){
store.dispatch('LogOut').then(() => { // store.dispatch('LogOut').then(() => {
location.reload(); // location.reload();
}); // });
}else{ // }else{
this.$emit('showdriving'); // this.$emit('showdriving');
this.jlmap3d.eventoff(); // this.jlmap3d.eventoff();
this.jlmap3d.animateoff(); // this.jlmap3d.animateoff();
// this.jlmap3d = null; // // this.jlmap3d = null;
} // }
// this.jlmap3d = null; // // this.jlmap3d = null;
}, // },
show: function (skinCode,group,zindex) { show: function (skinCode,group,zindex) {
// console.log("show"); // console.log("show");
// console.log(skinCode); // console.log(skinCode);