3.18 患者端
This commit is contained in:
+3
-3
@@ -267,8 +267,8 @@ Component({
|
||||
}];
|
||||
return renderDom;
|
||||
}
|
||||
//13 赠送对话
|
||||
if (customMessage.message_type ===14 || customMessage.message_type ===13){
|
||||
//13 赠送对话customMessage.message_type ===14 ||
|
||||
if (customMessage.message_type ===13){
|
||||
let data = customMessage.data;
|
||||
const renderDom = [{
|
||||
type: 'send_talk',
|
||||
@@ -285,7 +285,7 @@ Component({
|
||||
const renderDom = [{
|
||||
type: 'video_time',
|
||||
title: customMessage.title,
|
||||
desc: customMessage.desc,
|
||||
desc: customMessage.desc.replace(/text/g,'span'),
|
||||
|
||||
}];
|
||||
return renderDom;
|
||||
|
||||
+4
-2
@@ -35,7 +35,9 @@
|
||||
<view class="custom-content-text">{{renderDom[0].text}}</view>
|
||||
</view>
|
||||
<view wx:if="{{renderDom[0].type ==='c2cCalling' || renderDom[0].type ==='groupCalling'}}" class="call-message {{isMine?'my-text':'your-text'}}">
|
||||
<image src="{{isMine?'../../../../../static/images/video-right.png':'../../../../../static/images/video-left.png'}}" mode="" class="{{isMine?'classImgright':'classImgleft'}}"/>
|
||||
<view class="custom-content-text">{{renderDom[0].text}}</view>
|
||||
|
||||
</view>
|
||||
<view wx:if="{{renderDom[0].type ==='notSupport'}}" class="message-body-span text-message">
|
||||
<view class="message-body-span-text">{{renderDom[0].text}}</view>
|
||||
@@ -107,9 +109,9 @@
|
||||
|
||||
</view>
|
||||
<view class="videotime" wx:if="{{renderDom[0].type==='video_time'}}" >
|
||||
{{renderDom[0].desc}}
|
||||
<rich-text nodes="{{renderDom[0].desc}}"></rich-text>
|
||||
</view>
|
||||
<view class="videotime" wx:if="{{renderDom[0].type==='send_talk'}}" >
|
||||
{{renderDom[0].desc}}
|
||||
<rich-text nodes="{{renderDom[0].desc}}"></rich-text>
|
||||
</view>
|
||||
</view>
|
||||
+23
@@ -380,6 +380,7 @@ color: #666666;
|
||||
border-style: none none solid solid
|
||||
}
|
||||
.call-message.my-text {
|
||||
flex-direction: row-reverse;
|
||||
max-width: 60vw;
|
||||
min-height: 50rpx;
|
||||
padding: 10rpx 24rpx;
|
||||
@@ -407,6 +408,7 @@ color: #666666;
|
||||
padding: 10rpx 24rpx;
|
||||
line-height: 50rpx;
|
||||
position: relative;
|
||||
|
||||
border-radius: 10px 10px 10px 10px;
|
||||
background: rgb(255, 255, 255);
|
||||
border: 1rpx solid #D8D8D8;
|
||||
@@ -431,4 +433,25 @@ color: #666666;
|
||||
}
|
||||
.video_time_16{
|
||||
display: none;
|
||||
}
|
||||
.classImgleft{
|
||||
width:30rpx;
|
||||
height:30rpx;
|
||||
margin-right:10rpx;
|
||||
}
|
||||
.classImgright{
|
||||
margin-top: 4rpx;
|
||||
width:30rpx;
|
||||
height:30rpx;
|
||||
margin-left:10rpx;
|
||||
}
|
||||
.call-message{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
.tipColor{
|
||||
color:#3BB5FE;
|
||||
}
|
||||
.tipRoundsColor{
|
||||
color: #FF4D4F;
|
||||
}
|
||||
@@ -68,6 +68,15 @@ Component({
|
||||
});
|
||||
},
|
||||
},
|
||||
rest_rounds:{
|
||||
type:Number,
|
||||
value:0,
|
||||
observer(newVal){
|
||||
this.setData({
|
||||
rest_rounds:newVal
|
||||
})
|
||||
}
|
||||
},
|
||||
msgData:{
|
||||
type: Object,
|
||||
value:{},
|
||||
@@ -146,6 +155,7 @@ Component({
|
||||
patient_family_data:{},
|
||||
message: '',
|
||||
message_rounds:0,
|
||||
rest_rounds:0,
|
||||
times_number:0,//总共回合数
|
||||
msgData:{},
|
||||
rest_time:0,
|
||||
@@ -745,7 +755,7 @@ pageLifetimes:{
|
||||
},
|
||||
//发送成功之后回合数+1;
|
||||
sendCallback(){
|
||||
let {times_number,msgData}=this.data;
|
||||
let {times_number,msgData,rest_rounds}=this.data;
|
||||
let rounds=msgData.msg_round;
|
||||
if(msgData.msg_type==1){
|
||||
rounds=rounds+1;
|
||||
@@ -759,7 +769,7 @@ pageLifetimes:{
|
||||
});
|
||||
setTimeout(() => {
|
||||
if(times_number>=0){
|
||||
if(rounds==times_number){
|
||||
if(rounds==times_number || rest_rounds==0){
|
||||
wx.showToast({
|
||||
title: '沟通已达到限制的'+times_number+'个回合',
|
||||
icon:"none"
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<view class="TUI-message-input-container">
|
||||
|
||||
<view class="TUI-commom-function functionbox">
|
||||
<view bindtap="call">视频电话</view>
|
||||
<!-- <view bindtap="call">视频电话</view> -->
|
||||
<view class="more" bindtap="showTooltip">
|
||||
更多
|
||||
|
||||
|
||||
@@ -253,7 +253,8 @@ Component({
|
||||
|
||||
}else{
|
||||
let jsonData=JSON.parse(messageList[i].payload.data);
|
||||
if(jsonData.message_type==1){
|
||||
//13 赠送回合数
|
||||
if(jsonData.message_type==1 || jsonData.message_type==13){
|
||||
this.setData({
|
||||
'msgData.msg_round':0,
|
||||
'msgData.msg_type':2
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<scroll-view class="message-list-container" scroll-y="true" scroll-into-view="{{jumpAim}}" refresher-enabled="{{true}}" bindrefresherrefresh="refresh" refresher-triggered="{{triggered}}" lower-threshold="200" bindscrolltolower="scrollHandler">
|
||||
<view class="no-message" wx:if="{{isCompleted}}">没有更多啦</view>
|
||||
<!-- <text style="display: none;">{{filter.toS(messageList[messageList.length-1])}}</text> -->
|
||||
<view class="t-message" wx:if="{{conversation.type !== '@TIM#SYSTEM'}}" wx:for="{{messageList}}" wx:key="index" data-index ='{{index}}' hidden="{{!(item.payload.data && (filter.formateText(item.payload.data).message_type!=20) || item.type!='TIMCustomElem') || filter.formateText(item.payload.data).message_type==16}}">
|
||||
<view class="t-message" wx:if="{{conversation.type !== '@TIM#SYSTEM'}}" wx:for="{{messageList}}" wx:key="index" data-index ='{{index}}' hidden="{{!(item.payload.data && (filter.formateText(item.payload.data).message_type!=20) || item.type!='TIMCustomElem') || filter.formateText(item.payload.data).message_type==16 || filter.formateText(item.payload.data).message_type==14}}">
|
||||
<view class="time-pop-mask" data-value="{{item.time}}" wx:if="{{showMessageTime}}">
|
||||
<view class="showmessagetime" wx:if="{{item.isShowTime}}">
|
||||
<text class="time" wx:if="{{!item.isDeleted && !item.isRevoked}}">{{messageTime}} </text>
|
||||
@@ -49,7 +49,7 @@
|
||||
<ImageMessage wx:if="{{item.type === 'TIMImageElem'}}" message="{{item}}" isMine="{{item.flow === 'out'}}" />
|
||||
<VideoMessage wx:if="{{item.type === 'TIMVideoFileElem'}}" message="{{item}}" isMine="{{item.flow === 'out'}}"/>
|
||||
<AudioMessage wx:if="{{item.type === 'TIMSoundElem'}}" message="{{item}}" data-index ='{{index}}' messageList="{{messageList}}" bind:closeAudio="closeAudio" id="audio{{item.ID}}" isMine="{{item.flow === 'out'}}"/>
|
||||
<CustomMessage style="width:100vw" bind:popComment="popComment" wx:if="{{item.type === 'TIMCustomElem' && filter.formateText(item.payload.data).message_type!=6 && filter.formateText(item.payload.data).message_type!=11 && filter.formateText(item.payload.data).message_type!=20 && filter.formateText(item.payload.data).message_type!==0 }}" message="{{item}}" isMine="{{item.flow === 'out'}}" bindtap="handleJumpLink" data-value = "{{item}}" class="{{(item.type === 'TIMCustomElem' && filter.formateText(item.payload.data).message_type==2)?'custom'+filter.formateText(item.payload.data).data.order_inquiry_id:''}}" patient_data="{{filter.formateText(item.cloudCustomData).patient_family_data}}"/>
|
||||
<CustomMessage style="width:100vw" bind:popComment="popComment" wx:if="{{item.type === 'TIMCustomElem' && filter.formateText(item.payload.data).message_type!=6 && filter.formateText(item.payload.data).message_type!=11 && filter.formateText(item.payload.data).message_type!=20 && filter.formateText(item.payload.data).message_type!==0 && filter.formateText(item.payload.data).message_type!=14}}" message="{{item}}" isMine="{{item.flow === 'out'}}" bindtap="handleJumpLink" data-value = "{{item}}" class="{{(item.type === 'TIMCustomElem' && filter.formateText(item.payload.data).message_type==2)?'custom'+filter.formateText(item.payload.data).data.order_inquiry_id:''}}" patient_data="{{filter.formateText(item.cloudCustomData).patient_family_data}}"/>
|
||||
<FaceMessage wx:if="{{item.type === 'TIMFaceElem'}}" message="{{item}}" isMine="{{item.flow === 'out'}}"/>
|
||||
<FileMessage wx:if="{{item.type === 'TIMFileElem'}}" message="{{item}}" isMine="{{item.flow === 'out'}}"/>
|
||||
<MergerMessage wx:if="{{item.type === 'TIMRelayElem'}}" message="{{item}}" isMine="{{item.flow === 'out'}}"/>
|
||||
|
||||
@@ -420,7 +420,7 @@ Component({
|
||||
let rest_rounds=this.data.doctorChatData.times_number-event.detail.msg_round;
|
||||
console.log("rest_rounds:"+rest_rounds)
|
||||
this.setData({
|
||||
rest_rounds:rest_rounds
|
||||
rest_rounds:rest_rounds>=0?rest_rounds:0
|
||||
})
|
||||
|
||||
}
|
||||
@@ -534,9 +534,9 @@ Component({
|
||||
// console.log("times_number:----"+data.times_number,this.data.msgData.msg_round)
|
||||
if(data.times_number>=0){
|
||||
let rest_rounds=data.times_number-this.data.msgData.msg_round;
|
||||
console.log("rest_rounds:----"+rest_rounds)
|
||||
console.log("rest_rounds----:"+rest_rounds)
|
||||
this.setData({
|
||||
rest_rounds:rest_rounds
|
||||
rest_rounds:rest_rounds>=0?rest_rounds:0
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
@@ -83,7 +83,8 @@
|
||||
</view>
|
||||
<view class="input-area" wx:if="{{doctorChatData.inquiry_status==3 || doctorChatData.inquiry_status==4}}">
|
||||
<view class="message-input" style="{{viewData.style}}" wx:if="{{showChat}}">
|
||||
<MessageInput id="MessageInput" duration="{{doctorChatData.duration}}" rest_time="{{doctorChatData.rest_time}}" times_number="{{doctorChatData.times_number}}" msgData="{{msgData}}" order_inquiry_id="{{order_inquiry_id}}" inquiry_type="{{inquiry_type}}" inquiry_mode="{{inquiry_mode}}" conversation="{{conversation}}" patient_family_data="{{patient_family_data}}" doctor_user_id="{{doctorChatData.doctor_user_id}}" hasCallKit="{{hasCallKit}}" bind:sendMessage="sendMessage" bind:freshChatStatus="freshChatStatus"
|
||||
<MessageInput id="MessageInput" duration="{{doctorChatData.duration}}" rest_time="{{doctorChatData.rest_time}}" times_number="{{doctorChatData.times_number}}" msgData="{{msgData}}" order_inquiry_id="{{order_inquiry_id}}" inquiry_type="{{inquiry_type}}" inquiry_mode="{{inquiry_mode}}" conversation="{{conversation}}" patient_family_data="{{patient_family_data}}" rest_rounds="{{rest_rounds}}" doctor_user_id="{{doctorChatData.doctor_user_id}}" hasCallKit="{{hasCallKit}}"
|
||||
bind:sendMessage="sendMessage" bind:freshChatStatus="freshChatStatus"
|
||||
bind:changeTimeStatus="changeTimeStatus"
|
||||
bind:downKeysBoards="downKeysBoards" bind:pullKeysBoards="pullKeysBoards" bind:showMessageErrorImage="showMessageErrorImage" bind:handleCall="handleCall" bind:getMessageRounds="getMessageRounds"></MessageInput>
|
||||
</view>
|
||||
|
||||
@@ -633,4 +633,4 @@ border-radius: 30rpx;
|
||||
.zxicon{
|
||||
width:80rpx;
|
||||
height:80rpx;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user