This commit is contained in:
haomingming
2023-03-14 14:09:21 +08:00
parent 14bcbf1673
commit 959bfc61b1
79 changed files with 1601 additions and 438 deletions
@@ -1,4 +1,4 @@
<view class="text-message {{isMine?'my-text':''}}" >
<view class="text-message {{isMine?'my-text':'your-text'}}" >
<view class="message-body-span" wx:for="{{renderDom}}" wx:key="index">
<span class="message-body-span-text" wx:if="{{item.name === 'span'}}">{{item.text}}</span>
<image wx:if="{{item.name === 'img'}}" class="emoji-icon" src="{{item.src}}" />
@@ -29,6 +29,24 @@
border: 1rpx solid #1ACAD3;
border-style: none none solid solid
}
.your-text {
position: relative;
border-radius: 10px 10px 10px 10px;
background: rgb(255, 255, 255);
border: 1rpx solid #D8D8D8;
}
.your-text::after{
content:'';
position: absolute;
top: 45rpx;
left: 0;
transform: translate(-50%,-50%) rotate(45deg);
width: 16rpx;
height: 16rpx;
background: rgb(255, 255, 255);
border: 1rpx solid #D8D8D8;
border-style: none none solid solid
}
.message-body-span {
display: flex;
justify-content: center;
@@ -16,6 +16,10 @@ Component({
});
},
},
order_inquiry_id: {
type: String,
value: {},
},
hasCallKit: {
type: Boolean,
value: false,
@@ -331,7 +335,7 @@ Component({
});
break;
case '10'://查看完整病历
app.go("/Pages/yishi/case/index")
app.go("/Pages/yishi/case/index?order_inquiry_id="+this.data.order_inquiry_id)
break;
case '11'://在线开方
app.go("/Pages/yishi/onlinechufang/index")
@@ -483,16 +487,16 @@ Component({
const text = flag ? msg : this.data.message;
const { FEAT_NATIVE_CODE } = constant;
const message = wx.$TUIKit.createTextMessage({
to,
to,
conversationType: this.data.conversation.type,
payload: {
text,
},
cloudCustomData: JSON.stringify({ messageFeature:
{
needTyping: FEAT_NATIVE_CODE.FEAT_TYPING,
version: FEAT_NATIVE_CODE.NATIVE_VERSION,
},
cloudCustomData: JSON.stringify({
order_inquiry_id: "AA",
inquiry_type: "BB",
message_type: 0,
is_system: 0
}),
});
this.setData({
@@ -519,6 +523,7 @@ Component({
// 发送正在输入状态消息
sendTypingStatusMessage() {
const { BUSINESS_ID_TEXT, FEAT_NATIVE_CODE } = constant;
// 创建正在输入状态消息, "typingStatus":1,正在输入中1, 输入结束0, "version": 1 兼容老版本,userAction:0, // 14表示正在输入,actionParam:"EIMAMSG_InputStatus_Ing" //"EIMAMSG_InputStatus_Ing" 表示正在输入, "EIMAMSG_InputStatus_End" 表示输入结束
const typingMessage = wx.$TUIKit.createCustomMessage({
@@ -668,9 +673,9 @@ Component({
},
// 发送正在输入消息
$sendTypingMessage(message) {
wx.$TUIKit.sendMessage(message, {
onlineUserOnly: true,
});
// wx.$TUIKit.sendMessage(message, {
// onlineUserOnly: true,
// });
},
$sendTIMMessage(message) {
@@ -25,12 +25,12 @@
<view class="TUI-sendMessage-btn" wx:if="{{ has_emoji }}">
<image class="TUI-icon" bindtap="handleEmoji" src="../../../../static/assets/face-emoji.svg" />
</view>
<view wx:if="{{!sendMessageBtn}}" bindtap="handleExtensions" class="TUI-sendMessage-btn">
<image class="TUI-icon" src="https://gdxz-hospital.oss-cn-chengdu.aliyuncs.com/applet/doctor/static/images/chat/tianjia.png" />
</view>
<view wx:else class="TUI-sendMessage-btn" bindtap="sendTextMessage">
发送
</view>
<view wx:if="{{!sendMessageBtn}}" bindtap="handleExtensions" class="TUI-sendMessage-btn">
<image class="TUI-icon" src="https://gdxz-hospital.oss-cn-chengdu.aliyuncs.com/applet/doctor/static/images/chat/tianjia.png" />
</view>
<view wx:else class="TUI-sendMessage-btn TUI-sendMessage-btn-input" bindtap="sendTextMessage">
发送
</view>
</view>
</view>
<view wx:if="{{displayFlag === 'emoji'}}" class="TUI-Emoji-area">
@@ -6,9 +6,9 @@
display: flex;
padding-bottom: 16rpx;
background-color: #fff;
width: calc(100vw - 38rpx);
width: 95vw;
overflow: scroll;
padding-left: 38rpx;
margin: 0 auto;
}
.TUI-commom-function {
background-color: blueviolet;
@@ -37,25 +37,27 @@
margin-left: 48rpx;
}
.TUI-message-input-functions {
display: flex;
flex: 2;
display: flex;
justify-content: center;
}
.TUI-message-input-main {
height: 30px;
min-height: 78rpx;
background-color: #F1F1F1;
flex: 1;
flex: 9;
margin: 0 10rpx;
padding: 0 5rpx;
border-radius: 5rpx;
border-radius: 10rpx;
display: flex;
align-items: center;
}
.TUI-message-input-main-focus {
height: auto;
min-height: 78rpx;
background-color: #F1F1F1;
flex: 1;
flex: 9;
margin: 0 10rpx;
padding: 0 5rpx;
border-radius: 5rpx;
border-radius: 10rpx;
display: flex;
align-items: center;
}
@@ -66,6 +68,7 @@
/* 最多显示10行 */
line-height: 30rpx;
overflow: scroll;
padding: 20rpx 20rpx;
}
.TUI-icon {
width: 56rpx;
@@ -96,9 +99,16 @@
}
.TUI-sendMessage-btn {
display: flex;
align-items: center;
margin: 0 10rpx;
display: flex;
align-items: center;
width: 90%;
text-align: center;
justify-content: center;
border-radius: 10rpx;
color: #fff;
}
.TUI-sendMessage-btn-input{
background-color: #3CC7C0;
}
.TUI-Emoji-area {
@@ -208,6 +208,8 @@ Component({
wx.$TUIKit.setMessageRead({ conversationID: this.data.conversation.conversationID }).then(() => {
logger.log('| MessageList | setMessageRead | ok');
});
console.log('| MessageList | setMessageRead | ok');
console.log('message cloudCustomData', message.cloudCustomData);
const { BUSINESS_ID_TEXT, MESSAGE_TYPE_TEXT } = constant;
this.messageTimeForShow(message);
this.setData({
+4
View File
@@ -31,6 +31,10 @@ Component({
});
},
},
order_inquiry_id: {
type: String,
value: ''
},
unreadCount: {
type: Number,
value: '',
+2 -2
View File
@@ -2,7 +2,7 @@
<view class="container">
<view class="tui-navigatorbar">
<image class="tui-navigatorbar-back" bindtap="goBack" src="../../static/assets/ic_back_white.svg" />
<view class="conversation-title">{{conversationName}}-患者姓名</view>
<view class="conversation-title">{{conversationName}}</view>
</view>
<view class="list-box {{ showTips && 'list-box-notips'}} || {{ showGroupTips && 'list-box-group'}} || {{ showAll && 'list-box-group-notips'}} ">
<view wx:if="{{showTips}}" class="safetytips-box">
@@ -20,7 +20,7 @@
</view>
<view class="input-area">
<view class="message-input" style="{{viewData.style}}" wx:if="{{showChat}}">
<MessageInput id="MessageInput" conversation="{{conversation}}" hasCallKit="{{hasCallKit}}" bind:sendMessage="sendMessage" bind:downKeysBoards="downKeysBoards" bind:pullKeysBoards="pullKeysBoards" bind:showMessageErrorImage="showMessageErrorImage"
<MessageInput id="MessageInput" order_inquiry_id="{{order_inquiry_id}}" conversation="{{conversation}}" hasCallKit="{{hasCallKit}}" bind:sendMessage="sendMessage" bind:downKeysBoards="downKeysBoards" bind:pullKeysBoards="pullKeysBoards" bind:showMessageErrorImage="showMessageErrorImage"
bind:handleCall="handleCall" ></MessageInput>
</view>
</view>
@@ -116,6 +116,7 @@ Component({
},
getConversationList() {
wx.$TUIKit.getConversationList().then((imResponse) => {
console.log("imResponse.data.conversationList: ", imResponse.data.conversationList);
this.setData({
conversationList: imResponse.data.conversationList,
});