fix bug#3977 群公告只能管理员编辑;#3887 从消息聊天窗口退出后,首页列表的红点消失
This commit is contained in:
parent
566bba5308
commit
baa05faa24
@ -14,7 +14,7 @@
|
|||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<template #right>
|
<template #right v-if="state.isManager === 'true'">
|
||||||
<div
|
<div
|
||||||
v-if="state.editMode !== 3"
|
v-if="state.editMode !== 3"
|
||||||
class="nav-bar-done-btn"
|
class="nav-bar-done-btn"
|
||||||
@ -39,7 +39,7 @@
|
|||||||
</template>
|
</template>
|
||||||
<div class="notice-text-area">
|
<div class="notice-text-area">
|
||||||
<div class="notice-view-area">
|
<div class="notice-view-area">
|
||||||
<div class="notice-view-info" v-if="state.editMode !== 1">
|
<div class="notice-view-info" v-if="state.editMode !== 1 && state?.groupNoticeObj?.content">
|
||||||
<div class="notice-creater-avatar">
|
<div class="notice-creater-avatar">
|
||||||
<img :src="state?.groupNoticeObj?.avatar" />
|
<img :src="state?.groupNoticeObj?.avatar" />
|
||||||
</div>
|
</div>
|
||||||
@ -53,9 +53,12 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="notice-view-content" v-if="state.editMode === 3">
|
<div class="notice-view-content" v-if="state.editMode === 3">
|
||||||
<span class="text-[32rpx] font-regular">
|
<span class="text-[32rpx] font-regular" v-if="state?.groupNoticeObj?.content">
|
||||||
{{ state?.groupNoticeObj?.content }}
|
{{ state?.groupNoticeObj?.content }}
|
||||||
</span>
|
</span>
|
||||||
|
<span class="text-[32rpx] font-regular color-[#898989]" v-else>
|
||||||
|
{{ $t('groupNotice.notice.empty') }}
|
||||||
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<wd-textarea
|
<wd-textarea
|
||||||
size="large"
|
size="large"
|
||||||
@ -77,6 +80,7 @@ import useConfirm from '@/components/x-confirm/useConfirm.js'
|
|||||||
import ZPaging from '@/uni_modules/z-paging/components/z-paging/z-paging.vue'
|
import ZPaging from '@/uni_modules/z-paging/components/z-paging/z-paging.vue'
|
||||||
import { reactive, computed, onMounted } from 'vue'
|
import { reactive, computed, onMounted } from 'vue'
|
||||||
import { useGroupStore, useDialogueStore } from '@/store'
|
import { useGroupStore, useDialogueStore } from '@/store'
|
||||||
|
import { onLoad } from '@dcloudio/uni-app'
|
||||||
import {
|
import {
|
||||||
ServeEditGroupNotice,
|
ServeEditGroupNotice,
|
||||||
ServeDeleteGroupNotice,
|
ServeDeleteGroupNotice,
|
||||||
@ -98,7 +102,8 @@ const state = reactive({
|
|||||||
groupNoticeObj: null, //群公告信息
|
groupNoticeObj: null, //群公告信息
|
||||||
groupNotice: '', //群公告
|
groupNotice: '', //群公告
|
||||||
canDoComplete: false, //是否可以点击完成按钮
|
canDoComplete: false, //是否可以点击完成按钮
|
||||||
editMode: 1, // 1:新增;2:修改;3:查看
|
editMode: 3, // 1:新增;2:修改;3:查看
|
||||||
|
isManager: 'false', //是否是群管理员
|
||||||
})
|
})
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
@ -107,6 +112,14 @@ onMounted(() => {
|
|||||||
state.editMode = 3
|
state.editMode = 3
|
||||||
state.groupNoticeObj = groupParams.groupNotice[0]
|
state.groupNoticeObj = groupParams.groupNotice[0]
|
||||||
inputGroupNotice(groupParams?.groupNotice[0]?.content)
|
inputGroupNotice(groupParams?.groupNotice[0]?.content)
|
||||||
|
} else if( state.isManager === 'true'){
|
||||||
|
state.editMode = 1
|
||||||
|
}
|
||||||
|
})
|
||||||
|
onLoad((options) => {
|
||||||
|
console.log(options)
|
||||||
|
if (options?.is_manager) {
|
||||||
|
state.isManager = options?.is_manager
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
@ -453,7 +453,7 @@ const toManagePage = (label) => {
|
|||||||
})
|
})
|
||||||
} else if (label === t('chat.settings.groupNotice')) {
|
} else if (label === t('chat.settings.groupNotice')) {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '/pages/chatSettings/groupManage/manageNotice',
|
url: `/pages/chatSettings/groupManage/manageNotice?is_manager=${groupParams?.groupInfo?.is_manager}`,
|
||||||
})
|
})
|
||||||
} else if (label === t('chat.settings.groupMember')) {
|
} else if (label === t('chat.settings.groupMember')) {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
|
@ -479,7 +479,7 @@ import useZPaging from '@/uni_modules/z-paging/components/z-paging/js/hooks/useZ
|
|||||||
import emojiPanel from './components/emojiPanel.vue'
|
import emojiPanel from './components/emojiPanel.vue'
|
||||||
import filePanel from './components/filePanel.vue'
|
import filePanel from './components/filePanel.vue'
|
||||||
import lodash from 'lodash'
|
import lodash from 'lodash'
|
||||||
import { ServePublishMessage,detailGetRecordsContext } from '@/api/chat'
|
import { ServePublishMessage,detailGetRecordsContext,ServeClearTalkUnreadNum } from '@/api/chat'
|
||||||
import copy07 from '@/static/image/chatList/copy07@2x.png'
|
import copy07 from '@/static/image/chatList/copy07@2x.png'
|
||||||
import multipleChoices from '@/static/image/chatList/multipleChoices@2x.png'
|
import multipleChoices from '@/static/image/chatList/multipleChoices@2x.png'
|
||||||
import cite from '@/static/image/chatList/cite@2x.png'
|
import cite from '@/static/image/chatList/cite@2x.png'
|
||||||
@ -492,7 +492,7 @@ import zu6053 from '@/static/image/chatList/zu6053@2x.png'
|
|||||||
import deepBubble from '@/components/deep-bubble/deep-bubble.vue'
|
import deepBubble from '@/components/deep-bubble/deep-bubble.vue'
|
||||||
import { isRevoke } from './menu'
|
import { isRevoke } from './menu'
|
||||||
import useConfirm from '@/components/x-confirm/useConfirm.js'
|
import useConfirm from '@/components/x-confirm/useConfirm.js'
|
||||||
import { onLoad as uniOnload } from '@dcloudio/uni-app'
|
import { onLoad as uniOnload, onUnload as uniOnUnload } from '@dcloudio/uni-app'
|
||||||
|
|
||||||
Quill.register('formats/emoji', EmojiBlot)
|
Quill.register('formats/emoji', EmojiBlot)
|
||||||
|
|
||||||
@ -530,6 +530,9 @@ const state = ref({
|
|||||||
showWin: false,
|
showWin: false,
|
||||||
onfocusItem: null,
|
onfocusItem: null,
|
||||||
sessionId: '',
|
sessionId: '',
|
||||||
|
talkType: '',
|
||||||
|
receiverId: '',
|
||||||
|
indexName: '',
|
||||||
localPageLoadDone: true, //分页加载缓存中的聊天记录是否完毕
|
localPageLoadDone: true, //分页加载缓存中的聊天记录是否完毕
|
||||||
quoteInfo: null, //引用信息
|
quoteInfo: null, //引用信息
|
||||||
mentionIsMulSelect: false, //是否是多选提醒的人
|
mentionIsMulSelect: false, //是否是多选提醒的人
|
||||||
@ -541,8 +544,12 @@ const state = ref({
|
|||||||
})
|
})
|
||||||
|
|
||||||
uniOnload((options) => {
|
uniOnload((options) => {
|
||||||
|
console.log('onLoad'+ options)
|
||||||
if (options.sessionId) {
|
if (options.sessionId) {
|
||||||
state.value.sessionId = options.sessionId
|
state.value.sessionId = options.sessionId
|
||||||
|
state.value.talkType = options.talkType
|
||||||
|
state.value.receiverId = options.receiverId
|
||||||
|
state.value.indexName = options.indexName
|
||||||
}
|
}
|
||||||
if (options.msgInfo) {
|
if (options.msgInfo) {
|
||||||
const msgInfo = JSON.parse(decodeURIComponent(options.msgInfo))
|
const msgInfo = JSON.parse(decodeURIComponent(options.msgInfo))
|
||||||
@ -552,7 +559,20 @@ uniOnload((options) => {
|
|||||||
}
|
}
|
||||||
initData()
|
initData()
|
||||||
})
|
})
|
||||||
|
uniOnUnload(() => {
|
||||||
|
console.log('onUnload')
|
||||||
|
console.log(state.value.talkType)
|
||||||
|
console.log(state.value.receiverId)
|
||||||
|
ServeClearTalkUnreadNum({
|
||||||
|
talk_type: Number(state.value.talkType),
|
||||||
|
receiver_id: Number(state.value.receiverId)
|
||||||
|
}).then(() => {
|
||||||
|
talkStore.updateItem({
|
||||||
|
index_name: state.value.indexNamee,
|
||||||
|
unread_num: 0,
|
||||||
|
})
|
||||||
|
})
|
||||||
|
})
|
||||||
const handleEmojiPanel = () => {
|
const handleEmojiPanel = () => {
|
||||||
state.value.isOpenFilePanel = false
|
state.value.isOpenFilePanel = false
|
||||||
state.value.isOpenEmojiPanel = !state.value.isOpenEmojiPanel
|
state.value.isOpenEmojiPanel = !state.value.isOpenEmojiPanel
|
||||||
|
@ -134,7 +134,7 @@ const cellClick = () => {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: "/pages/dialog/index?sessionId=" + props.data.id,
|
url: `/pages/dialog/index?sessionId=${props.data.id}&talkType=${props.data.talk_type}&receiverId=${props.data.receiver_id}&indexName=${props.data.index_name}`,
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -248,7 +248,7 @@ onLoad((options) => {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '/pages/dialog/index?sessionId=' + openSession.id,
|
url: `/pages/dialog/index?sessionId=${openSession.id}&talkType=${openSession.talk_type}&receiverId=${openSession.receiver_id}&indexName=${openSession.index_name}`,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
@ -130,6 +130,7 @@
|
|||||||
"groupNotice.confirm.clear": "清空",
|
"groupNotice.confirm.clear": "清空",
|
||||||
"groupNotice.quit.edit": "退出本次编辑",
|
"groupNotice.quit.edit": "退出本次编辑",
|
||||||
"groupNotice.continue.edit": "继续编辑",
|
"groupNotice.continue.edit": "继续编辑",
|
||||||
|
"groupNotice.notice.empty": "暂无内容",
|
||||||
"groupNotice.confirm.quit": "退出",
|
"groupNotice.confirm.quit": "退出",
|
||||||
"chatSettings.btn.removeAdmin": "移除",
|
"chatSettings.btn.removeAdmin": "移除",
|
||||||
"groupManage.disband.hint": "退出后,本群将被解散",
|
"groupManage.disband.hint": "退出后,本群将被解散",
|
||||||
|
Loading…
Reference in New Issue
Block a user