This commit is contained in:
2025-11-25 05:36:02 +08:00
parent 8e036cc171
commit b10e4b4336
65 changed files with 2672 additions and 2270 deletions
@@ -1,34 +1,31 @@
<template>
<view @tap.prevent="clickConversationItem" class="conversation_item">
<view class="pinned" v-if="source.isPinned"></view>
<view @tap.prevent="clickConversationItem" :class="['conversation_item',source.isPinned?'pinned' : '']">
<view class="left_info">
<my-avatar :isGroup="isGroup" :isNotify="isNotify" :src="source.faceURL" :desc="source.showName"
size="46" />
<view class="details">
<text class="conversation_name">{{ source.showName }}</text>
<view class="title">
<text class="conversation_name">
{{ source.showName }}
</text>
<view class="right_desc">
<text class="send_time">{{ latestMessageTime }}</text>
<u-badge max="99" :value="source.unreadCount"></u-badge>
</view>
</view>
<view class="lastest_msg_wrap">
<text class="lastest_msg_content">{{ latestMessage }}</text>
</view>
</view>
</view>
<view class="right_desc">
<text class="send_time">{{ latestMessageTime }}</text>
<u-badge max="99" :value="source.unreadCount"></u-badge>
</view>
</view>
</template>
<script>
import {
SessionType,
} from "openim-uniapp-polyfill";
import {SessionType,} from "openim-uniapp-polyfill";
import MyAvatar from "@/components/MyAvatar/index.vue";
import UParse from "@/components/gaoyia-parse/parse.vue";
import {
getConversationContent,
formatConversionTime,
prepareConversationState,
} from "@/util/imCommon";
import {getConversationContent,formatConversionTime,prepareConversationState,} from "@/util/imCommon";
export default {
components: {
@@ -81,6 +78,9 @@
flex-direction: row;
padding: 12rpx 44rpx 20rpx;
position: relative;
&.pinned{
background-color: #ededed;
}
&_active {
background-color: #f3f3f3;
@@ -88,17 +88,41 @@
.left_info {
@include btwBox();
flex:1;
.details {
@include colBox(true);
flex:1;
margin-left: 24rpx;
height: 46px;
color: $uni-text-color;
border-bottom: 1px solid #eee;
padding-bottom:20rpx;
.title{
@include btwBox();
.conversation_name {
@include nomalEllipsis();
max-width: 40vw;
font-size: 32rpx;
font-weight: 500;
}
.conversation_name {
@include nomalEllipsis();
max-width: 40vw;
font-size: 28rpx;
.right_desc {
@include colBox(true);
align-items: flex-end;
width: max-content;
justify-content: space-between;
.send_time {
width: max-content;
font-size: 24rpx;
color: #999;
}
.u-badge {
width: fit-content;
}
}
}
.lastest_msg_wrap {
@@ -125,32 +149,5 @@
}
}
}
.right_desc {
@include colBox(true);
align-items: flex-end;
width: max-content;
justify-content: space-between;
height: 46px;
.send_time {
width: max-content;
font-size: 24rpx;
color: #999;
}
.u-badge {
width: fit-content;
}
}
.pinned {
position: absolute;
top: 0;
right: 24rpx;
width: 17rpx;
height: 17rpx;
background-image: linear-gradient(to bottom left, #314ffe 50%, white 50%);
}
}
</style>