gemercheung преди 2 години
родител
ревизия
6ec40f1e56
променени са 2 файла, в които са добавени 10 реда и са изтрити 9 реда
  1. 8 2
      src/components/chatRoom/chat.vue
  2. 2 7
      src/components/chatRoom/index.vue

+ 8 - 2
src/components/chatRoom/chat.vue

@@ -1,7 +1,11 @@
 <template>
   <div id="chat">
     <div id="contents">
-      <div class="chat-item flex" v-for="(i, index) in chatList" :key="index">
+      <div
+        class="chat-item flex justify-start items-start"
+        v-for="(i, index) in chatList"
+        :key="index"
+      >
         <div class="chat-msg">
           <!-- {{ user_info }} -->
           <!-- <span :class="{ my: i.UserId == user_info.UserId }" class="chat-name">
@@ -62,12 +66,14 @@
     left: 0.44rem;
     bottom: 2.83rem;
     .chat-item {
+      text-align: left;
     }
     .chat-msg {
       width: auto;
       border-radius: 0.44rem;
       background: rgba(0, 0, 0, 0.3);
-      padding: 0.17rem 0.28rem;
+      // padding: 0.17rem 0.28rem;
+      padding: 0.07rem 0.28rem;
       box-sizing: border-box;
 
       display: inline-block;

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

@@ -182,9 +182,7 @@
   );
   //设置socket 参数
   const initParams: SocketParams = {
-    userId:
-      browser.getURLParam('vruserId') ||
-      `user_${browser.getURLParam('role')}${Math.floor(Math.random() * 100000000)}`,
+    userId: browser.getURLParam('vruserId') || `user_${Math.floor(Math.random() * 100000000)}`,
     roomId: browser.getURLParam('roomId') || `room_${Math.floor(Math.random() * 100000000)}`,
     role: (browser.getURLParam('role') as RoleType) || 'leader',
     avatar: browser.getURLParam('avatar'),
@@ -347,10 +345,7 @@
   const handleCreateShare = () => {
     const search = new URLSearchParams();
     search.set('isTour', '0');
-    search.set(
-      'vruserId',
-      `user_${browser.getURLParam('role')}${Math.floor(Math.random() * 100000000)}`,
-    );
+    search.set('vruserId', `user_${Math.floor(Math.random() * 100000000)}`);
     search.set('role', 'customer');
     search.set('name', '');
     search.set('roomId', `${rtcStore.roomId}`);