群公告的群内提醒,链接跳转

This commit is contained in:
2022-02-23 16:29:06 +08:00
parent a5bd5a898c
commit 20317cc1df
4 changed files with 29 additions and 6 deletions

View File

@@ -1,6 +1,10 @@
<template>
<view class="">
<view class="notify" v-if="message.objectName === 'RC:GrpNtf'">{{ message.content.message }}</view>
<view class="notify" v-if="message.objectName === 'RC:GrpNtf'">
{{ message.content.message }}
<text class="link" @click="toAnnounce(message.content.extra)"
v-if="message.content.operation == 'ANNOUNCEMENT'">点击查看 </text>
</view>
<view class="notify" v-else-if="message.objectName === 'RC:RcNtf'">
{{ contact(message.senderUserId).name }} 撤回了一条消息
</view>
@@ -75,6 +79,19 @@
})
}
},
// 跳转群公告
toAnnounce(targetId) {
if (targetId) {
uni.navigateTo({
url: '/pages/im/group/announceCreate?targetId=' + this.targetId
})
} else {
uni.showToast({
icon: 'none',
title: '旧版本,无链接'
})
}
},
// 撤回消息测试
backMessage() {
if (this.$store.getters.sender.userId != this.message.senderUserId) {
@@ -118,6 +135,11 @@
text-align: center;
font-size: 24rpx;
color: #666;
.link {
color: blue;
margin-left: 10rpx;
}
}
.cell-item {