diff --git a/src/views/demonstration/deomonList/index.vue b/src/views/demonstration/deomonList/index.vue index 745d8fa47..9da81c9be 100644 --- a/src/views/demonstration/deomonList/index.vue +++ b/src/views/demonstration/deomonList/index.vue @@ -103,16 +103,20 @@ export default { }, async handleJoin() { - await getjointTraining(this.group); - if (this.state == '02') { - launchFullscreen(); - await putJointTrainingSimulationEntrance(this.group); - const rest = await getPublishMapInfo(this.mapId); - const query = { skinStyle: rest.data.skinStyle, mapId: this.mapId, group: this.group }; - this.$router.push({ path: `/jointTraining`, query: query }); - } else if (this.state == '01') { - const query = { group: this.group }; - this.$router.push({ path: `/trainroom`, query: query }); + if (this.group) { + await getjointTraining(this.group); + if (this.state == '02') { + launchFullscreen(); + await putJointTrainingSimulationEntrance(this.group); + const rest = await getPublishMapInfo(this.mapId); + const query = { skinStyle: rest.data.skinStyle, mapId: this.mapId, group: this.group }; + this.$router.push({ path: `/jointTraining`, query: query }); + } else if (this.state == '01') { + const query = { group: this.group }; + this.$router.push({ path: `/trainroom`, query: query }); + } + } else { + this.$message.info('您没有选择房间'); } } }