format
This commit is contained in:
@@ -8,13 +8,13 @@
|
||||
<view class="item show">私聊</view>
|
||||
<view class="item" @click="onNav('', {})">群聊</view>
|
||||
</view>
|
||||
<view class="btns">
|
||||
<view class="btns">
|
||||
<view class="item" @click="scanQrCode">
|
||||
<uni-icons color="#555" type="scan" size="22"></uni-icons>
|
||||
</view>
|
||||
<view class="item" @click="onNav('imFriends', {})">
|
||||
<uni-icons color="#555" custom-prefix="iconfont" type="icon-tuandui" size="22"></uni-icons>
|
||||
</view>
|
||||
<view class="item" @click="scanQrCode">
|
||||
<uni-icons color="#555" type="scan" size="22"></uni-icons>
|
||||
</view>
|
||||
<!-- <view class="item" @click="onNav('', {})">
|
||||
<uni-icons color="#555" custom-prefix="iconfont" type="icon-gengduo2" size="22"></uni-icons>
|
||||
</view> -->
|
||||
@@ -29,16 +29,16 @@
|
||||
</view>
|
||||
</block>
|
||||
<block v-else>
|
||||
<u-alert type="warning" v-if="connection != 0" description="网络似乎断开了" :show-icon="true" />
|
||||
<u-alert type="warning" v-if="connection != 0" description="网络似乎断开了,请检查网络" :show-icon="true" />
|
||||
<view v-for="(item, index) in conversations" :key="index" :class="['message', { 'is-top': item.isTop }]"
|
||||
@tap="toDetail(item)" @longpress="onLongPress" :data-item="item">
|
||||
<view class="avatar">
|
||||
@click="toDetail(item)" @longpress="onLongPress" :data-item="item">
|
||||
<view class="avatar" @click="toFriend(item.targetId)">
|
||||
<u-badge numberType="ellipsis" max="99" shape="horn" absolute :offset="[-5, -5]"
|
||||
:value="item.unreadMessageCount" />
|
||||
<u-avatar :src="friend(item.targetId).portraitUrl || require('@/static/user/cover.png')"
|
||||
shape="square" size="46" />
|
||||
shape="square" size="44" />
|
||||
</view>
|
||||
<view class="content">
|
||||
<view class="content u-border-bottom">
|
||||
<view class="header">
|
||||
<view class="name">{{ friend(item.targetId).name || '未知用户' }}</view>
|
||||
<view class="time">{{ item.sentTime|timeCustomCN }}</view>
|
||||
@@ -47,9 +47,9 @@
|
||||
</view>
|
||||
</view>
|
||||
<!-- TODO 长按的弹出框,怎么点击隐藏,没搞明白 -->
|
||||
<view class="shade" @tap="hidePop">
|
||||
<view class="shade" @click="hidePop" v-show="showPop">
|
||||
<view class="pop" :style="popStyle" :class="{'show':showPop}">
|
||||
<view v-for="(item, index) in popButton" :key="index" @tap="pickerMenu" :data-index="index">
|
||||
<view v-for="(item, index) in popButton" :key="index" @click="pickerMenu" :data-index="index">
|
||||
{{item}}
|
||||
</view>
|
||||
</view>
|
||||
@@ -209,8 +209,11 @@
|
||||
url: '/pages/im/private/chat?targetId=' + item.targetId + '&conversationType=' + item
|
||||
.conversationType
|
||||
})
|
||||
|
||||
// url: '/pages/im/private/index?targetId=' + item.targetId + '&conversationType=' + item.conversationType
|
||||
},
|
||||
toFriend(targetId) {
|
||||
uni.navigateTo({
|
||||
url: '/pages/im/friends/info?targetId=' + targetId
|
||||
})
|
||||
},
|
||||
// 点击按钮
|
||||
onNav(name, params) {
|
||||
@@ -318,7 +321,7 @@
|
||||
|
||||
.message {
|
||||
background: white;
|
||||
padding: 30rpx 0 0 30rpx;
|
||||
padding: 20rpx 0 0 20rpx;
|
||||
position: relative;
|
||||
display: flex;
|
||||
|
||||
@@ -326,7 +329,6 @@
|
||||
&.is-top {
|
||||
background: $window-color;
|
||||
border-bottom: #e8e8e8;
|
||||
// background-color: rgba($color: $main-color, $alpha: 0.02);
|
||||
}
|
||||
|
||||
.avatar {
|
||||
@@ -341,7 +343,6 @@
|
||||
margin-left: 30rpx;
|
||||
width: calc(100% - 46px);
|
||||
box-sizing: border-box;
|
||||
border-bottom: solid 1rpx #f3f3f3;
|
||||
position: relative;
|
||||
|
||||
.header {
|
||||
@@ -368,29 +369,20 @@
|
||||
padding-top: $padding - 20;
|
||||
padding-bottom: $padding;
|
||||
font-size: $title-size-m;
|
||||
height: 40rpx;
|
||||
line-height: 40rpx;
|
||||
height: 32rpx;
|
||||
line-height: 32rpx;
|
||||
width: 500rpx;
|
||||
@extend .nowrap;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// .message:not(:last-child) {
|
||||
// &::after {
|
||||
// position: absolute;
|
||||
// left: calc(44px + #{$padding} + 30rpx);
|
||||
// right: 0;
|
||||
// bottom: 0;
|
||||
// content: " ";
|
||||
// height: 1rpx;
|
||||
// background: $border-color;
|
||||
// }
|
||||
// }
|
||||
}
|
||||
|
||||
/* 遮罩 */
|
||||
.shade {
|
||||
.shade {
|
||||
position: fixed;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
|
||||
.pop {
|
||||
position: fixed;
|
||||
|
||||
Reference in New Issue
Block a user