草稿展示
This commit is contained in:
@@ -6,11 +6,12 @@
|
||||
</view>
|
||||
<view class="content">
|
||||
<view class="header">
|
||||
<view class="name">{{ contact(item.targetId).name }} <text v-if="item.conversationType === 3" class='qun'>[群]</text></view>
|
||||
<view class="name">{{ contact(item.targetId).name }} <text v-if="item.conversationType === 3"
|
||||
class='qun'>[群]</text></view>
|
||||
<view class="time">{{ item.sentTime|timeCustomCN }}</view>
|
||||
</view>
|
||||
<message-preview class="preview" :msg="item.latestMessage" :conversationType="item.conversationType"
|
||||
:user="item.latestMessage.userInfo" />
|
||||
<message-preview class="preview" :msg="item.latestMessage" :draft="item.draft"
|
||||
:conversationType="item.conversationType" :user="item.latestMessage.userInfo" />
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
@@ -26,6 +27,9 @@
|
||||
return {}
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
console.log(this.item);
|
||||
},
|
||||
computed: {
|
||||
contact() {
|
||||
@@ -58,7 +62,7 @@
|
||||
box-sizing: border-box;
|
||||
position: relative;
|
||||
flex: 1;
|
||||
|
||||
|
||||
|
||||
border-bottom-width: 0.5px !important;
|
||||
border-color: #f9f9f9 !important;
|
||||
|
||||
@@ -1,32 +1,37 @@
|
||||
<template>
|
||||
<view>
|
||||
<view class="preview" v-if="msg.objectName=='RC:TxtMsg'">
|
||||
<text v-if="conversationType == 3">{{ user.name }}:</text>{{ msg.content || '' }}
|
||||
</view>
|
||||
<view class="preview" v-if="msg.objectName=='RC:HQVCMsg'">
|
||||
<text v-if="conversationType == 3">{{ user.name }}:</text>[语音]
|
||||
</view>
|
||||
<view class="preview" v-if="msg.objectName=='RC:ImgMsg'">
|
||||
<text v-if="conversationType == 3">{{ user.name }}:</text>[图片]
|
||||
</view>
|
||||
<view class="preview" v-if="msg.objectName=='RC:GIFMsg'">
|
||||
<text v-if="conversationType == 3">{{ user.name }}:</text>[表情]
|
||||
</view>
|
||||
<view class="preview" v-if="msg.objectName=='RC:FileMsg'">
|
||||
<text v-if="conversationType == 3">{{ user.name }}:</text>[文件]
|
||||
</view>
|
||||
<view class="preview" v-if="msg.objectName=='RC:LBSMsg'">
|
||||
<text v-if="conversationType == 3">{{ user.name }}:</text>[位置]
|
||||
</view>
|
||||
<view class="preview" v-if="msg.objectName=='RC:AudioMsg'">
|
||||
<text v-if="conversationType == 3">{{ user.name }}:</text>[语音通话]
|
||||
</view>
|
||||
<view class="preview" v-if="msg.objectName=='RC:VideoMsg'">
|
||||
<text v-if="conversationType == 3">{{ user.name }}:</text>[视频通话]
|
||||
<view>
|
||||
<view class="preview" v-if="draft">
|
||||
<text class="draft">[草稿]</text> {{ draft }}
|
||||
</view>
|
||||
<view class="preview" v-if="msg.objectName=='RC:GrpNtf'">
|
||||
[{{ msg.message }}]
|
||||
</view>
|
||||
<block v-else>
|
||||
<view class="preview" v-if="msg.objectName=='RC:TxtMsg'">
|
||||
<text v-if="conversationType == 3">{{ user.name }}:</text>{{ msg.content || '' }}
|
||||
</view>
|
||||
<view class="preview" v-if="msg.objectName=='RC:HQVCMsg'">
|
||||
<text v-if="conversationType == 3">{{ user.name }}:</text>[语音]
|
||||
</view>
|
||||
<view class="preview" v-if="msg.objectName=='RC:ImgMsg'">
|
||||
<text v-if="conversationType == 3">{{ user.name }}:</text>[图片]
|
||||
</view>
|
||||
<view class="preview" v-if="msg.objectName=='RC:GIFMsg'">
|
||||
<text v-if="conversationType == 3">{{ user.name }}:</text>[表情]
|
||||
</view>
|
||||
<view class="preview" v-if="msg.objectName=='RC:FileMsg'">
|
||||
<text v-if="conversationType == 3">{{ user.name }}:</text>[文件]
|
||||
</view>
|
||||
<view class="preview" v-if="msg.objectName=='RC:LBSMsg'">
|
||||
<text v-if="conversationType == 3">{{ user.name }}:</text>[位置]
|
||||
</view>
|
||||
<view class="preview" v-if="msg.objectName=='RC:AudioMsg'">
|
||||
<text v-if="conversationType == 3">{{ user.name }}:</text>[语音通话]
|
||||
</view>
|
||||
<view class="preview" v-if="msg.objectName=='RC:VideoMsg'">
|
||||
<text v-if="conversationType == 3">{{ user.name }}:</text>[视频通话]
|
||||
</view>
|
||||
<view class="preview" v-if="msg.objectName=='RC:GrpNtf'">
|
||||
[{{ msg.message }}]
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@@ -36,10 +41,14 @@
|
||||
msg: {
|
||||
type: Object,
|
||||
default: {}
|
||||
},
|
||||
conversationType: {
|
||||
type: Number,
|
||||
default: 0
|
||||
},
|
||||
conversationType: {
|
||||
type: Number,
|
||||
default: 0
|
||||
},
|
||||
draft: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
user: {
|
||||
type: Object,
|
||||
@@ -63,6 +72,11 @@
|
||||
height: 32rpx;
|
||||
line-height: 32rpx;
|
||||
width: 520rpx;
|
||||
@extend .nowrap;
|
||||
@extend .nowrap;
|
||||
|
||||
.draft {
|
||||
color: $text-price;
|
||||
padding-right: 10rpx;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user