4.18上传
This commit is contained in:
parent
a81098cafc
commit
348defecb7
@ -74,6 +74,16 @@ Component({
|
||||
});
|
||||
},
|
||||
},
|
||||
serviceInfo:{
|
||||
type: Object,
|
||||
value: {},
|
||||
observer(serviceInfo) {
|
||||
console.log(serviceInfo)
|
||||
this.setData({
|
||||
serviceInfo: serviceInfo
|
||||
});
|
||||
},
|
||||
},
|
||||
baseInfo: {
|
||||
type: Object,
|
||||
value: {},
|
||||
@ -172,7 +182,9 @@ Component({
|
||||
*/
|
||||
data: {
|
||||
rest_time:0,
|
||||
showYaotip:false,
|
||||
videoInfo:{},
|
||||
serviceInfo:{},
|
||||
total_rounds:0,
|
||||
timeData:{},
|
||||
showTip:false,
|
||||
@ -221,6 +233,11 @@ Component({
|
||||
* 组件的方法列表
|
||||
*/
|
||||
methods: {
|
||||
closeYaotip(){
|
||||
this.setData({
|
||||
showYaotip:true
|
||||
})
|
||||
},
|
||||
openTime(){
|
||||
this.selectComponent("#MessageInput").openTimePicker();
|
||||
this.setData({
|
||||
|
||||
@ -7,7 +7,7 @@
|
||||
<view class="name" wx:if="{{baseInfo.inquiry_status!=4}}">{{baseInfo.patient_family_name}}</view>
|
||||
<view class="age" wx:if="{{baseInfo.inquiry_status!=4}}">{{baseInfo.patient_family_sex==1?'男':'女'}} | {{baseInfo.patient_family_age}}岁</view>
|
||||
|
||||
<view class="count_time" wx:else="{{baseInfo.inquiry_status==4}}">
|
||||
<view class="count_time" wx:elif="{{baseInfo.inquiry_status==4 && !(baseInfo.inquiry_mode==9 || baseInfo.inquiry_mode==8) }}">
|
||||
|
||||
问诊中|<text wx:if="{{rest_time==-1}}" class="time_desc">不限时间</text>
|
||||
<view wx:else="{{rest_time!=-1}}" class="time_desc">
|
||||
@ -26,6 +26,8 @@
|
||||
<text wx:else>0</text>个沟通回合
|
||||
</text>
|
||||
</view>
|
||||
<view class="count_time" wx:elif="{{baseInfo.inquiry_status==4 && (baseInfo.inquiry_mode==9 || baseInfo.inquiry_mode==8) }}"> 问诊中 | <text wx:if="{{serviceInfo.monthly_frequency==0}}" class="red" decode> 不限问诊次数,{{serviceInfo.finish_time}}后结束</text>
|
||||
<text decode wx:else> 当月剩余:<text class="red">{{serviceInfo.monthly_frequency-serviceInfo.month_inquiry_count}}</text>次</text></view>
|
||||
</view>
|
||||
<view class="right">
|
||||
<text class="right_txt" bindtap="putDoctorInquiryFinish" wx:if="{{baseInfo.inquiry_status==4}}">结束问诊</text>
|
||||
@ -36,6 +38,10 @@
|
||||
<view >如需要修改视频时间,请点击这里</view>
|
||||
<van-icon name="arrow" size="14px" style="margin-top: 3rpx;" color="#FF9C00" />
|
||||
</view>
|
||||
<view class="yaotip" hidden="{{showYaotip}}">
|
||||
<view>温馨提示:还剩{{serviceInfo.remaining_quantity}}盒“肝爽颗粒(步长)”,记得开具处方</view>
|
||||
<van-icon name="cross" bind:tap="closeYaotip"/>
|
||||
</view>
|
||||
|
||||
|
||||
|
||||
|
||||
@ -317,4 +317,23 @@ margin-left: 32rpx;
|
||||
font-size: 28rpx;
|
||||
font-weight: 400;
|
||||
color: #FF9C00;
|
||||
}
|
||||
}
|
||||
.count_time .red{
|
||||
color:#E34D59;
|
||||
}
|
||||
.yaotip{
|
||||
position: fixed;
|
||||
z-index:999;
|
||||
top:230rpx;
|
||||
justify-content: space-between;
|
||||
padding: 0 10rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
box-sizing: border-box;
|
||||
width:100%;
|
||||
height: 72rpx;
|
||||
background: #facd91;
|
||||
font-size: 28rpx;
|
||||
font-weight: 400;
|
||||
color: #db0f22;
|
||||
}
|
||||
@ -21,6 +21,7 @@ Component({
|
||||
order_inquiry_id:'',
|
||||
inquiry_type:'',
|
||||
baseInfo:{},
|
||||
serviceInfo:{},
|
||||
from:'',
|
||||
unreadCount: 0,
|
||||
hasCallKit: true,
|
||||
@ -37,8 +38,8 @@ Component({
|
||||
* 组件的方法列表
|
||||
*/
|
||||
methods: {
|
||||
init(currentConversationID,order_inquiry_id,inquiry_type,baseInfo,from) {
|
||||
console.log(baseInfo)
|
||||
init(currentConversationID,order_inquiry_id,inquiry_type,baseInfo,from,serviceInfo) {
|
||||
console.log(serviceInfo)
|
||||
console.warn("TUIKit js: init")
|
||||
|
||||
const { config } = this.data;
|
||||
@ -52,7 +53,8 @@ Component({
|
||||
order_inquiry_id,
|
||||
inquiry_type,
|
||||
baseInfo,
|
||||
from
|
||||
from,
|
||||
serviceInfo
|
||||
}, () => {
|
||||
//this.TUICallKit = this.selectComponent('#TUICallKit');
|
||||
// 这里的 isExitInit 用来判断 TUICallKit init 方法是否存在
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
<!--TUIKitWChat/Chat/index.wxml-->
|
||||
<!-- <TUIConversation id="TUIConversation" wx:if="{{isShowConversationList}}" bind:currentConversationID="currentConversationID" bind:currentGroupID="currentGroupID"></TUIConversation> -->
|
||||
<TUIChat id="TUIChat" currentConversationID="{{currentConversationID}}" inquiry_type="{{baseInfo.inquiry_type}}" order_inquiry_id="{{order_inquiry_id}}" baseInfo="{{baseInfo}}"
|
||||
<TUIChat id="TUIChat" currentConversationID="{{currentConversationID}}" inquiry_type="{{baseInfo.inquiry_type}}" order_inquiry_id="{{order_inquiry_id}}" baseInfo="{{baseInfo}}" serviceInfo="{{serviceInfo}}"
|
||||
from="{{from}}"></TUIChat>
|
||||
<!-- <TUICallKit class="calling" id="TUICallKit" config="{{config}}" bind:sendMessage="sendMessage"></TUICallKit> -->
|
||||
|
||||
@ -9,7 +9,8 @@ Page({
|
||||
from:'',
|
||||
inquiry_type:'',
|
||||
currentConversationID:'',
|
||||
baseInfo: {}
|
||||
baseInfo: {},
|
||||
serviceInfo:{}
|
||||
},
|
||||
onLoad(option) {
|
||||
// console.log("chat onload", option);
|
||||
@ -35,13 +36,13 @@ Page({
|
||||
initChat(){
|
||||
let _this = this;
|
||||
let count = 0;
|
||||
let {currentConversationID,order_inquiry_id,inquiry_type,baseInfo,from}=this.data;
|
||||
let {currentConversationID,order_inquiry_id,inquiry_type,baseInfo,from,serviceInfo}=this.data;
|
||||
let interval = setInterval(() => {
|
||||
// console.log("chat init count: ", count);
|
||||
// console.log("app.globalData.chat_sdk_ready: ", app.globalData.chat_sdk_ready);
|
||||
if(app.globalData.chat_sdk_ready){
|
||||
const TUIChat = _this.selectComponent('#TUIKit');
|
||||
TUIChat.init(currentConversationID,order_inquiry_id,inquiry_type,baseInfo,from);
|
||||
TUIChat.init(currentConversationID,order_inquiry_id,inquiry_type,baseInfo,from,serviceInfo);
|
||||
// wx.$TUIKit.on(wx.$TUIKitTIM.EVENT.MESSAGE_RECEIVED, _this.$onMessageReceived, _this);
|
||||
clearInterval(interval);
|
||||
}
|
||||
@ -52,8 +53,18 @@ Page({
|
||||
}
|
||||
}, 1000);
|
||||
},
|
||||
handleServiceChatMsg(id){
|
||||
api.serviceChatMsg(id).then(response=>{
|
||||
console.log(response);
|
||||
this.setData({
|
||||
serviceInfo:response.data
|
||||
})
|
||||
this.initChat();
|
||||
})
|
||||
},
|
||||
//获取问诊订单消息内页基础数据
|
||||
getInquiryMessageBasic() {
|
||||
|
||||
// console.log("order_inquiry_id: ", this.data.order_inquiry_id);
|
||||
api.getInquiryMessageBasic({order_inquiry_id: this.data.order_inquiry_id}).then(response => {
|
||||
// console.log(response);
|
||||
@ -70,7 +81,8 @@ Page({
|
||||
console.warn('getUserProfile error:', imError); // 获取其他用户资料失败的相关信息
|
||||
});
|
||||
}).then(res => {
|
||||
this.initChat();
|
||||
this.handleServiceChatMsg(this.data.order_inquiry_id);
|
||||
|
||||
}).catch(errors => {console.error(errors);})
|
||||
},
|
||||
})
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
<view>
|
||||
<TUIKit id="TUIKit" currentConversationID="C2C{{baseInfo.patient_user_id}}" inquiry_type="{{baseInfo.inquiry_type}}" order_inquiry_id="{{order_inquiry_id}}" baseInfo="{{baseInfo}}"
|
||||
<TUIKit id="TUIKit" currentConversationID="C2C{{baseInfo.patient_user_id}}" inquiry_type="{{baseInfo.inquiry_type}}" order_inquiry_id="{{order_inquiry_id}}" baseInfo="{{baseInfo}}" serviceInfo="{{serviceInfo}}"
|
||||
hasCallKit="{{ false }}" from="{{from}}" bind:handleCall="handleCall"></TUIKit>
|
||||
</view>
|
||||
|
||||
@ -1065,6 +1065,12 @@ postServiceConfig(params) {//新增医生问诊配置-服务设置
|
||||
method: 'GET'
|
||||
})
|
||||
}
|
||||
serviceChatMsg(id){
|
||||
return this.request({//获取服务包关联问诊订单消息内页基础数据
|
||||
url: `${this.baseUrl}/im/inquiry/basic/service/${id}`,
|
||||
method: 'GET'
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user