diff --git a/.env.production b/.env.production index 07c0c59..14efc50 100644 --- a/.env.production +++ b/.env.production @@ -22,7 +22,7 @@ VITE_GLOB_API_URL=/jeecg-boot VITE_GLOB_DOMAIN_URL=http://bylwcs.nenu.edu.cn/jeecg-boot #RTC服务器地址 -VITE_GLOB_RTC_SERVER = http://bylwcs.nenu.edu.cn/RTCServer +VITE_GLOB_RTC_SERVER = http://bylwcs.nenu.edu.cn:8081 # 接口父路径前缀 VITE_GLOB_API_URL_PREFIX= diff --git a/src/views/kc/jiaoshi/index.vue b/src/views/kc/jiaoshi/index.vue index a13560c..0b58673 100644 --- a/src/views/kc/jiaoshi/index.vue +++ b/src/views/kc/jiaoshi/index.vue @@ -36,9 +36,9 @@
- - - + + +
@@ -95,6 +95,7 @@ const _document = window.document; const leftList = ref([]); const currentItem = ref({}); const topWidth = ref('0'); +const mainVideoCardBoxTitle = ref(''); const videoOption = reactive({ // width: '800', //播放器高度 @@ -227,8 +228,14 @@ function calcOtherVideo() :any{ function switchVideoToMain(){ console.log(`🚀 ~ file: index.vue:188 ~ switchVideoToMain ~ switchVideoToMain: 自动切换第一个子界面到主界面`); nextTick(() => { + let firstBox = document.querySelector('.videoMax'); + let titleBox = firstBox?.querySelector('.ant-card-head-title'); + let title = titleBox?.textContent; + + mainVideoCardBoxTitle.value = title; + let mainVideo = document.querySelector('#mainVideo'); - let firstVideo = document.querySelector('.videoMax video'); + let firstVideo = firstBox.querySelector('video'); mainVideo.srcObject = firstVideo.srcObject mainVideo.play(); }); @@ -238,6 +245,13 @@ function bVideoClick(e){ console.log(`bVideoClick: 切换至主界面`); let mainVideo = document.querySelector('#mainVideo'); let currentVideo = e.srcElement; + + let title = currentVideo?.parentElement?.parentElement?.querySelector('.ant-card-head-title')?.textContent + mainVideoCardBoxTitle.value = title; + console.log(`🚀 --------------------------------------------------------------------🚀`); + console.log(`🚀 ~ file: index.vue:238 ~ bVideoClick ~ currentVideo:`, currentVideo); + console.log(`🚀 --------------------------------------------------------------------🚀`); + mainVideo.srcObject = currentVideo.srcObject mainVideo.play(); }