瀏覽代碼

Merge branch 'master' of http://git.dayaedu.com/lex/dy-admin-live

wolyshaw 3 年之前
父節點
當前提交
1cc1a3b304

File diff suppressed because it is too large
+ 0 - 0
dist/assets/index-legacy.25e8c249.js


File diff suppressed because it is too large
+ 0 - 0
dist/assets/index-legacy.411bb6fe.js


File diff suppressed because it is too large
+ 0 - 0
dist/assets/index-legacy.4de585d3.js


File diff suppressed because it is too large
+ 0 - 0
dist/assets/index-legacy.9cfbed1e.js


File diff suppressed because it is too large
+ 0 - 0
dist/assets/index-legacy.e890db01.js


File diff suppressed because it is too large
+ 0 - 0
dist/assets/index.03b2c305.css


File diff suppressed because it is too large
+ 0 - 0
dist/assets/index.4d543e6e.js


File diff suppressed because it is too large
+ 0 - 0
dist/assets/index.6e4cfb4f.js


+ 1 - 1
dist/assets/index.74fefb88.js → dist/assets/index.7c98fc8f.js

@@ -1 +1 @@
-import{d as i,f as s,l as t}from"./vendor.3d4ad280.js";const e="_wscnHttp404Container_1v1ex_1",c="_wscnHttp404_1v1ex_1",u="_pic404_1v1ex_13",n="_pic404__parent_1v1ex_19",o="_pic404__child_1v1ex_22",a="_left_1v1ex_25",d="_cloudLeft_1v1ex_1",r="_mid_1v1ex_36",h="_cloudMid_1v1ex_1",p="_right_1v1ex_47",v="_cloudRight_1v1ex_1",b="_bullshit_1v1ex_124",x="_bullshit__oops_1v1ex_132",m="_slideUp_1v1ex_1",f="_bullshit__headline_1v1ex_143",g="_bullshit__info_1v1ex_155",H="_bullshit__returnHome_1v1ex_166";var _={wscnHttp404Container:e,wscnHttp404:c,pic404:u,pic404__parent:n,pic404__child:o,left:a,cloudLeft:d,mid:r,cloudMid:h,right:p,cloudRight:v,bullshit:b,bullshit__oops:x,slideUp:m,bullshit__headline:f,bullshit__info:g,bullshit__returnHome:H},F="./assets/404.538aa4d7.png",l="./assets/404_cloud.98e7ac66.png",w=i({name:"Page404",data(){return{message:"\u5F88\u62B1\u6B49\uFF0C\u4F60\u8BBF\u95EE\u7684\u9875\u9762\u4E0D\u5B58\u5728"}},render(){return s("div",{class:_.wscnHttp404Container},[s("div",{class:_.wscnHttp404},[s("div",{class:_.pic404},[s("img",{class:_.pic404__parent,src:F,alt:"404"},null),s("img",{class:[_.pic404__child,_.left],src:l,alt:"404"},null),s("img",{class:[_.pic404__child,_.mid],src:l,alt:"404"},null),s("img",{class:[_.pic404__child,_.right],src:l,alt:"404"},null)]),s("div",{class:_.bullshit},[s("div",{class:_.bullshit__oops},[t("OOPS!")]),s("div",{class:_.bullshit__headline},[this.message]),s("div",{class:_.bullshit__info},[t("\u8BF7\u68C0\u67E5\u60A8\u8F93\u5165\u7684\u7F51\u5740\u662F\u5426\u6B63\u786E\uFF0C\u6216\u8005\u70B9\u51FB\u94FE\u63A5\u7EE7\u7EED\u6D4F\u89C8")]),s("a",{href:"",class:_.bullshit__returnHome},[t("\u8FD4\u56DE\u9996\u9875")])])])])}});export{w as default};
+import{d as i,f as s,l as t}from"./vendor.b0ed3cca.js";const e="_wscnHttp404Container_1v1ex_1",c="_wscnHttp404_1v1ex_1",u="_pic404_1v1ex_13",n="_pic404__parent_1v1ex_19",o="_pic404__child_1v1ex_22",a="_left_1v1ex_25",d="_cloudLeft_1v1ex_1",r="_mid_1v1ex_36",h="_cloudMid_1v1ex_1",p="_right_1v1ex_47",v="_cloudRight_1v1ex_1",b="_bullshit_1v1ex_124",x="_bullshit__oops_1v1ex_132",m="_slideUp_1v1ex_1",f="_bullshit__headline_1v1ex_143",g="_bullshit__info_1v1ex_155",H="_bullshit__returnHome_1v1ex_166";var _={wscnHttp404Container:e,wscnHttp404:c,pic404:u,pic404__parent:n,pic404__child:o,left:a,cloudLeft:d,mid:r,cloudMid:h,right:p,cloudRight:v,bullshit:b,bullshit__oops:x,slideUp:m,bullshit__headline:f,bullshit__info:g,bullshit__returnHome:H},F="./assets/404.538aa4d7.png",l="./assets/404_cloud.98e7ac66.png",w=i({name:"Page404",data(){return{message:"\u5F88\u62B1\u6B49\uFF0C\u4F60\u8BBF\u95EE\u7684\u9875\u9762\u4E0D\u5B58\u5728"}},render(){return s("div",{class:_.wscnHttp404Container},[s("div",{class:_.wscnHttp404},[s("div",{class:_.pic404},[s("img",{class:_.pic404__parent,src:F,alt:"404"},null),s("img",{class:[_.pic404__child,_.left],src:l,alt:"404"},null),s("img",{class:[_.pic404__child,_.mid],src:l,alt:"404"},null),s("img",{class:[_.pic404__child,_.right],src:l,alt:"404"},null)]),s("div",{class:_.bullshit},[s("div",{class:_.bullshit__oops},[t("OOPS!")]),s("div",{class:_.bullshit__headline},[this.message]),s("div",{class:_.bullshit__info},[t("\u8BF7\u68C0\u67E5\u60A8\u8F93\u5165\u7684\u7F51\u5740\u662F\u5426\u6B63\u786E\uFF0C\u6216\u8005\u70B9\u51FB\u94FE\u63A5\u7EE7\u7EED\u6D4F\u89C8")]),s("a",{href:"",class:_.bullshit__returnHome},[t("\u8FD4\u56DE\u9996\u9875")])])])])}});export{w as default};

