From 625bf5dff7267038342333c8cdc62a33b02c30da Mon Sep 17 00:00:00 2001
From: zengh <123456>
Date: Sun, 04 Jul 2021 15:05:27 +0800
Subject: [PATCH] 聊天室调整

---
 pages/groupChat/chatingQZ.vue |   14 ++++++++------
 1 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/pages/groupChat/chatingQZ.vue b/pages/groupChat/chatingQZ.vue
index fde4bf8..0d47c8f 100644
--- a/pages/groupChat/chatingQZ.vue
+++ b/pages/groupChat/chatingQZ.vue
@@ -221,8 +221,8 @@
 						'content-type': 'application/x-www-form-urlencoded', 
 					},
 					data:{
-						//gid: that.recipientId
-						gid: "1"
+						gid: that.recipientId
+						//gid: "1"
 					},
 					success:(res)=> {
 						// recAvatar: null,//接收者头像
@@ -234,7 +234,9 @@
 							}else{
 								resdata[i].avatar = resdata[i].avatar;
 							}
-							
+							if(resdata[i].sender_id == that.senId){
+								that.senAvatar = resdata[i].avatar;
+							}
 							
 						}
 						let msg = res.data.data;
@@ -325,12 +327,12 @@
 				}
 				nowTime = t
 				let sendMsg = {
-					senderId: that.senId,
-					recipientId: that.recipientId,
+					sender_id: that.senId,
 					post_message: e.message,
 					message_type: 0,
 					status: 0,
 					post_time: nowTime,
+					avatar:that.senAvatar
 				}
 				
 				uni.request({
@@ -342,9 +344,9 @@
 						messageType: 0,
 						status: 0,
 						postTime: sentTime,
+						gid:that.recipientId
 					},
 					success:(res)=> {
-						
 					}
 				});
 				

--
Gitblit v1.9.3