From 2c7da360f4b980c2b0933431273f7edefe563b2d Mon Sep 17 00:00:00 2001 From: tangxinyue <524779910@qq.com> Date: Wed, 18 Mar 2026 10:12:20 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E5=AE=8C=E6=88=90=E6=94=AF=E4=BB=98?= =?UTF-8?q?=E5=AE=9D=E7=9F=AD=E4=BF=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/message/chat/chat-layout.vue | 114 ++++++++++-- components/message/chat/chat-list.vue | 18 +- components/message/list/list.vue | 42 ++++- components/message/list/message-nav-bar.vue | 10 +- main.js | 2 +- pages/message/chat-page/chat-page.vue | 104 +++++++++-- pages/message/list-index.vue | 181 +++++++++++++++++++- static/image/phone-message/change.png | Bin 0 -> 934 bytes static/image/phone-message/edit.png | Bin 0 -> 568 bytes static/image/phone-message/sort.png | Bin 0 -> 740 bytes 10 files changed, 426 insertions(+), 45 deletions(-) create mode 100644 static/image/phone-message/change.png create mode 100644 static/image/phone-message/edit.png create mode 100644 static/image/phone-message/sort.png 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 @@