gemercheung 2 년 전
부모
커밋
0047f328ee
8개의 변경된 파일62개의 추가작업 그리고 11개의 파일을 삭제
  1. 2 0
      .env.eur
  2. 4 1
      .env.eur.prod
  3. 26 0
      .env.fr
  4. 1 0
      package.json
  5. 7 3
      src/App.vue
  6. 19 5
      src/components/chatRoom/index.vue
  7. 2 1
      src/components/custom/panel.vue
  8. 1 1
      src/store/modules/app.ts

+ 2 - 0
.env.eur

@@ -22,3 +22,5 @@ VITE_USE_HTTPS=1
 VITE_PUBLIC_DIR='/livestream/'
 VITE_ROOM_MEMBER=10
 VITE_SHOW_CONSOLE=1
+VITE_SHOW_DEBUGPANEL=1
+VITE_TEST_VERSION =2022120704

+ 4 - 1
.env.eur.prod

@@ -3,7 +3,8 @@ VITE_APP_RESOURCE_URL=https://eurs3.4dkankan.com/
 # 静态资源地址
 VITE_APP_CDN_URL=https://4dkk.4dage.com/v4/www/
 # sdk文件地址
-VITE_APP_SDK_DIR=https://eurs3.4dkankan.com/v4/www/sdk
+# VITE_APP_SDK_DIR=https://eurs3.4dkankan.com/v4/www/sdk
+VITE_APP_SDK_DIR=https://testeurs3.4dkankan.com/v4/www/sdk
 # socket地址
 # VITE_APP_SOCKET_URL=wss://ws.gemer.xyz
 VITE_APP_SOCKET_URL=wss://eurws.4dkankan.com
@@ -22,3 +23,5 @@ VITE_USE_HTTPS=1
 VITE_PUBLIC_DIR='/livestream/'
 VITE_ROOM_MEMBER=10
 VITE_SHOW_CONSOLE=0
+VITE_SHOW_DEBUGPANEL=0
+VITE_TEST_VERSION=

+ 26 - 0
.env.fr

@@ -0,0 +1,26 @@
+# 场景资源地址
+VITE_APP_RESOURCE_URL=https://eurs3.4dkankan.com/
+# 静态资源地址
+VITE_APP_CDN_URL=https://4dkk.4dage.com/v4/www/
+# sdk文件地址
+VITE_APP_SDK_DIR=https://eurs3.4dkankan.com/v4/www/sdk
+# socket地址
+# VITE_APP_SOCKET_URL=wss://ws.gemer.xyz
+VITE_APP_SOCKET_URL=wss://eurws.4dkankan.com
+# VITE_APP_SOCKET_URL=wss://221.4.210.172:16666
+# 静态资源目录
+VITE_APP_STATIC_DIR=viewer
+
+# 云存储环境
+VUE_APP_REGION_URL=aws
+
+# 接口请求地址
+VITE_APP_APIS_URL=https://360.vizite.fr/
+# VITE_APP_APIS_URL=https://v4-uat.4dkankan.com/
+# VITE_TAKE_LOOK_API=https://testeur.4dkankan.com/
+VITE_USE_HTTPS=1
+VITE_PUBLIC_DIR='/livestream/'
+VITE_ROOM_MEMBER=10
+VITE_SHOW_CONSOLE=0
+VITE_SHOW_DEBUGPANEL=0
+VITE_TEST_VERSION=

+ 1 - 0
package.json

@@ -7,6 +7,7 @@
     "dev-eur": "vite --mode eur --port=6100",
     "build-eur-test": "vue-tsc  --noEmit && vite build --mode eur",
     "build-eur-prod": "vue-tsc  --noEmit && vite build --mode eur.prod",
+    "build-eur-fr": "vue-tsc  --noEmit && vite build --mode fr",
     "build": "vue-tsc  --noEmit && vite build --mode production",
     "commit": "git add . && git cz",
     "preview": "vite preview",

+ 7 - 3
src/App.vue

