This commit is contained in:
唐明明
2022-02-24 14:19:39 +08:00
8 changed files with 60 additions and 26 deletions

View File

@@ -104,7 +104,10 @@
hideAction(item) {
this.actionShow = false
},
showAction(item) {
showAction(item) {
if (item.is_admin == 2) {
return
}
this.currentUser = item
this.actionTitle = item.name
// 只有管理员以上才会弹窗

View File

@@ -121,8 +121,8 @@
icon: 'none',
title: '消息撤回成功'
})
IMLib.getMessage(this.message.messageId, res => {
uni.$emit('onRecallMessage', res.message)
IMLib.getMessage(this.message.messageId, res => {
uni.$emit('onRecallMessage_' + this.message.targetId, res.message)
})
} else {
uni.showToast({

View File

@@ -4,7 +4,7 @@
<!-- 用户信息 -->
<view class="info-flex">
<view class="info-flex-item">
<u-avatar :src="infoObj.portraitUrl" shape="square" size="210rpx" bg-color="#fff" class="avatar" />
<u-avatar :src="infoObj.portraitUrl" @click='previewImg(infoObj.portraitUrl)' shape="square" size="210rpx" bg-color="#fff" class="avatar" />
<view class="nickname">{{infoObj.name}}</view>
<view class="address">{{infoObj.address}}</view>
<view class="info-code">
@@ -47,7 +47,13 @@
this.infoObj = res
})
},
methods: {
methods: {
previewImg(item){
console.log(item)
uni.previewImage({
urls:[item]
})
},
copy() {
uni.setClipboardData({
data: this.downUrl,
@@ -100,7 +106,7 @@
.avatar {
// padding: 14rpx;
border-radius: 10rpx;
border-radius: 20rpx;
background-color: #fff;
border: solid 14rpx rgba($color: #fff, $alpha:1);
}

View File

@@ -84,8 +84,18 @@
}
})
})
uni.$once('onUserDelete_' + this.targetId, () => {
uni.showToast({
icon: 'none',
title: '好友关系已解除'
})
uni.switchTab({
url: '/pages/im/index'
})
})
},
onUnload() {
uni.$off('onUserDelete_' + this.targetId)
uni.$off('onReceiveMessage_' + this.targetId)
uni.$off('onRecallMessage_' + this.targetId)
uni.$off('onRecallMessage')