...
|
...
|
@@ -333,13 +333,13 @@ export default defineComponent({ |
|
|
watch(messages, (newVal: any, oldVal: any) => {
|
|
|
// 下拉刷新不滑动 todo 优化
|
|
|
nextTick(() => {
|
|
|
const newLastMessage = newVal[newVal.length - 1]
|
|
|
const oldLastMessage = oldVal ? oldVal[oldVal.length - 1] : {}
|
|
|
// const newLastMessage = newVal[newVal.length - 1]
|
|
|
// const oldLastMessage = oldVal ? oldVal[oldVal.length - 1] : {}
|
|
|
data.oldMessageTime = messages.value[0].time
|
|
|
handleShowTime()
|
|
|
if (oldVal && newLastMessage.ID !== oldLastMessage.ID) {
|
|
|
handleScrollBottom() // 非从conversationList 首次进入
|
|
|
}
|
|
|
// if (oldVal && newLastMessage.ID !== oldLastMessage.ID) {
|
|
|
// handleScrollBottom() // 非从conversationList 首次进入
|
|
|
// }
|
|
|
})
|
|
|
})
|
|
|
// 监听数据初次渲染,展示最新一条消息
|
...
|
...
|
@@ -383,8 +383,8 @@ export default defineComponent({ |
|
|
|
|
|
const scrollbottomHandler = () => {
|
|
|
setTimeout(() => {
|
|
|
data.scrollTop = 100000
|
|
|
}, 500)
|
|
|
data.scrollTop = 1000000
|
|
|
}, 800)
|
|
|
}
|
|
|
|
|
|
const imageFormatMap = new Map([
|
...
|
...
|
@@ -396,9 +396,9 @@ export default defineComponent({ |
|
|
|
|
|
const stateInterval = setInterval(async () => {
|
|
|
if (data.history === 'err') {
|
|
|
// const { result }: { result: Consultation_information_detailType } = await getConsultation_information_detail({ id: data.Event.orderId })
|
|
|
const { result }: { result: Consultation_information_detailType } = await getConsultation_information_detail({ id: data.Event.orderId })
|
|
|
|
|
|
// if (result?.orderState !== 30) proxy.$h.timeCallBack('对方已结束问诊即将返回', 2000)
|
|
|
if (result?.orderState !== 30) proxy.$h.timeCallBack('对方已结束问诊即将返回', 2000)
|
|
|
}
|
|
|
}, 3000)
|
|
|
|
...
|
...
|
|