panhui 3 年 前
コミット
92d6c07810
1 ファイル変更12 行追加0 行削除
  1. 12 0
      src/views/Room.vue

+ 12 - 0
src/views/Room.vue

@@ -262,6 +262,18 @@ export default {
                     this.info = res;
                     if (!this.isFull && !this.isJoin && res.status === 'WAITING') {
                         this.$refs.join.init();
+                    } else if (!this.isJoin && this.isFull) {
+                        this.$dialog
+                            .alert({ title: '匹配成功', message: '房间已经满员啦,选择其他房间加入吧!' })
+                            .then(() => {
+                                this.$router.go(-1);
+                            });
+                    } else if (!this.isJoin && res.status !== 'WAITING') {
+                        this.$dialog
+                            .alert({ title: '提示', message: '比赛已经开始了,选择其他房间加入吧!' })
+                            .then(() => {
+                                this.$router.go(-1);
+                            });
                     }
                 })
                 .catch(e => {