@@ -1,5 +1,5 @@
 <script setup lang="ts">
-  import { onMounted, ref, computed, unref, watchEffect } from 'vue';
+  import { onMounted, ref, computed, unref, watchEffect, onUnmounted } from 'vue';
   import { createApp } from '/@/hooks/userApp';
   // import tagView from '/@/components/custom/tagView.vue';
   // import tag from '/@/components/custom/tag.vue';
@@ -26,7 +26,7 @@
   import BaseDialog from '/@/components/chatRoom/dialog/base.vue';
 
   const { createTourPlayer } = useTourPlayer();
-  const showDebug = ref(true);
+  const showDebug = ref(Number(import.meta.env.VITE_SHOW_DEBUGPANEL) === 1);
   const { t } = useI18n();
 
   const { changeLocale } = useLocale();
@@ -39,6 +39,7 @@
     changeLocale('zh');
   }
   const maxNumber = import.meta.env.VITE_ROOM_MEMBER || 10;
+  const test_version = computed(() => import.meta.env.VITE_TEST_VERSION || '');
   const sceneStore = useSceneStore();
   const appStore = useAppStore();
   const rtcStore = useRtcStore();
@@ -255,6 +256,9 @@
     // SDK初始化结束
   });
   // SDK global Event end
+  onUnmounted(() => {
+    appStore.unLoad();
+  });
 
   // method
   const changeMode = (name: string) => {
@@ -270,7 +274,7 @@
 <template>
   <div class="debug flex justify-between px-1" v-if="showDebug">
     <span>
-      {{ t('base.debuginfo') }}:公告,当前测试最新:2022120702,当前满员条件:
+      {{ t('base.debuginfo') }}:公告,当前测试最新: {{ test_version }}, 当前满员条件:
       {{ maxNumber }}
     </span>
     <span class="close" @click.stop="showDebug = false">X</span>

+ 19 - 5
src/components/chatRoom/index.vue

@@ -201,6 +201,7 @@
   // const disableMic = ref(false);
   const connectStatus = computed(() => rtcStore.connectStatus);
   const isJoined = computed(() => rtcStore.isJoined);
+  const isLoaded = computed(() => appStore.isLoaded);
   const role = computed(() => rtcStore.role);
   const text = ref<string>('');
   const chatList = computed(() => rtcStore.chatList);
@@ -289,11 +290,11 @@
     mode: browser.getURLParam('mode'),
   };
 
-  if (initParams.nickname === '') {
-    showCreateNameDialog.value = true;
-  } else {
-    startJoin();
-  }
+  // if (initParams.nickname === '') {
+  //   showCreateNameDialog.value = true;
+  // } else {
+  //   startJoin();
+  // }
 
   const handleNameConfirm = (userName: string) => {
     const rtcStore = useRtcStore();
@@ -313,6 +314,19 @@
   };
 
   onMounted(async () => {
+    watch(
+      () => isLoaded,
+      (val) => {
+        if (unref(val)) {
+          if (initParams.nickname === '') {
+            showCreateNameDialog.value = true;
+          } else {
+            startJoin();
+          }
+        }
+      },
+      { deep: true, immediate: true },
+    );
     //初始化同屏等
     watch(
       () => [isJoined, isNativeLeader],

+ 2 - 1
src/components/custom/panel.vue

@@ -1,6 +1,7 @@
 <template>
   <div class="panel" :class="{ show }" v-if="panelShow">
-    <span class="icon" @click="handlePlayTours" v-if="hasTours">
+    <!-- 暂时隐藏 33729 -->
+    <span class="icon" @click="handlePlayTours" v-if="hasTours && false">
       <Icon type="play" />
     </span>
     <span class="icon" @click="showScenes = !showScenes" v-if="sceneList.length > 1">

+ 1 - 1
src/store/modules/app.ts

@@ -131,7 +131,7 @@ export const useAppStore = defineStore({
       this.isLoaded = true;
     },
     unLoad() {
-      this.isLoaded = true;
+      this.isLoaded = false;
     },
   },
 });