From d0d825e09ffdb95e9c4edcc44eeff08c4b2a9c23 Mon Sep 17 00:00:00 2001
From: luohairen <3399054449@qq.com>
Date: 星期四, 07 十一月 2024 15:53:22 +0800
Subject: [PATCH] 完成教师端,考试列表展示

---
 src/views/meet/index.vue |   21 ++++++++++++++++++---
 1 files changed, 18 insertions(+), 3 deletions(-)

diff --git a/src/views/meet/index.vue b/src/views/meet/index.vue
index 0156789..6fef657 100644
--- a/src/views/meet/index.vue
+++ b/src/views/meet/index.vue
@@ -51,6 +51,7 @@
 
 <script>
 import { getStudentList } from '@/api/meet'
+import Cookies from 'js-cookie'
 
 export default {
   data () {
@@ -81,15 +82,27 @@
   methods: {
     muteEveryone () {
       this.jitsiApi.executeCommand('muteEveryone', 'audio')
+      const h = this.$createElement;
+
+      this.$notify({
+        title: '鎻愮ず',
+        message: h('i', { style: 'color: teal'}, '宸插叏浣撶闊�')
+      });
     },
     videoEveryone () {
       this.jitsiApi.executeCommand('muteEveryone', 'video')
+      const h = this.$createElement;
+
+      this.$notify({
+        title: '鎻愮ず',
+        message: h('i', { style: 'color: teal'}, '宸插叧闂叏浣撹棰�')
+      });
     },
     handleCommand (command) {
       this.sendMessage(JSON.stringify(command))
     },
     initWebSocket () {
-      this.ws = new WebSocket('ws://127.0.0.1:8000/websocket/' + 1)
+      this.ws = new WebSocket('wss://www.kgmeet.com:18080/websocket/' + JSON.parse(Cookies.get('adminUserInfo')).id)
       let ws = this.ws
       ws.onopen = () => {
         console.log('WebSocket 杩炴帴鎴愬姛')
@@ -265,13 +278,15 @@
     this.jitsiApi.addListener('readyToClose', () => {
       window.close()
     })
+    // 鍒濆鍖�
+    this.initWebSocket()
     // 姣忎笁绉掓洿瀛﹀憳鍦ㄧ嚎鐘舵��
     this.intervalId = setInterval(() => {
       this.getRoomInfo()
+      // 鍙戦�佸績璺虫暟鎹�
+      this.ws.send('ping')
     }, 2500)
 
-    // 鍒濆鍖�
-    this.initWebSocket()
   },
   beforeDestroy () {
     // 娓呴櫎瀹氭椂鍣紝閬垮厤鍐呭瓨娉勬紡

--
Gitblit v1.8.0