我的群聊+人数+默认头像四个小人

This commit is contained in:
2022-02-23 16:30:35 +08:00
parent c840e9ee6b
commit 8bb646a520
5 changed files with 6 additions and 6 deletions

BIN
.DS_Store vendored

Binary file not shown.

View File

@@ -3,16 +3,15 @@
<block v-if="groups.length > 0">
<view class="title"> 群聊 </view>
<view v-for="(item, index) in groups" :key="index" class="friend-flex" @click="toGroup(item.targetId)">
<u-avatar size="38" shape="square" :src="contact(item.targetId).portraitUrl" />
<u-avatar size="38" shape="square" :src="item.portraitUrl !== ''?contact(item.targetId).portraitUrl :require('@/static/user/cover-s.png')" />
<view class="info">
<view class="name">{{item.name}} <span class="total">10人</span></view>
<view class="name">{{item.name}} <span class="total">{{item.people_count}} 成员</span></view>
</view>
</view>
<view class="group-count"> {{groups.length}}个群聊 </view>
</block>
<view class="no-lists" v-else>
<u-image class="cover" radius="4" width="400rpx" height="400rpx"
:src="require('@/static/imgs/no-friend.png')" :lazy-load="true" />
<u-image class="cover" radius="4" width="400rpx" height="400rpx" :src="require('@/static/imgs/no-friend.png')" :lazy-load="true" />
<span>空空如也~</span>
</view>
<u-modal negativeTop="300" :show="createModal" title="创建群聊" showCancelButton @cancel="onHideModal"
@@ -56,6 +55,7 @@
methods: {
initData() {
getMyGroups().then((res) => {
console.log(res,'res...')
if (res.length > 0) {
this.bg = '#f9f9f9'
} else {

View File

@@ -34,7 +34,7 @@
</view>
<u-modal negativeTop="300" :show="modalShow" title="修改群名称" showCancelButton @cancel="onHideModal" @confirm="onChangeGroupName">
<view class="slot-content"> <u--input placeholder="群名称" border="surround" focus v-model="groupName" maxlength="14" /> </view>
<view class="slot-content"> <u--input placeholder="群名称" border="surround" focus v-model="groupName" maxlength="12" /> </view>
</u-modal>
<u-modal :show="qrCodeShow" :title="group.name" @confirm="qrCodeShow = false">

BIN
static/.DS_Store vendored

Binary file not shown.

BIN
static/user/cover-s.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB