You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

77 lines
1.5 KiB

<template>
<view class="friend-item" @click="showFriendInfo()">
<head-image :name="friend.nickName" :online="friend.online" :url="friend.headImage" size="small"></head-image>
2 years ago
<view class="friend-info">
<view class="friend-name">{{ friend.nickName}}</view>
2 years ago
<view class="friend-online">
2 years ago
<image v-show="friend.onlineWeb" class="online" src="/static/image/online_web.png"
title="电脑设备在线" />
<image v-show="friend.onlineApp" class="online" src="/static/image/online_app.png"
title="移动设备在线" />
2 years ago
</view>
</view>
</view>
</template>
<script>
export default {
name: "frined-item",
data() {
return {}
},
2 years ago
methods: {
showFriendInfo() {
uni.navigateTo({
2 years ago
url: "/pages/common/user-info?id=" + this.friend.id
})
},
},
props: {
friend: {
type: Object
}
}
}
</script>
<style scope lang="scss">
.friend-item {
height: 90rpx;
display: flex;
margin-bottom: 1rpx;
position: relative;
2 years ago
padding: 10rpx;
padding-left: 20rpx;
align-items: center;
background-color: white;
white-space: nowrap;
2 years ago
&:hover {
1 year ago
background-color: $im-bg;
}
2 years ago
.friend-info {
flex: 1;
display: flex;
flex-direction: column;
2 years ago
padding-left: 20rpx;
text-align: left;
2 years ago
2 years ago
.friend-name {
1 year ago
font-size: $im-font-size;
2 years ago
white-space: nowrap;
overflow: hidden;
}
1 year ago
2 years ago
.friend-online {
1 year ago
margin-top: 4rpx;
2 years ago
.online {
padding-right: 4rpx;
1 year ago
width: 24rpx;
height: 24rpx;
2 years ago
}
}
}
}
1 year ago
</style>