fix: OSS客户端直传

This commit is contained in:
2025-12-24 16:05:21 +08:00
parent 84cafd66ae
commit 73f858fc07
5 changed files with 29 additions and 12 deletions

View File

@@ -75,6 +75,7 @@ const sendUploadedFile = () => {
room_id: chatStore.currentFriend.room_id,
read: true,
duration: 0,
isSent: true, // 标记为自己发送的消息,确保显示在右侧
};
chatStore.addMessage(messageObj, userStore.currentUser.doctor_id);
@@ -83,6 +84,7 @@ const sendUploadedFile = () => {
sendMessage({
senderId: userStore.currentUser.doctor_id,
receiverId: chatStore.currentFriend.id,
roomId: chatStore.currentFriend.room_id, // 添加房间ID
type: uploadPreview.value.type,
content: uploadPreview.value.url,
}).catch((error) => {