我的群聊+人数+默认头像四个小人
This commit is contained in:
@@ -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"
|
||||
@@ -55,7 +54,8 @@
|
||||
},
|
||||
methods: {
|
||||
initData() {
|
||||
getMyGroups().then((res) => {
|
||||
getMyGroups().then((res) => {
|
||||
console.log(res,'res...')
|
||||
if (res.length > 0) {
|
||||
this.bg = '#f9f9f9'
|
||||
} else {
|
||||
|
||||
@@ -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
BIN
static/.DS_Store
vendored
Binary file not shown.
BIN
static/user/cover-s.png
Normal file
BIN
static/user/cover-s.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 3.8 KiB |
Reference in New Issue
Block a user