From 9479036eb37aa9a5cb563daef47acbbe37de539c Mon Sep 17 00:00:00 2001 From: jscyl13849007907 <13849007907@163.com> Date: Thu, 21 Aug 2025 16:44:29 +0800 Subject: [PATCH] no message --- pages/NEUIKit/components/Appellation.vue | 53 ++++++++++++---------- .../conversation-list/conversation-item.vue | 2 +- 2 files changed, 30 insertions(+), 25 deletions(-) diff --git a/pages/NEUIKit/components/Appellation.vue b/pages/NEUIKit/components/Appellation.vue index 4829534..abfe441 100644 --- a/pages/NEUIKit/components/Appellation.vue +++ b/pages/NEUIKit/components/Appellation.vue @@ -22,7 +22,7 @@ import { deepClone } from '../utils' const appellation = ref('') -const { account, teamId, ignoreAlias, nickFromMsg } = withDefaults( +const { pid,account, teamId, ignoreAlias, nickFromMsg } = withDefaults( defineProps<{ account: string teamId?: string @@ -30,6 +30,7 @@ const { account, teamId, ignoreAlias, nickFromMsg } = withDefaults( nickFromMsg?: string color?: string fontSize?: number + pid?: number }>(), { teamId: undefined, @@ -37,34 +38,38 @@ const { account, teamId, ignoreAlias, nickFromMsg } = withDefaults( nickFromMsg: '-', color: '#333', fontSize: 16, + pid:0 } ) const subtitle = ref(''); const uninstallAppellationWatch = autorun(() => { - // async function getUserInfo() { - // try { - // const res = await uni.$UIKitStore.userStore.getUserActive('10023') - // return res - // } catch (error) { - // console.error('getUserInfo error:', error) - // } - // } - // getUserInfo().then(res => { - // if(res.serverExtension){ - // subtitle.value = '@' + JSON.parse(res.serverExtension).fullName; - // }else{ - // subtitle.value = ''; - // } - // appellation.value = res.name; - // }) - appellation.value = deepClone( - uni.$UIKitStore.uiStore.getAppellation({ - account, - teamId, - ignoreAlias, - nickFromMsg, + if(pid){ + async function getUserInfo() { + try { + const res = await uni.$UIKitStore.userStore.getUserActive(pid.split('|')[2]) + return res + } catch (error) { + console.error('getUserInfo error:', error) + } + } + getUserInfo().then(res => { + if(res.serverExtension){ + subtitle.value = '@' + JSON.parse(res.serverExtension).fullName; + }else{ + subtitle.value = ''; + } + appellation.value = res.name; }) - ) + }else{ + appellation.value = deepClone( + uni.$UIKitStore.uiStore.getAppellation({ + account, + teamId, + ignoreAlias, + nickFromMsg, + }) + ) + } }) onUnmounted(() => { uninstallAppellationWatch() diff --git a/pages/NEUIKit/pages/Conversation/conversation-list/conversation-item.vue b/pages/NEUIKit/pages/Conversation/conversation-list/conversation-item.vue index 1d28ccf..3a4ac74 100644 --- a/pages/NEUIKit/pages/Conversation/conversation-list/conversation-item.vue +++ b/pages/NEUIKit/pages/Conversation/conversation-list/conversation-item.vue @@ -23,7 +23,7 @@
- + {{ sessionName }}