1、处理撤回按钮点击区域大小;2、发送按钮新增loading;3、解决只有一条聊天记录搜索不到、单聊按日期搜索时搜索结果不正确问题;4、解决部分艾特功能在部分手机上样式错误等问题
This commit is contained in:
parent
87ca206b2b
commit
30412b109e
@ -3,7 +3,6 @@
|
||||
<ZPaging
|
||||
use-chat-record-mode
|
||||
use-virtual-list
|
||||
inside-more
|
||||
cell-height-mode="fixed"
|
||||
:refresher-enabled="true"
|
||||
:show-scrollbar="false"
|
||||
@ -310,6 +309,8 @@
|
||||
size="mini"
|
||||
:shadow="0"
|
||||
label="发送"
|
||||
:loading="state.isLoading"
|
||||
:width="120"
|
||||
></tm-button>
|
||||
</div>
|
||||
</div>
|
||||
@ -382,14 +383,14 @@
|
||||
<div class="divider"></div>
|
||||
<div
|
||||
@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 class="divider"></div>
|
||||
<div
|
||||
@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>
|
||||
@ -615,6 +616,7 @@ const state = ref({
|
||||
lastMentionText: '', // 记录上一次触发@时的完整文本内容
|
||||
lastMentionTriggered: false, // 记录当前@是否已经触发过
|
||||
lastMentionPosition: -1, // 添加新的状态来记录上一次@的位置
|
||||
isLoading: false,//发送按钮loading
|
||||
})
|
||||
|
||||
uniOnload(async (options) => {
|
||||
@ -681,7 +683,10 @@ const onEditorClick = () => {
|
||||
quill.focus()
|
||||
}
|
||||
|
||||
const onSendMessage = (data = {}, callBack) => {
|
||||
const onSendMessage = (data = {}, callBack, showLoading = false) => {
|
||||
if (showLoading) {
|
||||
state.value.isLoading = true
|
||||
}
|
||||
let message = {
|
||||
...data,
|
||||
receiver: {
|
||||
@ -692,6 +697,7 @@ const onSendMessage = (data = {}, callBack) => {
|
||||
|
||||
ServePublishMessage(message)
|
||||
.then(({ code, message }) => {
|
||||
state.value.isLoading = false
|
||||
if (code == 200) {
|
||||
uploadsStore.updateUploadStatus(false)
|
||||
if (callBack) {
|
||||
@ -703,6 +709,7 @@ const onSendMessage = (data = {}, callBack) => {
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
state.value.isLoading = false
|
||||
uploadsStore.updateUploadStatus(false)
|
||||
message.warning('网络繁忙,请稍后重试!')
|
||||
})
|
||||
@ -762,7 +769,7 @@ const onSendTextEvent = lodash.throttle((value) => {
|
||||
}
|
||||
console.log(message)
|
||||
|
||||
onSendMessage(message, callBack)
|
||||
onSendMessage(message, callBack, true)
|
||||
}, 1000)
|
||||
|
||||
// 编辑器输入事件
|
||||
@ -1374,7 +1381,7 @@ const hideMentionSelect = () => {
|
||||
state.value.lastCursorIndex = undefined
|
||||
// 获得焦点
|
||||
const quill = getQuill()
|
||||
quill.focus()
|
||||
// quill.focus()
|
||||
}
|
||||
|
||||
//确认要提醒人的选择
|
||||
@ -1476,7 +1483,7 @@ const queryRecordsByMsgInfo = async (msgInfo) => {
|
||||
let recordsList = []
|
||||
console.log(recordIndex)
|
||||
if (!recordIndex || recordIndex === -1) {
|
||||
recordsList = await findTalkRecords('', true, msgInfo.sequence)
|
||||
recordsList = await findTalkRecords('', true, msgInfo.sequence - 1)
|
||||
} else {
|
||||
// console.log(recordIndex)
|
||||
const startRecordIndex = Math.max(0, recordIndex - 10)
|
||||
@ -1577,7 +1584,8 @@ const findTalkRecords = (record, isMiddle, sequence, appointParams) => {
|
||||
return findTalkRecords('', false, sequence + 1, {
|
||||
direction: 'up',
|
||||
sort_sequence: '',
|
||||
}).then((finalResult) => {
|
||||
}).then((upResult) => {
|
||||
const finalResult = [...upResult, ...state.value.serveFindRecord]
|
||||
console.log(finalResult)
|
||||
resolve(finalResult)
|
||||
})
|
||||
@ -1715,7 +1723,7 @@ const showMentionSelectDebounced = (quill) => {
|
||||
state.value.lastMentionText = text
|
||||
state.value.lastMentionTriggered = true
|
||||
state.value.isShowMentionSelect = true
|
||||
quill.blur()
|
||||
// quill.blur()
|
||||
}
|
||||
</script>
|
||||
<style scoped lang="less">
|
||||
@ -2024,10 +2032,6 @@ const showMentionSelectDebounced = (quill) => {
|
||||
height: 44rpx;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
span {
|
||||
user-select: all;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user