diff --git a/src/views/thirdLogin/cgyLogin.vue b/src/views/thirdLogin/cgyLogin.vue index d4a39ff87..69f83fdf6 100644 --- a/src/views/thirdLogin/cgyLogin.vue +++ b/src/views/thirdLogin/cgyLogin.vue @@ -10,6 +10,8 @@ import { cgyThirdLogin } from '@/api/management/user'; import { setToken } from '@/utils/auth'; import { createSimulation } from '@/api/simulation'; import { launchFullscreen } from '@/utils/screen'; +import { getMapFunctioById } from '@/api/trainingPlatform'; +import { getPublishMapInfo } from '@/api/jmap/map'; export default { name:'CgyLogin', @@ -58,26 +60,16 @@ export default { } }, methods:{ - enterSimulation() { + async enterSimulation() { const query = { - third: true + third: true, + query: 'cgy' }; - if (this.$route.query.type === 'loc') { - query.lineCode = '02'; - query.mapId = '124'; - query.simType = 'METRO'; - query.project = 'cgy'; - } else if (this.$route.query.type === 'datie') { - query.lineCode = '16'; - query.mapId = '157'; - query.simType = 'RAILWAY'; - query.project = 'cgy'; - } else if (this.$route.query.type === 'drts') { - query.lineCode = '13'; - query.mapId = '78'; - query.simType = 'METRO'; - query.project = 'cgy'; - } + const resp = await getMapFunctioById(this.$route.query.systemId); + query.mapId = resp.data.mapId; + query.simType = resp.data.simType; + const resp1 = await getPublishMapInfo(resp.data.mapId); + query.lineCode = resp1.data.lineCode; createSimulation(this.$route.query.systemId).then(resp => { query.group = resp.data; this.$router.replace({ path: `/display/demon`, query: query });