merge
This commit is contained in:
@@ -18,9 +18,8 @@
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="loadmore">
|
||||
<u-icon name="arrow-right" @click="loadMore" v-if="members > users.length" color="#999" labelColor="#999"
|
||||
label="查看更多群成员" labelPos="left" :labelSize="labelSize" :size="iconSize" />
|
||||
<view class="loadmore" @click="loadMore" v-if="members > users.length">
|
||||
查看更多群成员 <uni-icons size="30rpx" type="right"></uni-icons>
|
||||
</view>
|
||||
|
||||
<u-action-sheet :actions="actionMap" :title="actionTitle" cancelText="取消" @close="hideAction"
|
||||
@@ -38,11 +37,11 @@
|
||||
transferGroupOwner
|
||||
} from '@/apis/interfaces/im.js'
|
||||
import utils from '@/utils/index.js'
|
||||
import imBase from '../mixins/imBase.js'
|
||||
|
||||
export default {
|
||||
mixins: [
|
||||
imBase
|
||||
import imBase from '../mixins/imBase.js'
|
||||
|
||||
export default {
|
||||
mixins: [
|
||||
imBase
|
||||
],
|
||||
props: {
|
||||
targetId: {
|
||||
@@ -66,14 +65,11 @@
|
||||
actionMap: [],
|
||||
actionTitle: '',
|
||||
currentUser: {},
|
||||
avatarSize: 40,
|
||||
labelSize: 14,
|
||||
iconSize: 14
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.avatarSize = utils.rpx2px(84)
|
||||
this.labelSize = utils.rpx2px(24)
|
||||
this.iconSize = utils.rpx2px(26)
|
||||
},
|
||||
mounted() {
|
||||
@@ -104,10 +100,10 @@
|
||||
hideAction(item) {
|
||||
this.actionShow = false
|
||||
},
|
||||
showAction(item) {
|
||||
if (item.is_admin == 2) {
|
||||
return
|
||||
}
|
||||
showAction(item) {
|
||||
if (item.is_admin == 2) {
|
||||
return
|
||||
}
|
||||
this.currentUser = item
|
||||
this.actionTitle = item.name
|
||||
// 只有管理员以上才会弹窗
|
||||
@@ -324,12 +320,16 @@
|
||||
|
||||
.loadmore {
|
||||
font-size: 26rpx;
|
||||
color: $text-gray-m;
|
||||
color: $text-gray-m !important;
|
||||
text-align: center;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
box-sizing: border-box;
|
||||
|
||||
.uni-icons {
|
||||
color: $text-gray-m !important;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -103,16 +103,11 @@
|
||||
this.callShow = true
|
||||
break;
|
||||
case 'location':
|
||||
// uni.showToast({
|
||||
// icon: 'none',
|
||||
// title: '功能正在开发中'
|
||||
// })
|
||||
// uni.chooseLocation({
|
||||
// success: res => {
|
||||
// console.log(res);
|
||||
// // this.success()
|
||||
// }
|
||||
// })
|
||||
uni.chooseLocation({
|
||||
success: (c) => {
|
||||
console.log(c);
|
||||
}
|
||||
})
|
||||
break;
|
||||
case 'redpacket':
|
||||
uni.showToast({
|
||||
|
||||
@@ -1,19 +1,13 @@
|
||||
<template>
|
||||
<view v-if="!isRemote">
|
||||
<view class="state" v-if="isGroup">
|
||||
<!-- 已发送 -->
|
||||
<u-icon name="checkbox-mark" :size="iconSize" class="sent"
|
||||
:color="message.sentStatus >= 30 ? '#34CE98' : '#999999' " />
|
||||
<!-- 已阅读 -->
|
||||
<!-- 已发送 -->
|
||||
<uni-icons class="sent" type="checkmarkempty" size="28rpx" :color="message.sentStatus >= 30 ? '#34CE98' : '#999999'" />
|
||||
<text class="readers">{{ readers }}</text>
|
||||
</view>
|
||||
<view class="state" v-else>
|
||||
<!-- 已发送 -->
|
||||
<u-icon name="checkbox-mark" :size="iconSize" class="sent"
|
||||
:color="message.sentStatus >= 30 ? '#34CE98' : '#999999' " />
|
||||
<!-- 已阅读 -->
|
||||
<u-icon name="checkbox-mark" :size="iconSize" class="receive"
|
||||
:color="message.sentStatus >= 50 ? '#34CE98' : '#999999' " />
|
||||
<view class="state" v-else>
|
||||
<uni-icons class="sent" type="checkmarkempty" size="28rpx" :color="message.sentStatus >= 30 ? '#34CE98' : '#999999'" />
|
||||
<uni-icons class="receive" type="checkmarkempty" size="28rpx" :color="message.sentStatus >= 50 ? '#34CE98' : '#999999'" />
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
<template>
|
||||
<view class="msg--call">
|
||||
<view class="name" v-if="isGroup && isRemote">{{ contact(message.senderUserId).name }}</view>
|
||||
<view class="im--text" :class="isRemote ? 'left': 'right'">
|
||||
<u-icon name="camera" size="22" v-if="msg.mediaType == 1" :label="label" />
|
||||
<u-icon name="phone" size="22" v-else :label="label" />
|
||||
<view class="im--text" :class="isRemote ? 'left': 'right'">
|
||||
<uni-icons type="videocam" size="44rpx" v-if="msg.mediaType == 1" />
|
||||
<uni-icons type="phone" size="40rpx" v-else />
|
||||
{{ label }}
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
@@ -68,7 +69,8 @@
|
||||
font-size: 32rpx;
|
||||
color: $text-color;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
|
||||
&.left {
|
||||
border-radius: 0 20rpx 20rpx 20rpx;
|
||||
@@ -80,8 +82,8 @@
|
||||
background: $main-color;
|
||||
color: white;
|
||||
|
||||
.u-icon {
|
||||
color: white;
|
||||
.uni-icons {
|
||||
color: white !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,10 +2,10 @@
|
||||
<view class="content">
|
||||
<!-- 用户信息 -->
|
||||
<view class="info-flex">
|
||||
<u-avatar :src="userInfo.portraitUrl || require('@/static/user/cover.png')" shape="square" size="50"
|
||||
bg-color="#fff"></u-avatar>
|
||||
<u-avatar :src="userInfo.portraitUrl || require('@/static/user/cover.png')" shape="square"
|
||||
:size="rpx2px(100)" bg-color="#fff"></u-avatar>
|
||||
<view class="info-text">
|
||||
<view class="nickname">{{ userInfo.name }}</view>
|
||||
<view class="nickname">{{ contact(targetId).name }} ({{ userInfo.name }})</view>
|
||||
<view class="address" @longpress="copyAddress">地址:{{ userInfo.address }}</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -14,20 +14,16 @@
|
||||
<view class="item">
|
||||
<label>性别</label>
|
||||
<view class="text" v-if="userInfo.gender === 0">保密</view>
|
||||
<view class="text" v-if="userInfo.gender === 1">男</view>
|
||||
<view class="text" v-if="userInfo.gender === 2">女</view>
|
||||
<view class="text" v-else-if="userInfo.gender === 1">男</view>
|
||||
<view class="text" v-else>女</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 如果是好友 -->
|
||||
<block v-if="userInfo.friendship ==='accepted'">
|
||||
<view class="info-btns">
|
||||
<view class="item u-border-bottom" @click="setRemark">
|
||||
<label>设置备注</label>
|
||||
<u-icon name="arrow-right" color="#eee" size="16" />
|
||||
</view>
|
||||
<view class="item u-border-bottom" @click="setRemark">
|
||||
<label>设置标签</label>
|
||||
<u-icon name="arrow-right" color="#eee" size="16" />
|
||||
<uni-icons type="right" size="32rpx" />
|
||||
</view>
|
||||
<view class="item u-border-bottom">
|
||||
<label>消息免打扰</label>
|
||||
@@ -69,6 +65,14 @@
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
|
||||
<u-modal negativeTop="300" :show="modalShow" title="修改备注" showCancelButton @cancel="onHideModal"
|
||||
@confirm="onChangeRemark">
|
||||
<view class="slot-content">
|
||||
<u--input placeholder="好友备注" border="surround" focus v-model="contactRemark" maxlength="12" />
|
||||
</view>
|
||||
</u-modal>
|
||||
|
||||
<u-action-sheet :actions="callActions" cancelText="取消" @close="callShow = false" @select="singleCall"
|
||||
:show="callShow">
|
||||
</u-action-sheet>
|
||||
@@ -83,12 +87,17 @@
|
||||
} from '@/apis/interfaces/im.js'
|
||||
import * as RongIMLib from '@/uni_modules/RongCloud-IMWrapper/js_sdk/index'
|
||||
import * as CallLib from '@/uni_modules/RongCloud-CallWrapper/lib/index'
|
||||
import imBase from '../mixins/imBase.js'
|
||||
|
||||
// friendship: '' 没有好友关系
|
||||
// accepted 好友
|
||||
// pending 申请中
|
||||
// denied 拒绝
|
||||
// blocked 黑名单
|
||||
export default {
|
||||
mixins: [
|
||||
imBase
|
||||
],
|
||||
data() {
|
||||
return {
|
||||
targetId: '',
|
||||
@@ -107,7 +116,9 @@
|
||||
}
|
||||
],
|
||||
callShow: false,
|
||||
hasPeding: false
|
||||
hasPeding: false,
|
||||
modalShow: false,
|
||||
contactRemark: ''
|
||||
}
|
||||
},
|
||||
onLoad(e) {
|
||||
@@ -151,7 +162,26 @@
|
||||
url: '/pages/im/private/chat?targetId=' + this.targetId
|
||||
});
|
||||
},
|
||||
// 设置好友备注操作
|
||||
setRemark() {
|
||||
this.modalShow = true
|
||||
this.contactRemark = this.$store.getters.contactInfo(this.targetId).name
|
||||
},
|
||||
onHideModal() {
|
||||
this.modalShow = false
|
||||
},
|
||||
onChangeRemark() {
|
||||
this.$store.dispatch('setContactRemark', {
|
||||
targetId: this.targetId,
|
||||
remark: this.contactRemark
|
||||
})
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: '备注设置成功'
|
||||
})
|
||||
this.onHideModal()
|
||||
},
|
||||
setTag() {
|
||||
uni.showToast({
|
||||
title: '开发中',
|
||||
icon: 'none'
|
||||
@@ -344,6 +374,10 @@
|
||||
width: 200rpx;
|
||||
}
|
||||
|
||||
.uni-icons {
|
||||
color: $text-gray-m !important;
|
||||
}
|
||||
|
||||
.text {
|
||||
width: calc(100% - 200rpx);
|
||||
color: $text-gray-m;
|
||||
|
||||
@@ -99,7 +99,7 @@
|
||||
})
|
||||
// 清理聊天记录
|
||||
uni.$once('cleanGroupMessage', this.getMessageList)
|
||||
uni.$on('onRecallMessage_' + this.targetId, (message) => {
|
||||
uni.$on('onRecallMessage_' + this.targetId, (message) => {
|
||||
this.messages = this.messages.map(item => {
|
||||
if (message.messageId == item.messageId) {
|
||||
return message
|
||||
|
||||
@@ -26,7 +26,8 @@
|
||||
</u-checkbox-group>
|
||||
</u-index-list>
|
||||
<view class="bottom">
|
||||
<span class="onInvite" @click="onInvite">完成<span>{{`(${checkboxValue.length})` || ''}}</span></span>
|
||||
<span class="onInvite" v-if="canInvite"> 添加中<span>{{`(${checkboxValue.length})` || ''}}</span></span>
|
||||
<span class="onInvite" v-else @click="onInvite">完成<span>{{`(${checkboxValue.length})` || ''}}</span></span>
|
||||
</view>
|
||||
</block>
|
||||
<view class="no-lists" v-else>
|
||||
@@ -63,7 +64,8 @@
|
||||
friends: [],
|
||||
orignalFriends: [],
|
||||
checkboxValue: [],
|
||||
selectValue: []
|
||||
selectValue: [],
|
||||
canInvite:false
|
||||
};
|
||||
},
|
||||
onLoad(e) {
|
||||
@@ -123,7 +125,8 @@
|
||||
},
|
||||
onInvite() {
|
||||
console.log(this.checkboxValue, 'userIds.....')
|
||||
console.log(this.selectValue, 'userIds.....')
|
||||
console.log(this.selectValue, 'userIds.....')
|
||||
this.canInvite = true
|
||||
let userIds = []
|
||||
this.checkboxValue.filter(item => {
|
||||
if (!utils.inArray(item, this.selectValue)) {
|
||||
@@ -136,9 +139,11 @@
|
||||
delta: 1,
|
||||
animationType: 'pop-out',
|
||||
animationDuration: 200
|
||||
});
|
||||
});
|
||||
this.canInvite = false
|
||||
uni.$emit('groupInvitedUser')
|
||||
}).catch(err => {
|
||||
}).catch(err => {
|
||||
this.canInvite = false
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: err.message
|
||||
|
||||
@@ -106,7 +106,8 @@
|
||||
code,
|
||||
conversations
|
||||
}) => {
|
||||
if (code === 0) {
|
||||
if (code === 0) {
|
||||
console.log(conversations,',,,,,')
|
||||
this.conversations = conversations
|
||||
}
|
||||
})
|
||||
|
||||
@@ -13,5 +13,10 @@ export default {
|
||||
sender() {
|
||||
return this.$store.getters.sender
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
rpx2px(size) {
|
||||
return utils.rpx2px(size)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -58,29 +58,28 @@ export default {
|
||||
}
|
||||
})
|
||||
break;
|
||||
case '撤回':
|
||||
const pushContent = this.$store.getters.sender.name + '撤回了一条消息'
|
||||
IMLib.recallMessage(msg.messageId, pushContent,
|
||||
({
|
||||
code,
|
||||
message
|
||||
}) => {
|
||||
if (code === 0) {
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: '消息撤回成功'
|
||||
})
|
||||
IMLib.getMessage(msg.messageId, res => {
|
||||
uni.$emit('onRecallMessage_' + msg.targetId, res.message)
|
||||
})
|
||||
} else {
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: '撤回失败' + code
|
||||
})
|
||||
}
|
||||
}
|
||||
)
|
||||
case '撤回':
|
||||
const pushContent = this.$store.getters.sender.name + '撤回了一条消息'
|
||||
IMLib.recallMessage(msg.messageId, pushContent,
|
||||
({
|
||||
code,
|
||||
message
|
||||
}) => {
|
||||
if (code === 0) {
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: '消息撤回成功'
|
||||
})
|
||||
msg.objectName = 'RC:RcNtf'
|
||||
uni.$emit('onRecallMessage_' + msg.targetId, msg)
|
||||
} else {
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: '撤回失败' + code
|
||||
})
|
||||
}
|
||||
}
|
||||
)
|
||||
break;
|
||||
}
|
||||
this.hidePop()
|
||||
|
||||
Reference in New Issue
Block a user