im聊天模块,我的群聊样式调整;通讯录页面优化处理;我的二维码样式重构;

This commit is contained in:
2022-02-17 13:04:10 +08:00
parent 88493f7fa6
commit 7c9a8f702d
11 changed files with 194 additions and 162 deletions

View File

@@ -1,7 +1,7 @@
<template>
<view>
<u-index-list :index-list="indexs" inactiveColor="#666" activeColor="#34CE98">
<view class="friend-flex u-border-bottom" @click="toPending">
<view class="friend-flex" @click="toPending">
<u-avatar class="cover" size="40" shape="square" :src="require('@/static/im/im_01.png')"></u-avatar>
<u-badge max="99" absolute :offset="[23, 20]" :value="pendingCount" />
<view class="info">新的朋友</view>
@@ -12,21 +12,21 @@
</view>
<block v-if="friends.length > 0">
<u-index-item v-for="(item, fkey) in friends" :key="fkey">
<u-index-anchor :text="indexs[fkey]" bgColor="#F9F9F9" height="20" size="12" color="#666" />
<view v-for="(friendItem, index) in item" :key="index" class="friend-flex u-border-bottom"
<u-index-anchor :text="indexs[fkey]" bgColor="#ededed" height="20" size="12" color="#666"
style="padding:10rpx 30rpx" />
<view v-for="(friendItem, index) in item" :key="index" class="friend-flex"
@click="toFriend(friendItem.targetId)">
<u-avatar class="avatar-img" size="40" shape="square" :src="contact(friendItem.targetId).portraitUrl" />
<u-avatar class="avatar-img" size="40" shape="square"
:src="contact(friendItem.targetId).portraitUrl" />
<view class="info">
<view class="name">{{ contact(friendItem.targetId).name }}</view>
<view class="address">hash:{{ friendItem.address }}</view>
<!-- <view class="address">Hash:{{ friendItem.address }}</view> -->
</view>
</view>
</u-index-item>
</block>
<block v-else>
<u-empty class="pages-null" mode="data" text="暂无好友">
</u-empty>
<u-empty class="pages-null" mode="data" text="暂无好友" />
</block>
</u-index-list>
</view>
@@ -90,9 +90,18 @@
},
// 新朋友
toPending() {
uni.navigateTo({
url: '/pages/im/friends/pending'
});
if (this.pendingCount > 0) {
uni.navigateTo({
url: '/pages/im/friends/pending'
});
} else {
uni.showToast({
title: ` 暂无好友申请 ~ `,
icon: "none",
mask: true,
duration: 3000
})
}
}
},
onNavigationBarButtonTap(e) {
@@ -112,21 +121,25 @@
// 好友列表
.friend-flex {
position: relative;
padding: 24rpx $padding;
padding: 0 $padding 0 $padding;
display: flex;
flex-direction: row;
align-items: center;
.avatar-img{
box-sizing: border-box;
.avatar-img {
box-shadow: 0 0 20rpx rgba($color: $main-color, $alpha: 0.2);
}
.info {
flex: 1;
margin-left: $padding;
border-bottom: solid 1rpx #f9f9f9;
height: 120rpx;
line-height: 120rpx;
.name {
font-size: $title-size + 2;
font-size: $title-size + 2;
font-size: $title-size;
color: #454545 !important;
@extend .nowrap;
}
@@ -135,7 +148,24 @@
color: $text-gray-m;
font-size: $title-size-m - 3;
padding-top: 10rpx;
word-break: break-word;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
width: 600rpx;
}
}
}
.list-cell {
display: flex;
box-sizing: border-box;
width: 100%;
padding: 10px 24rpx;
overflow: hidden;
color: #323233;
font-size: 14px;
line-height: 24px;
background-color: #fff;
}
</style>