diff --git a/TUIChatService/TUIKit/components/TUIChat/index.js b/TUIChatService/TUIKit/components/TUIChat/index.js
index 6d0c8e5..61a7d70 100644
--- a/TUIChatService/TUIKit/components/TUIChat/index.js
+++ b/TUIChatService/TUIKit/components/TUIChat/index.js
@@ -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({
diff --git a/TUIChatService/TUIKit/components/TUIChat/index.wxml b/TUIChatService/TUIKit/components/TUIChat/index.wxml
index c851d64..e0d325e 100644
--- a/TUIChatService/TUIKit/components/TUIChat/index.wxml
+++ b/TUIChatService/TUIKit/components/TUIChat/index.wxml
@@ -7,7 +7,7 @@
{{baseInfo.patient_family_name}}
{{baseInfo.patient_family_sex==1?'男':'女'}} | {{baseInfo.patient_family_age}}岁
-
+
问诊中|不限时间
@@ -26,6 +26,8 @@
0个沟通回合
+ 问诊中 | 不限问诊次数,{{serviceInfo.finish_time}}后结束
+ 当月剩余:{{serviceInfo.monthly_frequency-serviceInfo.month_inquiry_count}}次
结束问诊
@@ -36,6 +38,10 @@
如需要修改视频时间,请点击这里
+
+ 温馨提示:还剩{{serviceInfo.remaining_quantity}}盒“肝爽颗粒(步长)”,记得开具处方
+
+
diff --git a/TUIChatService/TUIKit/components/TUIChat/index.wxss b/TUIChatService/TUIKit/components/TUIChat/index.wxss
index 85b56ce..5281c47 100644
--- a/TUIChatService/TUIKit/components/TUIChat/index.wxss
+++ b/TUIChatService/TUIKit/components/TUIChat/index.wxss
@@ -317,4 +317,23 @@ margin-left: 32rpx;
font-size: 28rpx;
font-weight: 400;
color: #FF9C00;
- }
\ No newline at end of file
+ }
+ .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;
+ }
\ No newline at end of file
diff --git a/TUIChatService/TUIKit/index.js b/TUIChatService/TUIKit/index.js
index 339383f..c1fe106 100644
--- a/TUIChatService/TUIKit/index.js
+++ b/TUIChatService/TUIKit/index.js
@@ -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 方法是否存在
diff --git a/TUIChatService/TUIKit/index.wxml b/TUIChatService/TUIKit/index.wxml
index e4a7e7a..8bb4ae4 100644
--- a/TUIChatService/TUIKit/index.wxml
+++ b/TUIChatService/TUIKit/index.wxml
@@ -1,5 +1,5 @@
-
diff --git a/TUIChatService/pages/index.js b/TUIChatService/pages/index.js
index 62f1467..93214b4 100644
--- a/TUIChatService/pages/index.js
+++ b/TUIChatService/pages/index.js
@@ -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);})
},
})
diff --git a/TUIChatService/pages/index.wxml b/TUIChatService/pages/index.wxml
index d3941fe..818b69e 100644
--- a/TUIChatService/pages/index.wxml
+++ b/TUIChatService/pages/index.wxml
@@ -1,4 +1,4 @@
-
diff --git a/utils/network/api.js b/utils/network/api.js
index b2928d9..26a38c8 100644
--- a/utils/network/api.js
+++ b/utils/network/api.js
@@ -1065,6 +1065,12 @@ postServiceConfig(params) {//新增医生问诊配置-服务设置
method: 'GET'
})
}
+ serviceChatMsg(id){
+ return this.request({//获取服务包关联问诊订单消息内页基础数据
+ url: `${this.baseUrl}/im/inquiry/basic/service/${id}`,
+ method: 'GET'
+ })
+ }
}