1、处理撤回按钮点击区域大小;2、发送按钮新增loading;3、解决只有一条聊天记录搜索不到、单聊按日期搜索时搜索结果不正确问题;4、解决部分艾特功能在部分手机上样式错误等问题

This commit is contained in:
wangyifeng 2025-04-08 16:58:28 +08:00
parent 87ca206b2b
commit 30412b109e

View File

@ -3,7 +3,6 @@
<ZPaging <ZPaging
use-chat-record-mode use-chat-record-mode
use-virtual-list use-virtual-list
inside-more
cell-height-mode="fixed" cell-height-mode="fixed"
:refresher-enabled="true" :refresher-enabled="true"
:show-scrollbar="false" :show-scrollbar="false"
@ -310,6 +309,8 @@
size="mini" size="mini"
:shadow="0" :shadow="0"
label="发送" label="发送"
:loading="state.isLoading"
:width="120"
></tm-button> ></tm-button>
</div> </div>
</div> </div>
@ -382,14 +383,14 @@
<div class="divider"></div> <div class="divider"></div>
<div <div
@click="withdrawerConfirm" @click="withdrawerConfirm"
class="mt-[32rpx] mb-[32rpx] text-[32rpx] text-[#CF3050] leading-[48rpx]" class="mt-[32rpx] mb-[32rpx] text-[32rpx] text-[#CF3050] leading-[48rpx] w-full text-center"
> >
撤回 撤回
</div> </div>
<div class="divider"></div> <div class="divider"></div>
<div <div
@click="state.showWin = false" @click="state.showWin = false"
class="mt-[32rpx] mb-[32rpx] text-[32rpx] text-[#000000] leading-[48rpx]" class="mt-[32rpx] mb-[32rpx] text-[32rpx] text-[#000000] leading-[48rpx] w-full text-center"
> >
取消 取消
</div> </div>
@ -615,6 +616,7 @@ const state = ref({
lastMentionText: '', // @ lastMentionText: '', // @
lastMentionTriggered: false, // @ lastMentionTriggered: false, // @
lastMentionPosition: -1, // @ lastMentionPosition: -1, // @
isLoading: false,//loading
}) })
uniOnload(async (options) => { uniOnload(async (options) => {
@ -681,7 +683,10 @@ const onEditorClick = () => {
quill.focus() quill.focus()
} }
const onSendMessage = (data = {}, callBack) => { const onSendMessage = (data = {}, callBack, showLoading = false) => {
if (showLoading) {
state.value.isLoading = true
}
let message = { let message = {
...data, ...data,
receiver: { receiver: {
@ -692,6 +697,7 @@ const onSendMessage = (data = {}, callBack) => {
ServePublishMessage(message) ServePublishMessage(message)
.then(({ code, message }) => { .then(({ code, message }) => {
state.value.isLoading = false
if (code == 200) { if (code == 200) {
uploadsStore.updateUploadStatus(false) uploadsStore.updateUploadStatus(false)
if (callBack) { if (callBack) {
@ -703,6 +709,7 @@ const onSendMessage = (data = {}, callBack) => {
} }
}) })
.catch(() => { .catch(() => {
state.value.isLoading = false
uploadsStore.updateUploadStatus(false) uploadsStore.updateUploadStatus(false)
message.warning('网络繁忙,请稍后重试!') message.warning('网络繁忙,请稍后重试!')
}) })
@ -762,7 +769,7 @@ const onSendTextEvent = lodash.throttle((value) => {
} }
console.log(message) console.log(message)
onSendMessage(message, callBack) onSendMessage(message, callBack, true)
}, 1000) }, 1000)
// //
@ -1374,7 +1381,7 @@ const hideMentionSelect = () => {
state.value.lastCursorIndex = undefined state.value.lastCursorIndex = undefined
// //
const quill = getQuill() const quill = getQuill()
quill.focus() // quill.focus()
} }
// //
@ -1476,7 +1483,7 @@ const queryRecordsByMsgInfo = async (msgInfo) => {
let recordsList = [] let recordsList = []
console.log(recordIndex) console.log(recordIndex)
if (!recordIndex || recordIndex === -1) { if (!recordIndex || recordIndex === -1) {
recordsList = await findTalkRecords('', true, msgInfo.sequence) recordsList = await findTalkRecords('', true, msgInfo.sequence - 1)
} else { } else {
// console.log(recordIndex) // console.log(recordIndex)
const startRecordIndex = Math.max(0, recordIndex - 10) const startRecordIndex = Math.max(0, recordIndex - 10)
@ -1577,7 +1584,8 @@ const findTalkRecords = (record, isMiddle, sequence, appointParams) => {
return findTalkRecords('', false, sequence + 1, { return findTalkRecords('', false, sequence + 1, {
direction: 'up', direction: 'up',
sort_sequence: '', sort_sequence: '',
}).then((finalResult) => { }).then((upResult) => {
const finalResult = [...upResult, ...state.value.serveFindRecord]
console.log(finalResult) console.log(finalResult)
resolve(finalResult) resolve(finalResult)
}) })
@ -1715,7 +1723,7 @@ const showMentionSelectDebounced = (quill) => {
state.value.lastMentionText = text state.value.lastMentionText = text
state.value.lastMentionTriggered = true state.value.lastMentionTriggered = true
state.value.isShowMentionSelect = true state.value.isShowMentionSelect = true
quill.blur() // quill.blur()
} }
</script> </script>
<style scoped lang="less"> <style scoped lang="less">
@ -2024,10 +2032,6 @@ const showMentionSelectDebounced = (quill) => {
height: 44rpx; height: 44rpx;
display: inline-block; display: inline-block;
} }
span {
user-select: all;
}
} }
} }
} }