no message

cyl/master-0822
jscyl13849007907 3 months ago
parent b0aff270a3
commit 9479036eb3

@ -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()

@ -23,7 +23,7 @@
</div>
<div class="conversation-item-right">
<div class="conversation-item-top">
<Appellation class="conversation-item-title u-skeleton-fillet" fontSize="17" v-if="conversation.type === V2NIMConst.V2NIMConversationType.V2NIM_CONVERSATION_TYPE_P2P" :account="to" />
<Appellation :pid="props.conversation.conversationId" class="conversation-item-title u-skeleton-fillet" fontSize="17" v-if="conversation.type === V2NIMConst.V2NIMConversationType.V2NIM_CONVERSATION_TYPE_P2P" :account="to" />
<span v-else class="conversation-item-title u-skeleton-fillet">
{{ sessionName }}
</span>

Loading…
Cancel
Save