This commit is contained in:
zoujiandong 2024-04-24 18:43:36 +08:00
parent 8d97e64205
commit ef911b998f
2 changed files with 38 additions and 2 deletions

View File

@ -59,6 +59,15 @@ Component({
}); });
}, },
}, },
serviceInfo:{
type: Object,
value:{},
observer(newVal) {
this.setData({
serviceInfo:newVal
});
},
},
patient_family_data:{ patient_family_data:{
type: Object, type: Object,
value:{}, value:{},
@ -153,6 +162,7 @@ Component({
inquiry_type:'', inquiry_type:'',
inquiry_mode:'', inquiry_mode:'',
patient_family_data:{}, patient_family_data:{},
serviceInfo:{},
message: '', message: '',
message_rounds:0, message_rounds:0,
rest_rounds:0, rest_rounds:0,
@ -219,6 +229,7 @@ Component({
}); });
} }
this.sendCallback(); this.sendCallback();
let {serviceInfo}=this.data;
const message = wx.$TUIKit.createAudioMessage({ const message = wx.$TUIKit.createAudioMessage({
to: this.getToAccount(), to: this.getToAccount(),
conversationType: this.data.conversation.type, conversationType: this.data.conversation.type,
@ -231,6 +242,11 @@ Component({
inquiry_mode:this.data.inquiry_mode, inquiry_mode:this.data.inquiry_mode,
message_rounds:this.data.msgData.msg_round, message_rounds:this.data.msgData.msg_round,
patient_family_data:this.data.patient_family_data, patient_family_data:this.data.patient_family_data,
remaining_month_inquiry_count:serviceInfo.remaining_month_inquiry_count,
service_package_start_time:serviceInfo.start_time,
service_package_finish_time:serviceInfo.finish_timestart_time,
service_period:serviceInfo.service_period,
remaining_quantity:serviceInfo.remaining_quantity,
is_system:0 is_system:0
}) })
}); });
@ -539,6 +555,7 @@ pageLifetimes:{
// 发送图片消息 // 发送图片消息
handleSendImageMessage(file) { handleSendImageMessage(file) {
let {serviceInfo}=this.data;
const message = wx.$TUIKit.createImageMessage({ const message = wx.$TUIKit.createImageMessage({
to: this.getToAccount(), to: this.getToAccount(),
conversationType: this.data.conversation.type, conversationType: this.data.conversation.type,
@ -551,6 +568,11 @@ pageLifetimes:{
inquiry_mode:this.data.inquiry_mode, inquiry_mode:this.data.inquiry_mode,
message_rounds:this.data.msgData.msg_round, message_rounds:this.data.msgData.msg_round,
patient_family_data:this.data.patient_family_data, patient_family_data:this.data.patient_family_data,
remaining_month_inquiry_count:serviceInfo.remaining_month_inquiry_count,
service_package_start_time:serviceInfo.start_time,
service_package_finish_time:serviceInfo.finish_timestart_time,
service_period:serviceInfo.service_period,
remaining_quantity:serviceInfo.remaining_quantity,
is_system:0 is_system:0
}), }),
onProgress: (percent) => { onProgress: (percent) => {
@ -878,6 +900,7 @@ pageLifetimes:{
const text = flag ? msg : this.data.message; const text = flag ? msg : this.data.message;
const { FEAT_NATIVE_CODE } = constant; const { FEAT_NATIVE_CODE } = constant;
this.sendCallback(); this.sendCallback();
let {serviceInfo}=this.data;
const message = wx.$TUIKit.createTextMessage({ const message = wx.$TUIKit.createTextMessage({
to, to,
conversationType: this.data.conversation.type, conversationType: this.data.conversation.type,
@ -890,6 +913,11 @@ pageLifetimes:{
inquiry_mode:this.data.inquiry_mode, inquiry_mode:this.data.inquiry_mode,
message_rounds:this.data.msgData.msg_round, message_rounds:this.data.msgData.msg_round,
patient_family_data:this.data.patient_family_data, patient_family_data:this.data.patient_family_data,
remaining_month_inquiry_count:serviceInfo.remaining_month_inquiry_count,
service_package_start_time:serviceInfo.start_time,
service_package_finish_time:serviceInfo.finish_timestart_time,
service_period:serviceInfo.service_period,
remaining_quantity:serviceInfo.remaining_quantity,
is_system:0 is_system:0
}), }),
}); });
@ -927,6 +955,7 @@ pageLifetimes:{
// 发送正在输入状态消息 // 发送正在输入状态消息
sendTypingStatusMessage() { sendTypingStatusMessage() {
const { BUSINESS_ID_TEXT, FEAT_NATIVE_CODE } = constant; const { BUSINESS_ID_TEXT, FEAT_NATIVE_CODE } = constant;
let {serviceInfo}=this.data;
// 创建正在输入状态消息, "typingStatus":1,正在输入中1, 输入结束0, "version": 1 兼容老版本,userAction:0, // 14表示正在输入,actionParam:"EIMAMSG_InputStatus_Ing" //"EIMAMSG_InputStatus_Ing" 表示正在输入, "EIMAMSG_InputStatus_End" 表示输入结束 // 创建正在输入状态消息, "typingStatus":1,正在输入中1, 输入结束0, "version": 1 兼容老版本,userAction:0, // 14表示正在输入,actionParam:"EIMAMSG_InputStatus_Ing" //"EIMAMSG_InputStatus_Ing" 表示正在输入, "EIMAMSG_InputStatus_End" 表示输入结束
const typingMessage = wx.$TUIKit.createCustomMessage({ const typingMessage = wx.$TUIKit.createCustomMessage({
to: this.getToAccount(), to: this.getToAccount(),
@ -948,6 +977,11 @@ pageLifetimes:{
inquiry_mode:this.data.inquiry_mode, inquiry_mode:this.data.inquiry_mode,
message_rounds:this.data.msgData.msg_round, message_rounds:this.data.msgData.msg_round,
patient_family_data:this.data.patient_family_data, patient_family_data:this.data.patient_family_data,
remaining_month_inquiry_count:serviceInfo.remaining_month_inquiry_count,
service_package_start_time:serviceInfo.start_time,
service_package_finish_time:serviceInfo.finish_timestart_time,
service_period:serviceInfo.service_period,
remaining_quantity:serviceInfo.remaining_quantity,
is_system:0 is_system:0
}), }),
}); });

View File

@ -52,7 +52,7 @@
<text>沟通回合</text> <text>沟通回合</text>
</view> </view>
<view class="count_time" wx:if="{{doctorChatData.rest_time!==0 && !isEnd && (doctorChatData.inquiry_mode==8 || doctorChatData.inquiry_mode==9)}}"> <view class="count_time" wx:if="{{doctorChatData.rest_time!==0 && !isEnd && (doctorChatData.inquiry_mode==8 || doctorChatData.inquiry_mode==9)}}">
<text class="red" wx:if="{{serviceInfo.monthly_frequency==0}}">不限问诊次数,{{serviceInfo.finish_time}}天后结束</text> <text class="red" wx:if="{{serviceInfo.monthly_frequency==0}}">不限问诊次数,{{serviceInfo.remaining_finish_day}}天后结束</text>
<text wx:else >当月剩余:<text class="red">{{serviceInfo.monthly_frequency-serviceInfo.month_inquiry_count}}</text>次</text> <text wx:else >当月剩余:<text class="red">{{serviceInfo.monthly_frequency-serviceInfo.month_inquiry_count}}</text>次</text>
</view> </view>
</view> </view>
@ -87,7 +87,9 @@
</view> </view>
<view class="input-area" wx:if="{{doctorChatData.inquiry_status==3 || doctorChatData.inquiry_status==4}}"> <view class="input-area" wx:if="{{doctorChatData.inquiry_status==3 || doctorChatData.inquiry_status==4}}">
<view class="message-input" style="{{viewData.style}}" wx:if="{{showChat}}"> <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}}" rest_rounds="{{rest_rounds}}" doctor_user_id="{{doctorChatData.doctor_user_id}}" hasCallKit="{{hasCallKit}}" <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}}"
serviceInfo="{{serviceInfo}}"
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:sendMessage="sendMessage" bind:freshChatStatus="freshChatStatus"
bind:changeTimeStatus="changeTimeStatus" bind:changeTimeStatus="changeTimeStatus"
bind:downKeysBoards="downKeysBoards" bind:pullKeysBoards="pullKeysBoards" bind:showMessageErrorImage="showMessageErrorImage" bind:handleCall="handleCall" bind:getMessageRounds="getMessageRounds"></MessageInput> bind:downKeysBoards="downKeysBoards" bind:pullKeysBoards="pullKeysBoards" bind:showMessageErrorImage="showMessageErrorImage" bind:handleCall="handleCall" bind:getMessageRounds="getMessageRounds"></MessageInput>