This commit is contained in:
唐明明
2022-01-27 17:58:49 +08:00

View File

@@ -124,17 +124,39 @@
if (code == 0) { if (code == 0) {
this.isTop = conversation.isTop this.isTop = conversation.isTop
} }
}) });
}, },
methods: { toPrivate() {
copyAddress() { uni.redirectTo({
uni.setClipboardData({ url: '/pages/im/private/index?conversationType=1&targetId=' + this.targetId
data: this.userInfo.address, });
success: () => { },
setRemark() {
uni.showToast({
title: '开发中',
icon: 'none'
});
},
deleteFriend() {
uni.showModal({
title: '删除确认',
content: '确认删除后不可恢复',
success: e => {
if (e.confirm) {
deleteFriend(this.targetId).then(res => {
// 删除聊天记录
RongIMLib.deleteMessages(1, this.targetId);
RongIMLib.removeConversation(1, this.targetId);
uni.showToast({ uni.showToast({
icon: 'none', icon: 'none',
title: '复制区块链成功' title: '好友删除成功',
}) success() {
uni.switchTab({
url: '/pages/im/index'
});
}
});
});
} }
}) })
}, },
@@ -194,9 +216,11 @@
pedingFriend(this.targetId).then(res => { pedingFriend(this.targetId).then(res => {
uni.showToast({ uni.showToast({
title: '申请成功', title: '申请成功',
icon: "none" icon: 'none'
});
}) })
}).catch(err => { .catch(err => {
uni.showToast({ uni.showToast({
icon: 'error', icon: 'error',
title: err.message, title: err.message,
@@ -217,6 +241,7 @@
}) })
}, },
} }
}
}; };
</script> </script>