File diff suppressed because it is too large
+ 0 - 0
dist/assets/index.b7bcfd90.js


File diff suppressed because it is too large
+ 0 - 0
dist/assets/index.d14810a8.js


File diff suppressed because it is too large
+ 0 - 0
dist/assets/index.d7657bba.css


File diff suppressed because it is too large
+ 0 - 0
dist/assets/index.f1cebeaa.js


File diff suppressed because it is too large
+ 0 - 0
dist/assets/index.fb6968e4.css


File diff suppressed because it is too large
+ 0 - 0
dist/assets/vendor-legacy.2568dd0f.js


File diff suppressed because it is too large
+ 0 - 0
dist/assets/vendor.b0ed3cca.js


+ 4 - 4
dist/index.html

@@ -5,9 +5,9 @@
     <link rel="icon" href="./favicon.ico" />
     <meta name="viewport" content="width=device-width, initial-scale=1.0" />
     <title>管乐迷</title>
-    <script type="module" crossorigin src="./assets/index.4d543e6e.js"></script>
-    <link rel="modulepreload" href="./assets/vendor.3d4ad280.js">
-    <link rel="stylesheet" href="./assets/index.0cb0804c.css">
+    <script type="module" crossorigin src="./assets/index.d14810a8.js"></script>
+    <link rel="modulepreload" href="./assets/vendor.b0ed3cca.js">
+    <link rel="stylesheet" href="./assets/index.fb6968e4.css">
   <link rel="manifest" href="./manifest.webmanifest"><script src="./registerSW.js"></script>  <script type="module">!function(){try{new Function("m","return import(m)")}catch(o){console.warn("vite: loading legacy build because dynamic import is unsupported, syntax error above should be ignored");var e=document.getElementById("vite-legacy-polyfill"),n=document.createElement("script");n.src=e.src,n.onload=function(){System.import(document.getElementById('vite-legacy-entry').getAttribute('data-src'))},document.body.appendChild(n)}}();</script>
 </head>
   <body>
