yz3456
2024-06-28 7b22a877944f1219d406105139ecf318584dbb6d
ruoyi-ui/src/views/meeting/Home.vue
@@ -12,25 +12,25 @@
      <!-- quick demo 使用指引 -->
     <!-- <comp-guidance></comp-guidance> -->
      <!-- sdkAppId、secretKey、userId、roomId 参数输入区域 -->
     <p class="label">{{ $t('基本信息') }}</p>
     <!-- <p class="label">{{ $t('基本信息') }}</p> -->
      <div class="param-container" :class="$isMobile && 'param-container-mobile'">
        <comp-info-input
<!--        <comp-info-input
          label="sdkAppId" type="number" @change="handleValueChange($event, 'sdkAppId')"></comp-info-input>
        <comp-info-input
          label="secretKey" @change="handleValueChange($event, 'secretKey')"></comp-info-input>
        <comp-info-input
          label="用户名" @change="handleValueChange($event, 'userId')"></comp-info-input>
        <comp-info-input
          label="房间号" type="number" @change="handleValueChange($event, 'roomId')"></comp-info-input>
          label="secretKey" @change="handleValueChange($event, 'secretKey')"></comp-info-input> -->
<!--        <comp-info-input
          label="用户名" @change="handleValueChange($event, 'userId')"></comp-info-input> -->
<!--        <comp-info-input
          label="房间号" type="number" @change="handleValueChange($event, 'roomId')"></comp-info-input> -->
      </div>
     <div class='alert'>
<!--     <div class='alert'>
        <el-alert
          type="error"
          :closable="false"
        >
          <span>{{ $t("Alert")}} <a target="_blank" :href="$t('Url')">{{ $t("Click")}}</a></span>
        </el-alert>
      </div>
      </div> -->
     <!-- 设备选择区域 -->
      <p class="label">{{ $t('会议设置') }}</p>
      <div class="param-container" :class="$isMobile && 'param-container-mobile'">
@@ -40,13 +40,16 @@
          deviceType="microphone" @change="handleValueChange($event, 'microphoneId')"></comp-device-select>
      </div>
      <!-- rtc 房间 -->
      <div v-if="showComponent" v-loading="loading">
     <comp-room
        ref="child"
        :sdkAppId="Number(sdkAppId)"
        :secretKey="secretKey"
        :userId="userId"
        :roomId="Number(roomId)"
        :cameraId="cameraId"
        :microphoneId="microphoneId"></comp-room>
        </div>
   </div>
  </div>
</template>
@@ -57,8 +60,11 @@
import compInfoInput from '@/components/comp-info-input.vue';
import compDeviceSelect from '@/components/comp-device-select.vue';
import compRoom from '@/components/comp-room.vue';
// const compRoom = () => import('@/components/comp-room.vue');
// import { clearUrlParam } from '@/utils/utils';
import { getIndividualList } from "@/api/self";
import { Loading } from 'element-ui'
export default {
  name: '6666',
  components: {
@@ -70,15 +76,36 @@
  },
  data() {
    return {
      sdkAppId: 0,
      secretKey: '',
      user:{},
      showComponent: false,
      loading: true,
      // 会议基本信息
      sdkAppId: 1600032250,
      secretKey: 'abedcf588654e18888eff65dfdfde240a882c611710c6ed10e1044fb44818a89',
      userId: '',
      roomId: 0,
      roomId: 123,
      cameraId: '',
      microphoneId: '',
    };
  },
  created() {
    this.getUser();
  },
  methods: {
    // 获取用户名
    getUser(id) {
      getIndividualList().then(response => {
        this.user = response.data;
        this.userId = this.user.nickName
        // alert(this.userId)
      });
      setTimeout(() => {
        this.loading = false;
        this.showComponent = true;
      }, 3000);
    },
    handleValueChange(value, key) {
      this[key] = value;
    },