gemercheung 2 jaren geleden
bovenliggende
commit
8c242b200b

+ 2 - 2
.env.eur

@@ -5,8 +5,8 @@ VITE_APP_CDN_URL=https://4dkk.4dage.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://testeurws.4dkankan.com
+# VITE_APP_SOCKET_URL=wss://ws.gemer.xyz
+VITE_APP_SOCKET_URL=wss://testeurws.4dkankan.com
 # VITE_APP_SOCKET_URL=wss://221.4.210.172:16666
 # 静态资源目录
 VITE_APP_STATIC_DIR=viewer

+ 1 - 0
src/components/chatRoom/controls/join.ts

@@ -63,6 +63,7 @@ export function handleJoin(data: any) {
   //     data: unref(currentScene),
   //   });
   // }
+  rtcStore.setConnectStatus(1);
 
   setTimeout(() => {
     if (!rtcStore.isLeader) {

+ 4 - 2
src/components/chatRoom/index.vue

@@ -11,6 +11,7 @@
     <!-- 控制条 start -->
     <div class="controlBar" v-if="!showInput">
       <div
+        v-if="connectStatus === 1"
         class="saySomething"
         @click="onFocus"
         :class="{ disabled: !inputStatus && !isNativeLeader }"
@@ -26,8 +27,8 @@
           :class="{ dis: !chatShow }"
         ></div>
       </div>
-      <!-- <div style="text-align: right; width: 100%">连接中...</div> -->
-      <div class="control_btn">
+      <div style="text-align: right; width: 100%" v-if="connectStatus === 0">连接中...</div>
+      <div class="control_btn" v-if="connectStatus === 1">
         <div
           class="brushesBack"
           @click="onDrawUndo"
@@ -163,6 +164,7 @@
   const animateActive = ref(false);
   const showMember = ref(false);
   // const disableMic = ref(false);
+  const connectStatus = computed(() => rtcStore.connectStatus);
   const isJoined = computed(() => rtcStore.isJoined);
   const role = computed(() => rtcStore.role);
   const text = ref<string>('');

+ 1 - 1
src/locales/lang/en/base.ts

@@ -27,7 +27,7 @@ export default {
   send: 'Send',
   saveSuccess: 'Save successfully',
   nickNameRequired: 'Please input your’s nickname!',
-  joinRoom: '加入带看房间',
+  joinRoom: 'Enter the studio',
   hoster: 'hoster',
   audioPermission: '继续访问该页面需要获取您摄像头及麦克风的权限。',
   nickNameRegrexError:

+ 5 - 0
src/store/modules/rtc.ts

@@ -35,6 +35,7 @@ interface RtcState {
   baseDialog: BaseDialog;
   ifBaseDialog: boolean;
   baseDiaLogCallback?: () => void;
+  connectStatus: number;
 }
 
 interface DeviceListParams {
@@ -122,6 +123,7 @@ export const useRtcStore = defineStore({
     currentSession: null,
     baseDialog: defaultBaseDialog,
     ifBaseDialog: false,
+    connectStatus: 0,
   }),
   persist: [
     {
@@ -293,5 +295,8 @@ export const useRtcStore = defineStore({
         this.remoteStreams.splice(existStreamIndex, 1);
       }
     },
+    setConnectStatus(status: number) {
+      this.connectStatus = status;
+    },
   },
 });