瀏覽代碼

更新打包

lex-wxl 3 年之前
父節點
當前提交
7f45d32c4f

文件差異過大導致無法顯示
+ 0 - 0
dist/assets/index-legacy.1c095bb4.js


文件差異過大導致無法顯示
+ 0 - 0
dist/assets/index-legacy.95883eed.js


文件差異過大導致無法顯示
+ 0 - 0
dist/assets/index-legacy.b091d639.js


文件差異過大導致無法顯示
+ 0 - 0
dist/assets/index.317182da.js


文件差異過大導致無法顯示
+ 0 - 0
dist/assets/index.9068d167.js


文件差異過大導致無法顯示
+ 0 - 0
dist/assets/index.eb3fe0ca.js


+ 2 - 2
dist/index.html

@@ -6,7 +6,7 @@
     <meta name="viewport" content="width=device-width, initial-scale=1.0" />
     <title>管乐迷</title>
     
-    <script type="module" crossorigin src="./assets/index.27572855.js"></script>
+    <script type="module" crossorigin src="./assets/index.eb3fe0ca.js"></script>
     <link rel="modulepreload" href="./assets/vendor.db8201e1.js">
     <link rel="stylesheet" href="./assets/index.cd9189f2.css">
     <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>
@@ -131,6 +131,6 @@
     </script>
     <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.e727d681.js"></script>
-    <script nomodule id="vite-legacy-entry" data-src="./assets/index-legacy.96c9a414.js">System.import(document.getElementById('vite-legacy-entry').getAttribute('data-src'))</script>
+    <script nomodule id="vite-legacy-entry" data-src="./assets/index-legacy.1c095bb4.js">System.import(document.getElementById('vite-legacy-entry').getAttribute('data-src'))</script>
   </body>
 </html>

+ 70 - 41
src/components/live-message/message.tsx

@@ -1,90 +1,109 @@
 import { defineComponent } from "vue";
 import { ElButton } from "element-plus";
-import runtime, * as RuntimeUtils from '/src/components/live-broadcast/runtime'
-import styles from './message.module.less';
-import { state } from '/src/state'
-import request from '/src/helpers/request'
+import runtime, * as RuntimeUtils from "/src/components/live-broadcast/runtime";
+import styles from "./message.module.less";
+import { state } from "/src/state";
+import request from "/src/helpers/request";
 
