gemercheung %!s(int64=2) %!d(string=hai) anos
pai
achega
fac98b4468

+ 5 - 3
src/components/basic/miniMap.vue

@@ -39,9 +39,11 @@
           () => [props.show, props.to],
           () => {
             if (props.to?.length && props.show) {
-              console.log('小地图must show');
-              ifShow.value = true;
-              refMiniMap.value = props.to;
+              console.log('小地图must show', props.to, props.show);
+              setTimeout(() => {
+                ifShow.value = true;
+                refMiniMap.value = props.to;
+              }, 10);
             }
           },
           {

+ 15 - 22
src/components/chatRoom/controls/join.ts

@@ -1,4 +1,6 @@
 import consolaGlobalInstance from 'consola';
+import sortBy from 'lodash-es/sortBy';
+// import { unref } from 'vue';
 // import Dialog from '/@/components/basic/dialog';
 // import { getApp } from '/@/hooks/userApp';
 import { useRoom } from '/@/hooks/useRoom';
@@ -14,8 +16,8 @@ export function handleJoin(data: any) {
   const user = data?.user as any as UserInfoType;
   const rtcStore = useRtcStore();
 
-  const userExsit = rtcStore.checkUserInMemberList(rtcStore.userId);
-
+  // const userExsit = rtcStore.checkUserInMemberList(rtcStore.userId);
+  banLaterEnterer(members, user);
   enterRoom();
   rtcStore.setIsJoined(true);
   consolaGlobalInstance.info({
@@ -23,28 +25,9 @@ export function handleJoin(data: any) {
     tag: 'socket:enter',
   });
 
-  if (user) {
-    console.log('gem1', rtcStore.userId);
-    console.log('gem2', rtcStore.memberList);
-    const userExsit = rtcStore.checkUserInMemberList(rtcStore.userId);
-    console.log('gem3', userExsit, user.Id !== userExsit?.Id);
-    if (userExsit) {
-      // Dialog.confirm({
-      //   showCloseIcon: false,
-      //   okText: '我知道了',
-      //   content:
-      //     "<span style='font-size: 16px; line-height: 1.5;'>您已有登录端在登录,请不要重复登录<span/>",
-      //   title: '隱私條款:',
-      //   single: true,
-      //   func: (state) => {},
-      // });
-    }
-  } else {
-  }
-
   members && rtcStore.setMemberList(members);
 
-  console.log('gem', rtcStore.memberList.length, userExsit);
+  console.log('lala', user);
   const maxNumber = import.meta.env.VITE_ROOM_MEMBER || 10;
   console.log('roomMaxNumber', maxNumber);
   if (rtcStore.memberList.length > Number(maxNumber)) {
@@ -86,3 +69,13 @@ export function handleJoin(data: any) {
     }, 1500);
   }
 }
+
+const banLaterEnterer = (members: UserInfoType[], user: UserInfoType) => {
+  if (members && user) {
+    console.log('banLaterEnterer', members);
+    const sameIDsArray = members.some((item) => item.UserId === user.UserId);
+    const sortList = sortBy(sameIDsArray, ['InTime'], ['asc']);
+    console.log('banLaterEnterer', sortList);
+    // const beforeUSer =
+  }
+};

+ 13 - 0
src/locales/lang/en/action.ts

@@ -0,0 +1,13 @@
+export default {
+  hoster: 'Host',
+  hosterOpenDraw: 'The host enables a brush',
+  hosterCloseDraw: 'The host disable the brush',
+  hosterEnterRoom: 'The host entered the studio',
+  hosterDismissRoom: 'The host has dismissed the studio',
+  hostExitRoom: 'The host has left the studio',
+  hostAllowInput: 'The host is unmuted you',
+  hostBanInput: 'The host is muted you',
+  enterRoom: 'Enter the studio',
+  exitRoom: 'Exit the studio',
+  endUpRoom: 'The Livestream is ended',
+};