优化
This commit is contained in:
parent
4f14aad6f3
commit
596229d478
@ -13,7 +13,7 @@
|
|||||||
<view class="top">
|
<view class="top">
|
||||||
<view class="name">{{item.name_mask}}</view>
|
<view class="name">{{item.name_mask}}</view>
|
||||||
<view class="start">
|
<view class="start">
|
||||||
<t-rate value="{{item.avg_score}}" count="{{item.avg_score}}" color="#ED9C00"/>
|
<t-rate value="{{item.avg_score}}" count="5" color="#ED9C00"/>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="content">{{item.content}}</view>
|
<view class="content">{{item.content}}</view>
|
||||||
@ -29,7 +29,7 @@
|
|||||||
<view class="top">
|
<view class="top">
|
||||||
<view class="name">{{item.name_mask}}</view>
|
<view class="name">{{item.name_mask}}</view>
|
||||||
<view class="start">
|
<view class="start">
|
||||||
<t-rate value="{{item.avg_score}}" count="{{item.avg_score}}" color="#ED9C00"/>
|
<t-rate value="{{item.avg_score}}" count="5" color="#ED9C00"/>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="content">{{item.content}}</view>
|
<view class="content">{{item.content}}</view>
|
||||||
@ -45,7 +45,7 @@
|
|||||||
<view class="top">
|
<view class="top">
|
||||||
<view class="name">{{item.name_mask}}</view>
|
<view class="name">{{item.name_mask}}</view>
|
||||||
<view class="start">
|
<view class="start">
|
||||||
<t-rate value="{{item.avg_score}}" count="{{item.avg_score}}" color="#ED9C00"/>
|
<t-rate value="{{item.avg_score}}" count="5" color="#ED9C00"/>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="content">{{item.content}}</view>
|
<view class="content">{{item.content}}</view>
|
||||||
|
|||||||
@ -67,8 +67,8 @@ Page({
|
|||||||
console.log(response);
|
console.log(response);
|
||||||
if(response.data){
|
if(response.data){
|
||||||
this.setData({
|
this.setData({
|
||||||
realname:response.data.card_name,
|
realname:response.data.card_name_mask,
|
||||||
idcard:response.data.card_num
|
idcard:response.data.card_num_mask
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}).catch(errors => {
|
}).catch(errors => {
|
||||||
|
|||||||
@ -62,8 +62,8 @@ Page({
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this.setData({
|
this.setData({
|
||||||
realname:response.data.card_name,
|
realname:response.data.card_name_mask,
|
||||||
idcard:response.data.card_num,
|
idcard:response.data.card_num_mask,
|
||||||
next_btn_txt: "已认证,不可修改",
|
next_btn_txt: "已认证,不可修改",
|
||||||
next_btn_disabled: true,
|
next_btn_disabled: true,
|
||||||
panel_2_disabled: false,
|
panel_2_disabled: false,
|
||||||
|
|||||||
@ -218,8 +218,25 @@ page{
|
|||||||
line-height: 100rpx;
|
line-height: 100rpx;
|
||||||
}
|
}
|
||||||
.dialog_cancel_btn{
|
.dialog_cancel_btn{
|
||||||
border-top: 1px solid #E9E9E9;
|
position: relative;
|
||||||
border-right: 1px solid #E9E9E9;
|
}
|
||||||
|
.dialog_cancel_btn::before {
|
||||||
|
content: ' ';
|
||||||
|
position: absolute;
|
||||||
|
box-sizing: border-box;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
border-top: 2px solid var(--td-border-color, #e7e7e7);
|
||||||
|
border-right: 2px solid var(--td-border-color, #e7e7e7);
|
||||||
|
transform: scale(0.5);
|
||||||
|
transform-origin: 0 0;
|
||||||
|
width: 200%;
|
||||||
|
height: 200%;
|
||||||
|
border-radius: 0;
|
||||||
|
border-top-left-radius: 0px;
|
||||||
|
border-top-right-radius: 0px;
|
||||||
|
border-bottom-right-radius: 0px;
|
||||||
|
border-bottom-left-radius: 0px;
|
||||||
}
|
}
|
||||||
.dialog_confirm_btn{
|
.dialog_confirm_btn{
|
||||||
border-top: 1px solid #E9E9E9;
|
border-top: 1px solid #E9E9E9;
|
||||||
@ -227,4 +244,9 @@ page{
|
|||||||
}
|
}
|
||||||
.t-button__content{
|
.t-button__content{
|
||||||
color: #3CC7C0 !important;
|
color: #3CC7C0 !important;
|
||||||
|
}
|
||||||
|
.t-dialog__button--text:before {
|
||||||
|
border-top: 2px solid #E9E9E9 !important;
|
||||||
|
border-left: 2px solid var(--td-border-color, #E9E9E9);
|
||||||
|
border-top-color: #E9E9E9 !important;
|
||||||
}
|
}
|
||||||
@ -5,7 +5,7 @@
|
|||||||
<view class="item_top">
|
<view class="item_top">
|
||||||
<view class="item_img" wx:if="{{item.link_params.inquiry_type == 1}}">
|
<view class="item_img" wx:if="{{item.link_params.inquiry_type == 1}}">
|
||||||
<text style="margin-left: 10rpx;">在线问诊</text>
|
<text style="margin-left: 10rpx;">在线问诊</text>
|
||||||
<van-image class="van_img" src="https://gdxz-hospital.oss-cn-chengdu.aliyuncs.com/applet/doctor/static/images/yishi/service_notice/kuaisu.png" fit="heightFix" height="54rpx" aria-label="qrcode" />
|
<van-image class="van_img" src="https://gdxz-hospital.oss-cn-chengdu.aliyuncs.com/applet/doctor/static/images/yishi/service_notice/online.png" fit="heightFix" height="54rpx" aria-label="qrcode" />
|
||||||
</view>
|
</view>
|
||||||
<view class="item_img" wx:if="{{item.link_params.inquiry_type == 2}}">
|
<view class="item_img" wx:if="{{item.link_params.inquiry_type == 2}}">
|
||||||
<text style="margin-left: 10rpx;">快速问诊</text>
|
<text style="margin-left: 10rpx;">快速问诊</text>
|
||||||
|
|||||||
@ -247,6 +247,7 @@ Component({
|
|||||||
ext2: wx.$chat_reportType,
|
ext2: wx.$chat_reportType,
|
||||||
ext3: wx.$chat_SDKAppID,
|
ext3: wx.$chat_SDKAppID,
|
||||||
});
|
});
|
||||||
|
|
||||||
let targetFlag = 'extension';
|
let targetFlag = 'extension';
|
||||||
if (this.data.displayFlag === 'extension') {
|
if (this.data.displayFlag === 'extension') {
|
||||||
targetFlag = '';
|
targetFlag = '';
|
||||||
@ -305,47 +306,63 @@ Component({
|
|||||||
// 发送图片消息
|
// 发送图片消息
|
||||||
handleSendImageMessage(file) {
|
handleSendImageMessage(file) {
|
||||||
|
|
||||||
// 获取最后一条消息
|
let _this = this;
|
||||||
let last_message = this.data.conversation.lastMessage;
|
let conversationID = this.data.conversation.conversationID
|
||||||
console.log("last_message: ", last_message);
|
let promise = wx.$TUIKit.getConversationProfile(conversationID);
|
||||||
let cloudCustomData = "";
|
promise.then(function(imResponse) {
|
||||||
let cloudCustomDataJson = "";
|
console.log("getConversationProfile 正在执行")
|
||||||
if(last_message.cloudCustomData){
|
// 获取成功
|
||||||
cloudCustomData = last_message.cloudCustomData;
|
console.log(imResponse.data.conversation); // 会话资料
|
||||||
}
|
_this.setData({
|
||||||
if(cloudCustomData){
|
conversation: imResponse.data.conversation
|
||||||
cloudCustomDataJson = JSON.parse(cloudCustomData);
|
})
|
||||||
}
|
}).catch(function(imError) {
|
||||||
let message_rounds = 0;
|
console.warn('getConversationProfile error:', imError); // 获取会话资料失败的相关信息
|
||||||
let patient_family_data = {};
|
});
|
||||||
patient_family_data.patient_name = this.data.baseInfo.patient_family_name;
|
|
||||||
patient_family_data.patient_sex = this.data.baseInfo.patient_family_sex;
|
|
||||||
patient_family_data.patient_age = this.data.baseInfo.patient_family_age;
|
|
||||||
if(cloudCustomDataJson){
|
|
||||||
message_rounds = cloudCustomDataJson.message_rounds;
|
|
||||||
}
|
|
||||||
|
|
||||||
const mycloudCustomData = JSON.stringify({
|
Promise.all([promise]).then(res => {
|
||||||
order_inquiry_id: this.data.order_inquiry_id,
|
// 获取最后一条消息
|
||||||
inquiry_type: this.data.inquiry_type,
|
let last_message = this.data.conversation.lastMessage;
|
||||||
message_type: 0,
|
console.log("last_message: ", last_message);
|
||||||
is_system: 0,
|
let cloudCustomData = "";
|
||||||
message_rounds: message_rounds,
|
let cloudCustomDataJson = "";
|
||||||
patient_family_data: patient_family_data
|
if(last_message.cloudCustomData){
|
||||||
});
|
cloudCustomData = last_message.cloudCustomData;
|
||||||
|
}
|
||||||
const message = wx.$TUIKit.createImageMessage({
|
if(cloudCustomData){
|
||||||
to: this.getToAccount(),
|
cloudCustomDataJson = JSON.parse(cloudCustomData);
|
||||||
conversationType: this.data.conversation.type,
|
}
|
||||||
payload: {
|
let message_rounds = 0;
|
||||||
file,
|
let patient_family_data = {};
|
||||||
},
|
patient_family_data.patient_name = this.data.baseInfo.patient_family_name;
|
||||||
cloudCustomData: mycloudCustomData,
|
patient_family_data.patient_sex = this.data.baseInfo.patient_family_sex;
|
||||||
onProgress: (percent) => {
|
patient_family_data.patient_age = this.data.baseInfo.patient_family_age;
|
||||||
message.percent = percent;
|
if(cloudCustomDataJson){
|
||||||
},
|
message_rounds = cloudCustomDataJson.message_rounds;
|
||||||
});
|
}
|
||||||
this.$sendTIMMessage(message);
|
|
||||||
|
const mycloudCustomData = JSON.stringify({
|
||||||
|
order_inquiry_id: this.data.order_inquiry_id,
|
||||||
|
inquiry_type: this.data.inquiry_type,
|
||||||
|
message_type: 0,
|
||||||
|
is_system: 0,
|
||||||
|
message_rounds: message_rounds,
|
||||||
|
patient_family_data: patient_family_data
|
||||||
|
});
|
||||||
|
|
||||||
|
const message = wx.$TUIKit.createImageMessage({
|
||||||
|
to: this.getToAccount(),
|
||||||
|
conversationType: this.data.conversation.type,
|
||||||
|
payload: {
|
||||||
|
file,
|
||||||
|
},
|
||||||
|
cloudCustomData: mycloudCustomData,
|
||||||
|
onProgress: (percent) => {
|
||||||
|
message.percent = percent;
|
||||||
|
},
|
||||||
|
});
|
||||||
|
this.$sendTIMMessage(message);
|
||||||
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
// 发送视频消息
|
// 发送视频消息
|
||||||
@ -562,55 +579,71 @@ Component({
|
|||||||
ext2: wx.$chat_reportType,
|
ext2: wx.$chat_reportType,
|
||||||
ext3: wx.$chat_SDKAppID,
|
ext3: wx.$chat_SDKAppID,
|
||||||
});
|
});
|
||||||
|
let _this = this;
|
||||||
//获取最后一条消息
|
let conversationID = this.data.conversation.conversationID
|
||||||
let last_message = this.data.conversation.lastMessage;
|
let promise = wx.$TUIKit.getConversationProfile(conversationID);
|
||||||
console.log("last_message: ", last_message);
|
promise.then(function(imResponse) {
|
||||||
let cloudCustomData = "";
|
console.log("getConversationProfile 正在执行")
|
||||||
let cloudCustomDataJson = "";
|
// 获取成功
|
||||||
if(last_message.cloudCustomData){
|
console.log(imResponse.data.conversation); // 会话资料
|
||||||
cloudCustomData = last_message.cloudCustomData;
|
_this.setData({
|
||||||
}
|
conversation: imResponse.data.conversation
|
||||||
if(cloudCustomData){
|
})
|
||||||
cloudCustomDataJson = JSON.parse(cloudCustomData);
|
}).catch(function(imError) {
|
||||||
}
|
console.warn('getConversationProfile error:', imError); // 获取会话资料失败的相关信息
|
||||||
let message_rounds = 0;
|
|
||||||
let patient_family_data = {};
|
|
||||||
patient_family_data.patient_name = this.data.baseInfo.patient_family_name;
|
|
||||||
patient_family_data.patient_sex = this.data.baseInfo.patient_family_sex;
|
|
||||||
patient_family_data.patient_age = this.data.baseInfo.patient_family_age;
|
|
||||||
if(cloudCustomDataJson){
|
|
||||||
message_rounds = cloudCustomDataJson.message_rounds;
|
|
||||||
}
|
|
||||||
|
|
||||||
const to = this.getToAccount();
|
|
||||||
const text = flag ? msg : this.data.message;
|
|
||||||
|
|
||||||
const { FEAT_NATIVE_CODE } = constant;
|
|
||||||
const mycloudCustomData = JSON.stringify({
|
|
||||||
order_inquiry_id: this.data.order_inquiry_id,
|
|
||||||
inquiry_type: this.data.inquiry_type,
|
|
||||||
message_type: 0,
|
|
||||||
is_system: 0,
|
|
||||||
message_rounds: message_rounds,
|
|
||||||
patient_family_data: patient_family_data
|
|
||||||
});
|
});
|
||||||
|
|
||||||
console.log("mycloudCustomData: ", mycloudCustomData);
|
Promise.all([promise]).then(res => {
|
||||||
console.log("text: ", text);
|
console.log("getConversationProfile 执行完毕")
|
||||||
const message = wx.$TUIKit.createTextMessage({
|
//获取最后一条消息
|
||||||
to,
|
let last_message = this.data.conversation.lastMessage;
|
||||||
conversationType: this.data.conversation.type,
|
console.log("last_message: ", last_message);
|
||||||
payload: {
|
let cloudCustomData = "";
|
||||||
text,
|
let cloudCustomDataJson = "";
|
||||||
},
|
if(last_message.cloudCustomData){
|
||||||
cloudCustomData: mycloudCustomData
|
cloudCustomData = last_message.cloudCustomData;
|
||||||
});
|
}
|
||||||
this.setData({
|
if(cloudCustomData){
|
||||||
message: '',
|
cloudCustomDataJson = JSON.parse(cloudCustomData);
|
||||||
sendMessageBtn: false,
|
}
|
||||||
});
|
let message_rounds = 0;
|
||||||
this.$sendTIMMessage(message);
|
let patient_family_data = {};
|
||||||
|
patient_family_data.patient_name = this.data.baseInfo.patient_family_name;
|
||||||
|
patient_family_data.patient_sex = this.data.baseInfo.patient_family_sex;
|
||||||
|
patient_family_data.patient_age = this.data.baseInfo.patient_family_age;
|
||||||
|
if(cloudCustomDataJson){
|
||||||
|
message_rounds = cloudCustomDataJson.message_rounds;
|
||||||
|
}
|
||||||
|
|
||||||
|
const to = this.getToAccount();
|
||||||
|
const text = flag ? msg : this.data.message;
|
||||||
|
|
||||||
|
const { FEAT_NATIVE_CODE } = constant;
|
||||||
|
const mycloudCustomData = JSON.stringify({
|
||||||
|
order_inquiry_id: this.data.order_inquiry_id,
|
||||||
|
inquiry_type: this.data.inquiry_type,
|
||||||
|
message_type: 0,
|
||||||
|
is_system: 0,
|
||||||
|
message_rounds: message_rounds,
|
||||||
|
patient_family_data: patient_family_data
|
||||||
|
});
|
||||||
|
|
||||||
|
console.log("mycloudCustomData: ", mycloudCustomData);
|
||||||
|
console.log("text: ", text);
|
||||||
|
const message = wx.$TUIKit.createTextMessage({
|
||||||
|
to,
|
||||||
|
conversationType: this.data.conversation.type,
|
||||||
|
payload: {
|
||||||
|
text,
|
||||||
|
},
|
||||||
|
cloudCustomData: mycloudCustomData
|
||||||
|
});
|
||||||
|
this.setData({
|
||||||
|
message: '',
|
||||||
|
sendMessageBtn: false,
|
||||||
|
});
|
||||||
|
this.$sendTIMMessage(message);
|
||||||
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
// 监听输入框value值变化
|
// 监听输入框value值变化
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
<image class="TUI-icon" bindtap="switchAudio" wx:if="{{has_audio}}"
|
<image class="TUI-icon" bindtap="switchAudio" wx:if="{{has_audio}}"
|
||||||
src="{{isAudio ? '../../../../static/assets/keyboard.svg' : '../../../../static/assets/audio.svg'}}" />
|
src="{{isAudio ? '../../../../static/assets/keyboard.svg' : '../../../../static/assets/audio.svg'}}" />
|
||||||
<view wx:if="{{!isAudio || isEmoji}}" class="TUI-message-input-main {{ focus && 'TUI-message-input-main-focus'}}" >
|
<view wx:if="{{!isAudio || isEmoji}}" class="TUI-message-input-main {{ focus && 'TUI-message-input-main-focus'}}" >
|
||||||
<textarea class="TUI-message-input-area" adjust-position="{{false}}" cursor-spacing="20"
|
<textarea id="mytextarea" class="TUI-message-input-area" adjust-position="{{false}}" cursor-spacing="20"
|
||||||
value="{{message}}" bindinput="onInputValueChange" maxlength="-1" type="text" auto-height="{{true}}"
|
value="{{message}}" bindinput="onInputValueChange" maxlength="-1" type="text" auto-height="{{true}}"
|
||||||
placeholder="请输入文字" placeholder-class="input-placeholder" confirm-type="send" show-confirm-bar="{{false}}"
|
placeholder="请输入文字" placeholder-class="input-placeholder" confirm-type="send" show-confirm-bar="{{false}}"
|
||||||
bindfocus="inputBindFocus"
|
bindfocus="inputBindFocus"
|
||||||
|
|||||||
@ -342,7 +342,11 @@ Component({
|
|||||||
|
|
||||||
let jumpAim = `ID-${this.filterSystemMessageID(this.data.messageList[this.data.messageList.length - 1].ID)}`;
|
let jumpAim = `ID-${this.filterSystemMessageID(this.data.messageList[this.data.messageList.length - 1].ID)}`;
|
||||||
console.log("jumpAim:", jumpAim);
|
console.log("jumpAim:", jumpAim);
|
||||||
if(autoToButtom){
|
|
||||||
|
console.log("message.from: ", message.from)
|
||||||
|
console.log("conversation: ", this.data.conversation)
|
||||||
|
console.log("conversation: ", this.data.conversation.lastMessage.from)
|
||||||
|
if(autoToButtom && message.conversationID === this.data.conversation.conversationID){
|
||||||
this.setData({
|
this.setData({
|
||||||
jumpAim: jumpAim
|
jumpAim: jumpAim
|
||||||
})
|
})
|
||||||
|
|||||||
@ -131,7 +131,7 @@ Component({
|
|||||||
},
|
},
|
||||||
navbar_height: 0,
|
navbar_height: 0,
|
||||||
dialog_visible: false,
|
dialog_visible: false,
|
||||||
|
KeysBoardsStatus: "down"
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -275,39 +275,48 @@ Component({
|
|||||||
myhandleExtensions(e){
|
myhandleExtensions(e){
|
||||||
console.log("myhandleExtensionsmyhandleExtensions: ", e);
|
console.log("myhandleExtensionsmyhandleExtensions: ", e);
|
||||||
let displayFlag = e.detail.displayFlag;
|
let displayFlag = e.detail.displayFlag;
|
||||||
if(displayFlag){
|
setTimeout(() => {
|
||||||
this.setData({
|
if(displayFlag){
|
||||||
input_area_style: "position: absolute; bottom: 30px;"
|
this.setData({
|
||||||
})
|
input_area_style: "position: absolute; bottom: 30px;"
|
||||||
this.getNavbarHeight(100);
|
})
|
||||||
this.selectComponent('#MessageList').handleJumpNewMessage();
|
this.getNavbarHeight(100);
|
||||||
}else{
|
this.selectComponent('#MessageList').handleJumpNewMessage();
|
||||||
this.setData({
|
}else{
|
||||||
input_area_style: "",
|
this.setData({
|
||||||
})
|
input_area_style: "",
|
||||||
this.getNavbarHeight();
|
})
|
||||||
}
|
this.getNavbarHeight();
|
||||||
|
}
|
||||||
|
|
||||||
|
}, 10);
|
||||||
},
|
},
|
||||||
// 监听键盘,获取焦点时将输入框推到键盘上方
|
// 监听键盘,获取焦点时将输入框推到键盘上方
|
||||||
pullKeysBoards(event) {
|
pullKeysBoards(event) {
|
||||||
|
console.log("pullKeysBoardspullKeysBoards")
|
||||||
setNewInputStyle(event.detail.event.detail.height);
|
setNewInputStyle(event.detail.event.detail.height);
|
||||||
|
this.getNavbarHeight();
|
||||||
this.setData({
|
this.setData({
|
||||||
'viewData.style': newInputStyle,
|
'viewData.style': newInputStyle,
|
||||||
input_area_style: "position: absolute; bottom: 45rpx;"
|
input_area_style: "position: absolute; bottom: 45rpx;",
|
||||||
|
KeysBoardsStatus: "pull"
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 监听键盘,失去焦点时收起键盘
|
// 监听键盘,失去焦点时收起键盘
|
||||||
downKeysBoards(event) {
|
downKeysBoards(event) {
|
||||||
|
console.log("downKeysBoardsdownKeysBoards")
|
||||||
console.log(event)
|
console.log(event)
|
||||||
let value = event.detail.event.detail.value;
|
let value = event.detail.event.detail.value;
|
||||||
if(value){
|
if(value){
|
||||||
this.setData({
|
this.setData({
|
||||||
'viewData.style': inputStyle,
|
'viewData.style': inputStyle,
|
||||||
|
KeysBoardsStatus: "down"
|
||||||
});
|
});
|
||||||
}else{
|
}else{
|
||||||
this.setData({
|
this.setData({
|
||||||
'viewData.style': inputStyle,
|
'viewData.style': inputStyle,
|
||||||
input_area_style: ""
|
input_area_style: "",
|
||||||
|
KeysBoardsStatus: "down"
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@ -641,7 +641,7 @@ class API extends HTTP {
|
|||||||
let order_inquiry_id = params.order_inquiry_id;
|
let order_inquiry_id = params.order_inquiry_id;
|
||||||
params = {}
|
params = {}
|
||||||
return this.request({
|
return this.request({
|
||||||
url: `${this.baseUrl}/doctor/inquiry/finish/`+order_inquiry_id,
|
url: `${this.baseUrl}/inquiry/finish/`+order_inquiry_id,
|
||||||
method: 'PUT',
|
method: 'PUT',
|
||||||
data: {
|
data: {
|
||||||
...params
|
...params
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user