添加聊天页面的来源,处理带接诊的问题
This commit is contained in:
@@ -41,8 +41,6 @@ Page({
|
||||
dot_5: false,
|
||||
},
|
||||
onLoad() {
|
||||
console.log("wenzhen onloadddd");
|
||||
|
||||
// if(wx.$TUIKit){
|
||||
// wx.$TUIKit.on(wx.$TUIKitTIM.EVENT.MESSAGE_RECEIVED, this.$onMessageReceived, this);
|
||||
// }else{
|
||||
@@ -120,13 +118,10 @@ Page({
|
||||
|
||||
|
||||
if(wx.$TUIKit){
|
||||
console.log("1111");
|
||||
|
||||
wx.$TUIKit.off(wx.$TUIKitTIM.EVENT.SDK_READY, this.onSDKReady);
|
||||
wx.$TUIKit.on(wx.$TUIKitTIM.EVENT.SDK_READY, this.onSDKReady, this);
|
||||
wx.$TUIKit.on(wx.$TUIKitTIM.EVENT.MESSAGE_RECEIVED, this.$onMessageReceived, this);
|
||||
}else{
|
||||
console.log("222")
|
||||
app.imInit().then(res => {
|
||||
// console.log("wenzhen onload imInit");
|
||||
wx.$TUIKit.on(wx.$TUIKitTIM.EVENT.SDK_READY, this.onSDKReady, this);
|
||||
@@ -174,7 +169,7 @@ Page({
|
||||
})
|
||||
},
|
||||
onSDKReady(){
|
||||
console.log("onSDKReady from wenzhen");
|
||||
//console.log("onSDKReady from wenzhen");
|
||||
this.getConversationList();
|
||||
},
|
||||
getConversationList(){
|
||||
@@ -184,7 +179,7 @@ Page({
|
||||
|
||||
wx.$TUIKit.getConversationList().then((imResponse) => {
|
||||
// console.log("imResponse.data.conversationList from wenzhen_v2: ", imResponse.data.conversationList);
|
||||
console.log("监听会话接口列表")
|
||||
//console.log("监听会话接口列表")
|
||||
console.log(imResponse.data.conversationList)
|
||||
this.setData({
|
||||
conversationList: imResponse.data.conversationList,
|
||||
@@ -513,8 +508,18 @@ Page({
|
||||
|
||||
let from_account = e.currentTarget.dataset.from_account;
|
||||
let order_inquiry_id = e.currentTarget.dataset.order_inquiry_id;
|
||||
let from= e.currentTarget.dataset.from;
|
||||
let inquiry_type = e.currentTarget.dataset.inquiry_type;
|
||||
let url = e.currentTarget.dataset.url+"?from_account="+from_account+"&order_inquiry_id="+order_inquiry_id+"&inquiry_type="+inquiry_type;
|
||||
let url='';
|
||||
|
||||
//from=end代表从问诊接触过来,from=prescription 代表从处方管理进来
|
||||
//主要处理有新的问诊还停留在老的聊天问诊里的bug。
|
||||
if(from){
|
||||
url = e.currentTarget.dataset.url+"?from_account="+from_account+"&order_inquiry_id="+order_inquiry_id+"&inquiry_type="+inquiry_type+"&from="+from;
|
||||
}else{
|
||||
url = e.currentTarget.dataset.url+"?from_account="+from_account+"&order_inquiry_id="+order_inquiry_id+"&inquiry_type="+inquiry_type;
|
||||
}
|
||||
|
||||
app.go(url);
|
||||
},
|
||||
postDoctorInquiry(e){
|
||||
|
||||
@@ -195,7 +195,7 @@
|
||||
custom-style="padding:0 35rpx; height:67rpx; border-radius: 10rpx;margin-left:20rpx;" color="#3CC7C0">去接诊</van-button>
|
||||
</view>
|
||||
<view class="btn" wx:if="{{ item.inquiry_status >= 4 }}">
|
||||
<van-button bind:click="goChat" data-from_account="{{item.from_account}}" data-inquiry_type="{{item.inquiry_type}}" data-order_inquiry_id="{{item.order_inquiry_id}}" data-url="/Pages/yishi/chat/index" plain custom-style="padding:0 35rpx; height:67rpx; border-radius: 10rpx;" color="#3CC7C0">问诊详情</van-button>
|
||||
<van-button bind:click="goChat" data-from_account="{{item.from_account}}" data-inquiry_type="{{item.inquiry_type}}" data-order_inquiry_id="{{item.order_inquiry_id}}" data-url="/Pages/yishi/chat/index" plain custom-style="padding:0 35rpx; height:67rpx; border-radius: 10rpx;" color="#3CC7C0">问诊详情</van-button>
|
||||
<!-- <van-button bind:click="go" data-url="/Pages/yishi/chat_session/index" plain custom-style="width:200rpx; border-radius: 10rpx;" color="#3CC7C0">会话列表</van-button> -->
|
||||
</view>
|
||||
</view>
|
||||
@@ -380,7 +380,9 @@
|
||||
</view>
|
||||
</van-tab>
|
||||
<van-tab title="问诊结束" name="6" wx:if="{{data_list_6.length > 0}}">
|
||||
<view class="content" wx:for="{{ data_list_6 }}" wx:key="order_inquiry_id" bindtap="goChat" data-from_account="{{item.from_account}}" data-inquiry_type="{{item.inquiry_type}}" data-order_inquiry_id="{{item.order_inquiry_id}}" data-url="/Pages/yishi/chat/index">
|
||||
<view class="content" wx:for="{{ data_list_6 }}" wx:key="order_inquiry_id" bindtap="goChat" data-from_account="{{item.from_account}}" data-inquiry_type="{{item.inquiry_type}}" data-order_inquiry_id="{{item.order_inquiry_id}}"
|
||||
data-from="end"
|
||||
data-url="/Pages/yishi/chat/index">
|
||||
<view class="content_1" >
|
||||
<view class="name">
|
||||
<text style="font-size: 34rpx;color: #333;">就诊人:</text>
|
||||
|
||||
Reference in New Issue
Block a user