新增:发送消息
This commit is contained in:
@ -7,6 +7,8 @@ import { onClickOutside } from '@vueuse/core'
|
||||
/* 组件 */
|
||||
import PreviewSendImg from '../suit/previewSendImg.vue'
|
||||
import VueAt from 'vue-at/dist/vue-at-textarea' // for textarea
|
||||
import * as MessageApi from '@/api/im/message'
|
||||
import { generateUUID } from '@/utils'
|
||||
const props = defineProps({
|
||||
nowPickInfo: {
|
||||
type: Object,
|
||||
@ -100,17 +102,21 @@ const sendTextMessage = _.debounce(async () => {
|
||||
em_at_list: isAtAll.value ? MENTION_ALL.VALUE : _.map(atMembers.value, 'value')
|
||||
}
|
||||
}
|
||||
const imMessageSendReqVO = {
|
||||
clientMessageId: generateUUID(),
|
||||
receiverId: nowPickInfo.value.id,
|
||||
conversationType: nowPickInfo.value.chatType,
|
||||
contentType: ALL_MESSAGE_TYPE.TEXT,
|
||||
content: textContent.value
|
||||
}
|
||||
//关闭引用框
|
||||
if (messageQuoteRef.value?.isShowQuoteMsgBox) {
|
||||
}
|
||||
textContent.value = ''
|
||||
messageQuoteRef.value?.clearQuoteContent()
|
||||
try {
|
||||
console.log('msgOptions', msgOptions)
|
||||
// await store.dispatch('sendShowTypeMessage', {
|
||||
// msgType: ALL_MESSAGE_TYPE.TEXT,
|
||||
// msgOptions
|
||||
// })
|
||||
console.log('imMessageSendReqVO', imMessageSendReqVO)
|
||||
await MessageApi.sendMessage(imMessageSendReqVO)
|
||||
} catch (error) {
|
||||
//handleSDKErrorNotifi(error.type, error.message)
|
||||
console.log('>>>>>>>发送失败+++++++', error)
|
||||
|
||||
Reference in New Issue
Block a user