shuisheng 1 سال پیش
والد
کامیت
8e027d0035
6فایلهای تغییر یافته به همراه114 افزوده شده و 86 حذف شده
  1. 3 1
      src/constant.ts
  2. 96 53
      src/layout/pc/head/index.vue
  3. 6 2
      src/locales/en/layout.ts
  4. 6 2
      src/locales/zh/layout.ts
  5. 1 27
      src/utils/network/webRTC.ts
  6. 2 1
      src/views/remoteDesktop/index.vue

+ 3 - 1
src/constant.ts

@@ -62,7 +62,9 @@ export const QINIU_RESOURCE = {
 export const COMMON_URL = {
   apifox: `https://apifox.com/apidoc/shared-c7556b54-17b2-494e-a039-572d83f103ed/`,
   admin: `https://live-admin.${prodDomain}`,
-  mobileApk: `${QINIU_RESOURCE.url}/billd-live/image/app-release.apk`,
+  androidApp: `${QINIU_RESOURCE.url}/billd-live/image/app-release.apk`,
+  windows: `${QINIU_RESOURCE.url}/test/billd-desk-Win-0.0.1-Installer.exe`,
+  macos: `${QINIU_RESOURCE.url}/test/billd-desk-Mac-0.0.1-Installer.dmg`,
   bilibiliCollectiondetail: `https://space.bilibili.com/381307133/channel/collectiondetail?sid=1458070&ctype=0`,
   payCoursesArticle: `https://www.${prodDomain}/article/151`,
 };

+ 96 - 53
src/layout/pc/head/index.vue

@@ -20,6 +20,7 @@
           >
             {{ t('layout.home') }}
           </a>
+
           <a
             class="item"
             :class="{
@@ -29,15 +30,7 @@
           >
             {{ t('layout.area') }}
           </a>
-          <!-- <a
-            class="item"
-            :class="{
-              active: router.currentRoute.value.name === routerName.shop,
-            }"
-            @click.prevent="router.push({ name: routerName.shop })"
-          >
-            {{ t('layout.shop') }}
-          </a> -->
+
           <a
             class="item"
             :href="COMMON_URL.admin"
@@ -46,23 +39,68 @@
           >
             {{ t('layout.liveAdmin') }}
           </a>
+
           <a
             class="item"
-            :href="COMMON_URL.mobileApk"
-            @click.prevent="openToTarget(COMMON_URL.mobileApk)"
+            :href="COMMON_URL.androidApp"
+            @click.prevent="openToTarget(COMMON_URL.androidApp)"
           >
-            {{ t('layout.appdownload') }}
+            <Dropdown
+              class="download"
+              v-if="!isMobile()"
+            >
+              <template #btn>
+                <div class="btn">
+                  <span>{{ t('layout.download') }}</span>
+                  <VPIconChevronDown class="icon"></VPIconChevronDown>
+                </div>
+              </template>
+              <template #list>
+                <div class="list">
+                  <a
+                    class="item"
+                    @click.prevent="openToTarget(COMMON_URL.androidApp)"
+                  >
+                    <div class="txt">{{ t('layout.android') }}</div>
+                    <VPIconExternalLink class="icon"></VPIconExternalLink>
+                  </a>
+                  <a
+                    class="item"
+                    @click.prevent="handleTip"
+                  >
+                    <div class="txt">{{ t('layout.ios') }}</div>
+                  </a>
+                  <a
+                    class="item"
+                    :href="COMMON_URL.payCoursesArticle"
+                    @click.prevent="openToTarget(COMMON_URL.windows)"
+                  >
+                    <div class="txt">{{ t('layout.windows') }}</div>
+                    <VPIconExternalLink class="icon"></VPIconExternalLink>
+                  </a>
+                  <a
+                    class="item"
+                    :href="COMMON_URL.payCoursesArticle"
+                    @click.prevent="openToTarget(COMMON_URL.macos)"
+                  >
+                    <div class="txt">{{ t('layout.macos') }}</div>
+                    <VPIconExternalLink class="icon"></VPIconExternalLink>
+                  </a>
+                </div>
+              </template>
+            </Dropdown>
             <div class="badge">
               <div class="txt">new</div>
             </div>
           </a>
+
           <a
             class="item"
             @click.prevent="router.push({ name: routerName.remoteDesktop })"
           >
             {{ t('layout.remoteDesktop') }}
             <div class="badge">
-              <div class="txt">beta</div>
+              <div class="txt">stage</div>
             </div>
           </a>
         </div>
@@ -680,62 +718,67 @@ function handleWebsiteJump() {
         }
       }
     }
