...
This commit is contained in:
@@ -1,67 +1,67 @@
|
||||
<template>
|
||||
<u-alert type="warning" v-if="connection != 0" :description="description" show-icon />
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
props: {
|
||||
connection: {
|
||||
type: Number,
|
||||
default: 0
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
description() {
|
||||
return this.connectionStatusMap.filter(item => item.index == this.connection)[0].text
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
connectionStatusMap: [{
|
||||
index: -1,
|
||||
text: '网络不可用'
|
||||
},
|
||||
{
|
||||
index: 0,
|
||||
text: '连接成功'
|
||||
},
|
||||
{
|
||||
index: 1,
|
||||
text: '连接中'
|
||||
},
|
||||
{
|
||||
index: 2,
|
||||
text: '未连接'
|
||||
},
|
||||
{
|
||||
index: 3,
|
||||
text: '用户账号在其它设备登录'
|
||||
},
|
||||
{
|
||||
index: 4,
|
||||
text: 'TOKEN过期'
|
||||
},
|
||||
{
|
||||
index: 6,
|
||||
text: '用户被禁用'
|
||||
},
|
||||
{
|
||||
index: 12,
|
||||
text: '退出登录'
|
||||
},
|
||||
{
|
||||
index: 13,
|
||||
text: '连接暂时被挂起'
|
||||
},
|
||||
{
|
||||
index: 14,
|
||||
text: '连接超时'
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
<template>
|
||||
<u-alert type="warning" v-if="connection != 0" :description="description" show-icon />
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
props: {
|
||||
connection: {
|
||||
type: Number,
|
||||
default: 0
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
description() {
|
||||
return this.connectionStatusMap.filter(item => item.index == this.connection)[0].text
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
connectionStatusMap: [{
|
||||
index: -1,
|
||||
text: '网络不可用'
|
||||
},
|
||||
{
|
||||
index: 0,
|
||||
text: '连接成功'
|
||||
},
|
||||
{
|
||||
index: 1,
|
||||
text: '连接中'
|
||||
},
|
||||
{
|
||||
index: 2,
|
||||
text: '未连接'
|
||||
},
|
||||
{
|
||||
index: 3,
|
||||
text: '用户账号在其它设备登录'
|
||||
},
|
||||
{
|
||||
index: 4,
|
||||
text: 'TOKEN过期'
|
||||
},
|
||||
{
|
||||
index: 6,
|
||||
text: '用户被禁用'
|
||||
},
|
||||
{
|
||||
index: 12,
|
||||
text: '退出登录'
|
||||
},
|
||||
{
|
||||
index: 13,
|
||||
text: '连接暂时被挂起'
|
||||
},
|
||||
{
|
||||
index: 14,
|
||||
text: '连接超时'
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
</style>
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
<template>
|
||||
<view>
|
||||
<view v-for="(item, index) in conversations" :key="index" :class="['message', { 'is-top': item.isTop }]"
|
||||
<view v-for="(item, index) in conversations" :key="index" :class="['message', { 'is-top': item.isTop, 'is-active': pickedItem.targetId == item.targetId }]"
|
||||
:data-item="item" @longpress="onLongPress" @click="toDetail(item)">
|
||||
<message-cell :item="item" />
|
||||
</view>
|
||||
|
||||
<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" @click="pickerMenu" :data-index="index">
|
||||
@@ -131,6 +130,10 @@
|
||||
|
||||
&.is-top {
|
||||
background: $window-color;
|
||||
}
|
||||
|
||||
&.is-active {
|
||||
background: #F8FAFF;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -61,8 +61,13 @@
|
||||
actionMap: [],
|
||||
actionTitle: '',
|
||||
currentUser: {},
|
||||
<<<<<<< HEAD
|
||||
avatarSize: 45,
|
||||
labelSize: 14,
|
||||
=======
|
||||
avatarSize: 84,
|
||||
labelSize: 14,
|
||||
>>>>>>> d8b90f97d110aed79b35d385dbc0eeb481ef4eab
|
||||
iconSize: 14
|
||||
}
|
||||
},
|
||||
@@ -73,10 +78,17 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
<<<<<<< HEAD
|
||||
created() {
|
||||
this.avatarSize = utils.rpx2px(90)
|
||||
this.labelSize = utils.rpx2px(24)
|
||||
this.iconSize = utils.rpx2px(26)
|
||||
=======
|
||||
created() {
|
||||
this.avatarSize = utils.rpx2px(84)
|
||||
this.labelSize = utils.rpx2px(24)
|
||||
this.iconSize = utils.rpx2px(26)
|
||||
>>>>>>> d8b90f97d110aed79b35d385dbc0eeb481ef4eab
|
||||
},
|
||||
mounted() {
|
||||
this.initGroupInfo()
|
||||
@@ -273,8 +285,8 @@
|
||||
.avatar {
|
||||
border-radius: 0 8rpx 0 0;
|
||||
position: relative;
|
||||
width: 90rpx;
|
||||
height: 90rpx;
|
||||
width: 84rpx;
|
||||
height: 84rpx;
|
||||
overflow: hidden;
|
||||
|
||||
.admin {
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<view class="message--cell">
|
||||
<view class="avatar">
|
||||
<u-badge max="99" shape="horn" absolute :offset="[-5, -8]" :value="item.unreadMessageCount" />
|
||||
<u-avatar :src="contact(item.targetId).portraitUrl" shape="square" size="44" />
|
||||
<u-avatar :src="contact(item.targetId).portraitUrl" shape="square" :size="avatarSize" />
|
||||
</view>
|
||||
<view class="content">
|
||||
<view class="header">
|
||||
@@ -18,6 +18,7 @@
|
||||
|
||||
<script>
|
||||
import messagePreview from './messagePreview'
|
||||
import utils from '@/utils/index.js'
|
||||
|
||||
export default {
|
||||
props: {
|
||||
@@ -27,8 +28,16 @@
|
||||
return {}
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
avatarRpx: 84
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
avatarSize() {
|
||||
return utils.rpx2px(this.avatarRpx)
|
||||
},
|
||||
contact() {
|
||||
return function(targetId) {
|
||||
return this.$store.getters.contactInfo(targetId)
|
||||
@@ -48,6 +57,7 @@
|
||||
|
||||
.avatar {
|
||||
position: relative;
|
||||
padding-top: 5rpx;
|
||||
|
||||
.u-badge {
|
||||
z-index: 998;
|
||||
@@ -59,10 +69,8 @@
|
||||
box-sizing: border-box;
|
||||
position: relative;
|
||||
flex: 1;
|
||||
|
||||
|
||||
border-bottom-width: 0.5px !important;
|
||||
border-color: #f9f9f9 !important;
|
||||
border-color: #eee !important;
|
||||
border-bottom-style: solid;
|
||||
|
||||
.header {
|
||||
|
||||
@@ -22,10 +22,10 @@
|
||||
<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:InfoNtf' && JSON.parse(msg.message).mediaType=='0'">
|
||||
<view class="preview" v-if="msg.objectName=='RC:InfoNtf' && JSON.parse(msg.message).mediaType==0">
|
||||
<text v-if="conversationType == 3">{{ user.name }}:</text>[语音通话]
|
||||
</view>
|
||||
<view class="preview" v-if="msg.objectName=='RC:InfoNtf' && JSON.parse(msg.message).mediaType=='1'">
|
||||
<view class="preview" v-if="msg.objectName=='RC:InfoNtf' && JSON.parse(msg.message).mediaType==1">
|
||||
<text v-if="conversationType == 3">{{ user.name }}:</text>[视频通话]
|
||||
</view>
|
||||
<view class="preview" v-if="msg.objectName=='RC:GrpNtf'">
|
||||
|
||||
@@ -1,29 +1,18 @@
|
||||
<template>
|
||||
<view class="msg--text">
|
||||
<text class="name" v-if="!guest && name">{{ name }}</text>
|
||||
<view>
|
||||
<text class="im--text" :class="guest ? 'right': 'left'" v-if="message.mediaType == '1'">
|
||||
<u-icon name="camera" /> {{ message.connected ? '通话时长' + message.duration : '未接通' }}
|
||||
</text>
|
||||
<text class="im--text" :class="guest ? 'right': 'left'" v-else>
|
||||
<u-icon name="phone" /> {{ message.connected ? '通话时长' + message.duration : '未接通' }}
|
||||
</text>
|
||||
<view class="msg--call">
|
||||
<view class="name" v-if="!guest && name">{{ name }}</view>
|
||||
<view class="im--text" :class="guest ? 'right': 'left'">
|
||||
<u-icon name="camera" size="22" v-if="message.mediaType == 1"
|
||||
:label="message.connected ? '通话时长:' + duration : '未接通'" />
|
||||
<u-icon name="phone" size="22" v-else :label="message.connected ? '通话时长:' + duration : '未接通'" />
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
<!-- msg
|
||||
{
|
||||
"message": "1",
|
||||
"objectName": "RC:InfoNtf",
|
||||
"userInfo": {
|
||||
"userId": "10051",
|
||||
"name": "Jason.电信",
|
||||
"extra": "",
|
||||
"portraitUrl": "http://storage.zh.shangkelian.cn/uploads/2022/02/16/29b13f5301694721ad7acd8b8b67bbd9.jpg"
|
||||
}
|
||||
}
|
||||
-->
|
||||
|
||||
<script>
|
||||
import utils from '@/utils/index.js'
|
||||
import moment from 'moment'
|
||||
|
||||
export default {
|
||||
name: 'showText',
|
||||
props: {
|
||||
@@ -45,16 +34,20 @@
|
||||
computed: {
|
||||
message() {
|
||||
return JSON.parse(this.msg.message)
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
console.log(this.message);
|
||||
},
|
||||
duration() {
|
||||
if (this.message.duration > 3600) {
|
||||
return moment.utc(this.message.duration * 1000).format('HH:mm:ss')
|
||||
} else {
|
||||
return moment.utc(this.message.duration * 1000).format('mm:ss')
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.msg--text {
|
||||
.msg--call {
|
||||
.name {
|
||||
font-size: 26rpx;
|
||||
color: $text-gray-m;
|
||||
@@ -67,8 +60,8 @@
|
||||
line-height: 46rpx;
|
||||
font-size: 32rpx;
|
||||
color: $text-color;
|
||||
display: inline-block;
|
||||
word-break: break-all;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
|
||||
&.left {
|
||||
border-radius: 0 20rpx 20rpx 20rpx;
|
||||
@@ -79,6 +72,10 @@
|
||||
border-radius: 20rpx 0 20rpx 20rpx;
|
||||
background: $main-color;
|
||||
color: white;
|
||||
|
||||
.u-icon {
|
||||
color: white;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user