-
-type optionsType = 'ALL' | 'JOIN'
+type optionsType = "ALL" | "JOIN";
 export default defineComponent({
-  name: 'message',
+  name: "message",
   data() {
     return {
-      options: 'ALL' as optionsType,
-    }
+      options: "ALL" as optionsType,
+    };
   },
   mounted() {
-    const config = state.user?.roomConfig ? JSON.parse(state.user?.roomConfig) : {}
-    runtime.allowChatCtrl = config.whether_chat === 0
-    runtime.allowSeatsCtrl = config.whether_mic === 0
+    const config = state.user?.roomConfig
+      ? JSON.parse(state.user?.roomConfig)
+      : {};
+    runtime.allowChatCtrl = config.whether_chat === 0;
+    runtime.allowSeatsCtrl = config.whether_mic === 0;
   },
   methods: {
     async SeatsCtrl() {
       try {
-        const users = state.user
-        const roomConfig = users?.roomConfig ? JSON.parse(users?.roomConfig) : {}
-        await request.post('/api-web/imLiveBroadcastRoom/update', {
-          requestType: 'json',
+        const users = state.user;
+        const roomConfig = users?.roomConfig
+          ? JSON.parse(users?.roomConfig)
+          : {};
+        await request.post("/api-web/imLiveBroadcastRoom/update", {
+          requestType: "json",
           data: {
             id: users.id,
             liveRemark: users.liveRemark,
             liveStartTime: users.liveStartTime,
             preTemplate: users.preTemplate,
+            popularizeType: users.popularizeType,
             roomConfig: {
               whether_chat: roomConfig.whether_chat,
               whether_like: roomConfig.whether_like,
               whether_mic: runtime.allowSeatsCtrl ? 1 : 0,
-              whether_video: roomConfig.whether_video
+              whether_video: roomConfig.whether_video,
             },
             roomTitle: users.roomTitle,
             speakerId: users.speakerId,
-            tenantId: users.tenantId
-          }
-        })
+            tenantId: users.tenantId,
+          },
+        });
         state.user.roomConfig = JSON.stringify({
           whether_chat: roomConfig.whether_chat,
           whether_like: roomConfig.whether_like,
           whether_mic: runtime.allowSeatsCtrl ? 1 : 0,
-          whether_video: roomConfig.whether_video
-        })
+          whether_video: roomConfig.whether_video,
+        });
 
-        await RuntimeUtils.sendMessage({ seatBan: runtime.allowSeatsCtrl, ...RuntimeUtils.getSendMessageUser() }, 'SeatsCtrl')
-        runtime.allowSeatsCtrl = !runtime.allowSeatsCtrl
+        await RuntimeUtils.sendMessage(
+          {
+            seatBan: runtime.allowSeatsCtrl,
+            ...RuntimeUtils.getSendMessageUser(),
+          },
+          "SeatsCtrl"
+        );
+        runtime.allowSeatsCtrl = !runtime.allowSeatsCtrl;
       } catch {
         //
       }
     },
     async ChatBan() {
       try {
-        const users = state.user
-        const roomConfig = users?.roomConfig ? JSON.parse(users?.roomConfig) : {}
-        await request.post('/api-web/imLiveBroadcastRoom/update', {
-          requestType: 'json',
+        const users = state.user;
+        const roomConfig = users?.roomConfig
+          ? JSON.parse(users?.roomConfig)
+          : {};
+        await request.post("/api-web/imLiveBroadcastRoom/update", {
+          requestType: "json",
           data: {
             id: users.id,
             liveRemark: users.liveRemark,
             liveStartTime: users.liveStartTime,
             preTemplate: users.preTemplate,
+            popularizeType: users.popularizeType,
             roomConfig: {
               whether_chat: runtime.allowChatCtrl ? 1 : 0,
               whether_like: roomConfig.whether_like,
               whether_video: roomConfig.whether_video,
-              whether_mic: roomConfig.whether_mic
+              whether_mic: roomConfig.whether_mic,
             },
             roomTitle: users.roomTitle,
             speakerId: users.speakerId,
-            tenantId: users.tenantId
-          }
-        })
+            tenantId: users.tenantId,
+          },
+        });
         state.user.roomConfig = JSON.stringify({
           whether_chat: runtime.allowChatCtrl ? 1 : 0,
           whether_like: roomConfig.whether_like,
           whether_video: roomConfig.whether_video,
-          whether_mic: roomConfig.whether_mic
-        })
-        await RuntimeUtils.sendMessage({ chatBan: runtime.allowChatCtrl, ...RuntimeUtils.getSendMessageUser() }, 'ChatBan')
-        runtime.allowChatCtrl = !runtime.allowChatCtrl
+          whether_mic: roomConfig.whether_mic,
+        });
+        await RuntimeUtils.sendMessage(
+          {
+            chatBan: runtime.allowChatCtrl,
+            ...RuntimeUtils.getSendMessageUser(),
+          },
+          "ChatBan"
+        );
+        runtime.allowChatCtrl = !runtime.allowChatCtrl;
       } catch {
         //
       }
