yz3456
2024-07-29 fae5df1d3f1ae875ac546cacfb4744b2e8230ca2
ruoyi-ui/src/views/meeting/Home.vue
@@ -91,8 +91,33 @@
    };
  },
  created() {
    this.getUser();
    this.getRoomId();
    this.getUser();
  },
computed: {
    isStartExercise() {
      let roomId = this.roomId
      let userId = this.userId;
      return { roomId, userId };
    }
},
watch: {
    isStartExercise: {
      immediate: true,
      handler(n) {
        if (n.roomId && n.userId) {
          // 判断这两个值同时存在
          // alert(this.userId)
          // alert(this.roomId)
          this.loading = false;
          this.showComponent = true;
        }
      },
    }
  },
  methods: {
    // 获取房间号
@@ -108,11 +133,17 @@
        this.user = response.data;
        this.userId = this.user.nickName
        // alert(this.userId)
        // alert(this.roomId)
      });
      setTimeout(() => {
        this.loading = false;
        this.showComponent = true;
      }, 3000);
      // setTimeout(() => {
      //   this.loading = false;
      //   this.showComponent = true;
      // }, 5000);
      // if(this.userId !== '' && this.roomId !== ''){
      //   alert(123)
      //   this.loading = false;
      //   this.showComponent = true;
      // }
    },
    handleValueChange(value, key) {