添加聊天页面的来源,处理带接诊的问题
This commit is contained in:
@@ -6,13 +6,16 @@ Page({
|
||||
title: '',
|
||||
height: app.globalData.height,
|
||||
order_inquiry_id: "",
|
||||
from:'',
|
||||
baseInfo: {}
|
||||
},
|
||||
onLoad(option) {
|
||||
// console.log("chat onload", option);
|
||||
let order_inquiry_id = option.order_inquiry_id;
|
||||
let from=option.from;
|
||||
this.setData({
|
||||
order_inquiry_id: order_inquiry_id,
|
||||
from:from?from:''
|
||||
})
|
||||
this.getInquiryMessageBasic();
|
||||
},
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<!-- 一对一聊天 不带会话列表 -->
|
||||
<view>
|
||||
<TUIChat id="TUIChat" currentConversationID="C2C{{baseInfo.patient_user_id}}" inquiry_type="{{baseInfo.inquiry_type}}" order_inquiry_id="{{order_inquiry_id}}" baseInfo="{{baseInfo}}"
|
||||
hasCallKit="{{ true }}" bind:handleCall="handleCall"></TUIChat>
|
||||
hasCallKit="{{ true }}" from="{{from}}" bind:handleCall="handleCall"></TUIChat>
|
||||
</view>
|
||||
|
||||
@@ -26,9 +26,9 @@ Page({
|
||||
this.getList();
|
||||
},
|
||||
onTabsChange(e) {
|
||||
console.log(e);
|
||||
// console.log(e);
|
||||
let list_name = "chufang_list_" + e.detail.value;
|
||||
console.log(list_name)
|
||||
//console.log(list_name)
|
||||
this.setData({
|
||||
prescription_status: e.detail.value,
|
||||
current_page: 0,
|
||||
@@ -64,10 +64,10 @@ Page({
|
||||
params.pharmacist_audit_status = this.data.prescription_status;//处方审核状态(0:审核中 2:审核驳回)
|
||||
params.page = this.data.current_page + 1;
|
||||
api.getDoctorPrescription(params).then(response => {
|
||||
console.log(response);
|
||||
//console.log(response);
|
||||
if(response.data.total > 0){
|
||||
let list_name = "chufang_list_" + this.data.prescription_status;
|
||||
console.log(list_name);
|
||||
//console.log(list_name);
|
||||
let apprise_list = this.data[list_name];
|
||||
this.setData({
|
||||
[list_name]: apprise_list.concat(response.data.data),
|
||||
@@ -81,25 +81,23 @@ Page({
|
||||
},
|
||||
go(e){
|
||||
let url = e.currentTarget.dataset.url;
|
||||
console.log(url);
|
||||
//console.log(url);
|
||||
app.go(url);
|
||||
},
|
||||
handlegetLastInquiry(patient_id,doctor_id,order_inquiry_id){
|
||||
api. getLastInquiry({
|
||||
api.getLastInquiry({
|
||||
patient_id:patient_id,
|
||||
doctor_id:doctor_id
|
||||
}).then(data=>{
|
||||
let result=data.data;
|
||||
let url='';
|
||||
if(result.data){
|
||||
url = "/Pages/yishi/chat/index?order_inquiry_id="+result.data;
|
||||
if(result){
|
||||
url = "/Pages/yishi/chat/index?order_inquiry_id="+result+"&from=prescription";
|
||||
}else{
|
||||
url = "/Pages/yishi/chat/index?order_inquiry_id="+order_inquiry_id;
|
||||
url = "/Pages/yishi/chat/index?order_inquiry_id="+order_inquiry_id+"&from=prescription";
|
||||
|
||||
}
|
||||
app.go(url);
|
||||
console.log(result);
|
||||
|
||||
})
|
||||
},
|
||||
gochat(e){
|
||||
|
||||
@@ -41,7 +41,7 @@ Page({
|
||||
});
|
||||
},
|
||||
onLoad(){
|
||||
console.log("onLoad ");
|
||||
//console.log("onLoad ");
|
||||
},
|
||||
onShow: function () {
|
||||
// console.log("onshow ");
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
</view>
|
||||
<view class="account_top_right">
|
||||
<navigator url="/Pages/yishi/cash/index" open-type="navigate" hover-class="other-navigator-hover">
|
||||
<van-button custom-style="text-indent: 20rpx;letter-spacing: 20rpx;text-align: center;height:70rpx;border-radius: 40rpx;padding: 0rpx 44rpx;" color="linear-gradient(310deg, #FF931A 0%, #FF931A 0%, #FCB75D 100%);font-size: 32rpx;">
|
||||
<van-button custom-style="text-indent: 20rpx;letter-spacing: 20rpx;text-align: center;height:70rpx;border-radius: 40rpx;padding: 0rpx 44rpx;" color="linear-gradient(310deg, #FF931A 0%, #FF931A 0%, #FCB75D 100%);font-size: 32rpx;margin-bottom:20rpx">
|
||||
提现
|
||||
</van-button>
|
||||
</navigator>
|
||||
|
||||
@@ -99,11 +99,13 @@ page{
|
||||
.account_top{
|
||||
flex: 2;
|
||||
display: flex;
|
||||
align-items: stretch;
|
||||
}
|
||||
.account_top_left{
|
||||
flex: 3;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
color: black;
|
||||
margin-left: 20rpx;
|
||||
}
|
||||
@@ -116,17 +118,18 @@ color: rgba(0,0,0,0.65);
|
||||
align-items: center;
|
||||
}
|
||||
.account_num{
|
||||
margin-top: 10rpx;
|
||||
margin-bottom: 10rpx;
|
||||
font-weight: bold;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
.account_top_right{
|
||||
|
||||
flex: 2;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items:flex-end;
|
||||
margin-bottom: 20rpx;
|
||||
|
||||
}
|
||||
.account_bottom{
|
||||
flex: 1;
|
||||
|
||||
@@ -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