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 appellation = ref('')
const { account, teamId, ignoreAlias, nickFromMsg } = withDefaults( const { pid,account, teamId, ignoreAlias, nickFromMsg } = withDefaults(
defineProps<{ defineProps<{
account: string account: string
teamId?: string teamId?: string
@ -30,6 +30,7 @@ const { account, teamId, ignoreAlias, nickFromMsg } = withDefaults(
nickFromMsg?: string nickFromMsg?: string
color?: string color?: string
fontSize?: number fontSize?: number
pid?: number
}>(), }>(),
{ {
teamId: undefined, teamId: undefined,
@ -37,26 +38,29 @@ const { account, teamId, ignoreAlias, nickFromMsg } = withDefaults(
nickFromMsg: '-', nickFromMsg: '-',
color: '#333', color: '#333',
fontSize: 16, fontSize: 16,
pid:0
} }
) )
const subtitle = ref(''); const subtitle = ref('');
const uninstallAppellationWatch = autorun(() => { const uninstallAppellationWatch = autorun(() => {
// async function getUserInfo() { if(pid){
// try { async function getUserInfo() {
// const res = await uni.$UIKitStore.userStore.getUserActive('10023') try {
// return res const res = await uni.$UIKitStore.userStore.getUserActive(pid.split('|')[2])
// } catch (error) { return res
// console.error('getUserInfo error:', error) } catch (error) {
// } console.error('getUserInfo error:', error)
// } }
// getUserInfo().then(res => { }
// if(res.serverExtension){ getUserInfo().then(res => {
// subtitle.value = '@' + JSON.parse(res.serverExtension).fullName; if(res.serverExtension){
// }else{ subtitle.value = '@' + JSON.parse(res.serverExtension).fullName;
// subtitle.value = ''; }else{
// } subtitle.value = '';
// appellation.value = res.name; }
// }) appellation.value = res.name;
})
}else{
appellation.value = deepClone( appellation.value = deepClone(
uni.$UIKitStore.uiStore.getAppellation({ uni.$UIKitStore.uiStore.getAppellation({
account, account,
@ -65,6 +69,7 @@ const uninstallAppellationWatch = autorun(() => {
nickFromMsg, nickFromMsg,
}) })
) )
}
}) })
onUnmounted(() => { onUnmounted(() => {
uninstallAppellationWatch() uninstallAppellationWatch()

@ -23,7 +23,7 @@
</div> </div>
<div class="conversation-item-right"> <div class="conversation-item-right">
<div class="conversation-item-top"> <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"> <span v-else class="conversation-item-title u-skeleton-fillet">
{{ sessionName }} {{ sessionName }}
</span> </span>

Loading…
Cancel
Save