| 
														
															@@ -11,8 +11,8 @@ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															     <div class="imui-center qq-lemon-imui" v-show="showQW"> 
														 | 
														
														 | 
														
															     <div class="imui-center qq-lemon-imui" v-show="showQW"> 
														 | 
													
												
											
												
													
														| 
														 | 
														
															       <lemon-imui  class="lemon-slot" 
														 | 
														
														 | 
														
															       <lemon-imui  class="lemon-slot" 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-                   :width="windowWidth" 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-                   :height="windowHeight" 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+                   :width="isMaximized ? '100vw' : windowWidth" 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+                   :height="isMaximized ? '90vh' : windowHeight" 
														 | 
													
												
											
												
													
														| 
														 | 
														
															                    :user="userData" 
														 | 
														
														 | 
														
															                    :user="userData" 
														 | 
													
												
											
												
													
														| 
														 | 
														
															                    ref="IMUI" 
														 | 
														
														 | 
														
															                    ref="IMUI" 
														 | 
													
												
											
												
													
														| 
														 | 
														
															                    :contact-contextmenu="contactContextmenu" 
														 | 
														
														 | 
														
															                    :contact-contextmenu="contactContextmenu" 
														 | 
													
												
											
										
											
												
													
														 | 
														
															@@ -93,6 +93,7 @@ import VideoPlayer from '@/components/VideoPlayer/VueAliplayer.vue' 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 import UserDetail from "@/views/qw/qwChat/userDetail/index.vue"; 
														 | 
														
														 | 
														
															 import UserDetail from "@/views/qw/qwChat/userDetail/index.vue"; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 import {ImSocket} from "@/utils/ImSocket"; 
														 | 
														
														 | 
														
															 import {ImSocket} from "@/utils/ImSocket"; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 import {getToken} from '@/utils/auth' 
														 | 
														
														 | 
														
															 import {getToken} from '@/utils/auth' 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+import {uploadOss} from "@/api/common"; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															 let pages = {}; 
														 | 
														
														 | 
														
															 let pages = {}; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 export default { 
														 | 
														
														 | 
														
															 export default { 
														 | 
													
												
											
										
											
												
													
														 | 
														
															@@ -102,7 +103,8 @@ export default { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     UserDetail 
														 | 
														
														 | 
														
															     UserDetail 
														 | 
													
												
											
												
													
														| 
														 | 
														
															   }, 
														 | 
														
														 | 
														
															   }, 
														 | 
													
												
											
												
													
														| 
														 | 
														
															   props: { 
														 | 
														
														 | 
														
															   props: { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-    showQw: Boolean 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+    showQw: Boolean, 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+    isMaximized: Boolean 
														 | 
													
												
											
												
													
														| 
														 | 
														
															   }, 
														 | 
														
														 | 
														
															   }, 
														 | 
													
												
											
												
													
														| 
														 | 
														
															   data() { 
														 | 
														
														 | 
														
															   data() { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     return { 
														 | 
														
														 | 
														
															     return { 
														 | 
													
												
											
										
											
												
													
														 | 
														
															@@ -155,6 +157,7 @@ export default { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         open: false 
														 | 
														
														 | 
														
															         open: false 
														 | 
													
												
											
												
													
														| 
														 | 
														
															       }, 
														 | 
														
														 | 
														
															       }, 
														 | 
													
												
											
												
													
														| 
														 | 
														
															       imSocket: null, 
														 | 
														
														 | 
														
															       imSocket: null, 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+      imUrl: process.env.VUE_APP_IM_WS_URL 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     }; 
														 | 
														
														 | 
														
															     }; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															   }, 
														 | 
														
														 | 
														
															   }, 
														 | 
													
												
											
												
													
														| 
														 | 
														
															   created(){ 
														 | 
														
														 | 
														
															   created(){ 
														 | 
													
												
											
										
											
												
													
														 | 
														
															@@ -196,6 +199,10 @@ export default { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															       } 
														 | 
														
														 | 
														
															       } 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     ]); 
														 | 
														
														 | 
														
															     ]); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     IMUI.initEmoji(EmojiData); 
														 | 
														
														 | 
														
															     IMUI.initEmoji(EmojiData); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+    IMUI.initEditorTools([ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+      { name: "emoji" }, 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+      { name: "uploadImage" } 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+    ]) 
														 | 
													
												
											
												
													
														| 
														 | 
														
															   }, 
														 | 
														
														 | 
														
															   }, 
														 | 
													
												
											
												
													
														| 
														 | 
														
															   beforeDestroy() { 
														 | 
														
														 | 
														
															   beforeDestroy() { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     if (this.imSocket) { 
														 | 
														
														 | 
														
															     if (this.imSocket) { 
														 | 
													
												
											
										
											
												
													
														 | 
														
															@@ -204,7 +211,7 @@ export default { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															   }, 
														 | 
														
														 | 
														
															   }, 
														 | 
													
												
											
												
													
														| 
														 | 
														
															   methods: { 
														 | 
														
														 | 
														
															   methods: { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     initImSocket(companyId) { 
														 | 
														
														 | 
														
															     initImSocket(companyId) { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-      this.imSocket = new ImSocket(`ws://127.0.0.1:8667/qwImSocket/${companyId}?token=${getToken()}`); 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+      this.imSocket = new ImSocket(`${this.imUrl}/${companyId}?token=${getToken()}`); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															       this.imSocket.onMessage(data => { 
														 | 
														
														 | 
														
															       this.imSocket.onMessage(data => { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         const { IMUI } = this.$refs; 
														 | 
														
														 | 
														
															         const { IMUI } = this.$refs; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         let message = JSON.parse(data); 
														 | 
														
														 | 
														
															         let message = JSON.parse(data); 
														 | 
													
												
											
										
											
												
													
														 | 
														
															@@ -338,7 +345,7 @@ export default { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															       const IMUI = this.$refs.IMUI; 
														 | 
														
														 | 
														
															       const IMUI = this.$refs.IMUI; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															       let params = {}; 
														 | 
														
														 | 
														
															       let params = {}; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															       if(message.type === "text"){  //text   image   voice   video 
														 | 
														
														 | 
														
															       if(message.type === "text"){  //text   image   voice   video 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-        params = {"sessionId":message.toContactId,"appKey":this.qwUser.appKey,"content":message.content}; 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        params = {"sessionId":message.toContactId,"appKey":this.qwUser.appKey,"content":message.content, "msgType": 1}; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         sendMsg(params).then(response => { 
														 | 
														
														 | 
														
															         sendMsg(params).then(response => { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															           const {code, data} = response 
														 | 
														
														 | 
														
															           const {code, data} = response 
														 | 
													
												
											
												
													
														| 
														 | 
														
															           if(code === 200){ 
														 | 
														
														 | 
														
															           if(code === 200){ 
														 | 
													
												
											
										
											
												
													
														 | 
														
															@@ -354,6 +361,24 @@ export default { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															       // image 
														 | 
														
														 | 
														
															       // image 
														 | 
													
												
											
												
													
														| 
														 | 
														
															       else if(message.type === "image"){ 
														 | 
														
														 | 
														
															       else if(message.type === "image"){ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         console.log("Event:image-click", message, next, file) 
														 | 
														
														 | 
														
															         console.log("Event:image-click", message, next, file) 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        const formData = new FormData(); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        formData.append("file", file); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        uploadOss(formData).then(response => { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+          const {code, url} = response 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+          if (code === 200) { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+            params = {"sessionId":message.toContactId,"appKey":this.qwUser.appKey,"content":url, "msgType": 2}; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+            sendMsg(params).then(response => { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+              const {code} = response 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+              if(code === 200){ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+                let conversation = IMUI.findConversation(message.toContactId); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+                conversation.lastSendTime = message.sendTime; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+                conversation.lastContent = message.content; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+                IMUI.topPopConversations(conversation); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+                next(); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+              } 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+            }); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+          } 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        }) 
														 | 
													
												
											
												
													
														| 
														 | 
														
															       } 
														 | 
														
														 | 
														
															       } 
														 | 
													
												
											
												
													
														| 
														 | 
														
															       // file 
														 | 
														
														 | 
														
															       // file 
														 | 
													
												
											
												
													
														| 
														 | 
														
															       else if(message.type === "file"){ 
														 | 
														
														 | 
														
															       else if(message.type === "file"){ 
														 |