This commit is contained in:
2026-09-24 14:58:23 +08:00
parent 6e8bb2e0a0
commit 0a1a312418
6 changed files with 63 additions and 31 deletions
+11 -4
View File
@@ -3,7 +3,10 @@
<fy-header title="群聊设置" back />
<view class="card head">
<view class="grid">
<view v-for="p in members.slice(0, 4)" :key="p.id" class="cell">{{ (p.name || '?').slice(0, 1) }}</view>
<view v-for="p in members.slice(0, 4)" :key="p.id" class="cell">
<image v-if="p.avatar" class="cell-img" :src="p.avatar" mode="aspectFill" />
<text v-else>{{ (p.name || '?').slice(0, 1) }}</text>
</view>
</view>
<view class="meta">
<text class="gn">{{ title }}</text>
@@ -17,7 +20,8 @@
</view>
<view class="mems">
<view v-for="p in members" :key="p.id" class="mem" @click="open(p)">
<view class="mav">{{ (p.name || '?').slice(0, 1) }}</view>
<image v-if="p.avatar" class="mav img" :src="p.avatar" mode="aspectFill" />
<view v-else class="mav">{{ (p.name || '?').slice(0, 1) }}</view>
<text class="mn">{{ p.name }}</text>
</view>
</view>
@@ -76,6 +80,7 @@ export default {
this.members = ids.map((id) => store.person(id) || { id, name: id, title: '', department: '' })
},
open(p) {
if (!p || !store.person(p.id)) return
uni.navigateTo({ url: '/pages/contact/detail?id=' + encodeURIComponent(p.id) })
},
toggle(field) {
@@ -106,7 +111,8 @@ export default {
<style scoped>
.head { margin: 24rpx; padding: 28rpx; display: flex; align-items: center; }
.grid { width: 96rpx; height: 96rpx; background: #E8F1FF; border-radius: 22rpx; display: flex; flex-wrap: wrap; padding: 8rpx; box-sizing: border-box; }
.cell { width: 36rpx; height: 36rpx; margin: 2rpx; background: #fff; color: #1677FF; font-size: 18rpx; font-weight: 700; display: flex; align-items: center; justify-content: center; border-radius: 8rpx; }
.cell { width: 36rpx; height: 36rpx; margin: 2rpx; background: #fff; color: #1677FF; font-size: 18rpx; font-weight: 700; display: flex; align-items: center; justify-content: center; border-radius: 8rpx; overflow: hidden; }
.cell-img { width: 36rpx; height: 36rpx; display: block; }
.meta { margin-left: 20rpx; }
.gn { font-size: 32rpx; font-weight: 700; display: block; }
.gc { font-size: 22rpx; color: #6B7280; }
@@ -114,7 +120,8 @@ export default {
.cap { padding: 20rpx 24rpx 8rpx; font-size: 26rpx; font-weight: 700; }
.mems { display: flex; flex-wrap: wrap; padding: 8rpx 16rpx 24rpx; }
.mem { width: 20%; display: flex; flex-direction: column; align-items: center; margin-bottom: 16rpx; }
.mav { width: 80rpx; height: 80rpx; border-radius: 18rpx; background: #E8F1FF; color: #1677FF; display: flex; align-items: center; justify-content: center; font-weight: 700; }
.mav { width: 80rpx; height: 80rpx; border-radius: 18rpx; background: #E8F1FF; color: #1677FF; display: flex; align-items: center; justify-content: center; font-weight: 700; overflow: hidden; }
.mav.img { display: block; }
.mn { font-size: 20rpx; margin-top: 8rpx; }
.row { display: flex; justify-content: space-between; align-items: center; padding: 28rpx 24rpx; font-size: 28rpx; border-bottom: 1rpx solid #F0F2F5; }
.row:last-child { border-bottom: none; }