处理未读消息数量场景补全情况
Some checks are pending
Check / lint (push) Waiting to run
Check / typecheck (push) Waiting to run
Check / build (build, 18.x, ubuntu-latest) (push) Waiting to run
Check / build (build, 18.x, windows-latest) (push) Waiting to run
Check / build (build:app, 18.x, ubuntu-latest) (push) Waiting to run
Check / build (build:app, 18.x, windows-latest) (push) Waiting to run
Check / build (build:mp-weixin, 18.x, ubuntu-latest) (push) Waiting to run
Check / build (build:mp-weixin, 18.x, windows-latest) (push) Waiting to run
Some checks are pending
Check / lint (push) Waiting to run
Check / typecheck (push) Waiting to run
Check / build (build, 18.x, ubuntu-latest) (push) Waiting to run
Check / build (build, 18.x, windows-latest) (push) Waiting to run
Check / build (build:app, 18.x, ubuntu-latest) (push) Waiting to run
Check / build (build:app, 18.x, windows-latest) (push) Waiting to run
Check / build (build:mp-weixin, 18.x, ubuntu-latest) (push) Waiting to run
Check / build (build:mp-weixin, 18.x, windows-latest) (push) Waiting to run
This commit is contained in:
parent
fa2098c565
commit
04dcbdf331
@ -603,6 +603,7 @@ uniOnUnload(() => {
|
|||||||
index_name: talkParams.index_name,
|
index_name: talkParams.index_name,
|
||||||
unread_num: 0,
|
unread_num: 0,
|
||||||
})
|
})
|
||||||
|
dialogueStore.clearUnreadNum()
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
const handleEmojiPanel = () => {
|
const handleEmojiPanel = () => {
|
||||||
|
@ -135,16 +135,16 @@ const cellClick = () => {
|
|||||||
|
|
||||||
// 清空消息未读数
|
// 清空消息未读数
|
||||||
if (props.data.unread_num > 0) {
|
if (props.data.unread_num > 0) {
|
||||||
//不在此处维护未读消息数量
|
ServeClearTalkUnreadNum({
|
||||||
// ServeClearTalkUnreadNum({
|
talk_type: props.data.talk_type,
|
||||||
// talk_type: props.data.talk_type,
|
receiver_id: props.data.receiver_id,
|
||||||
// receiver_id: props.data.receiver_id,
|
},dialogueParams.unReadNum).then(() => {
|
||||||
// },dialogueParams.unReadNum).then(() => {
|
talkStore.updateItem({
|
||||||
// talkStore.updateItem({
|
index_name: props.data.index_name,
|
||||||
// index_name: props.data.index_name,
|
unread_num: 0,
|
||||||
// unread_num: 0,
|
})
|
||||||
// })
|
dialogueStore.clearUnreadNum()
|
||||||
// })
|
})
|
||||||
}
|
}
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: `/pages/dialog/index?sessionId=${props.data.id}`,
|
url: `/pages/dialog/index?sessionId=${props.data.id}`,
|
||||||
|
@ -244,16 +244,16 @@ onLoad((options) => {
|
|||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
dialogueStore.setDialogue(openSession)
|
dialogueStore.setDialogue(openSession)
|
||||||
if (openSession.unread_num > 0) {
|
if (openSession.unread_num > 0) {
|
||||||
//不在此处维护未读消息数量
|
ServeClearTalkUnreadNum({
|
||||||
// ServeClearTalkUnreadNum({
|
talk_type: openSession.talk_type,
|
||||||
// talk_type: openSession.talk_type,
|
receiver_id: openSession.receiver_id,
|
||||||
// receiver_id: openSession.receiver_id,
|
},dialogueParams.unReadNum).then(() => {
|
||||||
// },dialogueParams.unReadNum).then(() => {
|
talkStore.updateItem({
|
||||||
// talkStore.updateItem({
|
index_name: openSession.index_name,
|
||||||
// index_name: openSession.index_name,
|
unread_num: 0,
|
||||||
// unread_num: 0,
|
})
|
||||||
// })
|
dialogueStore.clearUnreadNum()
|
||||||
// })
|
})
|
||||||
}
|
}
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: `/pages/dialog/index?sessionId=${openSession.id}`,
|
url: `/pages/dialog/index?sessionId=${openSession.id}`,
|
||||||
|
@ -93,6 +93,11 @@ export const useDialogueStore = defineStore('dialogue', {
|
|||||||
this.online = status
|
this.online = status
|
||||||
},
|
},
|
||||||
|
|
||||||
|
// 更新未读消息数量-清空未读
|
||||||
|
clearUnreadNum() {
|
||||||
|
this.unreadNum = 0
|
||||||
|
},
|
||||||
|
|
||||||
// 更新对话信息
|
// 更新对话信息
|
||||||
setDialogue(data = {}) {
|
setDialogue(data = {}) {
|
||||||
this.online = data.is_online == 1
|
this.online = data.is_online == 1
|
||||||
|
Loading…
Reference in New Issue
Block a user