From 9c376c3c54702b872ad690055c7bac16b64e817c Mon Sep 17 00:00:00 2001 From: yz3456 <2753272399@qq.com> Date: 星期一, 01 七月 2024 18:13:23 +0800 Subject: [PATCH] 完成了直播roomId的添加,完成了家庭小医生分享模块 --- ruoyi-ui/src/views/meeting/Home.vue | 62 ++++++++++++++++++++++++------ 1 files changed, 49 insertions(+), 13 deletions(-) diff --git a/ruoyi-ui/src/views/meeting/Home.vue b/ruoyi-ui/src/views/meeting/Home.vue index 467ac69..9144f00 100644 --- a/ruoyi-ui/src/views/meeting/Home.vue +++ b/ruoyi-ui/src/views/meeting/Home.vue @@ -12,25 +12,25 @@ <!-- quick demo 浣跨敤鎸囧紩 --> <!-- <comp-guidance></comp-guidance> --> <!-- sdkAppId銆乻ecretKey銆乽serId銆乺oomId 鍙傛暟杈撳叆鍖哄煙 --> - <p class="label">{{ $t('鍩烘湰淇℃伅') }}</p> - <div class="param-container" :class="$isMobile && 'param-container-mobile'"> - <comp-info-input + <!-- <p class="label">{{ $t('鍩烘湰淇℃伅') }}</p> --> + <div class="param-container" :class="$isMobile && 'param-container-mobile'"> +<!-- <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,13 @@ 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' + //瀵煎叆鎺ュ彛鍑芥暟 --鎺ュソ浜� + import { getWebcastInfo } from "@/api/meeting/index"; export default { name: '6666', components: { @@ -70,15 +78,43 @@ }, data() { return { - sdkAppId: 0, - secretKey: '', + user:{}, + showComponent: false, + loading: true, + // 浼氳鍩烘湰淇℃伅 + sdkAppId: 1600032250, + secretKey: 'abedcf588654e18888eff65dfdfde240a882c611710c6ed10e1044fb44818a89', userId: '', - roomId: 0, + roomId: '', cameraId: '', microphoneId: '', }; }, + created() { + this.getUser(); + this.getRoomId(); + }, methods: { + // 鑾峰彇鎴块棿鍙� + getRoomId(){ + const id = this.$route.params && this.$route.params.id; + getWebcastInfo(id).then(response => { + this.roomId = response.data.roomId + }) + }, + // 鑾峰彇鐢ㄦ埛鍚� + 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; }, -- Gitblit v1.9.1