@@ -95,10 +114,20 @@ export default defineComponent({
       <div class={styles.message}>
         <div class={styles.buttonGroup}>
           {/* {this.whetherChat ? <ElButton type={!runtime.allowChatCtrl ? 'primary' : 'info'} onClick={this.ChatBan} >{runtime.allowChatCtrl ? '全体禁言' : '关闭全体禁言'}</ElButton> : null} */}
-          <ElButton type={!runtime.allowChatCtrl ? 'primary' : 'info'} onClick={this.ChatBan} >{runtime.allowChatCtrl ? '关闭聊天' : '开启聊天'}</ElButton>
-          <ElButton type={!runtime.allowSeatsCtrl ? 'primary' : 'info'} onClick={this.SeatsCtrl}>{runtime.allowSeatsCtrl ? '关闭连麦' : '开启连麦'}</ElButton>
+          <ElButton
+            type={!runtime.allowChatCtrl ? "primary" : "info"}
+            onClick={this.ChatBan}
+          >
+            {runtime.allowChatCtrl ? "关闭聊天" : "开启聊天"}
+          </ElButton>
+          <ElButton
+            type={!runtime.allowSeatsCtrl ? "primary" : "info"}
+            onClick={this.SeatsCtrl}
+          >
+            {runtime.allowSeatsCtrl ? "关闭连麦" : "开启连麦"}
+          </ElButton>
         </div>
       </div>
-    )
-  }
-})
+    );
+  },
+});

+ 25 - 25
vite.config.ts

@@ -1,13 +1,13 @@
-const path = require('path')
-import { defineConfig } from 'vite'
+const path = require("path");
+import { defineConfig } from "vite";
 import vue from "@vitejs/plugin-vue";
-import { VitePWA } from 'vite-plugin-pwa'
-import { createSvgIconsPlugin } from 'vite-plugin-svg-icons'
-const vueJsx = require('@vitejs/plugin-vue-jsx')
-const legacy = require('@vitejs/plugin-legacy')
+import { VitePWA } from "vite-plugin-pwa";
+import { createSvgIconsPlugin } from "vite-plugin-svg-icons";
+const vueJsx = require("@vitejs/plugin-vue-jsx");
+const legacy = require("@vitejs/plugin-legacy");
 
-// const proxyUrl = "https://test.dayaedu.com/"; // test 环境
-const proxyUrl = "https://online.dayaedu.com/"; // test 环境
+const proxyUrl = "https://test.dayaedu.com/"; // test 环境
+// const proxyUrl = "https://online.dayaedu.com/"; // test 环境
 // https://vitejs.dev/config/
 export default defineConfig({
   base: "./",
@@ -15,7 +15,7 @@ export default defineConfig({
   resolve: {
     alias: {
       // '/src': path.resolve(__dirname, './src'),
-    }
+    },
   },
   css: {
     preprocessorOptions: {
@@ -27,15 +27,15 @@ export default defineConfig({
       //     }
       //   }
       // }
-    }
+    },
   },
   plugins: [
     createSvgIconsPlugin({
       // 指定需要缓存的图标文件夹
-      iconDirs: [path.resolve(process.cwd(), 'src/icons')],
+      iconDirs: [path.resolve(process.cwd(), "src/icons")],
       // 指定symbolId格式
-      symbolId: 'icon-[dir]-[name]',
-      customDomId: '__svg__icons__dom__',
+      symbolId: "icon-[dir]-[name]",
+      customDomId: "__svg__icons__dom__",
     }),
     vue(),
     vueJsx(),
@@ -69,25 +69,25 @@ export default defineConfig({
     // })
   ],
   server: {
-    host: '0.0.0.0',
+    host: "0.0.0.0",
     cors: true,
     proxy: {
-      '/api-im': {
+      "/api-im": {
         target: proxyUrl,
-        changeOrigin: true
+        changeOrigin: true,
       },
-      '/api-web': {
+      "/api-web": {
         target: proxyUrl,
-        changeOrigin: true
+        changeOrigin: true,
       },
-      '/api-auth': {
+      "/api-auth": {
         target: proxyUrl,
-        changeOrigin: true
+        changeOrigin: true,
       },
-      '/api-teacher': {
+      "/api-teacher": {
         target: proxyUrl,
-        changeOrigin: true
-      }
-    }
-  }
+        changeOrigin: true,
+      },
+    },
+  },
 });

部分文件因文件數量過多而無法顯示