退出登陆 断开socket连接
This commit is contained in:
parent
d2ae5169d1
commit
a5df03f7c7
@ -14,9 +14,6 @@ import { getPublish3dMapDetail} from '@/api/jlmap3d/load3ddata';
|
||||
|
||||
import StompClient from '@/utils/sock';
|
||||
|
||||
import { getToken } from '@/utils/auth';
|
||||
import { logout } from '@/api/login';
|
||||
|
||||
var clock = new THREE.Clock();
|
||||
export function Jl3ddeviceNew(dom,group,token,skinCode) {
|
||||
var scope = this;
|
||||
@ -129,12 +126,8 @@ export function Jl3ddeviceNew(dom,group,token,skinCode) {
|
||||
|
||||
}
|
||||
if(data.type == 'Simulation_Over'){
|
||||
logout(getToken()).then(() => {
|
||||
this.$store.dispatch('LogOut').then(() => {
|
||||
location.reload();
|
||||
});
|
||||
}).catch(error => {
|
||||
|
||||
this.$store.dispatch('LogOut').then(() => {
|
||||
location.reload();
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -1,7 +1,6 @@
|
||||
import StompClient from '@/utils/sock';
|
||||
import { getBaseUrl } from '@/utils/baseUrl'
|
||||
import { getToken } from '@/utils/auth';
|
||||
import { logout } from '@/api/login';
|
||||
|
||||
// 定于仿真socket接口
|
||||
export function PassflowConnect(jl3dpass,deviceaction,toptrain,downtrain,routegroup) {
|
||||
@ -122,13 +121,9 @@ export function PassflowConnect(jl3dpass,deviceaction,toptrain,downtrain,routegr
|
||||
}
|
||||
}
|
||||
}
|
||||
if(data.type == 'Simulation_Over'){
|
||||
logout(getToken()).then(() => {
|
||||
this.$store.dispatch('LogOut').then(() => {
|
||||
location.reload();
|
||||
});
|
||||
}).catch(error => {
|
||||
|
||||
if(data.type == 'Simulation_Over') {
|
||||
this.$store.dispatch('LogOut').then(() => {
|
||||
location.reload();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
@ -161,11 +161,13 @@ const user = {
|
||||
commit('CLEAR_AUTO_PARAMS');
|
||||
const token = getToken();
|
||||
return new Promise((resolve, reject) => {
|
||||
dispatch('FedLogOut').then(resp => {
|
||||
logout(token).then(() => {
|
||||
resolve();
|
||||
}).catch(error => {
|
||||
reject(error);
|
||||
dispatch('disconnect').then(()=>{
|
||||
dispatch('FedLogOut').then(resp => {
|
||||
logout(token).then(() => {
|
||||
resolve();
|
||||
}).catch(error => {
|
||||
reject(error);
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
|
@ -60,8 +60,6 @@ import DriveMmi from '@/views/jlmap3d/drive/sceneview/mmiview';
|
||||
import DriveTms from '@/views/jlmap3d/drive/sceneview/tmsview';
|
||||
import DriveControl from '@/views/jlmap3d/drive/drivecontrol/drivecontrol';
|
||||
|
||||
import { getToken } from '@/utils/auth';
|
||||
import { logout } from '@/api/login';
|
||||
var train;
|
||||
export default {
|
||||
name: 'Jl3dDrive',
|
||||
@ -246,12 +244,8 @@ export default {
|
||||
|
||||
back() {
|
||||
if(this.$route.query.type == "DRIVE"){
|
||||
logout(getToken()).then(() => {
|
||||
this.$store.dispatch('LogOut').then(() => {
|
||||
location.reload();
|
||||
});
|
||||
}).catch(error => {
|
||||
|
||||
this.$store.dispatch('LogOut').then(() => {
|
||||
location.reload();
|
||||
});
|
||||
}else{
|
||||
this.$emit('showdriving');
|
||||
|
Loading…
Reference in New Issue
Block a user