Compare commits

...

3 Commits

Author SHA1 Message Date
fcb1632244 Merge commit 'c8bc5b257ae9fdb6b0455dc874f5f55e1d1476f8' into dev-wdb 2026-02-11 17:11:28 +08:00
abe38ad86f no message 2026-02-11 17:11:20 +08:00
huxuejian
c8bc5b257a fix: 默认头像路径调整 2026-02-11 16:12:30 +08:00
9 changed files with 18 additions and 14 deletions

View File

@ -25,7 +25,7 @@ const props = defineProps({
} }
}) })
const list = computed(() => props.avatarList.map(i => i || '/static/default-avatar.svg')) const list = computed(() => props.avatarList.map(i => i || '/static/default-avatar.png'))
const size = computed(() => { const size = computed(() => {
const val = Number.isInteger(props.size) && props.size > 0 ? props.size : 144; const val = Number.isInteger(props.size) && props.size > 0 ? props.size : 144;

View File

@ -13,7 +13,7 @@
<view v-for="i in teamates" :key="i.userid" <view v-for="i in teamates" :key="i.userid"
class="member-card flex flex-shrink-0 min-w-120 mr-15 p-15" class="member-card flex flex-shrink-0 min-w-120 mr-15 p-15"
@click="toHomePage(i)"> @click="toHomePage(i)">
<image class="flex-shrink-0 avatar mr-10" :src="i.avatar || '/static/default-avatar.svg'" /> <image class="flex-shrink-0 avatar mr-10" :src="i.avatar || '/static/default-avatar.png'" />
<view class="flex-grow flex flex-col justify-between"> <view class="flex-grow flex flex-col justify-between">
<view> <view>
<view class="member-name leading-normal h-24 text-base font-semibold text-dark whitespace-nowrap"> <view class="member-name leading-normal h-24 text-base font-semibold text-dark whitespace-nowrap">

View File

@ -8,7 +8,7 @@
<view class="input-area"> <view class="input-area">
<textarea v-if="!showVoiceInput" class="text-input" v-model="inputText" placeholder="我来说两句..." <textarea v-if="!showVoiceInput" class="text-input" v-model="inputText" placeholder="我来说两句..."
@confirm="sendTextMessage" @focus="handleInputFocus" @input="handleInput" @confirm="sendTextMessage" @focus="handleInputFocus" @input="handleInput"
:auto-height="true" :show-confirm-bar="false" :adjust-position="false" /> :auto-height="true" :show-confirm-bar="false" :adjust-position="false" :hold-keyboard="true" />
<input v-else class="voice-input-btn" :class="{ recording: isRecording }" @touchstart="startRecord" <input v-else class="voice-input-btn" :class="{ recording: isRecording }" @touchstart="startRecord"
@touchmove="onRecordTouchMove" @touchend="stopRecord" @touchcancel="cancelRecord" :placeholder="isRecording ? '松开发送' : '按住说话'" disabled> @touchmove="onRecordTouchMove" @touchend="stopRecord" @touchcancel="cancelRecord" :placeholder="isRecording ? '松开发送' : '按住说话'" disabled>
</input> </input>
@ -151,11 +151,15 @@ const initRecorderManager = () => {
const sendTextMessage = async () => { const sendTextMessage = async () => {
if (!inputText.value.trim()) return; if (!inputText.value.trim()) return;
await sendMessage("text", inputText.value); const textToSend = inputText.value;
inputText.value = ""; inputText.value = "";
// await sendMessage("text", textToSend);
uni.hideKeyboard();
//
nextTick(() => {
// hold-keyboard
});
}; };

View File

@ -10,7 +10,7 @@ export default function useGroupAvatars() {
const groupAvatarMap = ref({}) // { groupID: [avatarUrl1, avatarUrl2, ...] } const groupAvatarMap = ref({}) // { groupID: [avatarUrl1, avatarUrl2, ...] }
const teamStore = useTeamStore() const teamStore = useTeamStore()
const patientDefaultAvatar = '/static/default-patient-avatar.png' const patientDefaultAvatar = '/static/default-patient-avatar.png'
const teamMemberDefaultAvatar = '/static/default-avatar.svg' const teamMemberDefaultAvatar = '/static/default-avatar.png'
/** /**
* 获取单个群聊的头像列表 * 获取单个群聊的头像列表

View File

@ -47,7 +47,7 @@ export default function useGroupChat(groupID) {
const getUserAvatar = (userId) => { const getUserAvatar = (userId) => {
const member = chatMember.value[userId] const member = chatMember.value[userId]
if (!member) { if (!member) {
return userId === openid.value ? '/static/default-patient-avatar.png' : '/static/default-avatar.svg' return userId === openid.value ? '/static/default-patient-avatar.png' : '/static/default-avatar.png'
} }
// 如果有头像且不为空字符串,返回头像 // 如果有头像且不为空字符串,返回头像
@ -55,7 +55,7 @@ export default function useGroupChat(groupID) {
return member.avatar return member.avatar
} }
return member.isTeamMember ? '/static/default-avatar.svg' : '/static/default-patient-avatar.png' return member.isTeamMember ? '/static/default-avatar.png' : '/static/default-patient-avatar.png'
} }
// 获取群聊信息和成员头像 // 获取群聊信息和成员头像
async function getGroupInfo() { async function getGroupInfo() {

View File

@ -23,7 +23,7 @@
<!-- 聊天消息区域 --> <!-- 聊天消息区域 -->
<scroll-view <scroll-view
class="chat-content" class="chat-content"
:style="{ bottom: (keyboardHeight > 0 ? keyboardHeight + 120 : 120) + 'px' }" :style="{ bottom: (keyboardHeight > 0 ? keyboardHeight + 60 : 60) + 'px' }"
scroll-y="true" scroll-y="true"
enhanced="true" enhanced="true"
bounces="false" bounces="false"

View File

@ -2,7 +2,7 @@
<view v-if="member" class="flex flex-col h-full items-center justify-center"> <view v-if="member" class="flex flex-col h-full items-center justify-center">
<view class="business-card"> <view class="business-card">
<view class="flex"> <view class="flex">
<image class="mr-10 avatar" :src="member.avatar || '/static/default-avatar.svg'"></image> <image class="mr-10 avatar" :src="member.avatar || '/static/default-avatar.png'"></image>
<view class="w-0 flex-grow leading-normal"> <view class="w-0 flex-grow leading-normal">
<view class="flex items-center"> <view class="flex items-center">
<view class="mr-5 text-lg font-semibold text-dark">{{ member.anotherName }}</view> <view class="mr-5 text-lg font-semibold text-dark">{{ member.anotherName }}</view>

View File

@ -25,7 +25,7 @@
</view> </view>
<view v-for="i in teammate.leaders" :key="i._id" class="mt-12 flex p-10 border-primary rounded-sm" <view v-for="i in teammate.leaders" :key="i._id" class="mt-12 flex p-10 border-primary rounded-sm"
@click="toHomePage(i.userid)"> @click="toHomePage(i.userid)">
<image class="flex-shrink-0 mr-10 avatar" :src="i.avatar || '/static/default-avatar.svg'"></image> <image class="flex-shrink-0 mr-10 avatar" :src="i.avatar || '/static/default-avatar.png'"></image>
<view class="w-0 flex-grow leading-normal"> <view class="w-0 flex-grow leading-normal">
<view class="flex items-center justify-between"> <view class="flex items-center justify-between">
<view class="flex-shrink-0 mr-5 view-lg text-dark font-semibold">{{ i.anotherName }}</view> <view class="flex-shrink-0 mr-5 view-lg text-dark font-semibold">{{ i.anotherName }}</view>
@ -50,7 +50,7 @@
</view> </view>
<view v-for="i in teammate.members" :key="i._id" class="mt-12 flex p-10 border-primary rounded-sm" <view v-for="i in teammate.members" :key="i._id" class="mt-12 flex p-10 border-primary rounded-sm"
@click="toHomePage(i.userid)"> @click="toHomePage(i.userid)">
<image class="flex-shrink-0 mr-10 avatar" :src="i.avatar || '/static/default-avatar.svg'"></image> <image class="flex-shrink-0 mr-10 avatar" :src="i.avatar || '/static/default-avatar.png'"></image>
<view class="w-0 flex-grow leading-normal"> <view class="w-0 flex-grow leading-normal">
<view class="flex items-center justify-between"> <view class="flex items-center justify-between">
<view class="flex-shrink-0 mr-5 view-lg text-dark font-semibold">{{ i.anotherName }}</view> <view class="flex-shrink-0 mr-5 view-lg text-dark font-semibold">{{ i.anotherName }}</view>

View File

@ -144,7 +144,7 @@ function mergeConversationData(conversation, groupDetailsMap) {
name: formatConversationName(groupDetail), name: formatConversationName(groupDetail),
// 更新头像(优先使用已有头像,避免闪动) // 更新头像(优先使用已有头像,避免闪动)
avatar: conversation.avatar || groupDetail.patient?.avatar || '/static/default-avatar.svg', avatar: conversation.avatar || groupDetail.patient?.avatar || '/static/default-avatar.png',
// 【修复】保留未读消息数(确保不被覆盖) // 【修复】保留未读消息数(确保不被覆盖)
unreadCount: conversation.unreadCount || 0 unreadCount: conversation.unreadCount || 0