|
|
|
|
@ -115,7 +115,7 @@
|
|
|
|
|
" :goto-user-card="true" />
|
|
|
|
|
<div class="msg-content">
|
|
|
|
|
<div class="msg-name 2" v-if="!props.msg.isSelf">
|
|
|
|
|
{{ appellation }}
|
|
|
|
|
{{ appellation }} <span v-if="subtitle" style="color: orange;">{{ subtitle }}</span>
|
|
|
|
|
</div>
|
|
|
|
|
<MessageBubble :msg="props.msg" :tooltip-visible="true" :bg-visible="true">
|
|
|
|
|
<ReplyMessage v-if="!!replyMsg" :replyMsg="replyMsg"></ReplyMessage>
|
|
|
|
|
@ -436,7 +436,7 @@
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
// 昵称
|
|
|
|
|
const appellation = ref('')
|
|
|
|
|
const appellation = ref('-')
|
|
|
|
|
const accountId = uni.$UIKitStore?.userStore?.myUserInfo.accountId
|
|
|
|
|
|
|
|
|
|
// 会话类型
|
|
|
|
|
@ -503,20 +503,40 @@
|
|
|
|
|
const handleReeditMsg = (msg : V2NIMMessageForUI) => {
|
|
|
|
|
uni.$emit(events.ON_REEDIT_MSG, msg)
|
|
|
|
|
}
|
|
|
|
|
const subtitle = ref('')
|
|
|
|
|
|
|
|
|
|
// 监听昵称变化
|
|
|
|
|
const uninstallAppellationWatch = autorun(() => {
|
|
|
|
|
// 昵称展示顺序 群昵称 > 备注 > 个人昵称 > 帐号
|
|
|
|
|
appellation.value = deepClone(
|
|
|
|
|
uni.$UIKitStore.uiStore.getAppellation({
|
|
|
|
|
account: props.msg.senderId,
|
|
|
|
|
teamId:
|
|
|
|
|
conversationType ===
|
|
|
|
|
V2NIMConst.V2NIMConversationType.V2NIM_CONVERSATION_TYPE_TEAM
|
|
|
|
|
? to
|
|
|
|
|
: '',
|
|
|
|
|
if(uni.getStorageSync('selectopenimid')){
|
|
|
|
|
async function getUserInfo() {
|
|
|
|
|
try {
|
|
|
|
|
const res = await uni.$UIKitStore.userStore.getUserActive(uni.getStorageSync('selectopenimid').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: props.msg.senderId,
|
|
|
|
|
teamId:
|
|
|
|
|
conversationType ===
|
|
|
|
|
V2NIMConst.V2NIMConversationType.V2NIM_CONVERSATION_TYPE_TEAM
|
|
|
|
|
? to
|
|
|
|
|
: '',
|
|
|
|
|
})
|
|
|
|
|
)
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
onUnmounted(() => {
|
|
|
|
|
|