作者 韩昌

gaibug

<template>
<view class="message-bubble" :class="[message.flow === 'in' ? '' : 'reverse']">
<image class="avatar" :src="DialogUserAvatar || 'https://web.sdk.qcloud.com/component/TUIKit/assets/avatar_21.png'" alt=""></image>
<image class="avatar" mode="aspectFill" :src="DialogUserAvatar || 'https://web.sdk.qcloud.com/component/TUIKit/assets/avatar_21.png'" alt=""></image>
<!-- <image class="avatar" mode="aspectFill" :src="DialogUserAvatar || '/static/images/mAvatar.png'" alt=""></image> -->
<view>
<view class="username" :style="{ textAlign: message.flow === 'in' ? 'left' : 'right' }">{{ DialogUserName }}</view>
<view class="message-area">
... ...
... ... @@ -129,9 +129,9 @@ const TUIChatInput = defineComponent({
conversation: computed(() => store.state.timStore.conversation)
})
watchEffect(() => {
data.inputText = props.text
})
// watchEffect(() => {
// data.inputText = props.text
// })
const handleSwitchAudio = () => {
data.isAudio = !data.isAudio
... ... @@ -169,6 +169,8 @@ const TUIChatInput = defineComponent({
success(image) {
console.error(image)
TUIServer.sendImageMessage(res, image)
emit('scrollbottomHandler')
}
})
}
... ...
... ... @@ -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)
... ...
... ... @@ -115,7 +115,7 @@ page {
}
.mineCom {
box-sizing: border-box;
padding: 50rpx 24rpx 0;
padding: 40rpx 24rpx 0;
&-emptyImg {
width: 216rpx;
height: 216rpx;
... ...
... ... @@ -27,12 +27,12 @@
:style="index === (props.isRenew === 'err' ? PrescriptionDetail?.drugList : PrescriptionDetail?.renewDrugList)?.length ? 'margin-bottom: 42rpx' : 'margin-bottom: 0'"
>
<view>
<view class="blacktext" style="margin-bottom: 8rpx; font-weight: 700">{{ _.name || '' }}</view>
<view class="graytext">{{ _.des || '' }}</view>
<view class="blacktext" style="margin-bottom: 8rpx;">{{ _.name || '' }}</view>
<view class="graytext" style="margin-bottom: 16rpx;">{{ _.des || '' }}</view>
</view>
<view>
<view class="blacktext" style="margin-bottom: 8rpx; font-weight: 700">¥{{ _.amount || 0 }}</view>
<view class="graytext">x{{ _.num || 0 }}</view>
<view class="blacktext" style="margin-bottom: 8rpx;">¥{{ _.amount || 0 }}</view>
<view class="graytext" style="margin-bottom: 16rpx;">x{{ _.num || 0 }}</view>
</view>
</view>
</view>
... ... @@ -156,7 +156,6 @@ const CustomBackground = ref(props.bg)
.blacktext {
color: #323233;
font-size: 30rpx;
font-weight: 700;
}
.graytext {
color: #999999;
... ...
... ... @@ -61,11 +61,11 @@
</view> -->
</view>
<view style="height: 200rpx"></view>
<!-- <view class="fixed-bottom" v-if="[30, '30', 20, '20', 40, '40'].includes(detailData?.orderState)"> -->
<view>
<view class="fixed-bottom" v-if="[30, '30', 20, '20', 40, '40'].includes(detailData?.orderState)">
<!-- <view> -->
<view class="form-btns">
<!-- <up-button type="info" v-if="[20, '20'].includes(detailData?.orderState)" shape="circle" text="返回" throttleTime="1500" @click="proxy.$h.backUrl()" :customStyle="{ width: '196rpx', marginRight: '16rpx' }"></up-button> -->
<up-button color="#05B8D2" shape="circle" :text="[20, '20'].includes(detailData?.orderState) ? '接诊' : '回复'" throttleTime="1500" @click="AcceptHandler('err')"></up-button>
<!-- <up-button color="#05B8D2" shape="circle" :text="[20, '20'].includes(detailData?.orderState) ? '接诊' : '回复'" throttleTime="1500" @click="AcceptHandler('err')"></up-button> -->
<up-button color="#05B8D2" v-if="[20, '20', 30, '30'].includes(detailData?.orderState)" shape="circle" :text="[20, '20'].includes(detailData?.orderState) ? '接诊' : '回复'" throttleTime="1500" @click="AcceptHandler('err')"></up-button>
<up-button color="#05B8D2" v-if="[40, '40'].includes(detailData?.orderState)" shape="circle" text="问诊记录" throttleTime="1500" @click="AcceptHandler('success')"></up-button>
</view>
... ...