-
-    .right {
-      display: flex;
-      align-items: center;
-      height: 100%;
-
-      & > :last-child {
-        margin-right: 0 !important;
+    .download,
+    .doc,
+    .about,
+    .ecosystem {
+      &:hover {
+        color: $theme-color-gold;
       }
+      .btn {
+        display: flex;
+        align-items: center;
+        .icon {
+          margin-left: 5px;
+          width: 13px;
 
-      .doc,
-      .about,
-      .ecosystem {
-        margin-right: 20px;
+          fill: currentColor;
+        }
         &:hover {
           color: $theme-color-gold;
         }
-        .btn {
+      }
+
+      .list {
+        width: 150px;
+        padding: 10px 0;
+
+        .item {
           display: flex;
           align-items: center;
+          margin-bottom: 5px;
+          padding: 0 15px;
+          color: black;
+          text-decoration: none;
+          cursor: pointer;
+          &:hover {
+            color: $theme-color-gold;
+          }
           .icon {
             margin-left: 5px;
-            width: 13px;
+            width: 14px;
+            color: #3c3c4354;
 
             fill: currentColor;
           }
-          &:hover {
-            color: $theme-color-gold;
-          }
         }
+      }
+    }
 
-        .list {
-          width: 150px;
-          padding: 10px 0;
-
-          .item {
-            display: flex;
-            align-items: center;
-            margin-bottom: 5px;
-            padding: 0 15px;
-            color: black;
-            text-decoration: none;
-            cursor: pointer;
-            &:hover {
-              color: $theme-color-gold;
-            }
-            .icon {
-              margin-left: 5px;
-              width: 14px;
-              color: #3c3c4354;
+    .right {
+      display: flex;
+      align-items: center;
+      height: 100%;
+      .doc,
+      .about,
+      .ecosystem {
+        margin-right: 20px;
+      }
 
-              fill: currentColor;
-            }
-          }
-        }
+      & > :last-child {
+        margin-right: 0 !important;
       }
+
       .ecosystem {
         .list {
           width: 225px;

+ 6 - 2
src/locales/en/layout.ts

@@ -4,8 +4,12 @@ export default nameSpaceWrap('layout', {
   home: 'Home',
   area: 'Area',
   shop: 'Shop',
-  liveAdmin: 'LiveAdmin',
-  appdownload: 'App Download',
+  liveAdmin: 'Admin',
+  download: 'Download',
+  android: 'Android',
+  ios: 'IOS',
+  windows: 'Windows',
+  macos: 'macOS',
   doc: 'Doc',
   ecosystem: 'Ecosystem',
   about: 'About',

+ 6 - 2
src/locales/zh/layout.ts

@@ -4,8 +4,12 @@ export default nameSpaceWrap('layout', {
   home: '首页',
   area: '分区',
   shop: '商店',
-  liveAdmin: '直播后台',
-  appdownload: 'App下载',
+  liveAdmin: '后台',
+  download: '下载',
+  android: '安卓版',
+  ios: '苹果版',
+  windows: 'Windows版',
+  macos: 'macOS版',
   doc: '文档',
   ecosystem: '生态系统',
   about: '关于',

+ 1 - 27
src/utils/network/webRTC.ts

@@ -164,32 +164,6 @@ export class WebRTCClass {
       });
       return res;
     }
-    // return new Promise<number>((resolve) => {
-    // this.peerConnection?.getSenders().forEach((sender) => {
-    //   if (sender.track?.kind === 'video') {
-    //     const parameters = { ...sender.getParameters() };
-    //     if (parameters.encodings[0]) {
-    //       if (parameters.encodings[0].maxFramerate === maxFramerate) {
-    //         console.log('最大帧率不变,不设置');
-    //         resolve(1);
-    //         return;
-    //       }
-    //       parameters.encodings[0].maxFramerate = maxFramerate;
-    //       sender
-    //         .setParameters(parameters)
-    //         .then(() => {
-    //           console.log('设置最大帧率成功', maxFramerate);
-    //           this.maxFramerate = maxFramerate;
-    //           resolve(1);
-    //         })
-    //         .catch((error) => {
-    //           console.error('设置最大帧率失败', maxFramerate, error);
-    //           resolve(0);
-    //         });
-    //     }
-    //   }
-    // });
-    // });
   };
 
   /** 设置最大码率 */
@@ -589,7 +563,7 @@ export class WebRTCClass {
             //   urls: 'stun:stun.l.google.com:19302',
             // },
             {
-              urls: `turn:live.${prodDomain}:3478`,
+              urls: `turn:hk.${prodDomain}`,
               username: 'hss',
               credential: '123456',
             },

+ 2 - 1
src/views/remoteDesktop/index.vue

@@ -1,6 +1,6 @@
 <template>
   <div>
-    <h1>
+    <h1 v-if="NODE_ENV === 'development'">
       我的id:{{ mySocketId }},<n-button @click="copyToClipBoard(mySocketId)">
         复制
       </n-button>
@@ -58,6 +58,7 @@ import {
   WsRemoteDeskBehaviorType,
   WsStartRemoteDesk,
 } from '@/types/websocket';
+import { NODE_ENV } from 'script/constant';
 
 const num = '123456';
 const appStore = useAppStore();