@@ -15,6 +15,6 @@
     
     <script nomodule>!function(){var e=document,t=e.createElement("script");if(!("noModule"in t)&&"onbeforeload"in t){var n=!1;e.addEventListener("beforeload",(function(e){if(e.target===t)n=!0;else if(!e.target.hasAttribute("nomodule")||!n)return;e.preventDefault()}),!0),t.type="module",t.src=".",e.head.appendChild(t),t.remove()}}();</script>
     <script nomodule id="vite-legacy-polyfill" src="./assets/polyfills-legacy.55e2facf.js"></script>
-    <script nomodule id="vite-legacy-entry" data-src="./assets/index-legacy.02b4b6c8.js">System.import(document.getElementById('vite-legacy-entry').getAttribute('data-src'))</script>
+    <script nomodule id="vite-legacy-entry" data-src="./assets/index-legacy.9cfbed1e.js">System.import(document.getElementById('vite-legacy-entry').getAttribute('data-src'))</script>
   </body>
 </html>

+ 1 - 1
dist/sw.js

@@ -1 +1 @@
-if(!self.define){let e,s={};const i=(i,n)=>(i=new URL(i+".js",n).href,s[i]||new Promise((s=>{if("document"in self){const e=document.createElement("script");e.src=i,e.onload=s,document.head.appendChild(e)}else e=i,importScripts(i),s()})).then((()=>{let e=s[i];if(!e)throw new Error(`Module ${i} didn’t register its module`);return e})));self.define=(n,l)=>{const r=e||("document"in self?document.currentScript.src:"")||location.href;if(s[r])return;let u={};const c=e=>i(e,r),o={module:{uri:r},exports:u,require:c};s[r]=Promise.all(n.map((e=>o[e]||c(e)))).then((e=>(l(...e),u)))}}define(["./workbox-3e4da89b"],(function(e){"use strict";self.addEventListener("message",(e=>{e.data&&"SKIP_WAITING"===e.data.type&&self.skipWaiting()})),e.precacheAndRoute([{url:"assets/index-legacy.02b4b6c8.js",revision:null},{url:"assets/index-legacy.25e8c249.js",revision:null},{url:"assets/index-legacy.52ac8248.js",revision:null},{url:"assets/index-legacy.ff4bc09d.js",revision:null},{url:"assets/index.0cb0804c.css",revision:null},{url:"assets/index.49150f4c.css",revision:null},{url:"assets/index.4d543e6e.js",revision:null},{url:"assets/index.526ec19c.css",revision:null},{url:"assets/index.74fefb88.js",revision:null},{url:"assets/index.b7bcfd90.js",revision:null},{url:"assets/index.d1e18e28.js",revision:null},{url:"assets/index.d7657bba.css",revision:null},{url:"assets/polyfills-legacy.55e2facf.js",revision:null},{url:"assets/vendor-legacy.a1955742.js",revision:null},{url:"assets/vendor.3d4ad280.js",revision:null},{url:"index.html",revision:"8bb8a8bc687c898dbce84783910aa34d"},{url:"registerSW.js",revision:"402b66900e731ca748771b6fc5e7a068"},{url:"./pwa-192x192.png",revision:"144ca4ef34624022115c42af32467546"},{url:"./pwa-512x512.png",revision:"20d9c073708b48a904cefb9dff19d953"},{url:"manifest.webmanifest",revision:"4ce737594a4ed2f47d75bd675ae58fc0"}],{}),e.cleanupOutdatedCaches(),e.registerRoute(new e.NavigationRoute(e.createHandlerBoundToURL("index.html")))}));
+if(!self.define){let e,s={};const i=(i,n)=>(i=new URL(i+".js",n).href,s[i]||new Promise((s=>{if("document"in self){const e=document.createElement("script");e.src=i,e.onload=s,document.head.appendChild(e)}else e=i,importScripts(i),s()})).then((()=>{let e=s[i];if(!e)throw new Error(`Module ${i} didn’t register its module`);return e})));self.define=(n,l)=>{const r=e||("document"in self?document.currentScript.src:"")||location.href;if(s[r])return;let u={};const c=e=>i(e,r),o={module:{uri:r},exports:u,require:c};s[r]=Promise.all(n.map((e=>o[e]||c(e)))).then((e=>(l(...e),u)))}}define(["./workbox-3e4da89b"],(function(e){"use strict";self.addEventListener("message",(e=>{e.data&&"SKIP_WAITING"===e.data.type&&self.skipWaiting()})),e.precacheAndRoute([{url:"assets/index-legacy.411bb6fe.js",revision:null},{url:"assets/index-legacy.4de585d3.js",revision:null},{url:"assets/index-legacy.9cfbed1e.js",revision:null},{url:"assets/index-legacy.e890db01.js",revision:null},{url:"assets/index.03b2c305.css",revision:null},{url:"assets/index.49150f4c.css",revision:null},{url:"assets/index.526ec19c.css",revision:null},{url:"assets/index.6e4cfb4f.js",revision:null},{url:"assets/index.7c98fc8f.js",revision:null},{url:"assets/index.d14810a8.js",revision:null},{url:"assets/index.f1cebeaa.js",revision:null},{url:"assets/index.fb6968e4.css",revision:null},{url:"assets/polyfills-legacy.55e2facf.js",revision:null},{url:"assets/vendor-legacy.2568dd0f.js",revision:null},{url:"assets/vendor.b0ed3cca.js",revision:null},{url:"index.html",revision:"fb1e625ea764354560c7ade638aa25c4"},{url:"registerSW.js",revision:"402b66900e731ca748771b6fc5e7a068"},{url:"./pwa-192x192.png",revision:"144ca4ef34624022115c42af32467546"},{url:"./pwa-512x512.png",revision:"20d9c073708b48a904cefb9dff19d953"},{url:"manifest.webmanifest",revision:"4ce737594a4ed2f47d75bd675ae58fc0"}],{}),e.cleanupOutdatedCaches(),e.registerRoute(new e.NavigationRoute(e.createHandlerBoundToURL("index.html")))}));

