Browse Source

聊天 bug 修改

zhangjiansheng 3 months ago
parent
commit
8efc3fa720
1 changed files with 7 additions and 7 deletions
  1. 7 7
      src/layout/components/header/chat.vue

+ 7 - 7
src/layout/components/header/chat.vue

@@ -55,7 +55,7 @@
55
               <div
55
               <div
56
                 id="chatContent"
56
                 id="chatContent"
57
                 style="padding-left: 10px; line-height: normal"
57
                 style="padding-left: 10px; line-height: normal"
58
-                
58
+
59
               >
59
               >
60
 
60
 
61
                 <!-- 循环输出对话内容 -->
61
                 <!-- 循环输出对话内容 -->
@@ -249,8 +249,8 @@
249
         </div>
249
         </div>
250
       </div>
250
       </div>
251
     </el-dialog>
251
     </el-dialog>
252
-    
253
-    <cartDetail 
252
+
253
+    <cartDetail
254
     :patientDialogVisible="patientDialogVisible"
254
     :patientDialogVisible="patientDialogVisible"
255
     :patientObj="patientObj"
255
     :patientObj="patientObj"
256
     @cancelAll="cancelAll"
256
     @cancelAll="cancelAll"
@@ -391,7 +391,7 @@ export default {
391
         }
391
         }
392
         //如果是聊天信息
392
         //如果是聊天信息
393
         else if (cmd == "CHAT") {
393
         else if (cmd == "CHAT") {
394
-          if(name == "MY_SELF"){
394
+          if(name == store.state.user.id){
395
             if(message.indexOf('[image]') != -1){
395
             if(message.indexOf('[image]') != -1){
396
               let img = message.split(" - ")[1];
396
               let img = message.split(" - ")[1];
397
               let imgUrl = message.split('[image]')[1];
397
               let imgUrl = message.split('[image]')[1];
@@ -446,7 +446,7 @@ export default {
446
 
446
 
447
           }
447
           }
448
         }
448
         }
449
-        
449
+
450
         this.$nextTick(() => {
450
         this.$nextTick(() => {
451
           this.$refs.chatContentRef.$el.scrollTop = this.$refs.chatContentRef.$el.scrollHeight;
451
           this.$refs.chatContentRef.$el.scrollTop = this.$refs.chatContentRef.$el.scrollHeight;
452
         })
452
         })
@@ -488,7 +488,7 @@ export default {
488
       const formData = new FormData();
488
       const formData = new FormData();
489
       formData.append('file', file);
489
       formData.append('file', file);
490
       formData.append('path', "chat");
490
       formData.append('path', "chat");
491
-      
491
+
492
       const res = await minioUpload(formData)
492
       const res = await minioUpload(formData)
493
       if (res.code !== 200) return this.$message.error(res.msg);
493
       if (res.code !== 200) return this.$message.error(res.msg);
494
       this.fileList = [];
494
       this.fileList = [];
@@ -701,4 +701,4 @@ body > .el-container {
701
 ::v-deep .el-scrollbar__view {
701
 ::v-deep .el-scrollbar__view {
702
   overflow-x: hidden;
702
   overflow-x: hidden;
703
 }
703
 }
704
-</style>
704
+</style>