diff --git a/components/message/chat/chat-layout.vue b/components/message/chat/chat-layout.vue index 4787ad1..3fa524d 100644 --- a/components/message/chat/chat-layout.vue +++ b/components/message/chat/chat-layout.vue @@ -9,7 +9,7 @@ - 256 + {{ number }} - + - + @@ -126,6 +127,10 @@ const props = defineProps({ sortMode: { type: Boolean, default: false + }, + number: { + type: Number, + default: 0 } }) @@ -296,6 +301,7 @@ onMounted(() => { left: 0; } + .fixed-top-box { position: fixed; width: 100%; @@ -344,6 +350,7 @@ onMounted(() => { .img { width: 96rpx; height: 96rpx; + border-radius: 50%; } } @@ -357,6 +364,10 @@ onMounted(() => { height: 20rpx; .title { + text-align: center; + max-width: 400rpx; + overflow: hidden; + text-overflow: ellipsis; font-size: 20rpx; color: #1A1A1A; left: 20rpx; @@ -370,8 +381,19 @@ onMounted(() => { } + + + .bottom-box { + padding-bottom: 10rpx; + } + + .safe-area { + padding-bottom: calc(10rpx + constant(safe-area-inset-bottom)); + padding-bottom: calc(10rpx + env(safe-area-inset-bottom)); + } + .bottom-container { - padding: 10rpx 28rpx; + padding: 10rpx 28rpx 0; .add-img { width: 66rpx; @@ -431,7 +453,7 @@ onMounted(() => { .top-box { .top-container { - padding: 0 52rpx; + padding: 0 20rpx 0 52rpx; background-color: #F7F7F7; height: 88rpx; @@ -456,10 +478,21 @@ onMounted(() => { } .center { + flex: 1; + display: flex; + align-items: center; + .title { + flex: 1; + display: block; font-size: 36rpx; color: #1A1A1A; font-weight: 500; + width: 20px; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + margin-right: 10rpx; } } @@ -488,8 +521,19 @@ onMounted(() => { } .bottom-box { + padding-bottom: 20rpx; + } + + .safe-area { + padding-bottom: calc(20rpx + constant(safe-area-inset-bottom)); + padding-bottom: calc(20rpx + env(safe-area-inset-bottom)); + } + + .bottom-box { + .bottom-container { - padding: 20rpx 28rpx; + padding: 20rpx 28rpx 0; + .add-img { width: 72rpx; @@ -573,6 +617,7 @@ onMounted(() => { .center { flex: 1; + width: 20%; height: 100%; margin: 0 18rpx; display: flex; @@ -580,10 +625,15 @@ onMounted(() => { justify-content: center; .title { + width: 100%; font-size: 36rpx; color: #1A1A1A; font-weight: 500; line-height: 36rpx; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + margin-right: 10rpx; } .second-text { @@ -617,11 +667,21 @@ onMounted(() => { } + .bottom-box { + padding-bottom: 10rpx; + } + + .safe-area { + padding-bottom: calc(10rpx + constant(safe-area-inset-bottom)); + padding-bottom: calc(10rpx + env(safe-area-inset-bottom)); + } + + .bottom-box { background-color: #FAFAFA; .bottom-container { - padding: 16rpx 32rpx 50rpx; + padding: 16rpx 32rpx 0; .add-img { width: 84rpx; @@ -704,16 +764,19 @@ onMounted(() => { .center { flex: 1; + width: 20%; height: 100%; margin: 0 16rpx; display: flex; align-items: center; + overflow: hidden; .img { width: 72rpx; height: 72rpx; flex-shrink: 0; margin-right: 18rpx; + border-radius: 50%; } .title { @@ -721,6 +784,10 @@ onMounted(() => { color: #1A1A1A; font-weight: 500; line-height: 36rpx; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + margin-right: 10rpx; } .second-text { @@ -754,11 +821,20 @@ onMounted(() => { } + .bottom-box { + padding-bottom: 12rpx; + } + + .safe-area { + padding-bottom: calc(12rpx + constant(safe-area-inset-bottom)); + padding-bottom: calc(12rpx + env(safe-area-inset-bottom)); + } + .bottom-box { background-color: #FFFFFF; .bottom-container { - padding: 12rpx 32rpx; + padding: 12rpx 32rpx 0; .add-img { width: 44rpx; @@ -842,17 +918,23 @@ onMounted(() => { .center { flex: 1; + width: 20%; height: 100%; margin: 0 18rpx; display: flex; flex-direction: column; justify-content: center; + overflow: hidden; .title { font-size: 34rpx; color: #1A1A1A; font-weight: 500; line-height: 34rpx; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + margin-right: 10rpx; } } @@ -879,11 +961,21 @@ onMounted(() => { } + .bottom-box { + padding-bottom: 20rpx; + } + + .safe-area { + padding-bottom: 20rpx; + padding-bottom: calc(20rpx + constant(safe-area-inset-bottom)); + padding-bottom: calc(20rpx + env(safe-area-inset-bottom)); + } + .bottom-box { background-color: #fff; .bottom-container { - padding: 20rpx 48rpx; + padding: 20rpx 48rpx 0; .search-box { min-height: 64rpx; diff --git a/components/message/chat/chat-list.vue b/components/message/chat/chat-list.vue index 96d5d6b..44170a4 100644 --- a/components/message/chat/chat-list.vue +++ b/components/message/chat/chat-list.vue @@ -23,7 +23,8 @@ 短信/彩信 {{ formatHuaweiTopTime(message.time) }} {{ formatChatTime(message.time) }} 中国联通 + v-if="(phone == 'oppo' || (phone == 'vivo' && message.isMe)) && message.simIndex"> + {{ simInfo[`sim${message.simIndex}`] }} { + try { + const cached = uni.getStorageSync(SIM_STORAGE_KEY) + simInfo.value = cached ? JSON.parse(cached) : { sim1: '中国电信', sim2: '中国移动' } + } catch (e) { + simInfo.value = { sim1: '中国电信', sim2: '中国移动' } + } +}) + // 排序模式下的本地唦本列表 // 不直接修改 props.messageList,排序完成后 emit 给父组件 const localSortList = ref([]) diff --git a/components/message/list/list.vue b/components/message/list/list.vue index 5dab17f..d8bc06a 100644 --- a/components/message/list/list.vue +++ b/components/message/list/list.vue @@ -12,8 +12,8 @@ > 99 ? '99+' : (item.unReadNumber || 1) }} - + @@ -40,9 +40,8 @@ - 编辑 - + + { border-radius: 50%; } + + .edit { background-color: #5855D6; } +.main-box { + .title-box { + margin-bottom: 6rpx; + + + .title { + width: 20px; + flex: 1; + color: #1A1A1A; + font-size: 32rpx; + line-height: 32rpx; + white-space: nowrap; + font-weight: 600; + overflow: hidden; + text-overflow: ellipsis; + } + + .time { + flex-shrink: 0; + margin-left: 20rpx; + } + } +} + // 苹果样式 .iphone-style { + .circle { + border-radius: 50% !important; + } + + .square { + border-radius: 16rpx !important; + } .swipe-action { margin-top: 28rpx; diff --git a/components/message/list/message-nav-bar.vue b/components/message/list/message-nav-bar.vue index 48ce810..dd4042d 100644 --- a/components/message/list/message-nav-bar.vue +++ b/components/message/list/message-nav-bar.vue @@ -71,7 +71,7 @@ - + @@ -83,7 +83,8 @@