no message

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

@ -20,7 +20,7 @@ import {
import { deepClone } from '../utils' import { deepClone } from '../utils'
const appellation = ref('') const appellation = ref('-')
const { pid,account, teamId, ignoreAlias, nickFromMsg } = withDefaults( const { pid,account, teamId, ignoreAlias, nickFromMsg } = withDefaults(
defineProps<{ defineProps<{

@ -273,6 +273,7 @@ function handleTouchMove(event: TouchEvent) {
} }
function handleConversationItemClick() { function handleConversationItemClick() {
uni.setStorageSync("selectopenimid", props.conversation.conversationId);
if (props.showMoreActions) { if (props.showMoreActions) {
emit("leftSlide", null); emit("leftSlide", null);
return; return;

@ -115,7 +115,7 @@
" :goto-user-card="true" /> " :goto-user-card="true" />
<div class="msg-content"> <div class="msg-content">
<div class="msg-name 2" v-if="!props.msg.isSelf"> <div class="msg-name 2" v-if="!props.msg.isSelf">
{{ appellation }} {{ appellation }} <span v-if="subtitle" style="color: orange;">{{ subtitle }}</span>
</div> </div>
<MessageBubble :msg="props.msg" :tooltip-visible="true" :bg-visible="true"> <MessageBubble :msg="props.msg" :tooltip-visible="true" :bg-visible="true">
<ReplyMessage v-if="!!replyMsg" :replyMsg="replyMsg"></ReplyMessage> <ReplyMessage v-if="!!replyMsg" :replyMsg="replyMsg"></ReplyMessage>
@ -436,7 +436,7 @@
}) })
// //
const appellation = ref('') const appellation = ref('-')
const accountId = uni.$UIKitStore?.userStore?.myUserInfo.accountId const accountId = uni.$UIKitStore?.userStore?.myUserInfo.accountId
// //
@ -503,20 +503,40 @@
const handleReeditMsg = (msg : V2NIMMessageForUI) => { const handleReeditMsg = (msg : V2NIMMessageForUI) => {
uni.$emit(events.ON_REEDIT_MSG, msg) uni.$emit(events.ON_REEDIT_MSG, msg)
} }
const subtitle = ref('')
// //
const uninstallAppellationWatch = autorun(() => { const uninstallAppellationWatch = autorun(() => {
// > > > // > > >
appellation.value = deepClone( if(uni.getStorageSync('selectopenimid')){
uni.$UIKitStore.uiStore.getAppellation({ async function getUserInfo() {
account: props.msg.senderId, try {
teamId: const res = await uni.$UIKitStore.userStore.getUserActive(uni.getStorageSync('selectopenimid').split('|')[2])
conversationType === return res
V2NIMConst.V2NIMConversationType.V2NIM_CONVERSATION_TYPE_TEAM } catch (error) {
? to 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(() => { onUnmounted(() => {

Loading…
Cancel
Save