bzkf3 2 years ago
parent
commit
ae1d98fc4c
4 changed files with 7 additions and 19 deletions
  1. 1 1
      index.html
  2. 3 1
      src/components/rtc-dialog/index.vue
  3. 1 1
      src/main.ts
  4. 2 16
      src/pages/student/home.vue

+ 1 - 1
index.html

@@ -6,7 +6,7 @@
     <title>当阳市义务教育志愿辅导平台</title>
     <title>当阳市义务教育志愿辅导平台</title>
   </head>
   </head>
   <body>
   <body>
-    <div id="app"></div>
+    <div id="appx"></div>
     <script src="/config.js"></script>
     <script src="/config.js"></script>
     <script type="module" src="/src/main.ts"></script>
     <script type="module" src="/src/main.ts"></script>
   </body>
   </body>

+ 3 - 1
src/components/rtc-dialog/index.vue

@@ -10,7 +10,7 @@ import { socketSend } from '~/utils/ws';
 import { formatOffsetSec } from '~/utils/time';
 import { formatOffsetSec } from '~/utils/time';
 
 
 let offsetTimer: NodeJS.Timeout
 let offsetTimer: NodeJS.Timeout
-let offsetTime: number
+let offsetTime = $ref<number>(0)
 
 
 const emits = defineEmits<{
 const emits = defineEmits<{
   (event: 'update-info', info: Partial<type_dyaw_xlfw_zxhd_log>, isUpdate?: boolean): void;
   (event: 'update-info', info: Partial<type_dyaw_xlfw_zxhd_log>, isUpdate?: boolean): void;
@@ -100,6 +100,7 @@ defineExpose({
         if (mode === 'video')
         if (mode === 'video')
           await rtcInstance.client!.publish(rtcInstance.localVideoTrack!);
           await rtcInstance.client!.publish(rtcInstance.localVideoTrack!);
         currentChatStatus = CHAT_STATUS.CHATING
         currentChatStatus = CHAT_STATUS.CHATING
+        offsetTime = 0
         offsetTimer = setInterval(() => {
         offsetTimer = setInterval(() => {
           offsetTime = (offsetTime as number + 1)
           offsetTime = (offsetTime as number + 1)
         }, 1000)
         }, 1000)
@@ -331,6 +332,7 @@ async function handleAudioChatAccept() {
     fullSendData
     fullSendData
   })
   })
   currentChatStatus = CHAT_STATUS.CHATING
   currentChatStatus = CHAT_STATUS.CHATING
+  offsetTime = 0
   offsetTimer = setInterval(() => {
   offsetTimer = setInterval(() => {
     offsetTime = (offsetTime as number + 1)
     offsetTime = (offsetTime as number + 1)
   }, 1000)
   }, 1000)

+ 1 - 1
src/main.ts

@@ -7,4 +7,4 @@ import router from './router/index'
 import 'element-plus/es/components/message/style/css'
 import 'element-plus/es/components/message/style/css'
 import 'element-plus/es/components/message-box/style/css'
 import 'element-plus/es/components/message-box/style/css'
 
 
-createApp(App).use(router).mount('#app')
+createApp(App).use(router).mount('#appx')

+ 2 - 16
src/pages/student/home.vue

@@ -11,22 +11,7 @@ const teacherList = (await request({
     dxpp_date: Date.now()
     dxpp_date: Date.now()
   }
   }
 })).data?.page_data
 })).data?.page_data
-// const teacherList = $ref([
-//   {
-//     user_id: '213595',
-//     dxp_user_realname: 'lwteacher2',
-//     dxp_user_avatar: 'https://openapi.dev.bozedu.net/template/default/static/img/avatar_teacher_middle.png',
-//     "dxp_jj": "我真的是简介",
-//     "dxp_user_phone": "18876564587",
-//   },
-//   {
-//     user_id: '213596',
-//     dxp_user_realname: 'lwteacher3',
-//     dxp_user_avatar: 'https://openapi.dev.bozedu.net/template/default/static/img/avatar_teacher_middle.png',
-//     "dxp_jj": "我真的是简介",
-//     "dxp_user_phone": "18876564587",
-//   },
-// ])
+
 </script>
 </script>
 
 
 <template>
 <template>
@@ -36,6 +21,7 @@ const teacherList = (await request({
     </div>
     </div>
     <div
     <div
       class="w-400px h-full overflow-y-auto flex flex-col items-center space-y-4 py-4 scrollbar scrollbar-thin scrollbar-thumb-rounded-md scrollbar-thumb-gray-200 scrollbar-track-transparent">
       class="w-400px h-full overflow-y-auto flex flex-col items-center space-y-4 py-4 scrollbar scrollbar-thin scrollbar-thumb-rounded-md scrollbar-thumb-gray-200 scrollbar-track-transparent">
+      <el-empty v-if="!teacherList?.length" description="今天暂无排版老师"></el-empty>
       <teacher-card v-for="item in teacherList" class="flex-none" :d="item"></teacher-card>
       <teacher-card v-for="item in teacherList" class="flex-none" :d="item"></teacher-card>
     </div>
     </div>
   </div>
   </div>