From 936a66a8aad8a9111103d6be7daa09517b404f0a Mon Sep 17 00:00:00 2001 From: Z Date: Mon, 21 Feb 2022 14:04:02 +0800 Subject: [PATCH] ... --- pages/im/group/announcement.vue | 94 +++++++++++++++++++-------------- 1 file changed, 54 insertions(+), 40 deletions(-) diff --git a/pages/im/group/announcement.vue b/pages/im/group/announcement.vue index 6731837..03ed8bf 100644 --- a/pages/im/group/announcement.vue +++ b/pages/im/group/announcement.vue @@ -1,9 +1,8 @@ @@ -38,12 +36,14 @@ data() { return { targetId: '', - announcements: [], + groupAnnouncementId: '', // 选择公告 id + announcements: [], // 公告列表 loading: true, - isAdmin: false, - actionShow: false, - actionMap: [], - actionTitle: '请选择', + isAdmin: false, + actionShow: false, + list: [{name: '选项一'}, {name: '选项二'}], + actionMap: [{key: 1,name: '编辑',disabled: false}, {key: 2,name: '删除',disabled: false}, {key: 3,name: '置顶',disabled: false}], + actionTitle: '请选择操作', } }, onLoad(e) { @@ -70,15 +70,28 @@ } }, methods: { + // 获取公告信息 initData() { - getGroupAnnouncements(this.targetId).then(res => { + getGroupAnnouncements(this.targetId).then(res => { + console.log(res) this.announcements = res this.loading = false }) - }, - actions(id){ - console.log(id) }, + // 选择公告 并显示操作弹窗 + actions(id) { + this.groupAnnouncementId = id + this.actionShow = true + }, + // 选择了操作出发事件 + handleAction(e) { + console.log('addadfs', e) + UNI.showToast({ + title:e, + icon:"none" + }) + }, + // 删除公告 onDelete(aId) { uni.showModal({ title: '删除公告', @@ -120,8 +133,8 @@ } .item { - background-color: #fff; - padding: $padding $padding + 10; + background-color: #fff; + padding: $padding $padding + 10; border-bottom: $padding solid #f9f9f9; .user { @@ -145,23 +158,24 @@ .content-a { font-size: $title-size; color: $text-color; - max-width: 100%; - margin-bottom: $padding; - display: -webkit-box; - -webkit-box-orient: vertical; - -webkit-line-clamp: 3; - overflow: hidden; - line-height: 1.5; - span{ - color: #fff; - display: inline-block; - border-radius: 10rpx; - background-color: $main-color; - font-size: $title-size-m - 4; - padding: 4rpx 10rpx; - margin-right: 10rpx; - line-height: 1.4; - margin-bottom: 10rpx; + max-width: 100%; + margin-bottom: $padding; + display: -webkit-box; + -webkit-box-orient: vertical; + -webkit-line-clamp: 3; + overflow: hidden; + line-height: 1.5; + + span { + color: #fff; + display: inline-block; + border-radius: 10rpx; + background-color: $main-color; + font-size: $title-size-m - 4; + padding: 4rpx 10rpx; + margin-right: 10rpx; + line-height: 1.4; + margin-bottom: 10rpx; } } }