修改wyxd居中和去内边距
This commit is contained in:
@@ -244,7 +244,7 @@ onLoad((options) => {
|
|||||||
.wyxd-slide-area {
|
.wyxd-slide-area {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
min-height: 0;
|
min-height: 0;
|
||||||
padding: 20rpx;
|
/* padding: 20rpx; */
|
||||||
}
|
}
|
||||||
|
|
||||||
.wyxd-slide-scroll {
|
.wyxd-slide-scroll {
|
||||||
@@ -254,10 +254,18 @@ onLoad((options) => {
|
|||||||
box-shadow: 0 2rpx 12rpx rgba(0, 0, 0, 0.04);
|
box-shadow: 0 2rpx 12rpx rgba(0, 0, 0, 0.04);
|
||||||
}
|
}
|
||||||
|
|
||||||
.wyxd-slide-card {
|
/* .wyxd-slide-card {
|
||||||
padding: 32rpx;
|
padding: 32rpx;
|
||||||
min-height: 100%;
|
min-height: 100%;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
|
} */
|
||||||
|
.wyxd-slide-card {
|
||||||
|
min-height: 100%;
|
||||||
|
box-sizing: border-box;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
flex-direction: column; /* 子元素垂直排列 */
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ===== 底部翻页 ===== */
|
/* ===== 底部翻页 ===== */
|
||||||
|
|||||||
116
unpackage/dist/dev/app-plus/app-service.js
vendored
116
unpackage/dist/dev/app-plus/app-service.js
vendored
@@ -5639,7 +5639,7 @@ This will fail in production.`);
|
|||||||
if (friendSocketStore.isConnected)
|
if (friendSocketStore.isConnected)
|
||||||
return;
|
return;
|
||||||
if (!userToken.value || !UserId.value) {
|
if (!userToken.value || !UserId.value) {
|
||||||
formatAppLog("warn", "at pages/Chat/Chat.vue:346", "Token或UserId未准备好");
|
formatAppLog("warn", "at pages/Chat/Chat.vue:345", "Token或UserId未准备好");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
friendSocketStore.connect({
|
friendSocketStore.connect({
|
||||||
@@ -5725,7 +5725,7 @@ This will fail in production.`);
|
|||||||
);
|
);
|
||||||
return html;
|
return html;
|
||||||
} catch (e2) {
|
} catch (e2) {
|
||||||
formatAppLog("error", "at pages/Chat/Chat.vue:472", "解析失败", e2);
|
formatAppLog("error", "at pages/Chat/Chat.vue:471", "解析失败", e2);
|
||||||
return content;
|
return content;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@@ -5784,7 +5784,7 @@ This will fail in production.`);
|
|||||||
files
|
files
|
||||||
};
|
};
|
||||||
} catch (e2) {
|
} catch (e2) {
|
||||||
formatAppLog("error", "at pages/Chat/Chat.vue:549", "解析文件信息失败:", e2);
|
formatAppLog("error", "at pages/Chat/Chat.vue:548", "解析文件信息失败:", e2);
|
||||||
return {
|
return {
|
||||||
textContent: content,
|
textContent: content,
|
||||||
files: []
|
files: []
|
||||||
@@ -5821,7 +5821,7 @@ This will fail in production.`);
|
|||||||
}
|
}
|
||||||
takeUserConversations();
|
takeUserConversations();
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
formatAppLog("error", "at pages/Chat/Chat.vue:594", "新建普通会话失败:", error);
|
formatAppLog("error", "at pages/Chat/Chat.vue:593", "新建普通会话失败:", error);
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: "创建会话失败,请重试",
|
title: "创建会话失败,请重试",
|
||||||
icon: "none"
|
icon: "none"
|
||||||
@@ -5859,7 +5859,7 @@ This will fail in production.`);
|
|||||||
};
|
};
|
||||||
const previewFileArray = vue.ref([]);
|
const previewFileArray = vue.ref([]);
|
||||||
const uploadPhoto = () => {
|
const uploadPhoto = () => {
|
||||||
formatAppLog("log", "at pages/Chat/Chat.vue:643", "点击了拍照上传");
|
formatAppLog("log", "at pages/Chat/Chat.vue:642", "点击了拍照上传");
|
||||||
uni.chooseImage({
|
uni.chooseImage({
|
||||||
count: 1,
|
count: 1,
|
||||||
sourceType: ["camera", "album"],
|
sourceType: ["camera", "album"],
|
||||||
@@ -5882,7 +5882,7 @@ This will fail in production.`);
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
fail: (err) => {
|
fail: (err) => {
|
||||||
formatAppLog("error", "at pages/Chat/Chat.vue:661", "选择图片失败", err);
|
formatAppLog("error", "at pages/Chat/Chat.vue:660", "选择图片失败", err);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
@@ -5891,12 +5891,12 @@ This will fail in production.`);
|
|||||||
};
|
};
|
||||||
const fileList = vue.ref([]);
|
const fileList = vue.ref([]);
|
||||||
const uploadFile = () => {
|
const uploadFile = () => {
|
||||||
formatAppLog("log", "at pages/Chat/Chat.vue:672", "点击了上传文件");
|
formatAppLog("log", "at pages/Chat/Chat.vue:671", "点击了上传文件");
|
||||||
chooseFile({
|
chooseFile({
|
||||||
count: 5,
|
count: 5,
|
||||||
type: "all",
|
type: "all",
|
||||||
success: (res) => {
|
success: (res) => {
|
||||||
formatAppLog("log", "at pages/Chat/Chat.vue:677", "成功了");
|
formatAppLog("log", "at pages/Chat/Chat.vue:676", "成功了");
|
||||||
fileList.value = res.tempFiles;
|
fileList.value = res.tempFiles;
|
||||||
previewFileArray.value.push(...res.tempFiles);
|
previewFileArray.value.push(...res.tempFiles);
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
@@ -5905,7 +5905,7 @@ This will fail in production.`);
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
fail: (err) => {
|
fail: (err) => {
|
||||||
formatAppLog("error", "at pages/Chat/Chat.vue:688", "选择失败:", err);
|
formatAppLog("error", "at pages/Chat/Chat.vue:687", "选择失败:", err);
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: "选择失败",
|
title: "选择失败",
|
||||||
icon: "error"
|
icon: "error"
|
||||||
@@ -6107,7 +6107,7 @@ This will fail in production.`);
|
|||||||
previewFileArray.value = [];
|
previewFileArray.value = [];
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
uni.hideLoading();
|
uni.hideLoading();
|
||||||
formatAppLog("error", "at pages/Chat/Chat.vue:923", "文件上传失败:", err);
|
formatAppLog("error", "at pages/Chat/Chat.vue:922", "文件上传失败:", err);
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: "文件上传失败,请重试",
|
title: "文件上传失败,请重试",
|
||||||
icon: "error"
|
icon: "error"
|
||||||
@@ -6130,6 +6130,17 @@ This will fail in production.`);
|
|||||||
await handleFriendConnect();
|
await handleFriendConnect();
|
||||||
const receiverId = getReceiverId();
|
const receiverId = getReceiverId();
|
||||||
const hasFiles = uploadedFiles.value.length > 0;
|
const hasFiles = uploadedFiles.value.length > 0;
|
||||||
|
const newMessageData = {
|
||||||
|
"sender": UserId.value,
|
||||||
|
"receiver": receiverId,
|
||||||
|
"content": textMessage.value,
|
||||||
|
"taskId": null,
|
||||||
|
"avatar": null,
|
||||||
|
"createTime": "",
|
||||||
|
"messageType": "null",
|
||||||
|
"contentJson": hasFiles ? JSON.stringify(uploadedFiles.value) : "null"
|
||||||
|
};
|
||||||
|
allmessages.value = [...allmessages.value, newMessageData];
|
||||||
const body = {
|
const body = {
|
||||||
"command": 1,
|
"command": 1,
|
||||||
"sender": UserId.value,
|
"sender": UserId.value,
|
||||||
@@ -6148,17 +6159,6 @@ This will fail in production.`);
|
|||||||
"body": body
|
"body": body
|
||||||
};
|
};
|
||||||
friendSocketStore.send(data);
|
friendSocketStore.send(data);
|
||||||
const newMessageData = {
|
|
||||||
"sender": UserId.value,
|
|
||||||
"receiver": receiverId,
|
|
||||||
"content": textMessage.value,
|
|
||||||
"taskId": null,
|
|
||||||
"avatar": null,
|
|
||||||
"createTime": "",
|
|
||||||
"messageType": "null",
|
|
||||||
"contentJson": hasFiles ? JSON.stringify(uploadedFiles.value) : "null"
|
|
||||||
};
|
|
||||||
allmessages.value = [...allmessages.value, newMessageData];
|
|
||||||
textMessage.value = "";
|
textMessage.value = "";
|
||||||
uploadedFiles.value = [];
|
uploadedFiles.value = [];
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
@@ -6180,11 +6180,6 @@ This will fail in production.`);
|
|||||||
if (hasFiles) {
|
if (hasFiles) {
|
||||||
body.uploadVos = uploadedFiles.value;
|
body.uploadVos = uploadedFiles.value;
|
||||||
}
|
}
|
||||||
const data = {
|
|
||||||
"version": "1.1",
|
|
||||||
"body": body
|
|
||||||
};
|
|
||||||
friendSocketStore.send(data);
|
|
||||||
const newMessageData = {
|
const newMessageData = {
|
||||||
"id": allmessages.value.length + 1,
|
"id": allmessages.value.length + 1,
|
||||||
"message": textMessage.value,
|
"message": textMessage.value,
|
||||||
@@ -6195,6 +6190,11 @@ This will fail in production.`);
|
|||||||
"sender": UserId.value
|
"sender": UserId.value
|
||||||
};
|
};
|
||||||
allmessages.value = [...allmessages.value, newMessageData];
|
allmessages.value = [...allmessages.value, newMessageData];
|
||||||
|
const data = {
|
||||||
|
"version": "1.1",
|
||||||
|
"body": body
|
||||||
|
};
|
||||||
|
friendSocketStore.send(data);
|
||||||
textMessage.value = "";
|
textMessage.value = "";
|
||||||
uploadedFiles.value = [];
|
uploadedFiles.value = [];
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
@@ -6210,6 +6210,10 @@ This will fail in production.`);
|
|||||||
messageContent = messageContent ? `${messageContent}
|
messageContent = messageContent ? `${messageContent}
|
||||||
[文件信息:${fileJson}]` : `[文件信息:${fileJson}]`;
|
[文件信息:${fileJson}]` : `[文件信息:${fileJson}]`;
|
||||||
}
|
}
|
||||||
|
allmessages.value = [...allmessages.value, {
|
||||||
|
role: "user",
|
||||||
|
content: messageContent
|
||||||
|
}];
|
||||||
const data = {
|
const data = {
|
||||||
"type": "chat",
|
"type": "chat",
|
||||||
"conversation_id": currentSessionId.value,
|
"conversation_id": currentSessionId.value,
|
||||||
@@ -6218,10 +6222,6 @@ This will fail in production.`);
|
|||||||
socketStore.send(data);
|
socketStore.send(data);
|
||||||
isThinking.value = true;
|
isThinking.value = true;
|
||||||
isSelfSent.value = true;
|
isSelfSent.value = true;
|
||||||
allmessages.value = [...allmessages.value, {
|
|
||||||
role: "user",
|
|
||||||
content: messageContent
|
|
||||||
}];
|
|
||||||
streamingMessageId.value = "streaming-" + Date.now();
|
streamingMessageId.value = "streaming-" + Date.now();
|
||||||
allmessages.value = [...allmessages.value, {
|
allmessages.value = [...allmessages.value, {
|
||||||
role: "assistant",
|
role: "assistant",
|
||||||
@@ -6241,15 +6241,15 @@ This will fail in production.`);
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
const stopConversation = async () => {
|
const stopConversation = async () => {
|
||||||
formatAppLog("log", "at pages/Chat/Chat.vue:1092", "中断对话 - 当前会话ID:", currentSessionId.value);
|
formatAppLog("log", "at pages/Chat/Chat.vue:1082", "中断对话 - 当前会话ID:", currentSessionId.value);
|
||||||
try {
|
try {
|
||||||
await socketStore.send({
|
await socketStore.send({
|
||||||
type: "stop",
|
type: "stop",
|
||||||
conversation_id: currentSessionId.value
|
conversation_id: currentSessionId.value
|
||||||
});
|
});
|
||||||
formatAppLog("log", "at pages/Chat/Chat.vue:1098", "中断指令已发送成功");
|
formatAppLog("log", "at pages/Chat/Chat.vue:1088", "中断指令已发送成功");
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
formatAppLog("error", "at pages/Chat/Chat.vue:1100", "中断指令发送失败:", err);
|
formatAppLog("error", "at pages/Chat/Chat.vue:1090", "中断指令发送失败:", err);
|
||||||
}
|
}
|
||||||
if (streamingMessageId.value) {
|
if (streamingMessageId.value) {
|
||||||
allmessages.value = allmessages.value.filter((m) => m._id !== streamingMessageId.value);
|
allmessages.value = allmessages.value.filter((m) => m._id !== streamingMessageId.value);
|
||||||
@@ -6267,9 +6267,9 @@ This will fail in production.`);
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
vue.watch(() => socketStore.isThinking, (newVal, oldVal) => {
|
vue.watch(() => socketStore.isThinking, (newVal, oldVal) => {
|
||||||
formatAppLog("log", "at pages/Chat/Chat.vue:1124", "isThinking 变化:", oldVal, "→", newVal, "messageString:", socketStore.messageString);
|
formatAppLog("log", "at pages/Chat/Chat.vue:1114", "isThinking 变化:", oldVal, "→", newVal, "messageString:", socketStore.messageString);
|
||||||
if (!oldVal && newVal) {
|
if (!oldVal && newVal) {
|
||||||
formatAppLog("log", "at pages/Chat/Chat.vue:1127", "AI开始回复(跨设备同步),锁定输入框");
|
formatAppLog("log", "at pages/Chat/Chat.vue:1117", "AI开始回复(跨设备同步),锁定输入框");
|
||||||
isThinking.value = true;
|
isThinking.value = true;
|
||||||
if (!streamingMessageId.value) {
|
if (!streamingMessageId.value) {
|
||||||
streamingMessageId.value = "streaming-" + Date.now();
|
streamingMessageId.value = "streaming-" + Date.now();
|
||||||
@@ -6283,7 +6283,7 @@ This will fail in production.`);
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (oldVal && !newVal) {
|
if (oldVal && !newVal) {
|
||||||
formatAppLog("log", "at pages/Chat/Chat.vue:1143", "AI回复结束(正常/中断),解锁并刷新消息列表");
|
formatAppLog("log", "at pages/Chat/Chat.vue:1133", "AI回复结束(正常/中断),解锁并刷新消息列表");
|
||||||
if (streamingMessageId.value) {
|
if (streamingMessageId.value) {
|
||||||
allmessages.value = allmessages.value.filter((m) => m._id !== streamingMessageId.value);
|
allmessages.value = allmessages.value.filter((m) => m._id !== streamingMessageId.value);
|
||||||
streamingMessageId.value = null;
|
streamingMessageId.value = null;
|
||||||
@@ -6335,15 +6335,15 @@ This will fail in production.`);
|
|||||||
UserData.value = await getUserInfo(userToken.value);
|
UserData.value = await getUserInfo(userToken.value);
|
||||||
UserId.value = UserData.value._id;
|
UserId.value = UserData.value._id;
|
||||||
UserAvatar.value = UserData.value.avatar || "";
|
UserAvatar.value = UserData.value.avatar || "";
|
||||||
formatAppLog("log", "at pages/Chat/Chat.vue:1207", "用户信息已加载:", UserId.value, UserAvatar.value);
|
formatAppLog("log", "at pages/Chat/Chat.vue:1197", "用户信息已加载:", UserId.value, UserAvatar.value);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
formatAppLog("error", "at pages/Chat/Chat.vue:1209", "获取用户信息失败:", error);
|
formatAppLog("error", "at pages/Chat/Chat.vue:1199", "获取用户信息失败:", error);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
const takeUserConversations = async () => {
|
const takeUserConversations = async () => {
|
||||||
try {
|
try {
|
||||||
userToken.value = getToken();
|
userToken.value = getToken();
|
||||||
formatAppLog("log", "at pages/Chat/Chat.vue:1217", "token:", userToken.value);
|
formatAppLog("log", "at pages/Chat/Chat.vue:1207", "token:", userToken.value);
|
||||||
UserConversations.value = await getUserConversations(userToken.value) || [];
|
UserConversations.value = await getUserConversations(userToken.value) || [];
|
||||||
const savedSessionId = getCurrentSessionId();
|
const savedSessionId = getCurrentSessionId();
|
||||||
if (savedSessionId && UserConversations.value.some((c) => c._id === savedSessionId)) {
|
if (savedSessionId && UserConversations.value.some((c) => c._id === savedSessionId)) {
|
||||||
@@ -6353,7 +6353,7 @@ This will fail in production.`);
|
|||||||
} else {
|
} else {
|
||||||
currentSessionId.value = "";
|
currentSessionId.value = "";
|
||||||
}
|
}
|
||||||
formatAppLog("log", "at pages/Chat/Chat.vue:1229", "保存会话id:", currentSessionId.value);
|
formatAppLog("log", "at pages/Chat/Chat.vue:1219", "保存会话id:", currentSessionId.value);
|
||||||
uni.setStorageSync("currentSessionId", currentSessionId.value);
|
uni.setStorageSync("currentSessionId", currentSessionId.value);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
@@ -6365,17 +6365,17 @@ This will fail in production.`);
|
|||||||
const FriendInfoList = vue.ref([]);
|
const FriendInfoList = vue.ref([]);
|
||||||
const takeFriendList = async () => {
|
const takeFriendList = async () => {
|
||||||
try {
|
try {
|
||||||
formatAppLog("log", "at pages/Chat/Chat.vue:1244", "开始获取好友列表");
|
formatAppLog("log", "at pages/Chat/Chat.vue:1234", "开始获取好友列表");
|
||||||
const friendList = await getChatFriend(UserId.value);
|
const friendList = await getChatFriend(UserId.value);
|
||||||
formatAppLog("log", "at pages/Chat/Chat.vue:1247", "friendList:", friendList);
|
formatAppLog("log", "at pages/Chat/Chat.vue:1237", "friendList:", friendList);
|
||||||
if (friendList && friendList.length) {
|
if (friendList && friendList.length) {
|
||||||
FriendInfoList.value = await takeUserAvatar(friendList);
|
FriendInfoList.value = await takeUserAvatar(friendList);
|
||||||
} else {
|
} else {
|
||||||
FriendInfoList.value = [];
|
FriendInfoList.value = [];
|
||||||
formatAppLog("log", "at pages/Chat/Chat.vue:1252", "好友列表为空");
|
formatAppLog("log", "at pages/Chat/Chat.vue:1242", "好友列表为空");
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
formatAppLog("error", "at pages/Chat/Chat.vue:1255", "获取好友列表失败:", error);
|
formatAppLog("error", "at pages/Chat/Chat.vue:1245", "获取好友列表失败:", error);
|
||||||
FriendInfoList.value = [];
|
FriendInfoList.value = [];
|
||||||
} finally {
|
} finally {
|
||||||
UserConversations.value = FriendInfoList.value;
|
UserConversations.value = FriendInfoList.value;
|
||||||
@@ -6402,17 +6402,17 @@ This will fail in production.`);
|
|||||||
};
|
};
|
||||||
});
|
});
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
formatAppLog("error", "at pages/Chat/Chat.vue:1285", "获取好友头像失败", err);
|
formatAppLog("error", "at pages/Chat/Chat.vue:1275", "获取好友头像失败", err);
|
||||||
return friendList;
|
return friendList;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
const GroupList = vue.ref([]);
|
const GroupList = vue.ref([]);
|
||||||
const takeGroupList = async () => {
|
const takeGroupList = async () => {
|
||||||
try {
|
try {
|
||||||
formatAppLog("log", "at pages/Chat/Chat.vue:1295", "开始获取群聊列表");
|
formatAppLog("log", "at pages/Chat/Chat.vue:1285", "开始获取群聊列表");
|
||||||
GroupList.value = await getGroup(UserId.value);
|
GroupList.value = await getGroup(UserId.value);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
formatAppLog("error", "at pages/Chat/Chat.vue:1300", "获取群聊列表失败:", error);
|
formatAppLog("error", "at pages/Chat/Chat.vue:1290", "获取群聊列表失败:", error);
|
||||||
GroupList.value = [];
|
GroupList.value = [];
|
||||||
} finally {
|
} finally {
|
||||||
UserConversations.value = GroupList.value;
|
UserConversations.value = GroupList.value;
|
||||||
@@ -6424,22 +6424,22 @@ This will fail in production.`);
|
|||||||
return [];
|
return [];
|
||||||
try {
|
try {
|
||||||
const memberIds = memberList.map((item) => item.groupContactId);
|
const memberIds = memberList.map((item) => item.groupContactId);
|
||||||
formatAppLog("log", "at pages/Chat/Chat.vue:1314", "请求头像的ID列表:", memberIds);
|
formatAppLog("log", "at pages/Chat/Chat.vue:1304", "请求头像的ID列表:", memberIds);
|
||||||
const memberAvatarList = await getUserAvatar(userToken.value, memberIds);
|
const memberAvatarList = await getUserAvatar(userToken.value, memberIds);
|
||||||
formatAppLog("log", "at pages/Chat/Chat.vue:1316", "头像接口返回数据:", memberAvatarList);
|
formatAppLog("log", "at pages/Chat/Chat.vue:1306", "头像接口返回数据:", memberAvatarList);
|
||||||
const userMap = new Map(memberAvatarList.map((user) => [user.user_id, user]) || []);
|
const userMap = new Map(memberAvatarList.map((user) => [user.user_id, user]) || []);
|
||||||
formatAppLog("log", "at pages/Chat/Chat.vue:1319", "userMap的keys:", Array.from(userMap.keys()));
|
formatAppLog("log", "at pages/Chat/Chat.vue:1309", "userMap的keys:", Array.from(userMap.keys()));
|
||||||
return memberList.map((member) => {
|
return memberList.map((member) => {
|
||||||
const memberId = member.groupContactId;
|
const memberId = member.groupContactId;
|
||||||
const userInfo = userMap.get(memberId);
|
const userInfo = userMap.get(memberId);
|
||||||
formatAppLog("log", "at pages/Chat/Chat.vue:1324", `查找 ${memberId} 的头像:`, userInfo);
|
formatAppLog("log", "at pages/Chat/Chat.vue:1314", `查找 ${memberId} 的头像:`, userInfo);
|
||||||
return {
|
return {
|
||||||
...member,
|
...member,
|
||||||
avatar: (userInfo == null ? void 0 : userInfo.avatar) || null
|
avatar: (userInfo == null ? void 0 : userInfo.avatar) || null
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
formatAppLog("error", "at pages/Chat/Chat.vue:1331", "获取群成员头像失败", err);
|
formatAppLog("error", "at pages/Chat/Chat.vue:1321", "获取群成员头像失败", err);
|
||||||
return memberList;
|
return memberList;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@@ -6486,12 +6486,12 @@ This will fail in production.`);
|
|||||||
const takeGroupMessages = async () => {
|
const takeGroupMessages = async () => {
|
||||||
try {
|
try {
|
||||||
allmessages.value = await getGroupMessages(currentSessionId.value) || [];
|
allmessages.value = await getGroupMessages(currentSessionId.value) || [];
|
||||||
formatAppLog("log", "at pages/Chat/Chat.vue:1395", "群聊消息:", allmessages.value);
|
formatAppLog("log", "at pages/Chat/Chat.vue:1385", "群聊消息:", allmessages.value);
|
||||||
const memberList = await getGroupMemberList(currentSessionId.value);
|
const memberList = await getGroupMemberList(currentSessionId.value);
|
||||||
formatAppLog("log", "at pages/Chat/Chat.vue:1398", "获取到的群成员列表:", memberList);
|
formatAppLog("log", "at pages/Chat/Chat.vue:1388", "获取到的群成员列表:", memberList);
|
||||||
if (memberList && memberList.length) {
|
if (memberList && memberList.length) {
|
||||||
groupMemberList.value = await takeGroupMemberAvatar(memberList);
|
groupMemberList.value = await takeGroupMemberAvatar(memberList);
|
||||||
formatAppLog("log", "at pages/Chat/Chat.vue:1401", "群成员列表(带头像):", groupMemberList.value);
|
formatAppLog("log", "at pages/Chat/Chat.vue:1391", "群成员列表(带头像):", groupMemberList.value);
|
||||||
} else {
|
} else {
|
||||||
groupMemberList.value = [];
|
groupMemberList.value = [];
|
||||||
}
|
}
|
||||||
@@ -6515,9 +6515,9 @@ This will fail in production.`);
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
vue.watch(() => friendSocketStore.MessageReceived, (newId) => {
|
vue.watch(() => friendSocketStore.MessageReceived, (newId) => {
|
||||||
formatAppLog("log", "at pages/Chat/Chat.vue:1448", "收到了好友消息");
|
formatAppLog("log", "at pages/Chat/Chat.vue:1438", "收到了好友消息");
|
||||||
if (newId) {
|
if (newId) {
|
||||||
formatAppLog("log", "at pages/Chat/Chat.vue:1450", "ChatType:", ChatType.value);
|
formatAppLog("log", "at pages/Chat/Chat.vue:1440", "ChatType:", ChatType.value);
|
||||||
switch (ChatType.value) {
|
switch (ChatType.value) {
|
||||||
case 0:
|
case 0:
|
||||||
takeConversationMessages();
|
takeConversationMessages();
|
||||||
@@ -6532,7 +6532,7 @@ This will fail in production.`);
|
|||||||
friendSocketStore.MessageReceived = false;
|
friendSocketStore.MessageReceived = false;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
formatAppLog("log", "at pages/Chat/Chat.vue:1466", "default 分支");
|
formatAppLog("log", "at pages/Chat/Chat.vue:1456", "default 分支");
|
||||||
friendSocketStore.MessageReceived = false;
|
friendSocketStore.MessageReceived = false;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
14
unpackage/dist/dev/app-plus/pages/WYXD/WYXD.css
vendored
14
unpackage/dist/dev/app-plus/pages/WYXD/WYXD.css
vendored
@@ -378,7 +378,7 @@
|
|||||||
.wyxd-slide-area[data-v-507487c4] {
|
.wyxd-slide-area[data-v-507487c4] {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
min-height: 0;
|
min-height: 0;
|
||||||
padding: 0.625rem;
|
/* padding: 20rpx; */
|
||||||
}
|
}
|
||||||
.wyxd-slide-scroll[data-v-507487c4] {
|
.wyxd-slide-scroll[data-v-507487c4] {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
@@ -386,10 +386,18 @@
|
|||||||
border-radius: 0.375rem;
|
border-radius: 0.375rem;
|
||||||
box-shadow: 0 0.0625rem 0.375rem rgba(0, 0, 0, 0.04);
|
box-shadow: 0 0.0625rem 0.375rem rgba(0, 0, 0, 0.04);
|
||||||
}
|
}
|
||||||
.wyxd-slide-card[data-v-507487c4] {
|
/* .wyxd-slide-card {
|
||||||
padding: 1rem;
|
padding: 32rpx;
|
||||||
min-height: 100%;
|
min-height: 100%;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
|
} */
|
||||||
|
.wyxd-slide-card[data-v-507487c4] {
|
||||||
|
min-height: 100%;
|
||||||
|
box-sizing: border-box;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
flex-direction: column; /* 子元素垂直排列 */
|
||||||
}
|
}
|
||||||
/* ===== 底部翻页 ===== */
|
/* ===== 底部翻页 ===== */
|
||||||
.wyxd-pager[data-v-507487c4] {
|
.wyxd-pager[data-v-507487c4] {
|
||||||
|
|||||||
Reference in New Issue
Block a user