diff --git a/common/main.css b/common/main.css index a4d30ce..6e7522f 100644 --- a/common/main.css +++ b/common/main.css @@ -261,6 +261,7 @@ } .flex-column { + display: flex; flex-direction: column; } diff --git a/components/call-log/list/list.vue b/components/call-log/list/list.vue index c88e10d..589f891 100644 --- a/components/call-log/list/list.vue +++ b/components/call-log/list/list.vue @@ -4,12 +4,12 @@ @touchmove="touchMove($event, index)" @touchend="touchEnd($event, index)" :style="{ 'transform': 'translateX(' + swiperList[index] + 'px)', 'transition': swiperList[index] == 0 ? 'all 0.3s' : '' }"> - - - + {{ getAvatarText(item.name) }} + + @@ -133,7 +133,7 @@ 运营商 - @@ -148,13 +148,13 @@ 卡几 - 状态 - @@ -163,7 +163,7 @@ 头像类型 - @@ -211,28 +211,28 @@ - 电话 * + 电话 * - 运营商 * - 运营商 * + - 时间 * + 时间 * {{ addForm.time }} - 状态 * - 状态 * + 卡几 - @@ -249,7 +249,7 @@ 头像类型 - @@ -264,9 +264,13 @@ 清除 + + 随机数据 + + - 随机数据 + 取消 保存 @@ -328,7 +332,7 @@ "address": "北京", "time": "2026-02-01 10:00:00", "status": 1, - avatarType: 'image', // image 或 text + "avatarType": 'image', // image 或 text "notes": "工作往来" }, { @@ -341,7 +345,7 @@ "address": "上海", "time": "2026-02-02 14:30:00", "status": 4, - avatarType: 'image', // image 或 text + "avatarType": 'image', // image 或 text "notes": "老朋友" }, { @@ -354,7 +358,7 @@ "address": "广州", "time": "2026-03-03 16:45:00", "status": 0, - avatarType: 'image', // image 或 text + "avatarType": 'image', // image 或 text "notes": "推销电话" }, { @@ -367,7 +371,7 @@ "address": "深圳", "time": "2026-03-04 10:30:00", "status": 2, - avatarType: 'image', // image 或 text + "avatarType": 'image', // image 或 text "notes": "快递小哥" }, { @@ -380,7 +384,7 @@ "address": "杭州", "time": "2026-03-05 15:00:00", "status": 3, - avatarType: 'image', // image 或 text + "avatarType": 'image', // image 或 text "notes": "大学同学" }, { @@ -393,7 +397,7 @@ "address": "成都", "time": "2026-03-01 18:00:00", "status": 5, - avatarType: 'image', // image 或 text + "avatarType": 'image', // image 或 text "notes": "骚扰电话" }, { @@ -406,7 +410,7 @@ "address": "武汉", "time": "2026-02-05 18:30:00", "status": 1, - avatarType: 'image', // image 或 text + "avatarType": 'image', // image 或 text "notes": "客户" }, { @@ -419,7 +423,7 @@ "address": "西安", "time": "2026-02-05 18:30:00", "status": 4, - avatarType: 'image', // image 或 text + "avatarType": 'image', // image 或 text "notes": "家人" }, { @@ -432,7 +436,7 @@ "address": "南京", "time": "2026-02-05 18:30:00", "status": 0, - avatarType: 'image', // image 或 text + "avatarType": 'image', // image 或 text "notes": "广告推销" }, { @@ -445,7 +449,7 @@ "address": "长沙", "time": "2026-03-05 18:30:00", "status": 2, - avatarType: 'image', // image 或 text + "avatarType": 'image', // image 或 text "notes": "同事" }, { @@ -458,7 +462,7 @@ "address": "天津", "time": "2025-08-05 18:30:00", "status": 3, - avatarType: 'image', // image 或 text + "avatarType": 'image', // image 或 text "notes": "未知号码" }, { @@ -471,7 +475,7 @@ "address": "苏州", "time": "2026-03-05 18:30:00", "status": 5, - avatarType: 'image', // image 或 text + "avatarType": 'image', // image 或 text "notes": "健身房" }, { @@ -484,7 +488,7 @@ "address": "青岛", "time": "2026-03-05 18:30:00", "status": 1, - avatarType: 'image', // image 或 text + "avatarType": 'image', // image 或 text "notes": "学校老师" }, { @@ -497,7 +501,7 @@ "address": "大连", "time": "2026-03-05 18:30:00", "status": 4, - avatarType: 'image', // image 或 text + "avatarType": 'image', // image 或 text "notes": "保险推销" }, { @@ -510,7 +514,7 @@ "address": "厦门", "time": "2026-03-05 18:30:00", "status": 0, - avatarType: 'image', // image 或 text + "avatarType": 'image', // image 或 text "notes": "外卖" }, { @@ -523,7 +527,7 @@ "address": "宁波", "time": "2026-03-05 18:30:00", "status": 2, - avatarType: 'image', // image 或 text + "avatarType": 'image', // image 或 text "notes": "亲戚" }, { @@ -536,7 +540,7 @@ "address": "郑州", "time": "2026-03-05 18:30:00", "status": 3, - avatarType: 'image', // image 或 text + "avatarType": 'image', // image 或 text "notes": "房产中介" }, { @@ -549,7 +553,7 @@ "address": "沈阳", "time": "2026-03-05 18:30:00", "status": 5, - avatarType: 'image', // image 或 text + "avatarType": 'image', // image 或 text "notes": "银行客服" }, { @@ -562,7 +566,7 @@ "address": "济南", "time": "2026-02-05 18:30:00", "status": 1, - avatarType: 'image', // image 或 text + "avatarType": 'image', // image 或 text "notes": "合作伙伴" }, { @@ -575,7 +579,7 @@ "address": "重庆", "time": "2026-03-05 18:30:00", "status": 4, - avatarType: 'image', // image 或 text + "avatarType": 'image', // image 或 text "notes": "骚扰电话" } ]); @@ -598,7 +602,7 @@ kj: '1', address: '', time: '', - status: '0', + status: 0, notes: '' }); const editIndex = ref(-1); @@ -615,7 +619,7 @@ kj: '1', address: '', time: '', - status: '0', + status: 0, notes: '' }); @@ -632,27 +636,27 @@ // 状态选项(对象数组,用于显示中文文本) const statusOptions = ref([{ value: 0, - text: '来电-未接' - }, - { - value: 1, - text: '来电-已接' - }, - { - value: 2, - text: '来电-拒接' - }, - { - value: 3, text: '播出-未接' }, { - value: 4, + value: 1, text: '播出-已接' }, { - value: 5, + value: 2, text: '播出-拒接' + }, + { + value: 3, + text: '来电-未接' + }, + { + value: 4, + text: '来电-已接' + }, + { + value: 5, + text: '来电-拒接' } ]); // 运营商选项 @@ -791,7 +795,7 @@ editForm.kj = item.kj || '1'; editForm.address = item.address || ''; editForm.time = item.time || ''; - editForm.status = item.status || '0'; + editForm.status = item.status ||0; editForm.notes = item.notes || ''; showEditModal.value = true; }; @@ -887,7 +891,7 @@ addForm.address = ''; addForm.time = `${currentYear}-${currentMonth + 1}-${currentDay} ${now.getHours()}:${now.getMinutes()}:${now.getSeconds()}`; - addForm.status = '0'; + addForm.status = 0; addForm.notes = ''; showAddModal.value = true; console.log(showAddModal.value) @@ -920,13 +924,13 @@ }); return; } - if (!addForm.status) { - uni.showToast({ - title: '请选择状态', - icon: 'none' - }); - return; - } + // if (!addForm.status) { + // uni.showToast({ + // title: '请选择状态', + // icon: 'none' + // }); + // return; + // } // 创建新联系人 const newItem = { @@ -1169,8 +1173,21 @@ // 获取头像文字 const getAvatarText = (name) => { if (!name) return ''; - // 取姓名的第一个字符 - return name.charAt(0); + // 获取字符串长度(考虑中文字符) + const length = name.length; + + if (length === 2) { + // 两个字:返回全部 + return name; + } else { + // 返回第一个字符 + return name.charAt(0); + } + }; + // 获取头像文字 + const getAvatarLength = (name) => { + const length = name.length; + return length }; // 获取头像数字 @@ -1245,7 +1262,7 @@ addForm.kj = Math.random() > 0.5 ? '1' : '2'; addForm.address = addresses[Math.floor(Math.random() * addresses.length)]; addForm.time = randomTime(); - addForm.status = Math.floor(Math.random() * 6).toString(); + addForm.status = Math.floor(Math.random() * 6); addForm.notes = notes[Math.floor(Math.random() * notes.length)]; addForm.avatar = ''; // 随机数据不生成头像 addForm.avatarType = Math.random() > 0.5 ? 'image' : 'text'; // 随机选择头像类型 @@ -1725,6 +1742,9 @@ .form-item { margin-bottom: 30rpx; + display: flex; + justify-content: space-between; + align-items: center; } .form-label { @@ -1732,10 +1752,13 @@ font-size: 28rpx; color: #666; margin-bottom: 16rpx; + text{ + color: red; + } } .form-input { - width: 100%; + width: 364rpx; height: 80rpx; border: 1rpx solid #ddd; border-radius: 8rpx; @@ -1744,12 +1767,18 @@ box-sizing: border-box; color: #1A1A1A; } - + .form-select{ + width: 364rpx !important; + flex: none; + } .form-avatar-container { display: flex; align-items: center; } - + .suiji{ + width: 50rpx; + height: 50rpx; + } .form-avatar { width: 80px; height: 80px; @@ -1794,7 +1823,9 @@ font-weight: bold; background: linear-gradient(180deg, #A1A8B8 0%, #878B94 100%); } - +.text-avatar-18{ + font-size: 36rpx !important; +} .form-input-time { line-height: 40px; } diff --git a/components/message/chat/chat-layout.vue b/components/message/chat/chat-layout.vue new file mode 100644 index 0000000..4787ad1 --- /dev/null +++ b/components/message/chat/chat-layout.vue @@ -0,0 +1,930 @@ + + + + \ No newline at end of file diff --git a/components/message/chat/chat-list.vue b/components/message/chat/chat-list.vue new file mode 100644 index 0000000..96d5d6b --- /dev/null +++ b/components/message/chat/chat-list.vue @@ -0,0 +1,857 @@ + + + + diff --git a/components/message/list.vue b/components/message/list.vue deleted file mode 100644 index c3ed4c8..0000000 --- a/components/message/list.vue +++ /dev/null @@ -1,145 +0,0 @@ - - - - \ No newline at end of file diff --git a/components/message/list/list.vue b/components/message/list/list.vue new file mode 100644 index 0000000..5dab17f --- /dev/null +++ b/components/message/list/list.vue @@ -0,0 +1,655 @@ + + + + + diff --git a/components/message/message-nav-bar.vue b/components/message/list/message-nav-bar.vue similarity index 69% rename from components/message/message-nav-bar.vue rename to components/message/list/message-nav-bar.vue index de19cf2..48ce810 100644 --- a/components/message/message-nav-bar.vue +++ b/components/message/list/message-nav-bar.vue @@ -1,57 +1,67 @@