查看消息调准

This commit is contained in:
2022-02-24 10:17:54 +08:00
parent 9c7a8c8ee1
commit 4a31ba32f7
4 changed files with 23 additions and 36 deletions

View File

@@ -56,7 +56,7 @@
.text {
box-sizing: border-box;
max-width: 502rpx;
padding:10rpx 24rpx;
padding:10rpx 30rpx;
line-height: 46rpx;
font-size: 32rpx;
color: $text-color;

View File

@@ -2,8 +2,7 @@
<view class="">
<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>
<text class="link" @click="toAnnounce(message)" v-if="message.content.operation == 'ANNOUNCEMENT'">点击查看 </text>
</view>
<view class="notify" v-else-if="message.objectName === 'RC:RcNtf'">
{{ contact(message.senderUserId).name }} 撤回了一条消息
@@ -32,11 +31,11 @@
import showText from './show/showText'
import showCall from './show/showCall'
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
],
components: {
showCall,
@@ -69,10 +68,10 @@
}
},
// 跳转群公告
toAnnounce(targetId) {
if (targetId) {
uni.navigateTo({
url: '/pages/im/group/announceCreate?type=check&targetId=' + this.targetId
toAnnounce(message) {
if (message.content.extra) {
uni.navigateTo({
url: '/pages/im/group/announceCreate?type=cheack&targetId=' + message.targetId + '&aId=' + message.content.extra
})
} else {
uni.showToast({
@@ -126,7 +125,7 @@
color: #666;
.link {
color: blue;
color: $main-color;
margin-left: 10rpx;
}
}

View File

@@ -1,11 +1,11 @@
<template>
<view class="create">
<view class="create-title">公告内容</view>
<block v-if="type !== 'check'">
<block v-if="type !== 'cheack'">
<u--textarea v-model="content" count height="240" maxlength="240" placeholder="请输入公告内容" />
<u-button type="primary" text="发布" :disabled="disabled" @click="onCreate" color="#34CE98" />
</block>
<block v-if="type === 'check'">
<block v-if="type === 'cheack'">
<view class="content-a"> {{content}} </view>
</block>
</view>
@@ -27,13 +27,17 @@
targetId: '',
content: '',
aId: '',
type: '' // check ' 查看详情'
type: '' // cheack ' 查看详情'
}
},
onLoad(e) {
onLoad(e) {
console.log(e,'e,,,,,')
this.targetId = e.targetId
if (e.type) {
this.type = e.type
this.type = e.type
uni.setNavigationBarTitle({
title:' 公告内容'
})
}
if (e.aId) {
this.aId = e.aId

View File

@@ -78,7 +78,7 @@
onNavigationBarButtonTap() {
if (this.isAdmin) {
uni.navigateTo({
url: '/pages/im/group/announceCreate?type=check&targetId=' + this.targetId
url: '/pages/im/group/announceCreate?targetId=' + this.targetId
})
} else {
uni.showToast({
@@ -121,7 +121,7 @@
},
tabA(id) {
uni.navigateTo({
url: '/pages/im/group/announceCreate?type=check&targetId=' + this.targetId + '&aId=' + id
url: '/pages/im/group/announceCreate?type=cheack&targetId=' + this.targetId + '&aId=' + id
})
},
onTop(aId) {
@@ -134,14 +134,6 @@
uni.$emit('updateAnnouncement')
this.initData()
})
// uni.showModal({
// title: ' 置顶该公告',
// success: (res) => {
// if (res.confirm) {
// }
// }
// })
},
// 删除公告
onDelete(aId) {
@@ -154,14 +146,6 @@
uni.$emit('updateAnnouncement')
this.initData()
})
// uni.showModal({
// title: '删除该公告',
// success: (res) => {
// if (res.confirm) {
// }
// }
// })
}
}
}