+ 5 - 3
src/components/live-broadcast/groupChat.tsx

@@ -1,5 +1,5 @@
 import { defineComponent, ref } from 'vue'
-import { ElButton, ElFormItem, ElForm, ElRadio, ElMessage, ElCheckboxGroup, ElCheckbox, ElInput } from 'element-plus'
+import { ElButton, ElFormItem, ElForm, ElRadio, ElMessage, ElCheckboxGroup, ElCheckbox, ElInput,ElEmpty } from 'element-plus'
 import { state } from '/src/state'
 import request from "/src/helpers/request";
 import { removeMedia } from './helpers'
@@ -68,7 +68,7 @@ export default defineComponent({
                         <ElButton type="danger" onClick={this.onReSet}>重置</ElButton>
                     </ElFormItem>
                 </ElForm>
-                <div class={styles.tableWrap}>
+                { this.tableList.length >0?        <div class={styles.tableWrap}>
                     <ElCheckboxGroup modelValue={this.checkList}>
                         {this.tableList.map((item: any) => {
                             return <div class={styles.cell} onClick={() => this.resectCheck(item.id)}>
@@ -83,7 +83,9 @@ export default defineComponent({
                         })}
 
                     </ElCheckboxGroup>
-                </div>
+                </div>:<ElEmpty description={'暂无群聊'}/>}
+         
+                
             </div>
         )
     }

+ 8 - 17
src/components/live-broadcast/share.tsx

@@ -8,6 +8,7 @@ import { toPng } from "html-to-image";
 import copy from "copy-to-clipboard";
 import GroupChat from './groupChat'
 import Preview from './preview'
+import { state } from '/src/state'
 const GroupChatRef: Ref<DefineComponent<{}, {}, any> | null> = ref(null)
 export default defineComponent({
     name: 'LiveBroadcastShare',
@@ -24,25 +25,14 @@ export default defineComponent({
                 roomTitle: '',
                 liveStartTime: '',
                 liveRemark: '',
-                roomUid: ''
+                roomUid: '',
+                speakerName:''
             },
             url: ''
         }
     },
     async mounted() {
-        let details: any = JSON.parse(sessionStorage.getItem('details') || '')
-        if (!details) {
-            const roomUid = sessionStorage.getItem('roomUid')
-            const details: any = await request.get('/api-web/imLiveBroadcastRoom/queryRoom', {
-                params: {
-                    roomUid: roomUid
-                }
-            })
-            sessionStorage.setItem('details', details.data)
-            this.detail = { ...details.data }
-        } else {
-            this.detail = { ...details }
-        }
+        this.detail = {...state.user}
         this.url = vaildStudentUrl() + `/#/liveClassTransfer?roomUid=${this.detail.roomUid}`;
     },
     methods: {
@@ -121,9 +111,10 @@ export default defineComponent({
                         <div class={styles.shareWrap}>
                             <h2>乐团老师邀请您参与直播课!</h2>
                             <h4>{this.detail.roomTitle}</h4>
-                            <p>直播时间:{this.detail.liveStartTime}</p>
-                            <p>直播内容:{this.detail.liveRemark}</p>
-                            <p>直播地址:{this.url}</p>
+                            <p>主讲人:{this.detail.speakerName}</p>
+                            <p>开播时间:{this.detail.liveStartTime}</p>
+                            <p>直播内容:{this.detail.liveRemark}</p>
+                            <p>直播地址:{this.url}</p>
                         </div>
                         <div class={styles.shareBtn} onClick={this.copyText}>复制分享内容</div>
                     </div> : null}

+ 9 - 0
src/components/live-message/index.module.less

@@ -38,6 +38,15 @@
     width: 20px;
     height: 20px;
   }
+  .point {
+    width: 8px;
+    height: 8px;
+    border-radius: 50%;
+    background-color: var(--live-time-status-background-color);
+    position: absolute;
+    right: -10px;
+    top: 5px;
+  }
   :global {
     .el-tabs__header {
       margin-bottom: 0;

+ 13 - 1
src/components/live-message/index.tsx

@@ -9,6 +9,7 @@ import ItemList from './item-list'
 import JoinModel from './model/join-model';
 import LookModel from './model/look-model';
 import MessageModel from './model/message-model';
+import runtimeModel, * as RuntimeModelUtils from '/src/components/live-message/model/runtime'
 
 
 type tabStatus = 'message' | 'join' | 'look'
@@ -20,6 +21,17 @@ export default defineComponent({
       modelIndex: 'message' as tabStatus,
     }
   },
+  computed: {
+    joinStatus() {
+      console.log(this.modelIndex)
+      let status = runtimeModel.joinTips
+      if(runtimeModel.joinTips && this.modelIndex === 'join') {
+        status = false
+        runtimeModel.joinTips = false
+      }
+      return status
+    }
+  },
   mounted() {
     runtime.likeCount = state.user?.likeNum || 0
   },
@@ -51,7 +63,7 @@ export default defineComponent({
           <ElTabPane
             // @ts-ignore
             vSlots={{
-              label: () => <span style={{ display: 'flex', alignItems: 'center' }}><SvgIcon name="message-evenEtc" color={this.modelIndex === 'join' ? '#00FFF0' : '#fff'} class={styles.tabIcon} />连麦</span>
+              label: () => <span style={{ display: 'flex', alignItems: 'center', position: 'relative' }}><SvgIcon name="message-evenEtc" color={this.modelIndex === 'join' ? '#00FFF0' : '#fff'} class={styles.tabIcon} />连麦 {this.joinStatus ? <i class={styles.point} ></i> : null}</span>
             }} name="join"></ElTabPane>
           <ElTabPane
             // @ts-ignore

+ 1 - 1
src/components/live-message/model/join-model.tsx

@@ -51,7 +51,7 @@ export default defineComponent({
       RuntimeModelUtils.removeLook(value.userId)
     },
     onSeatApply(evt: any) {
-      console.log(evt, 'onSeatApply joinModel')
+      // console.log(evt, 'onSeatApply joinModel')
       if (Array.isArray(evt)) {
         for (const id of evt) {
           console.log('onSeatApply', id)

+ 16 - 30
src/components/live-message/model/look-model.tsx

@@ -32,8 +32,8 @@ export default defineComponent({
       return count
     },
   },
-  mounted() {
-    // this._init()
+  async mounted() {
+    await this._init()
     this.loadingLook = true
     event.on(LIVE_EVENT_MESSAGE["RC:Chatroom:Welcome"], this.onWelcome);
     setTimeout(() => {
@@ -49,39 +49,25 @@ export default defineComponent({
             roomUid: roomUid,
           }
         })
-        console.log('_init', res)
-      } catch {
-        //
-      }
-    },
-    onSeatResponse(value: any) {
-      console.log(value, 'onSeatResponse')
-      if(value.type == 3) {
-        runtimeModel.lookList.forEach((item: any) => {
-          if(item.id == value.audienceId) {
-            item.type = 1
+        const resList = res.data
+        resList.forEach((item: any) => {
+          // 判断是已经,存在学生
+          if(!runtimeModel.lookList[item.userId]) {
+            runtimeModel.lookList[item.userId] = {
+              id: item.userId,
+              name: item.userName,
+              type: 3,
+              userRoomType: 1,
+              time: dayjs().format('YYYY-MM-DD HH:mm:ss'),
+            }
           }
         })
-        // 判断是否是同一个人
-        let isExist = runtimeModel.joinList[value.audienceId]
-        console.log(runtimeModel.joinList)
-        if (!isExist) {
-          RuntimeModelUtils.addJoin(value.audienceId, {
-            id: value.audienceId,
-            name: value.audienceName,
-            audienceId: value.audienceId,
-            audienceName: value.audienceName,
-            teacherId: state.user?.id,
-            teacherName: state.user?.speakerName,
-            type: 1
-          })
-        } else {
-          runtimeModel.joinList[value.audienceId].type = 1
-        }
+      } catch {
+        //
       }
     },
     onWelcome(value: any) {
-      console.log(value)
+      // console.log(value)
       if (value && value.user) {
         const sendTime = dayjs(value.$EventMessage.sentTime || new Date()).format('HH:mm:ss')
         let tempObj = {

+ 2 - 0
src/components/live-message/model/runtime.ts

@@ -3,6 +3,7 @@ import { reactive, ref } from 'vue'
 const runtime = reactive({
   messageList: [] as Array<any>,
   joinList: {} as { [key: string]: any },
+  joinTips: false as boolean, // 是否显示加入提示
   lookList: {} as { [key: string]: any },
 })
 
@@ -33,6 +34,7 @@ export const addMessage = (message: Message) => {
  * 添加上麦消息
  */
 export const addJoin = (key: string, message: Message) => {
+  runtime.joinTips = true
   runtime.joinList[key] = message
 }
 /**

+ 1 - 0
src/helpers/request.ts

@@ -76,6 +76,7 @@ request.interceptors.response.use(async (res, options) => {
       if(!hideMessage) {
         ElMessage.error(`登录过期,请重新登录!`)
       }
+      removeToken()
       router.push(`/login`)
     }
     if(data.code === 404) {

+ 5 - 0
yarn.lock

@@ -3038,6 +3038,11 @@ loader-utils@^1.1.0:
     emojis-list "^3.0.0"
     json5 "^1.0.1"
 
+loaders.css@^0.1.2:
+  version "0.1.2"
+  resolved "https://registry.npmmirror.com/loaders.css/-/loaders.css-0.1.2.tgz#3a9fb43726c73334a38142af9d0629019b658743"
+  integrity sha512-Rhowlq24ey1VOeor+3wYOt9+MjaxBOJm1u4KlQgNC3+0xJ0LS4wq4iG57D/BPzvuD/7HHDGQOWJ+81oR2EI9bQ==
+
 locate-path@^5.0.0:
   version "5.0.0"
   resolved "https://registry.npmmirror.com/locate-path/-/locate-path-5.0.0.tgz#1afba396afd676a6d42504d0a67a3a7eb9f62aa0"

Some files were not shown because too many files changed in this diff