分包医生
This commit is contained in:
+153
@@ -0,0 +1,153 @@
|
||||
import { parseAudio } from '../../../../../utils/message-parse';
|
||||
|
||||
// 创建audio控件
|
||||
const myaudio = wx.createInnerAudioContext();
|
||||
// eslint-disable-next-line no-undef
|
||||
Component({
|
||||
/**
|
||||
* 组件的属性列表
|
||||
*/
|
||||
properties: {
|
||||
message: {
|
||||
type: Object,
|
||||
value: {},
|
||||
observer(newVal) {
|
||||
this.setData({
|
||||
renderDom: parseAudio(newVal),
|
||||
message: newVal,
|
||||
});
|
||||
},
|
||||
},
|
||||
messageList: {
|
||||
type: Object,
|
||||
value: {},
|
||||
observer(newVal) {
|
||||
this.filtterAudioMessage(newVal);
|
||||
this.setData({
|
||||
audioMessageList: newVal,
|
||||
});
|
||||
},
|
||||
},
|
||||
isMine: {
|
||||
type: Boolean,
|
||||
value: true,
|
||||
},
|
||||
},
|
||||
|
||||
lifetimes: {
|
||||
detached() {
|
||||
myaudio.stop();
|
||||
},
|
||||
},
|
||||
|
||||
/**
|
||||
* 组件的初始数据
|
||||
*/
|
||||
data: {
|
||||
message: '',
|
||||
renderDom: [],
|
||||
Audio: [],
|
||||
audioMessageList: [],
|
||||
audioSave: [],
|
||||
audKey: '', // 当前选中的音频key
|
||||
indexAudio: Number,
|
||||
isPlay: false,
|
||||
},
|
||||
|
||||
/**
|
||||
* 组件的方法列表
|
||||
*/
|
||||
methods: {
|
||||
// 过滤语音消息,从消息列表里面筛选出语音消息
|
||||
filtterAudioMessage(messageList) {
|
||||
const list = [];
|
||||
for (let index = 0; index < messageList.length; index++) {
|
||||
if (messageList[index].type === 'TIMSoundElem') {
|
||||
list.push(messageList[index]);
|
||||
Object.assign(messageList[index], {
|
||||
isPlaying: false,
|
||||
}),
|
||||
this.data.audioSave = list;
|
||||
this.setData({
|
||||
audioSave: this.data.audioSave,
|
||||
});
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
// 音频播放
|
||||
audioPlay(e) {
|
||||
|
||||
const { id } = e.currentTarget.dataset;
|
||||
const { audioSave } = this.data;
|
||||
this.triggerEvent("closeAudio",false)
|
||||
// 设置状态
|
||||
audioSave.forEach((message, index) => {
|
||||
message.isPlaying = false;
|
||||
if (audioSave[index].ID == id) {
|
||||
message.isPlaying = true;
|
||||
const indexAudio = audioSave.findIndex(value => value.ID == audioSave[index].ID);
|
||||
this.setData({
|
||||
indexAudio,
|
||||
isPlay: false,
|
||||
});
|
||||
}
|
||||
});
|
||||
this.setData({
|
||||
audioSave,
|
||||
audKey: this.data.indexAudio,
|
||||
isPlay: true,
|
||||
});
|
||||
myaudio.autoplay = true;
|
||||
const { audKey } = this.data;
|
||||
const playSrc = audioSave[audKey].payload.url;
|
||||
myaudio.src = playSrc;
|
||||
myaudio.play();
|
||||
// 开始监听
|
||||
myaudio.onPlay(() => {
|
||||
console.log('开始播放');
|
||||
});
|
||||
|
||||
// 结束监听
|
||||
myaudio.onEnded(() => {
|
||||
console.log('自动播放完毕');
|
||||
audioSave[this.data.indexAudio].isPlaying = false;
|
||||
this.setData({
|
||||
audioSave,
|
||||
isPlay: false,
|
||||
});
|
||||
});
|
||||
|
||||
// 错误回调
|
||||
myaudio.onError((err) => {
|
||||
console.log(err);
|
||||
audioSave[this.data.indexAudio].isPlaying = false;
|
||||
this.setData({
|
||||
audioSave,
|
||||
});
|
||||
return;
|
||||
});
|
||||
},
|
||||
|
||||
// 音频停止
|
||||
audioStop(e) {
|
||||
const { key } = e.currentTarget.dataset;
|
||||
const { audioSave } = this.data;
|
||||
console.log(audioSave);
|
||||
// 设置状态
|
||||
audioSave.forEach((message, index) => {
|
||||
message.isPlaying = false;
|
||||
});
|
||||
this.setData({
|
||||
audioSave,
|
||||
isPlay: false,
|
||||
});
|
||||
myaudio.stop();
|
||||
|
||||
// 停止监听
|
||||
myaudio.onStop(() => {
|
||||
console.log('停止播放');
|
||||
});
|
||||
},
|
||||
},
|
||||
});
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {}
|
||||
}
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
<block>
|
||||
<view class="audio-message {{isMine?'my-audio':'your-audio'}}">
|
||||
<!-- 默认状态 未播放 -->
|
||||
<view class='audio' wx:if="{{!isPlay}}" bindtap='audioPlay' data-id="{{message.ID}}" >
|
||||
<image class="image {{isMine?'my-image':''}}" src="../../../../../static/images/play.png" /> {{renderDom[0].second}}"
|
||||
</view>
|
||||
<!-- 当前正在播放状态 -->
|
||||
<view class='audio' wx:else data-value="{{message}}" bindtap='audioStop' id="audio{{message.ID}}" data-id="{{message.ID}}" >
|
||||
<image class="image {{isMine?'my-image':''}}" src="../../../../../static/images/play.gif" /> {{renderDom[0].second}}"
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
|
||||
|
||||
+78
@@ -0,0 +1,78 @@
|
||||
.audio-message {
|
||||
padding: 10rpx 18rpx;
|
||||
border-radius: 2px 10px 10px 10px;
|
||||
border: 1px solid #D9D9D9;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.my-audio {
|
||||
position: relative;
|
||||
border-radius: 10px 10px 10px 10px;
|
||||
background: rgb(212, 239, 241);
|
||||
border: 1rpx solid #1ACAD3;
|
||||
}
|
||||
|
||||
.my-audio::after{
|
||||
content:'';
|
||||
position: absolute;
|
||||
top: 35rpx;
|
||||
right: -19rpx;
|
||||
transform: translate(-50%,-50%) rotate(-135deg);
|
||||
width: 16rpx;
|
||||
height: 16rpx;
|
||||
background: rgb(212, 239, 241);
|
||||
border: 1rpx solid #1ACAD3;
|
||||
border-style: none none solid solid
|
||||
}
|
||||
.your-audio {
|
||||
position: relative;
|
||||
border-radius: 10px 10px 10px 10px;
|
||||
background: rgb(255, 255, 255);
|
||||
border: 1rpx solid #D8D8D8;
|
||||
}
|
||||
.your-audio::after{
|
||||
content:'';
|
||||
position: absolute;
|
||||
top: 35rpx;
|
||||
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
|
||||
}
|
||||
.audio {
|
||||
width:200rpx;
|
||||
/*border-radius: 2px 10px 10px 10px;*/
|
||||
height: 60rpx;
|
||||
font-family: PingFangSC-Medium;
|
||||
font-size: 28rpx;
|
||||
color: #000000;
|
||||
line-height: 28rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: flex-start;
|
||||
}
|
||||
.my-audio .audio{
|
||||
flex-direction: row-reverse;
|
||||
}
|
||||
.image{
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
padding-left: 2px;
|
||||
padding-right: 2px;
|
||||
}
|
||||
.my-image{
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
transform:rotate(180deg)
|
||||
}
|
||||
.dot{
|
||||
top:10rpx;
|
||||
position: absolute;
|
||||
width:15rpx;
|
||||
height:15rpx;
|
||||
background-color: red;
|
||||
border-radius: 50%;
|
||||
}
|
||||
+23
@@ -0,0 +1,23 @@
|
||||
// TUIKit/components/TUIChat/components/MessageElements/BannerMessage/index.js
|
||||
Component({
|
||||
/**
|
||||
* 组件的属性列表
|
||||
*/
|
||||
properties: {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 组件的初始数据
|
||||
*/
|
||||
data: {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 组件的方法列表
|
||||
*/
|
||||
methods: {
|
||||
|
||||
}
|
||||
})
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {
|
||||
"t-message": "tdesign-miniprogram/message/message"
|
||||
}
|
||||
}
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
<!--TUIKit/components/TUIChat/components/MessageElements/BannerMessage/index.wxml-->
|
||||
<view>
|
||||
<t-message id="t-message" />
|
||||
</view>
|
||||
+1
@@ -0,0 +1 @@
|
||||
/* TUIKit/components/TUIChat/components/MessageElements/BannerMessage/index.wxss */
|
||||
+346
@@ -0,0 +1,346 @@
|
||||
import formateTime from '../../../../../utils/formate-time';
|
||||
import constant from '../../../../../utils/constant';
|
||||
import debounce from '../../../../../../../utils/debounce';
|
||||
import { API } from '../../../../../../../utils/network/api'
|
||||
const app = getApp()
|
||||
const api = new API();
|
||||
// eslint-disable-next-line no-undef
|
||||
Component({
|
||||
/**
|
||||
* 组件的属性列表
|
||||
*/
|
||||
properties: {
|
||||
message: {
|
||||
type: Object,
|
||||
value: {},
|
||||
observer(newVal) {
|
||||
this.setData({
|
||||
message: newVal,
|
||||
renderDom: this.parseCustom(newVal),
|
||||
});
|
||||
},
|
||||
},
|
||||
patient_family_data:{
|
||||
type: Object,
|
||||
value: {},
|
||||
observer(newVal) {
|
||||
this.setData({
|
||||
patient_family_data: newVal,
|
||||
});
|
||||
}
|
||||
},
|
||||
isMine: {
|
||||
type: Boolean,
|
||||
value: true,
|
||||
},
|
||||
},
|
||||
|
||||
/**
|
||||
* 组件的初始数据
|
||||
*/
|
||||
data: {
|
||||
static_host: api.getStaticHost()
|
||||
},
|
||||
|
||||
/**
|
||||
* 组件的方法列表
|
||||
*/
|
||||
methods: {
|
||||
// 解析音视频通话消息
|
||||
extractCallingInfoFromMessage(message) {
|
||||
const callingmessage = JSON.parse(message.payload.data);
|
||||
if (callingmessage.businessID !== 1) {
|
||||
return '';
|
||||
}
|
||||
const objectData = JSON.parse(callingmessage.data);
|
||||
switch (callingmessage.actionType) {
|
||||
case 1: {
|
||||
if (objectData.call_end >= 0) {
|
||||
return `通话时长:${formateTime(objectData.call_end)}`;
|
||||
}
|
||||
if (objectData.data && objectData.data.cmd === 'switchToAudio') {
|
||||
return '切换语音通话';
|
||||
}
|
||||
if (objectData.data && objectData.data.cmd === 'switchToVideo') {
|
||||
return '切换视频通话';
|
||||
}
|
||||
return '发起通话';
|
||||
}
|
||||
case 2:
|
||||
return '取消通话';
|
||||
case 3:
|
||||
if (objectData.data && objectData.data.cmd === 'switchToAudio') {
|
||||
return '切换语音通话';
|
||||
}
|
||||
if (objectData.data && objectData.data.cmd === 'switchToVideo') {
|
||||
return '切换视频通话';
|
||||
}
|
||||
return '已接听';
|
||||
case 4:
|
||||
return '拒绝通话';
|
||||
case 5:
|
||||
if (objectData.data && objectData.data.cmd === 'switchToAudio') {
|
||||
return '切换语音通话';
|
||||
}
|
||||
if (objectData.data && objectData.data.cmd === 'switchToVideo') {
|
||||
return '切换视频通话';
|
||||
}
|
||||
return '无应答';
|
||||
default:
|
||||
return '';
|
||||
}
|
||||
},
|
||||
parseCustom(message) {
|
||||
|
||||
const { BUSINESS_ID_TEXT } = constant;
|
||||
const { GDXZ_CUSTOM_MSEEAGE } = constant;
|
||||
// 群消息解析
|
||||
if (message.payload.data === BUSINESS_ID_TEXT.CREATE_GROUP) {
|
||||
const renderDom = [{
|
||||
type: 'group_create',
|
||||
text: message.payload.extension,
|
||||
}];
|
||||
return renderDom;
|
||||
}
|
||||
try {
|
||||
const customMessage = JSON.parse(message.payload.data);
|
||||
// 约定自定义消息的 data 字段作为区分,不解析的不进行展示
|
||||
if (customMessage.businessID === BUSINESS_ID_TEXT.ORDER) {
|
||||
const renderDom = [{
|
||||
type: 'order',
|
||||
name: 'custom',
|
||||
title: customMessage.title || '',
|
||||
imageUrl: customMessage.imageUrl || '',
|
||||
price: customMessage.price || 0,
|
||||
description: customMessage.description,
|
||||
}];
|
||||
return renderDom;
|
||||
}
|
||||
// 服务评价
|
||||
if (customMessage.businessID === BUSINESS_ID_TEXT.EVALUATION) {
|
||||
const renderDom = [{
|
||||
type: 'evaluation',
|
||||
title: message.payload.description,
|
||||
score: customMessage.score,
|
||||
description: customMessage.comment,
|
||||
}];
|
||||
return renderDom;
|
||||
}
|
||||
// native 自定义消息解析
|
||||
if (customMessage.businessID === BUSINESS_ID_TEXT.LINK) {
|
||||
const renderDom = [{
|
||||
type: 'text_link',
|
||||
text: customMessage.text,
|
||||
}];
|
||||
return renderDom;
|
||||
}
|
||||
// 1:消息内页横条(医生->患者)
|
||||
if (customMessage.message_type === GDXZ_CUSTOM_MSEEAGE.TRABECULA) {
|
||||
const renderDom = [{
|
||||
type: 'trabecula',
|
||||
title: customMessage.title,
|
||||
desc: customMessage.desc,
|
||||
}];
|
||||
return renderDom;
|
||||
}
|
||||
//8:消息内页横条(患者->医生)
|
||||
if (customMessage.message_type === GDXZ_CUSTOM_MSEEAGE.BANNER_MESSAGE) {
|
||||
const renderDom = [{
|
||||
type: 'banner_message',
|
||||
title: customMessage.title,
|
||||
desc: customMessage.desc,
|
||||
}];
|
||||
return renderDom;
|
||||
}
|
||||
// 2:订单结束评价弹出
|
||||
if (customMessage.message_type === GDXZ_CUSTOM_MSEEAGE.ORDER_EVALUATION) {
|
||||
let data = customMessage.data;
|
||||
const renderDom = [{
|
||||
type: 'order_evaluation',
|
||||
order_inquiry_id: data.order_inquiry_id
|
||||
}];
|
||||
return renderDom;
|
||||
}
|
||||
// 6:处方开具成功
|
||||
if (customMessage.message_type === GDXZ_CUSTOM_MSEEAGE.PRESCRIBE) {
|
||||
let data = customMessage.data;
|
||||
const renderDom = [{
|
||||
type: 'prescribe',
|
||||
product_name: data.product_name,
|
||||
title: customMessage.title,
|
||||
order_inquiry_id: data.order_inquiry_id,
|
||||
order_prescription_id: data.order_prescription_id,
|
||||
pharmacist_verify_time: data.pharmacist_verify_time.substring(0,10),
|
||||
}];
|
||||
return renderDom;
|
||||
}
|
||||
// 7:处方开具成功
|
||||
if (customMessage.message_type === GDXZ_CUSTOM_MSEEAGE.PRESCRIBE_VERIFY) {
|
||||
let data = customMessage.data;
|
||||
const renderDom = [{
|
||||
type: 'prescribe_verify',
|
||||
product_name: data.product_name,
|
||||
title: customMessage.title,
|
||||
order_inquiry_id: data.order_inquiry_id,
|
||||
order_prescription_id: data.order_prescription_id,
|
||||
pharmacist_verify_time: data.pharmacist_verify_time.substring(0,10),
|
||||
}];
|
||||
return renderDom;
|
||||
}
|
||||
// 10:糖组检测
|
||||
if (customMessage.message_type === GDXZ_CUSTOM_MSEEAGE.SUGAR_CHECK) {
|
||||
let data = customMessage.data;
|
||||
const renderDom = [{
|
||||
type: 'sugar_check',
|
||||
title:customMessage.title,
|
||||
detection_link:data.detection_link,
|
||||
disease_class_names:data.disease_class_names
|
||||
}];
|
||||
return renderDom;
|
||||
}
|
||||
// 11:患者信息
|
||||
if (customMessage.message_type === GDXZ_CUSTOM_MSEEAGE.PATIENT_INFO) {
|
||||
let data = customMessage.data;
|
||||
const renderDom = [{
|
||||
type: 'patient_info',
|
||||
disease_desc:data.disease_desc,
|
||||
path:data.message_path,
|
||||
detection_link:data.detection_link
|
||||
}];
|
||||
return renderDom;
|
||||
}
|
||||
|
||||
//12:问诊表
|
||||
if (customMessage.message_type === GDXZ_CUSTOM_MSEEAGE.WENZHEN_FORM) {
|
||||
let data = customMessage.data;
|
||||
console.log(data)
|
||||
const renderDom = [{
|
||||
type: 'wenzhen_form',
|
||||
order_inquiry_id:data.order_inquiry_id,
|
||||
message_path:data.message_path,
|
||||
case_patient_message_path:data.case_patient_message_path,
|
||||
case_filled_fields:data.case_filled_fields,
|
||||
case_not_fill_fields:data. case_not_fill_fields
|
||||
}];
|
||||
return renderDom;
|
||||
}
|
||||
} catch (error) {
|
||||
}
|
||||
// 客服咨询
|
||||
try {
|
||||
const extension = JSON.parse(message.payload.extension);
|
||||
if (message.payload.data === BUSINESS_ID_TEXT.CONSULTION) {
|
||||
const renderDom = [{
|
||||
type: 'consultion',
|
||||
title: extension.title || '',
|
||||
item: extension.item || 0,
|
||||
description: extension.description,
|
||||
}];
|
||||
return renderDom;
|
||||
}
|
||||
} catch (error) {
|
||||
}
|
||||
// 音视频通话消息解析
|
||||
try {
|
||||
const callingmessage = JSON.parse(message.payload.data);
|
||||
if (callingmessage.businessID === 1) {
|
||||
if (message.conversationType === wx.$TUIKitTIM.TYPES.CONV_GROUP) {
|
||||
if (message.payload.data.actionType === 5) {
|
||||
message.nick = message.payload.data.inviteeList ? message.payload.data.inviteeList.join(',') : message.from;
|
||||
}
|
||||
const _text = this.extractCallingInfoFromMessage(message);
|
||||
const groupText = `${_text}`;
|
||||
const renderDom = [{
|
||||
type: 'groupCalling',
|
||||
text: groupText,
|
||||
userIDList: [],
|
||||
}];
|
||||
return renderDom;
|
||||
}
|
||||
if (message.conversationType === wx.$TUIKitTIM.TYPES.CONV_C2C) {
|
||||
const c2cText = this.extractCallingInfoFromMessage(message);
|
||||
const renderDom = [{
|
||||
type: 'c2cCalling',
|
||||
text: c2cText,
|
||||
}];
|
||||
return renderDom;
|
||||
}
|
||||
}
|
||||
return [{
|
||||
type: 'notSupport',
|
||||
text: '[自定义消息]',
|
||||
}];
|
||||
} catch (error) {
|
||||
}
|
||||
},
|
||||
goReport:debounce(function(event){
|
||||
wx.showLoading({
|
||||
mask:true,
|
||||
title: '正在打开文件...'
|
||||
})
|
||||
const url=event.currentTarget.dataset.url;
|
||||
const randfile = new Date().getTime() + '检测报告';
|
||||
const newPath = `${wx.env.USER_DATA_PATH}/${randfile}`;
|
||||
wx.downloadFile({
|
||||
// 示例 url,并非真实存在
|
||||
url:url,
|
||||
filePath: newPath,
|
||||
success: function (res) {
|
||||
//const filePath = res.tempFilePath
|
||||
wx.openDocument({
|
||||
fileType:"pdf",
|
||||
showMenu:true,
|
||||
filePath: newPath,
|
||||
success: function (res) {
|
||||
wx.hideLoading();
|
||||
console.log('打开文档成功')
|
||||
},
|
||||
fail:function(error){
|
||||
wx.hideLoading();
|
||||
wx.showToast({
|
||||
title:res,
|
||||
icon:"none"
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
fail:function(error){
|
||||
wx.showToast({
|
||||
title:error,
|
||||
icon:"none"
|
||||
})
|
||||
}
|
||||
|
||||
})
|
||||
}),
|
||||
goSick(event){
|
||||
const url=event.currentTarget.dataset.url;
|
||||
app.go(url);
|
||||
},
|
||||
|
||||
openLink(e) {
|
||||
if (e.currentTarget.dataset.value.key === '立即前往') {
|
||||
wx.navigateTo({
|
||||
url: '/pages/TUI-User-Center/webview/webview?url=https://cloud.tencent.com/act/pro/imnew?from=16975&wechatMobile',
|
||||
});
|
||||
} else if (e.currentTarget.dataset.value.key === '立即体验') {
|
||||
wx.navigateTo({
|
||||
url: '/pages/TUI-User-Center/webview/webview?url=https://cloud.tencent.com/document/product/269/68091',
|
||||
});
|
||||
}
|
||||
},
|
||||
go(e){
|
||||
let url = e.currentTarget.dataset.url;
|
||||
app.go(url);
|
||||
},
|
||||
goList(event){
|
||||
console.log(event);
|
||||
const {ismine,params}=event.currentTarget.dataset;
|
||||
console.log(params);
|
||||
if(!ismine){
|
||||
app.go('/Pages/yishi/sickform/index?case_filled_fields='+params)
|
||||
}
|
||||
// app.go(url);
|
||||
}
|
||||
},
|
||||
});
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {
|
||||
"van-icon": "@vant/weapp/icon/index"
|
||||
}
|
||||
}
|
||||
+147
@@ -0,0 +1,147 @@
|
||||
<view class="custom_wrap">
|
||||
<view wx:if="{{renderDom[0].type ==='order'}}" class="custom-message {{isMine?'my-custom':''}}">
|
||||
<image class="custom-image" src="{{renderDom[0].imageUrl}}" />
|
||||
<view class="custom-content">
|
||||
<view class="custom-content-title">{{renderDom[0].title}}</view>
|
||||
<view class="custom-content-description">{{renderDom[0].description}}</view>
|
||||
<view class="custom-content-price">{{renderDom[0].price}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view wx:if="{{renderDom[0].type ==='consultion'}}" class="custom-message {{isMine?'my-custom':''}}">
|
||||
<view class="custom-content">
|
||||
<view>
|
||||
<text class="custom-content-title">{{renderDom[0].title}}</text>
|
||||
<text class="custom-content-hyperlinks" bindtap="openLink" data-value="{{renderDom[0].hyperlinks_text}}">{{renderDom[0].hyperlinks_text.key}}</text>
|
||||
<view class="custom-content-description" wx:for="{{renderDom[0].item}}" wx:key="index" id="{{item.key}}">{{item.key}}
|
||||
</view>
|
||||
</view>
|
||||
<text class="custom-content-description">{{renderDom[0].description}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view wx:if="{{renderDom[0].type ==='evaluation'}}" class="custom-message {{isMine?'my-custom':''}}">
|
||||
<view class="custom-content">
|
||||
<view class="custom-content-title">{{renderDom[0].title}}</view>
|
||||
<view class="custom-content-score">
|
||||
<image class="score-star" wx:for="{{renderDom[0].score}}" wx:key="*this" src="../../../../../static/images/star.png" />
|
||||
</view>
|
||||
<view class="custom-content-description">{{renderDom[0].description}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view wx:if="{{renderDom[0].type === 'text_link'}}" class="message-body-span text-message">
|
||||
<view class="message-body-span-text">{{renderDom[0].text}}</view>
|
||||
<text class="message-body-span-link">查看详情>></text>
|
||||
</view>
|
||||
<view wx:if="{{renderDom[0].type ==='group_create'}}" class="custom-message {{isMine?'my-custom':''}}" >
|
||||
<view class="custom-content-text">{{renderDom[0].text}}</view>
|
||||
</view>
|
||||
<view wx:if="{{renderDom[0].type ==='c2cCalling' || renderDom[0].type ==='groupCalling'}}" class="call-message {{isMine?'my-text':'your-text'}}" >
|
||||
<view class="custom-content-text">{{renderDom[0].text}}11</view>
|
||||
</view>
|
||||
<!-- <view wx:if="{{renderDom[0].type ==='notSupport'}}" class="message-body-span text-message" >
|
||||
<view class="message-body-span-text">{{renderDom[0].text}}</view>
|
||||
</view> -->
|
||||
<!-- 自定义横条样式 -->
|
||||
<view wx:if="{{renderDom[0].type==='trabecula'}}" class="gdxz_custom_trabecula_message">
|
||||
<view class="gdxz_custom_message_title">{{renderDom[0].title}}</view>
|
||||
<view class="gdxz_custom_message_desc">{{renderDom[0].desc}}</view>
|
||||
</view>
|
||||
<!-- <view wx:if="{{renderDom[0].type==='banner_message'}}" class="gdxz_custom_trabecula_message">
|
||||
<view class="gdxz_custom_message_title">{{renderDom[0].title}}</view>
|
||||
<view class="gdxz_custom_message_desc">{{renderDom[0].desc}}</view>
|
||||
</view> -->
|
||||
|
||||
|
||||
<!-- 自定义开处方样式 -->
|
||||
<view wx:if="{{renderDom[0].type==='prescribe'}}"
|
||||
class="gdxz_custom_order_prescribe_message"
|
||||
data-url="/Pages/yishi/onlinechufang/index?order_inquiry_id={{renderDom[0].order_inquiry_id}}&order_prescription_id={{renderDom[0].order_prescription_id}}&from=chat"
|
||||
bindtap="go">
|
||||
<view class="prescribe_title">
|
||||
{{renderDom[0].title}}
|
||||
</view>
|
||||
<view class="prescribe_box">
|
||||
<view class="prescribe_box_top">
|
||||
<view class="prescribe_box_top_product_name"><text style="color: #999;"> RP:</text>{{renderDom[0].product_name}}</view>
|
||||
<view class="prescribe_box_top_pharmacist_verify_time"><text style="color: #999;">开方日期:</text> {{renderDom[0].pharmacist_verify_time}}</view>
|
||||
</view>
|
||||
<view class="prescribe_box_bottom" data-order_prescription_id="{{renderDom[0].order_prescription_id}}">
|
||||
<view class="prescribe_box_buy">去查看</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view wx:if="{{renderDom[0].type==='prescribe_verify'}}"
|
||||
class="gdxz_custom_order_prescribe_message"
|
||||
data-url="/Pages/yishi/onlinechufang/index?order_inquiry_id={{renderDom[0].order_inquiry_id}}&order_prescription_id={{renderDom[0].order_prescription_id}}&from=chat"
|
||||
bindtap="go">
|
||||
<view class="prescribe_title">
|
||||
{{renderDom[0].title}}
|
||||
</view>
|
||||
<view class="prescribe_box">
|
||||
<view class="prescribe_box_top">
|
||||
<view class="prescribe_box_top_product_name"><text style="color: #999;"> RP:</text>{{renderDom[0].product_name}}</view>
|
||||
<view class="prescribe_box_top_pharmacist_verify_time"><text style="color: #999;">开方日期:</text> {{renderDom[0].pharmacist_verify_time}}</view>
|
||||
</view>
|
||||
<view class="prescribe_box_bottom" data-order_prescription_id="{{renderDom[0].order_prescription_id}}">
|
||||
<view class="prescribe_box_buy">去查看</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view wx:if="{{renderDom[0].type==='sugar_check'}}" class="sugarbox">
|
||||
<view class="sugarcon">
|
||||
<view class="title">
|
||||
{{renderDom[0].title}}报告
|
||||
</view>
|
||||
<view class="patient_info">
|
||||
<view class="name">就诊人:{{patient_family_data.patient_name}}(<text wx:if="{{patient_family_data.patient_sex==1}}">男</text><text wx:elif="{{patient_family_data.patient_sex==2}}">女</text><text wx:else>未知</text>|{{patient_family_data.patient_age}}岁)</view>
|
||||
<view class="sick"> 所患疾病:{{renderDom[0].disease_class_names}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="detail" data-url="{{renderDom[0].detection_link}}" bindtap="goReport">
|
||||
<view class="left">查看报告</view>
|
||||
<image src="../../../../../static/images/back.png" class="back" mode="widthFix"/>
|
||||
</view>
|
||||
</view>
|
||||
<view wx:if="{{renderDom[0].type==='patient_info'}}" class="patientbox" >
|
||||
<image src="../../../../../static/images/patient_bg.png"
|
||||
class="bg" mode=""/>
|
||||
<view class="title">患者信息</view>
|
||||
<view class="sickinfo" wx:if="{{renderDom[0].disease_desc}}">
|
||||
<view class="name">{{patient_family_data.patient_name}}(<text wx:if="{{patient_family_data.patient_sex==1}}">男</text><text wx:elif="{{patient_family_data.patient_sex==2}}">女</text><text wx:else>未知</text>|{{patient_family_data.patient_age}}岁)</view>
|
||||
<view class="sick_desc">
|
||||
<text class="sickname">病情描述:</text>{{renderDom[0].disease_desc}}
|
||||
</view>
|
||||
<view class="look sicklook" bindtap="goSick" data-url="{{renderDom[0].path}}">
|
||||
<view class="see">查看详情</view>
|
||||
<van-icon name="arrow" color="rgba(0,0,0,0.45)" style="margin-top:4rpx;margin-left:8rpx;"/>
|
||||
</view>
|
||||
</view>
|
||||
<view class="patient_info" wx:else>
|
||||
<view class="name">{{patient_family_data.patient_name}}(<text wx:if="{{patient_family_data.patient_sex==1}}">男</text><text wx:elif="{{patient_family_data.patient_sex==2}}">女</text><text wx:else>未知</text>|{{patient_family_data.patient_age}}岁)</view>
|
||||
|
||||
<view class="look" bindtap="goSick" data-url="{{renderDom[0].path}}">
|
||||
<view class="see">查看详情</view>
|
||||
<van-icon name="arrow" color="rgba(0,0,0,0.45)" style="margin-top:4rpx;margin-left:8rpx;"/>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
||||
|
||||
</view>
|
||||
<view wx:if="{{renderDom[0].type==='wenzhen_form'}}" class="wenzhen_form {{isMine?'my-custom':'your-custom'}}" bindtap="goList" data-ismine="{{isMine}}" data-params="{{isMine?renderDom[0].case_not_fill_fields:renderDom[0].case_filled_fields}}">
|
||||
<view class="title" wx:if="{{renderDom[0].case_not_fill_fields}}">
|
||||
<image src="{{static_host}}/applet/doctor/static/images/yishi/wenzhenform.png" mode="" class="wzicon" />
|
||||
<view class="name">问诊表</view>
|
||||
</view>
|
||||
<view class="title" wx:else>
|
||||
<image src="{{static_host}}/applet/doctor/static/images/yishi/wenzhenform.png" mode="" class="wzicon"/>
|
||||
<view class="name">问诊表-已填写</view>
|
||||
</view>
|
||||
<view class="descform" wx:if="{{renderDom[0].case_not_fill_fields}}">
|
||||
等待填写
|
||||
</view>
|
||||
<view class="descform" wx:else>
|
||||
点击查看
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
+466
@@ -0,0 +1,466 @@
|
||||
.custom-message {
|
||||
background: #FBFBFB;
|
||||
border-radius: 4rpx 20rpx 20rpx 20rpx;
|
||||
display: flex;
|
||||
padding: 10rpx 24rpx;
|
||||
background-color: #fff;
|
||||
border: 1px solid #D9D9D9;
|
||||
}
|
||||
.my-custom {
|
||||
border-radius: 10px 2px 10px 10px;
|
||||
border: 1px solid rgba(0,110,255,0.30);
|
||||
}
|
||||
.custom-content-title {
|
||||
font-family: PingFangSC-Medium;
|
||||
max-width: 268rpx;
|
||||
height: 34rpx;
|
||||
font-size: 28rpx;
|
||||
color: #000000;
|
||||
letter-spacing: 0;
|
||||
margin-bottom: 12rpx;
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.custom-content-description {
|
||||
font-family: PingFangSC-Regular;
|
||||
width: 278rpx;
|
||||
line-height: 34rpx;
|
||||
font-size: 28rpx;
|
||||
color: #999999;
|
||||
letter-spacing: 0;
|
||||
line-height: 40rpx;
|
||||
font-size: 24rpx;
|
||||
margin-bottom: 12rpx;
|
||||
word-break: break-word;
|
||||
}
|
||||
|
||||
.custom-content-price {
|
||||
font-family: PingFangSC-Medium;
|
||||
line-height: 50rpx;
|
||||
color: #FF7201;
|
||||
letter-spacing: 0;
|
||||
}
|
||||
|
||||
.custom-image {
|
||||
width: 135rpx;
|
||||
height: 135rpx;
|
||||
border-radius: 6rpx;
|
||||
margin-right: 10rpx;
|
||||
margin-top: 4rpx;
|
||||
}
|
||||
|
||||
.custom-content-score {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding-bottom: 12rpx;
|
||||
}
|
||||
.custom-content-score .score-star {
|
||||
width: 36rpx;
|
||||
height: 36rpx;
|
||||
margin-right: 10rpx;
|
||||
}
|
||||
.text-message {
|
||||
display: inline-flex;
|
||||
max-width: 60vw;
|
||||
line-height: 52rpx;
|
||||
padding: 12rpx 24rpx;
|
||||
background: #F8F8F8;
|
||||
border: 1px solid #D9D9D9;
|
||||
border-radius: 2px 10px 10px 10px;
|
||||
}
|
||||
.my-text {
|
||||
border-radius: 10px 2px 10px 10px;
|
||||
border: 1px solid rgba(0,110,255,0.30);
|
||||
background: rgba(0,110,255,0.10);
|
||||
}
|
||||
.message-body-span {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
/*justify-content: flex-start;*/
|
||||
flex-wrap: wrap;
|
||||
outline: none;
|
||||
font-size: 28rpx;
|
||||
color: #333333;
|
||||
position: relative;
|
||||
max-width: 60vw;
|
||||
}
|
||||
.message-body-span-text {
|
||||
/* width: 434rpx; */
|
||||
font-family: PingFangSC-Regular;
|
||||
font-weight: 400;
|
||||
font-size: 32rpx;
|
||||
color: #000000;
|
||||
letter-spacing: 0;
|
||||
line-height: 42rpx;
|
||||
}
|
||||
.message-body-span-link {
|
||||
color: blue;
|
||||
}
|
||||
.message-body-span-link {
|
||||
color: blue;
|
||||
}
|
||||
.message-body-span-link {
|
||||
color: blue;
|
||||
}
|
||||
.custom-content-text{
|
||||
font-family: PingFangSC-Regular;
|
||||
height: 25px;
|
||||
line-height: 25px;
|
||||
font-size: 28rpx;
|
||||
letter-spacing: 0;
|
||||
}
|
||||
.custom-content-hyperlinks{
|
||||
font-family: PingFangSC-Regular;
|
||||
font-weight: 400;
|
||||
line-height: 40rpx;
|
||||
font-size: 28rpx;
|
||||
color: #006EFF;
|
||||
letter-spacing: 0;
|
||||
margin-bottom: 12rpx;
|
||||
}
|
||||
|
||||
/* 自定义样式 */
|
||||
/* 横条样式 */
|
||||
.gdxz_custom_trabecula_message{
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
width: calc(100vw - 40rpx);
|
||||
text-align: center;
|
||||
}
|
||||
.gdxz_custom_message_title{
|
||||
flex: 1;
|
||||
display: flex;
|
||||
max-width: 95vw;
|
||||
justify-content: center;
|
||||
background-color: #E1E1E1;
|
||||
padding: 5rpx 40rpx;
|
||||
font-size: 28rpx;
|
||||
border-radius: 5rpx;
|
||||
}
|
||||
.gdxz_custom_message_desc{
|
||||
margin-top: 30rpx;
|
||||
display: flex;
|
||||
max-width: 95vw;
|
||||
letter-spacing: 2rpx;
|
||||
justify-content: center;
|
||||
color: #666666;
|
||||
font-size: 24rpx;
|
||||
}
|
||||
/* 评价样式 */
|
||||
.gdxz_custom_order_evaluation_message{
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
flex-direction: column;
|
||||
width: 80vw;
|
||||
margin-right: 10vw;
|
||||
border-radius: 10px;
|
||||
background-color: #ffffff;
|
||||
height: 250rpx;
|
||||
overflow: hidden;
|
||||
box-shadow: 0 0 10px 10px rgba(143, 142, 142, 0.2);
|
||||
}
|
||||
.evaluation_title{
|
||||
flex: 1;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: 28rpx;
|
||||
}
|
||||
.evaluation_ratebox{
|
||||
flex: 1;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items:baseline;
|
||||
}
|
||||
.evaluation_button{
|
||||
flex: 1;
|
||||
background-color: rgb(226, 247, 247);
|
||||
color: #3CC7C0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: 34rpx;
|
||||
}
|
||||
/* 开具处方样式 */
|
||||
.gdxz_custom_order_prescribe_message{
|
||||
width: 60vw;
|
||||
position: relative;
|
||||
border-radius: 10px 10px 10px 10px;
|
||||
background: rgb(212, 239, 241);
|
||||
border: 1rpx solid #1ACAD3;
|
||||
/* background: rgb(255, 255, 255);
|
||||
border: 1rpx solid #E7E7E7; */
|
||||
}
|
||||
.gdxz_custom_order_prescribe_message::after{
|
||||
content:'';
|
||||
position: absolute;
|
||||
top: 35rpx;
|
||||
right: -19rpx;
|
||||
transform: translate(-50%,-50%) rotate(-135deg);
|
||||
width: 16rpx;
|
||||
height: 16rpx;
|
||||
background: rgb(212, 239, 241);
|
||||
border: 1rpx solid #1ACAD3;
|
||||
/* background: rgb(255, 255, 255);
|
||||
border: 1rpx solid #E7E7E7; */
|
||||
border-style: none none solid solid;
|
||||
}
|
||||
.prescribe_title{
|
||||
font-size: 34rpx;
|
||||
border-bottom: 1px solid #E7E7E7;
|
||||
margin: 0 20rpx;
|
||||
padding: 20rpx 0;
|
||||
}
|
||||
.prescribe_box{
|
||||
margin: 0 20rpx;
|
||||
padding: 20rpx 0;
|
||||
font-size: 28rpx;
|
||||
}
|
||||
.prescribe_box_top_pharmacist_verify_time{
|
||||
margin-top: 20rpx;
|
||||
}
|
||||
.prescribe_box_bottom{
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
.prescribe_box_buy{
|
||||
margin: 20rpx 20rpx 0 20rpx;
|
||||
background-color: #3CC7C0;
|
||||
color: #fff;
|
||||
padding: 15rpx 30rpx;
|
||||
border-radius: 40rpx;
|
||||
font-size: 30rpx;
|
||||
}
|
||||
/* 糖组检测 */
|
||||
|
||||
.back{
|
||||
width:24rpx;
|
||||
height:48rpx;
|
||||
transform: rotate(180deg);
|
||||
}
|
||||
.sugarbox{
|
||||
position: relative;
|
||||
width: 420rpx;
|
||||
background: rgb(255, 255, 255);
|
||||
border: 1rpx solid #D8D8D8;
|
||||
border-radius: 12rpx;
|
||||
}
|
||||
.sugarbox::after{
|
||||
content:'';
|
||||
position: absolute;
|
||||
top: 35rpx;
|
||||
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;
|
||||
}
|
||||
.sugarcon{
|
||||
margin:0rpx 24rpx 0;
|
||||
|
||||
}
|
||||
.patient_info{
|
||||
font-size: 28rpx;
|
||||
font-weight: 400;
|
||||
color: rgba(0,0,0,0.65);
|
||||
line-height: 40rpx;
|
||||
}
|
||||
.sugarcon{
|
||||
border-bottom: 1rpx solid rgba(0,0,0,0.12);
|
||||
padding-bottom: 24rpx;
|
||||
}
|
||||
.sugarcon .title{
|
||||
margin:24rpx 0 20rpx;
|
||||
font-size: 32rpx;
|
||||
font-weight: 500;
|
||||
color: #3CC7C0;
|
||||
}
|
||||
.sugarbox .detail{
|
||||
display: flex;
|
||||
margin:0 24rpx;
|
||||
height:88rpx;
|
||||
font-size: 32rpx;
|
||||
font-weight: 400;
|
||||
color: rgba(0,0,0,0.85);
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
}
|
||||
/* 患者信息 */
|
||||
.patientbox{
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
width: calc(100vw - 40rpx);
|
||||
text-align: center;
|
||||
background-color: #fff;
|
||||
border-radius: 12rpx;
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
box-shadow: 0 0 6rpx 0 #ccc;
|
||||
}
|
||||
.patientbox .title{
|
||||
position: relative;
|
||||
text-align: left;
|
||||
padding:0 24rpx;
|
||||
height: 90rpx;
|
||||
font-size: 32rpx;
|
||||
border-bottom: 1rpx solid rgba(0,0,0,0.12);
|
||||
font-weight: 550;
|
||||
color: rgba(0,0,0,0.85);
|
||||
line-height: 90rpx;
|
||||
}
|
||||
.patientbox .name{
|
||||
color: rgba(0,0,0,0.85);
|
||||
font-size: 32rpx;
|
||||
}
|
||||
.bg{
|
||||
position: absolute;
|
||||
z-index:0;
|
||||
width:100%;
|
||||
height:90rpx;
|
||||
}
|
||||
.patientbox .patient_info{
|
||||
padding:40rpx 0;
|
||||
margin:0 24rpx;
|
||||
display: flex;
|
||||
justify-content:space-between;
|
||||
}
|
||||
.look{
|
||||
display: flex;
|
||||
color:rgba(0,0,0,0.45);
|
||||
align-items: center;
|
||||
}
|
||||
.sick_desc{
|
||||
font-size: 28rpx;
|
||||
margin:20rpx 32rpx 0;
|
||||
text-align: left;
|
||||
|
||||
border-bottom: 1rpx solid rgba(0,0,0,0.12);
|
||||
padding-bottom: 30rpx;
|
||||
|
||||
}
|
||||
.sickname{
|
||||
font-size: 28rpx;
|
||||
font-weight: 400;
|
||||
color: rgba(0,0,0,0.45);
|
||||
}
|
||||
.sicklook{
|
||||
justify-content: space-between;
|
||||
margin:0 32rpx;
|
||||
align-items: center;
|
||||
height: 100rpx;
|
||||
}
|
||||
.sickinfo .name{
|
||||
margin: 20rpx 32rpx 0;
|
||||
|
||||
text-align: left;
|
||||
}
|
||||
.sicklook .see{
|
||||
|
||||
font-size: 32rpx;
|
||||
}
|
||||
.wenzhen_form{
|
||||
width: 60vw;
|
||||
position: relative;
|
||||
z-index:2;
|
||||
border-radius: 10px 10px 10px 10px;
|
||||
border: 1rpx solid #1ACAD3;
|
||||
}
|
||||
.wenzhen_form .title{
|
||||
border-radius: 16rpx 16rpx 0 0;
|
||||
padding:20rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
font-size: 30rpx;
|
||||
color: #FFFFFF;
|
||||
background-color: #3CC7C0;
|
||||
}
|
||||
.wzicon{
|
||||
margin-right: 10rpx;
|
||||
width:42rpx;
|
||||
height:46rpx;
|
||||
}
|
||||
.my-custom .wenzhen_form{
|
||||
background: rgb(212, 239, 241);
|
||||
}
|
||||
.wenzhen_form .descform{
|
||||
padding:15rpx 20rpx;
|
||||
background-color: #ffff;
|
||||
font-size: 28rpx;
|
||||
color: #666666;
|
||||
border-radius: 0 0 16rpx 16rpx;
|
||||
}
|
||||
.wenzhen_form.my-custom::after{
|
||||
content:'';
|
||||
position: absolute;
|
||||
top: 35rpx;
|
||||
right: -19rpx;
|
||||
transform: translate(-50%,-50%) rotate(-135deg);
|
||||
width: 16rpx;
|
||||
height: 16rpx;
|
||||
background: #3CC7C0;
|
||||
border: 1rpx solid #1ACAD3;
|
||||
/* background: rgb(255, 255, 255);
|
||||
border: 1rpx solid #E7E7E7; */
|
||||
border-style: none none solid solid;
|
||||
}
|
||||
.wenzhen_form.your-custom::after{
|
||||
content:'';
|
||||
position: absolute;
|
||||
top: 35rpx;
|
||||
left: 0;
|
||||
transform: translate(-50%,-50%) rotate(45deg);
|
||||
width: 16rpx;
|
||||
height: 16rpx;
|
||||
background: #3CC7C0;
|
||||
border: 1rpx solid #1ACAD3;
|
||||
border-style: none none solid solid
|
||||
}
|
||||
.call-message.my-text {
|
||||
max-width: 60vw;
|
||||
min-height: 50rpx;
|
||||
padding: 10rpx 24rpx;
|
||||
line-height: 50rpx;
|
||||
position: relative;
|
||||
border-radius: 10px 10px 10px 10px;
|
||||
background: rgb(212, 239, 241);
|
||||
border: 1rpx solid #1ACAD3;
|
||||
}
|
||||
.call-message.my-text::after{
|
||||
content:'';
|
||||
position: absolute;
|
||||
top: 35rpx;
|
||||
right: -19rpx;
|
||||
transform: translate(-50%,-50%) rotate(-135deg);
|
||||
width: 16rpx;
|
||||
height: 16rpx;
|
||||
background: rgb(212, 239, 241);
|
||||
border: 1rpx solid #1ACAD3;
|
||||
border-style: none none solid solid
|
||||
}
|
||||
.call-message.your-text {
|
||||
max-width: 60vw;
|
||||
min-height: 50rpx;
|
||||
padding: 10rpx 24rpx;
|
||||
line-height: 50rpx;
|
||||
position: relative;
|
||||
border-radius: 10px 10px 10px 10px;
|
||||
background: rgb(255, 255, 255);
|
||||
border: 1rpx solid #D8D8D8;
|
||||
}
|
||||
.call-message.your-text::after{
|
||||
content:'';
|
||||
position: absolute;
|
||||
top: 35rpx;
|
||||
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
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
import { emojiName, emojiUrl, emojiMap } from '../../../../../utils/emojiMap';
|
||||
// eslint-disable-next-line no-undef
|
||||
Component({
|
||||
/**
|
||||
* 组件的属性列表
|
||||
*/
|
||||
properties: {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 组件的初始数据
|
||||
*/
|
||||
data: {
|
||||
emojiList: [],
|
||||
},
|
||||
|
||||
lifetimes: {
|
||||
attached() {
|
||||
for (let i = 0; i < emojiName.length; i++) {
|
||||
this.data.emojiList.push({
|
||||
emojiName: emojiName[i],
|
||||
url: emojiUrl + emojiMap[emojiName[i]],
|
||||
});
|
||||
}
|
||||
this.setData({
|
||||
emojiList: this.data.emojiList,
|
||||
});
|
||||
},
|
||||
},
|
||||
|
||||
/**
|
||||
* 组件的方法列表
|
||||
*/
|
||||
methods: {
|
||||
handleEnterEmoji(event) {
|
||||
this.triggerEvent('enterEmoji', {
|
||||
message: event.currentTarget.dataset.name,
|
||||
});
|
||||
},
|
||||
},
|
||||
});
|
||||
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {}
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
<scroll-view scroll-y="true" enable-flex="true" class="TUI-Emoji">
|
||||
<view class="TUI-emoji-image" wx:for="{{emojiList}}" wx:key="index" >
|
||||
<image data-name="{{item.emojiName}}" src="{{item.url}}" bindtap="handleEnterEmoji" />
|
||||
</view>>
|
||||
</scroll-view>
|
||||
@@ -0,0 +1,19 @@
|
||||
.TUI-Emoji {
|
||||
display: flex;
|
||||
justify-content: flex-start;
|
||||
flex-wrap: wrap;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
margin-left: 4vw;
|
||||
}
|
||||
|
||||
.TUI-emoji-image {
|
||||
width: 9vw;
|
||||
height: 9vw;
|
||||
margin: 2vw;
|
||||
}
|
||||
|
||||
.TUI-emoji-image > image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
+54
@@ -0,0 +1,54 @@
|
||||
// eslint-disable-next-line no-undef
|
||||
Component({
|
||||
/**
|
||||
* 组件的属性列表
|
||||
*/
|
||||
properties: {
|
||||
message: {
|
||||
type: Object,
|
||||
value: {},
|
||||
observer(newVal) {
|
||||
this.setData({
|
||||
renderDom: this.parseFace(newVal),
|
||||
});
|
||||
},
|
||||
},
|
||||
isMine: {
|
||||
type: Boolean,
|
||||
value: true,
|
||||
},
|
||||
},
|
||||
|
||||
/**
|
||||
* 组件的初始数据
|
||||
*/
|
||||
data: {
|
||||
renderDom: [],
|
||||
percent: 0,
|
||||
faceUrl: 'https://web.sdk.qcloud.com/im/assets/face-elem/',
|
||||
},
|
||||
|
||||
/**
|
||||
* 组件的方法列表
|
||||
*/
|
||||
methods: {
|
||||
// 解析face 消息
|
||||
parseFace(message) {
|
||||
// 兼容android的大表情格式
|
||||
if (message.payload.data.indexOf('@2x') < 0) {
|
||||
message.payload.data = `${message.payload.data}@2x`;
|
||||
}
|
||||
const renderDom = {
|
||||
src: `${this.data.faceUrl + message.payload.data}.png`,
|
||||
};
|
||||
return renderDom;
|
||||
},
|
||||
|
||||
previewImage() {
|
||||
wx.previewImage({
|
||||
current: this.data.renderDom[0].src, // 当前显示图片的http链接
|
||||
urls: [this.data.renderDom[0].src],
|
||||
});
|
||||
},
|
||||
},
|
||||
});
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {}
|
||||
}
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
<view class="TUI-faceMessage" bindtap="previewImage">
|
||||
<image class="face-message" src="{{renderDom.src}}" />
|
||||
</view>
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
.TUI-faceMessage {
|
||||
width: 150px;
|
||||
height: 110px;
|
||||
max-width: 60vw;
|
||||
}
|
||||
.face-message {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border-radius: 10px 10px 10px 10px;
|
||||
}
|
||||
.my-image {
|
||||
border-radius: 10px 2px 10px 10px;
|
||||
}
|
||||
+58
@@ -0,0 +1,58 @@
|
||||
// eslint-disable-next-line no-undef
|
||||
Component({
|
||||
/**
|
||||
* 组件的属性列表
|
||||
*/
|
||||
properties: {
|
||||
message: {
|
||||
type: Object,
|
||||
value: {},
|
||||
observer(newVal) {
|
||||
this.setData({
|
||||
filePayload: newVal.payload,
|
||||
});
|
||||
},
|
||||
},
|
||||
isMine: {
|
||||
type: Boolean,
|
||||
value: true,
|
||||
},
|
||||
},
|
||||
|
||||
/**
|
||||
* 组件的初始数据
|
||||
*/
|
||||
data: {
|
||||
Show: false,
|
||||
filePayload: {},
|
||||
},
|
||||
|
||||
/**
|
||||
* 组件的方法列表
|
||||
*/
|
||||
methods: {
|
||||
download() {
|
||||
this.setData({
|
||||
Show: true,
|
||||
});
|
||||
},
|
||||
downloadConfirm() {
|
||||
wx.downloadFile({
|
||||
url: this.data.filePayload.fileUrl,
|
||||
success(res) {
|
||||
const filePath = res.tempFilePath;
|
||||
wx.openDocument({
|
||||
filePath,
|
||||
success() {
|
||||
},
|
||||
});
|
||||
},
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
this.setData({
|
||||
Show: false,
|
||||
});
|
||||
},
|
||||
},
|
||||
});
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {}
|
||||
}
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
<view class="TUI-fileMessage">
|
||||
<view class="fileMessage">
|
||||
<view class="fileMessage-box">
|
||||
<image class="file-icon" src="../../../../static/images/file.png" />
|
||||
<label bindtap="download" class="file-title">{{filePayload.fileName}}</label>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="pop" wx:if="{{Show}}">
|
||||
<view class="text-box">
|
||||
<text class="download-confirm" catchtap="downloadConfirm">下载</text>
|
||||
</view>
|
||||
<view class="text-box">
|
||||
<text class="abandon" bindtap="cancel">取消</text>
|
||||
</view>
|
||||
</view>
|
||||
+57
@@ -0,0 +1,57 @@
|
||||
.TUI-fileMessage {
|
||||
display: flex;
|
||||
padding: 10rpx 24rpx;
|
||||
background-color: #fff;
|
||||
border-radius: 2px 10px 10px 10px;
|
||||
border: 1px solid #D9D9D9;
|
||||
}
|
||||
.fileMessage{
|
||||
display: flex;
|
||||
}
|
||||
.fileMessage-box{
|
||||
display: flex;
|
||||
background: white;
|
||||
align-items: center;
|
||||
height: 150rpx;
|
||||
}
|
||||
.file-icon {
|
||||
width: 80rpx;
|
||||
height: 80rpx;
|
||||
}
|
||||
.pop{
|
||||
position: fixed;
|
||||
width: 50%;
|
||||
bottom: 400rpx;
|
||||
margin-left: 90rpx;
|
||||
background: rgba(0, 0, 0, 0.3);
|
||||
z-index: 99999;
|
||||
}
|
||||
.text-box{
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
height: 112rpx;
|
||||
}
|
||||
.download-confirm{
|
||||
font-family: PingFangSC-Regular;
|
||||
font-size: 16px;
|
||||
color: #E85454;
|
||||
letter-spacing: 0;
|
||||
text-align: center;
|
||||
line-height: 22px;
|
||||
}
|
||||
.abandon{
|
||||
opacity: 0.8;
|
||||
font-family: PingFangSC-Regular;
|
||||
font-size: 16px;
|
||||
color: #FFFFFF;
|
||||
letter-spacing: 0;
|
||||
text-align: center;
|
||||
line-height: 22px;
|
||||
}
|
||||
.file-title {
|
||||
max-width: 53vw;
|
||||
display: inline;
|
||||
word-wrap: break-word;
|
||||
word-break: break-all;
|
||||
}
|
||||
+54
@@ -0,0 +1,54 @@
|
||||
import { parseImage } from '../../../../../utils/message-parse';
|
||||
// eslint-disable-next-line no-undef
|
||||
Component({
|
||||
/**
|
||||
* 组件的属性列表
|
||||
*/
|
||||
properties: {
|
||||
message: {
|
||||
type: Object,
|
||||
value: {},
|
||||
observer(newVal) {
|
||||
this.setData({
|
||||
renderDom: parseImage(newVal),
|
||||
percent: newVal.percent,
|
||||
});
|
||||
},
|
||||
},
|
||||
isMine: {
|
||||
type: Boolean,
|
||||
value: true,
|
||||
},
|
||||
},
|
||||
|
||||
/**
|
||||
* 组件的初始数据
|
||||
*/
|
||||
data: {
|
||||
renderDom: [],
|
||||
percent: 0,
|
||||
showSave: false,
|
||||
},
|
||||
|
||||
/**
|
||||
* 组件的方法列表
|
||||
*/
|
||||
methods: {
|
||||
previewImage() {
|
||||
wx.previewImage({
|
||||
current: this.data.renderDom[0].src, // 当前显示图片的http链接
|
||||
urls: [this.data.renderDom[0].src], // 图片链接必须是数组
|
||||
success: () => {
|
||||
this.setData({
|
||||
showSave: true,
|
||||
});
|
||||
},
|
||||
complete: () => {
|
||||
this.setData({
|
||||
showSave: false,
|
||||
});
|
||||
},
|
||||
});
|
||||
},
|
||||
},
|
||||
});
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {
|
||||
"van-image": "@vant/weapp/image/index",
|
||||
"van-loading": "@vant/weapp/loading/index"
|
||||
|
||||
}
|
||||
}
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
<view class="TUI-ImageMessage" bindtap="previewImage">
|
||||
<!-- <image class="image-message {{isMine?'my-image':''}}" mode="aspectFill" src="{{renderDom[0].src}}" /> -->
|
||||
|
||||
<!-- <image wx:if="{{showSave}}" class="image-message {{isMine?'my-image':''}}" mode="aspectFill" src="{{renderDom[0].src}}" show-menu-by-longpress="{{true}}"/> -->
|
||||
<van-image use-loading-slot fit="cover" class="image-message {{isMine?'my-image':''}}" width="100%" height="100" src="{{renderDom[0].src}}" radius="6px">
|
||||
<van-loading slot="loading" type="spinner" size="20" vertical />
|
||||
</van-image>
|
||||
<van-image wx:if="{{showSave}}" use-loading-slot fit="cover" class="image-message {{isMine?'my-image':''}}" width="100%" height="100" src="{{renderDom[0].src}}" radius="6px" show-menu-by-longpress="{{true}}">
|
||||
<van-loading slot="loading" type="spinner" size="20" vertical />
|
||||
</van-image>
|
||||
</view>
|
||||
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
.TUI-ImageMessage {
|
||||
width: 150px;
|
||||
}
|
||||
.image-message {
|
||||
width: 100%;
|
||||
max-height: 300rpx;
|
||||
height: 300rpx;
|
||||
border-radius: 10px 10px 10px 10px;
|
||||
}
|
||||
.my-image {
|
||||
height: 300rpx;
|
||||
border-radius: 10px 10px 10px 10px;
|
||||
}
|
||||
.big-image {
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
position: fix;
|
||||
top: 0;
|
||||
left: 0;
|
||||
}
|
||||
+33
@@ -0,0 +1,33 @@
|
||||
// eslint-disable-next-line no-undef
|
||||
Component({
|
||||
/**
|
||||
* 组件的属性列表
|
||||
*/
|
||||
properties: {
|
||||
message: {
|
||||
type: Object,
|
||||
value: {},
|
||||
observer(newVal) {
|
||||
this.setData({
|
||||
message: newVal,
|
||||
});
|
||||
},
|
||||
},
|
||||
isMine: {
|
||||
type: Boolean,
|
||||
value: true,
|
||||
},
|
||||
},
|
||||
|
||||
/**
|
||||
* 组件的初始数据
|
||||
*/
|
||||
data: {
|
||||
},
|
||||
|
||||
/**
|
||||
* 组件的方法列表
|
||||
*/
|
||||
methods: {
|
||||
},
|
||||
});
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {}
|
||||
}
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
<!--TUI-CustomerService/components/tui-chat/message-elements/relay-message/index.wxml-->
|
||||
<text class="message-body-span text-message">[聊天记录]</text>
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
/* TUI-CustomerService/components/tui-chat/message-elements/relay-message/index.wxss */
|
||||
.message-body-span {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
/*justify-content: flex-start;*/
|
||||
flex-wrap: wrap;
|
||||
outline: none;
|
||||
font-size: 28rpx;
|
||||
color: #333333;
|
||||
position: relative;
|
||||
max-width: 60vw;
|
||||
}
|
||||
.text-message {
|
||||
display: inline-flex;
|
||||
max-width: 60vw;
|
||||
line-height: 52rpx;
|
||||
padding: 12rpx 24rpx;
|
||||
background: #F8F8F8;
|
||||
border: 1px solid #D9D9D9;
|
||||
border-radius: 2px 10px 10px 10px;
|
||||
}
|
||||
+39
@@ -0,0 +1,39 @@
|
||||
// eslint-disable-next-line no-undef
|
||||
Component({
|
||||
/**
|
||||
* 组件的属性列表
|
||||
*/
|
||||
properties: {
|
||||
message: {
|
||||
type: Object,
|
||||
value: {},
|
||||
observer(newVal) {
|
||||
this.setData({
|
||||
message: newVal,
|
||||
});
|
||||
},
|
||||
},
|
||||
isMine: {
|
||||
type: Boolean,
|
||||
value: true,
|
||||
},
|
||||
},
|
||||
|
||||
/**
|
||||
* 组件的初始数据
|
||||
*/
|
||||
data: {
|
||||
message: ''
|
||||
},
|
||||
|
||||
/**
|
||||
* 组件的方法列表
|
||||
*/
|
||||
methods: {
|
||||
resendMessage(e) {
|
||||
this.triggerEvent('resendMessage', {
|
||||
message: e.currentTarget.dataset.value.payload.text
|
||||
});
|
||||
}
|
||||
},
|
||||
});
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {}
|
||||
}
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
<view class="revoke" data-value="{{message}}" id="{{'ID-'+message.ID}}">
|
||||
<!-- <label class="name" wx:if="{{message.flow === 'in'}}">{{message.nick || message.from}}</label> -->
|
||||
<label class="name" wx:if="{{message.flow === 'in'}}">对方</label>
|
||||
<label class="name" wx:else>你</label>
|
||||
<span class="name">撤回了一条消息</span>
|
||||
<span class="edit" wx:if="{{message.flow === 'out' && message.type === 'TIMTextElem'}}" bindtap="resendMessage" data-value="{{message}}">重新编辑</span>
|
||||
</view>
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
|
||||
.revoke{
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center
|
||||
}
|
||||
.name {
|
||||
border-radius: 8px;
|
||||
font-size: 14px;
|
||||
padding: 6px 0px;
|
||||
}
|
||||
.edit{
|
||||
font-family: PingFangSC-Regular;
|
||||
font-size: 14px;
|
||||
color: #006eff;
|
||||
letter-spacing: 0;
|
||||
padding-left: 8px
|
||||
}
|
||||
+79
@@ -0,0 +1,79 @@
|
||||
import { parseGroupSystemNotice } from '../../../../../utils/message-parse';
|
||||
import { caculateTimeago } from '../../../../../utils/common';
|
||||
// eslint-disable-next-line no-undef
|
||||
Component({
|
||||
/**
|
||||
* 组件的属性列表
|
||||
*/
|
||||
properties: {
|
||||
message: {
|
||||
type: Object,
|
||||
value: {},
|
||||
observer(newVal) {
|
||||
this.setData({
|
||||
message: newVal,
|
||||
messageTime: caculateTimeago(newVal.time * 1000),
|
||||
renderDom: parseGroupSystemNotice(newVal),
|
||||
});
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
/**
|
||||
* 组件的初始数据
|
||||
*/
|
||||
data: {
|
||||
message: {},
|
||||
options: '处理',
|
||||
messageTime: '',
|
||||
renderDom: '',
|
||||
},
|
||||
lifetimes: {
|
||||
attached() {
|
||||
// 在组件实例进入页面节点树时执行
|
||||
},
|
||||
detached() {
|
||||
// 在组件实例被从页面节点树移除时执行
|
||||
},
|
||||
},
|
||||
/**
|
||||
* 组件的方法列表
|
||||
*/
|
||||
methods: {
|
||||
handleClick() {
|
||||
wx.showActionSheet({
|
||||
itemList: ['同意', '拒绝'],
|
||||
success: (res) => {
|
||||
this.triggerEvent('changeSystemMessageList', {
|
||||
message: this.data.message,
|
||||
});
|
||||
const option = {
|
||||
handleAction: 'Agree',
|
||||
handleMessage: '欢迎进群',
|
||||
message: this.data.message,
|
||||
};
|
||||
if (res.tapIndex === 1) {
|
||||
this.triggerEvent('changeSystemMessageList', {
|
||||
message: this.data.message,
|
||||
});
|
||||
option.handleAction = 'Reject';
|
||||
option.handleMessage = '拒绝申请';
|
||||
}
|
||||
wx.$TUIKit.handleGroupApplication(option)
|
||||
.then(() => {
|
||||
wx.showToast({ title: option.handleAction === 'Agree' ? '已同意申请' : '已拒绝申请' });
|
||||
})
|
||||
.catch((error) => {
|
||||
wx.showToast({
|
||||
title: error.message || '处理失败',
|
||||
icon: 'none',
|
||||
});
|
||||
});
|
||||
},
|
||||
});
|
||||
},
|
||||
|
||||
},
|
||||
|
||||
|
||||
});
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {}
|
||||
}
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
<view class="container">
|
||||
<view wx:if="{{message.payload.operationType === 1}}" class="card handle">
|
||||
<view>
|
||||
<view class="time" >{{messageTime}}</view>
|
||||
{{renderDom}}
|
||||
</view>
|
||||
<view class="choose">
|
||||
<view class="button" bindtap="handleClick"> {{options}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="card" wx:else>
|
||||
<view class="time">{{messageTime}}</view>
|
||||
{{renderDom}}
|
||||
</view>
|
||||
</view>
|
||||
+24
@@ -0,0 +1,24 @@
|
||||
.handle {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.card{
|
||||
font-size: 14px;
|
||||
margin: 20px;
|
||||
padding: 20px;
|
||||
box-sizing: border-box;
|
||||
border: 1px solid #abdcff;
|
||||
background-color: #f0faff;
|
||||
border-radius: 12px;
|
||||
}
|
||||
.time {
|
||||
|
||||
}
|
||||
.button{
|
||||
color: blue;
|
||||
border-radius: 8px;
|
||||
line-height: 30px;
|
||||
font-size: 16px;
|
||||
width: 70px;
|
||||
}
|
||||
+44
@@ -0,0 +1,44 @@
|
||||
import { parseText } from '../../../../../utils/message-parse';
|
||||
// eslint-disable-next-line no-undef
|
||||
Component({
|
||||
/**
|
||||
* 组件的属性列表
|
||||
*/
|
||||
properties: {
|
||||
message: {
|
||||
type: Object,
|
||||
value: {},
|
||||
observer(newVal) {
|
||||
// console.log(newVal)
|
||||
this.setData({
|
||||
renderDom: parseText(newVal),
|
||||
});
|
||||
},
|
||||
},
|
||||
isMine: {
|
||||
type: Boolean,
|
||||
value: true,
|
||||
},
|
||||
},
|
||||
|
||||
/**
|
||||
* 组件的初始数据
|
||||
*/
|
||||
data: {
|
||||
|
||||
},
|
||||
lifetimes: {
|
||||
attached() {
|
||||
// 在组件实例进入页面节点树时执行
|
||||
},
|
||||
detached() {
|
||||
// 在组件实例被从页面节点树移除时执行
|
||||
},
|
||||
},
|
||||
/**
|
||||
* 组件的方法列表
|
||||
*/
|
||||
methods: {
|
||||
|
||||
},
|
||||
});
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {}
|
||||
}
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
<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}}" />
|
||||
</view>
|
||||
</view>
|
||||
+81
@@ -0,0 +1,81 @@
|
||||
.text-message {
|
||||
max-width: 60vw;
|
||||
min-height: 50rpx;
|
||||
line-height: 50rpx;
|
||||
padding: 10rpx 24rpx;
|
||||
background: #F8F8F8;
|
||||
border: 1rpx solid #D9D9D9;
|
||||
border-radius: 2px 10px 10px 10px;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
flex-wrap: wrap;
|
||||
white-space: pre-wrap;
|
||||
}
|
||||
.my-text {
|
||||
position: relative;
|
||||
border-radius: 10px 10px 10px 10px;
|
||||
background: rgb(212, 239, 241);
|
||||
border: 1rpx solid #1ACAD3;
|
||||
}
|
||||
.my-text::after{
|
||||
content:'';
|
||||
position: absolute;
|
||||
top: 35rpx;
|
||||
right: -19rpx;
|
||||
transform: translate(-50%,-50%) rotate(-135deg);
|
||||
width: 16rpx;
|
||||
height: 16rpx;
|
||||
background: rgb(212, 239, 241);
|
||||
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: 35rpx;
|
||||
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;
|
||||
align-items: center;
|
||||
/*justify-content: flex-start;*/
|
||||
flex-wrap: wrap;
|
||||
outline: none;
|
||||
font-size: 34rpx;
|
||||
color: #333333;
|
||||
position: relative;
|
||||
max-width: 60vw;
|
||||
}
|
||||
.message-body-span-text {
|
||||
font-family: PingFangSC-Regular;
|
||||
font-weight: 400;
|
||||
color: #000000;
|
||||
letter-spacing: 0;
|
||||
line-height: 40rpx;
|
||||
/* font-size: 28rpx; */
|
||||
word-wrap: break-word;
|
||||
word-break: break-all;
|
||||
}
|
||||
.message-body-span-image {
|
||||
display: inline-block;
|
||||
width: 32rpx;
|
||||
height: 32rpx;
|
||||
margin: 0 4rpx;
|
||||
}
|
||||
.emoji-icon {
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
}
|
||||
+39
@@ -0,0 +1,39 @@
|
||||
import { parseGroupTip } from '../../../../../utils/message-parse';
|
||||
// eslint-disable-next-line no-undef
|
||||
Component({
|
||||
/**
|
||||
* 组件的属性列表
|
||||
*/
|
||||
properties: {
|
||||
message: {
|
||||
type: Object,
|
||||
value: {},
|
||||
observer(newVal) {
|
||||
this.setData({
|
||||
renderDom: parseGroupTip(newVal),
|
||||
});
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
/**
|
||||
* 组件的初始数据
|
||||
*/
|
||||
data: {
|
||||
|
||||
},
|
||||
lifetimes: {
|
||||
attached() {
|
||||
// 在组件实例进入页面节点树时执行
|
||||
},
|
||||
detached() {
|
||||
// 在组件实例被从页面节点树移除时执行
|
||||
},
|
||||
},
|
||||
/**
|
||||
* 组件的方法列表
|
||||
*/
|
||||
methods: {
|
||||
|
||||
},
|
||||
});
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {}
|
||||
}
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
<view class="tip-message">
|
||||
<view class="text-message">{{renderDom[0].text}}</view>
|
||||
</view>
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
.tip-message {
|
||||
width: 100%;
|
||||
}
|
||||
.text-message {
|
||||
text-align: center;
|
||||
font-size: 12px;
|
||||
color: #999999;
|
||||
}
|
||||
|
||||
+85
@@ -0,0 +1,85 @@
|
||||
import { parseVideo } from '../../../../../utils/message-parse';
|
||||
// eslint-disable-next-line no-undef
|
||||
Component({
|
||||
/**
|
||||
* 组件的属性列表
|
||||
*/
|
||||
properties: {
|
||||
message: {
|
||||
type: Object,
|
||||
value: {},
|
||||
observer(newVal) {
|
||||
this.setData({
|
||||
message: newVal,
|
||||
renderDom: parseVideo(newVal),
|
||||
});
|
||||
},
|
||||
},
|
||||
isMine: {
|
||||
type: Boolean,
|
||||
value: true,
|
||||
},
|
||||
},
|
||||
|
||||
/**
|
||||
* 组件的初始数据
|
||||
*/
|
||||
data: {
|
||||
message: {},
|
||||
showSaveFlag: Number,
|
||||
},
|
||||
|
||||
/**
|
||||
* 组件的方法列表
|
||||
*/
|
||||
methods: {
|
||||
showVideoFullScreenChange(event) {
|
||||
if (event.detail.fullScreen) {
|
||||
this.setData({
|
||||
showSaveFlag: 1,
|
||||
});
|
||||
} else {
|
||||
this.setData({
|
||||
showSaveFlag: 2,
|
||||
});
|
||||
}
|
||||
},
|
||||
// 1代表当前状态处于全屏,2代表当前状态不处于全屏。
|
||||
handleLongPress(e) {
|
||||
if (this.data.showSaveFlag === 1) {
|
||||
wx.showModal({
|
||||
content: '确认保存该视频?',
|
||||
success: (res) => {
|
||||
if (res.confirm) {
|
||||
wx.downloadFile({
|
||||
url: this.data.message.payload.videoUrl,
|
||||
success(res) {
|
||||
// 只要服务器有响应数据,就会把响应内容写入文件并进入 success 回调,业务需要自行判断是否下载到了想要的内容
|
||||
if (res.statusCode === 200) {
|
||||
wx.saveVideoToPhotosAlbum({
|
||||
filePath: res.tempFilePath,
|
||||
success() {
|
||||
wx.showToast({
|
||||
title: '保存成功!',
|
||||
duration: 800,
|
||||
icon: 'none',
|
||||
});
|
||||
},
|
||||
});
|
||||
}
|
||||
},
|
||||
fail(error) {
|
||||
wx.showToast({
|
||||
title: '保存失败!',
|
||||
duration: 800,
|
||||
icon: 'none',
|
||||
});
|
||||
},
|
||||
});
|
||||
}
|
||||
},
|
||||
});
|
||||
}
|
||||
},
|
||||
},
|
||||
});
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {}
|
||||
}
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
<view class="video-message" >
|
||||
<video class="video-box {{isMine?'my-video':''}}" src="{{renderDom[0].src}}"
|
||||
poster="{{message.payload.thumbUrl}}" error="videoError" bindfullscreenchange="showVideoFullScreenChange"
|
||||
bind:longpress="handleLongPress"></video>
|
||||
</view>
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
.video-message {
|
||||
width: 150px;
|
||||
height: 110px;
|
||||
max-width: 60vw;
|
||||
}
|
||||
.video-box {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
.my-video {
|
||||
border-radius: 10px 2px 10px 10px;
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {
|
||||
"Emoji": "../MessageElements/Emoji/index",
|
||||
"CommonWords": "../MessagePrivate/CommonWords/index",
|
||||
"OrderList": "../MessagePrivate/OrderList/index",
|
||||
"van-popup": "@vant/weapp/popup/index",
|
||||
"van-datetime-picker": "@vant/weapp/datetime-picker/index",
|
||||
"ServiceEvaluation": "../MessagePrivate/ServiceEvaluation/index",
|
||||
"t-dialog": "tdesign-miniprogram/dialog/dialog"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,161 @@
|
||||
<view class="TUI-message-input-container">
|
||||
<view class="TUI-commom-function">
|
||||
<view class="TUI-commom-function-item" data-key="10" bindtap="handleCommonFunctions">查看完整病历</view>
|
||||
<view class="TUI-commom-function-item" data-key="11" bindtap="handleCommonFunctions" wx:if="{{baseInfo.multi_point_status == 1 && baseInfo.inquiry_status==4 && baseInfo.multi_point_enable==1}}">在线开处方</view>
|
||||
<view class="TUI-commom-function-item" data-key="12" bindtap="handleCommonFunctions" wx:if="{{baseInfo.multi_point_status == 1 && baseInfo.inquiry_status==4 && baseInfo.multi_point_enable==1}}">预约视频时间</view>
|
||||
<view class="TUI-commom-function-item" data-key="13" bindtap="handleCommonFunctions" wx:if="{{baseInfo.multi_point_status == 1 && baseInfo.inquiry_status==4 && baseInfo.multi_point_enable==1}}">发起视频</view>
|
||||
</view>
|
||||
<view class="TUI-message-input">
|
||||
<image class="TUI-icon" bindtap="switchAudio"
|
||||
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'}}" >
|
||||
<textarea focus="{{false}}" hold-keyboard id="mytextarea" class="TUI-message-input-area" adjust-position="{{false}}" cursor-spacing="0"
|
||||
value="{{message}}" bindinput="onInputValueChange" maxlength="-1" type="text" auto-height="{{true}}"
|
||||
placeholder="请输入文字" placeholder-class="input-placeholder" confirm-type="return" show-confirm-bar="{{false}}"
|
||||
bindfocus="inputBindFocus"
|
||||
bindblur="inputBindBlur"
|
||||
bindconfirm="sendTextMessage"
|
||||
bindlinechange="inputBindLinechange"
|
||||
/>
|
||||
</view>
|
||||
<view wx:if="{{isAudio}}" class="TUI-message-input-main"
|
||||
catchlongpress="handleLongPress"
|
||||
catchtouchmove="handleTouchMove"
|
||||
catchtouchend="handleTouchEnd"
|
||||
catchtap="handleTouchCancel"
|
||||
catchtouchcancel="handleTouchCancel"
|
||||
style="display: flex; justify-content: center; font-size: 32rpx; font-family: PingFangSC-Regular; height: 30px">
|
||||
<text >{{text}}</text>
|
||||
</view>
|
||||
<view class="TUI-message-input-functions" hover-class="none">
|
||||
<!-- 打开emoji按钮 -->
|
||||
<view class="TUI-sendMessage-btn" wx:if="{{ has_emoji }}">
|
||||
<image class="TUI-icon" bindtap="handleEmoji" src="../../../../static/assets/face-emoji.svg" />
|
||||
</view>
|
||||
<view class="TUI-sendMessage-btn" >
|
||||
<view wx:if="{{!sendMessageBtn}}" bindtap="handleExtensions" class="TUI-sendMessage-btn">
|
||||
<image class="TUI-icon" src="{{static_host}}/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>
|
||||
<view wx:if="{{displayFlag === 'emoji'}}" class="TUI-Emoji-area">
|
||||
<Emoji bind:enterEmoji="appendMessage" />
|
||||
</view>
|
||||
<view wx:if="{{displayFlag === 'extension'}}" class="TUI-Extensions">
|
||||
<view class="TUI-Extension-slot MY-TUI-Extension-slot" bindtap="handleSendPicture">
|
||||
<image mode="widthFix" class="TUI-Extension-icon MY-TUI-Extension-icon" src="{{static_host}}/applet/doctor/static/images/chat/xiangji.png" />
|
||||
<view class="TUI-Extension-slot-name MY-TUI-Extension-slot-name">相机</view>
|
||||
</view>
|
||||
<view class="TUI-Extension-slot MY-TUI-Extension-slot" bindtap="handleSendImage">
|
||||
<image mode="widthFix" class="TUI-Extension-icon MY-TUI-Extension-icon" src="{{static_host}}/applet/doctor/static/images/chat/picture.png" />
|
||||
<view class="TUI-Extension-slot-name MY-TUI-Extension-slot-name">照片</view>
|
||||
</view>
|
||||
<view class="TUI-Extension-slot MY-TUI-Extension-slot" bindtap="showChangYongYu">
|
||||
<image mode="widthFix" class="TUI-Extension-icon MY-TUI-Extension-icon" src="{{static_host}}/applet/doctor/static/images/chat/wenzi.png" />
|
||||
<view class="TUI-Extension-slot-name MY-TUI-Extension-slot-name">常用语</view>
|
||||
</view>
|
||||
<view class="TUI-Extension-slot MY-TUI-Extension-slot" bindtap="showWenZhenBiao" wx:if="{{baseInfo.inquiry_status==4}}">
|
||||
<image mode="widthFix" class="TUI-Extension-icon MY-TUI-Extension-icon" src="{{static_host}}/applet/doctor/static/images/yishi/wenzhenicon.png" />
|
||||
<view class="TUI-Extension-slot-name MY-TUI-Extension-slot-name">问诊表</view>
|
||||
</view>
|
||||
<!-- <view class="TUI-Extension-slot" bindtap="handleSendPicture">
|
||||
<image class="TUI-Extension-icon" src="../../../../static/assets/take-photo.svg" />
|
||||
<view class="TUI-Extension-slot-name">相机</view>
|
||||
</view>
|
||||
<view class="TUI-Extension-slot" bindtap="handleSendImage">
|
||||
<image class="TUI-Extension-icon" src="../../../../static/assets/send-img.svg" />
|
||||
<view class="TUI-Extension-slot-name">照片</view>
|
||||
</view>
|
||||
<view class="TUI-Extension-slot" bindtap="handleSendImage">
|
||||
<image class="TUI-Extension-icon" src="../../../../static/assets/send-img.svg" />
|
||||
<view class="TUI-Extension-slot-name">常用语</view>
|
||||
</view>
|
||||
<view class="TUI-Extension-slot" bindtap="handleShootVideo">
|
||||
<image class="TUI-Extension-icon" src="../../../../static/assets/take-video.svg" />
|
||||
<view class="TUI-Extension-slot-name">拍摄视频</view>
|
||||
</view>
|
||||
<view class="TUI-Extension-slot" bindtap="handleSendVideo">
|
||||
<image class="TUI-Extension-icon" src="../../../../static/assets/send-video.svg" />
|
||||
<view class="TUI-Extension-slot-name">发送视频</view>
|
||||
</view>
|
||||
<view class="TUI-Extension-slot" data-value="{{1}}" bindtap="handleCheckAuthorize" >
|
||||
<image class="TUI-Extension-icon" src="../../../../static/assets/audio-calling.svg" />
|
||||
<view class="TUI-Extension-slot-name">语音通话</view>
|
||||
</view>
|
||||
<view class="TUI-Extension-slot" data-value="{{2}}" bindtap="handleCheckAuthorize" >
|
||||
<image class="TUI-Extension-icon" src="../../../../static/assets/video-calling.svg" />
|
||||
<view class="TUI-Extension-slot-name">视频通话</view>
|
||||
</view>
|
||||
<view class="TUI-Extension-slot" bindtap="handleServiceEvaluation">
|
||||
<image class="TUI-Extension-icon" src="../../../../static/assets/service-assess.svg" />
|
||||
<view class="TUI-Extension-slot-name">服务评价</view>
|
||||
</view>
|
||||
<view class="TUI-Extension-slot" bindtap="handleSendOrder">
|
||||
<image class="TUI-Extension-icon" src="../../../../static/assets/send-order.svg" />
|
||||
<view class="TUI-Extension-slot-name">发送订单</view>
|
||||
</view> -->
|
||||
</view>
|
||||
<CommonWords class="tui-cards" display="{{displayCommonWords}}" bind:sendMessage="$handleSendTextMessage" bind:close="$handleCloseCards" />
|
||||
<OrderList class="tui-cards" display="{{displayOrderList}}" bind:sendCustomMessage="$handleSendCustomMessage" bind:close="$handleCloseCards"/>
|
||||
<ServiceEvaluation class="tui-cards" display="{{displayServiceEvaluation}}" bind:sendCustomMessage="$handleSendCustomMessage" bind:close="$handleCloseCards"/>
|
||||
</view>
|
||||
<view class="record-modal" wx:if="{{popupToggle}}" bind:longpress="handleLongPress"
|
||||
bind:touchmove="handleTouchMove"
|
||||
bind:touchend="handleTouchEnd">
|
||||
<view class="wrapper">
|
||||
<view class="modal-loading">
|
||||
</view>
|
||||
</view>
|
||||
<view class="recordtime">
|
||||
00:{{recordtime<10?'0'+recordtime:recordtime}}
|
||||
</view>
|
||||
<view class="modal-title">
|
||||
{{title}}
|
||||
</view>
|
||||
|
||||
</view>
|
||||
<t-dialog
|
||||
visible="{{ dialog_visible }}"
|
||||
title="温馨提示"
|
||||
content="{{dialog_message}}"
|
||||
>
|
||||
<view slot="cancel-btn" class="dialog dialog_cancel_btn" bindtap="cancelDialog">
|
||||
取消
|
||||
</view>
|
||||
<view slot="confirm-btn" class="dialog dialog_confirm_btn" bindtap="confirmDialog">
|
||||
确定
|
||||
</view>
|
||||
</t-dialog>
|
||||
|
||||
<t-dialog
|
||||
visible="{{ sub_visible }}"
|
||||
title="温馨提示"
|
||||
content="您已关闭订阅消息通知,请点击“确认”按钮在设置中打开订阅通知。"
|
||||
>
|
||||
<view slot="cancel-btn" class="dialog dialog_cancel_btn" bindtap="subcancelDialog">
|
||||
取消
|
||||
</view>
|
||||
<view slot="confirm-btn" class="dialog dialog_confirm_btn" bindtap="subconfirmDialog">
|
||||
确定
|
||||
</view>
|
||||
</t-dialog>
|
||||
<van-popup
|
||||
round
|
||||
show="{{ showTimepicker}}"
|
||||
position="bottom"
|
||||
custom-style="height: 50%"
|
||||
>
|
||||
<van-datetime-picker
|
||||
bind:cancel="cancelTimepicker"
|
||||
title="预约视频时间"
|
||||
bind:confirm="confirmTimepicker"
|
||||
value="{{ currentDate }}"
|
||||
min-date="{{ minDate }}"
|
||||
formatter="{{ formatter }}"
|
||||
/>
|
||||
|
||||
</van-popup>
|
||||
@@ -0,0 +1,222 @@
|
||||
.TUI-message-input-container {
|
||||
background-color: #fff;
|
||||
width: 100vw;
|
||||
z-index: 9999;
|
||||
}
|
||||
|
||||
.TUI-message-input {
|
||||
display: flex;
|
||||
padding-bottom: 16rpx;
|
||||
align-items: center;
|
||||
background-color: #fff;
|
||||
width: 95vw;
|
||||
overflow: scroll;
|
||||
margin: 0 auto;
|
||||
}
|
||||
.TUI-commom-function {
|
||||
background-color: blueviolet;
|
||||
display: flex;
|
||||
flex-wrap: nowrap;
|
||||
width: 95vw;
|
||||
height: 106rpx;
|
||||
background-color: #FFF;
|
||||
align-items: center;
|
||||
margin: 0 auto;
|
||||
}
|
||||
.TUI-commom-function-item {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
font-size: 28rpx;
|
||||
color: #3CC7C0;
|
||||
height: 48rpx;
|
||||
margin-left: 16rpx;
|
||||
border-radius: 10rpx;
|
||||
background-color: #fff;
|
||||
border: 1px solid #3CC7C0;
|
||||
padding: 0 20rpx;
|
||||
}
|
||||
.TUI-commom-function-item:first-child{
|
||||
border: 1px solid #999;
|
||||
color: #999;
|
||||
}
|
||||
.TUI-message-input-functions {
|
||||
flex: 2;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
.TUI-message-input-main {
|
||||
min-height: 78rpx;
|
||||
background-color: #F1F1F1;
|
||||
flex: 9;
|
||||
margin: 0 10rpx;
|
||||
padding: 0 5rpx;
|
||||
border-radius: 10rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
.TUI-message-input-main-focus {
|
||||
min-height: 78rpx;
|
||||
background-color: #F1F1F1;
|
||||
flex: 9;
|
||||
margin: 0 10rpx;
|
||||
padding: 0 5rpx;
|
||||
border-radius: 10rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
.TUI-message-input-area {
|
||||
width: 100%;
|
||||
max-height: 100px;
|
||||
/* 最多显示10行 */
|
||||
line-height: 30rpx;
|
||||
overflow: scroll;
|
||||
padding: 20rpx 20rpx;
|
||||
}
|
||||
.TUI-icon {
|
||||
width: 50rpx;
|
||||
height: 50rpx;
|
||||
margin: 0 16rpx;
|
||||
}
|
||||
.TUI-Extensions {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
width: 100vw;
|
||||
height: 100px;
|
||||
margin-left: 14rpx;
|
||||
margin-right: 14rpx;
|
||||
}
|
||||
|
||||
.TUI-Extension-slot {
|
||||
width: 128rpx;
|
||||
height: 170rpx;
|
||||
margin-left: 26rpx;
|
||||
margin-right: 26rpx;
|
||||
margin-top: 24rpx;
|
||||
}
|
||||
|
||||
.TUI-Extension-icon {
|
||||
width: 128rpx;
|
||||
height: 128rpx;
|
||||
border-radius: 25%;
|
||||
}
|
||||
|
||||
.TUI-sendMessage-btn {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
width: 90%;
|
||||
text-align: center;
|
||||
justify-content: center;
|
||||
border-radius: 10rpx;
|
||||
color: #fff;
|
||||
max-height: 200rpx;
|
||||
padding: 13rpx 0;
|
||||
height: 50rpx;
|
||||
}
|
||||
.TUI-sendMessage-btn-input{
|
||||
background-color: #3CC7C0;
|
||||
}
|
||||
|
||||
.TUI-Emoji-area {
|
||||
width: 100vw;
|
||||
height: 450rpx;
|
||||
}
|
||||
|
||||
.TUI-Extension-slot-name {
|
||||
line-height: 34rpx;
|
||||
font-size: 24rpx;
|
||||
color: #333333;
|
||||
letter-spacing: 0;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.record-modal {
|
||||
height: 300rpx;
|
||||
width: 60vw;
|
||||
background-color: #000;
|
||||
opacity: 0.8;
|
||||
position: fixed;
|
||||
top: 670rpx;
|
||||
z-index: 9999;
|
||||
left: 20vw;
|
||||
border-radius: 24rpx;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
.record-modal .wrapper {
|
||||
display: flex;
|
||||
height: 140rpx;
|
||||
box-sizing: border-box;
|
||||
padding: 8vw;
|
||||
}
|
||||
.recordtime{
|
||||
display: flex;
|
||||
font-size: 32rpx;
|
||||
margin-bottom: 10rpx;
|
||||
justify-content: center;
|
||||
color:#fff;
|
||||
}
|
||||
.record-modal .wrapper .modal-loading {
|
||||
opacity: 1;
|
||||
width: 40rpx;
|
||||
height: 16rpx;
|
||||
border-radius: 4rpx;
|
||||
background-color: #006fff;
|
||||
animation: loading 2s
|
||||
cubic-bezier(0.17, 0.37, 0.43, 0.67) infinite;
|
||||
}
|
||||
.modal-title {
|
||||
text-align: center;
|
||||
color: #fff;
|
||||
}
|
||||
@keyframes loading{
|
||||
0% {
|
||||
transform: translate(0,0)
|
||||
}
|
||||
50%
|
||||
{
|
||||
transform :translate(30vw,0);
|
||||
background-color: #f5634a;
|
||||
width :40px;
|
||||
}
|
||||
100%
|
||||
{transform: translate(0,0);
|
||||
}
|
||||
}
|
||||
.MY-TUI-Extension-slot{
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-around;
|
||||
align-items: center;
|
||||
}
|
||||
.MY-TUI-Extension-icon{
|
||||
width: 50%;
|
||||
background-color: #F4F4F4;
|
||||
padding: 30rpx;
|
||||
}
|
||||
.MY-TUI-Extension-slot-name{
|
||||
background-color: #fff;
|
||||
font-size: 30rpx;
|
||||
color: #666666;
|
||||
}
|
||||
.dialog{
|
||||
width: 50%;
|
||||
text-align: center;
|
||||
height: 100rpx;
|
||||
line-height: 100rpx;
|
||||
}
|
||||
.dialog_cancel_btn{
|
||||
border-top: 1px solid #E9E9E9;
|
||||
border-right: 1px solid #E9E9E9;
|
||||
}
|
||||
.dialog_confirm_btn{
|
||||
border-top: 1px solid #E9E9E9;
|
||||
color: #3CC7C0;
|
||||
}
|
||||
.van-picker__cancel{
|
||||
color: rgba(0,0,0,0.65)!important;
|
||||
}
|
||||
.van-picker__confirm{
|
||||
color: #3CC7C0!important;
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
var concat = function() {
|
||||
if (arguments[0] === 'GROUP' && arguments[2].indexOf('@TGS#') !== -1) {
|
||||
arguments[2] = arguments[2].replace('@TGS#', '')
|
||||
}
|
||||
return arguments[1] + arguments[2]
|
||||
}
|
||||
var connect = function() {
|
||||
return arguments[0] + arguments[1]
|
||||
}
|
||||
var formateText=function (value){
|
||||
if(!value){
|
||||
return {}
|
||||
}else{
|
||||
return JSON.parse(value)
|
||||
}
|
||||
}
|
||||
module.exports = {
|
||||
concat: concat,
|
||||
connect: connect,
|
||||
formateText:formateText
|
||||
};
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,20 @@
|
||||
{
|
||||
"component": true,
|
||||
"enablePullDownRefresh": true,
|
||||
"usingComponents": {
|
||||
"TextMessage": "../MessageElements/TextMessage/index",
|
||||
"ImageMessage": "../MessageElements/ImageMessage/index",
|
||||
"VideoMessage": "../MessageElements/VideoMessage/index",
|
||||
"AudioMessage": "../MessageElements/AudioMessage/index",
|
||||
"CustomMessage": "../MessageElements/CustomMessage/index",
|
||||
"TipMessage": "../MessageElements/TipMessage/index",
|
||||
"SystemMessage": "../MessageElements/SystemMessage/index",
|
||||
"FaceMessage": "../MessageElements/FaceMessage/index",
|
||||
"FileMessage": "../MessageElements/FileMessage/index",
|
||||
"MergerMessage": "../MessageElements/MergerMessage/index",
|
||||
"RevokeMessage": "../MessageElements/RevokeMessage/index",
|
||||
"van-loading": "@vant/weapp/loading/index",
|
||||
"van-icon": "@vant/weapp/icon/index",
|
||||
"t-message": "tdesign-miniprogram/message/message"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,99 @@
|
||||
<view class="container">
|
||||
|
||||
<scroll-view class="message-list-container" scroll-y="true" scroll-into-view="{{jumpAim}}" refresher-enabled="{{true}}" bindrefresherrefresh="refresh" refresher-triggered="{{triggered}}" lower-threshold="200" bindscrolltolower="scrollHandler" bindscrolltoupper="refresh" upper-threshold="100">
|
||||
<view class="no-message" wx:if="{{isCompleted}}">没有更多啦</view>
|
||||
<view style="width: 100%;text-align: center;position: absolute;top: 20rpx;">
|
||||
<van-loading size="24px" wx:if="{{list_first_loading}}" vertical color="#1989fa">加载中...</van-loading>
|
||||
</view>
|
||||
<view class="t-message" wx:if="{{conversation.type !== '@TIM#SYSTEM'}}" wx:for="{{messageList}}" wx:key="index" data-index ='{{index}}'>
|
||||
<view class="time-pop-mask" data-value="{{item.time}}" wx:if="{{item.showMessageTime}}">
|
||||
<view class="showmessagetime 1" wx:if="{{item.isShowTime}}">
|
||||
<text class="time" wx:if="{{!item.isDeleted && !item.isRevoked}}">{{item.messageTime}} </text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="time-pop-mask" data-value="{{item.time}}" wx:if="{{item.showMessageHistoryTime}}">
|
||||
<view class="showmessagetime 2" wx:if="{{item.isShowHistoryTime && !item.isShowTime && !item.isShowMoreHistoryTime}}">
|
||||
<text class="time" wx:if="{{!item.isDeleted && !item.isRevoked}}">{{item.messageTime}} </text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="time-pop-mask" wx:if="{{item.isShowMoreHistoryTime}}">
|
||||
<view class="showmessagetime 3">
|
||||
<text class="time">{{newArr[item.ID]}} </text>
|
||||
</view>
|
||||
</view>
|
||||
<view id="{{concat.concat(conversation.type,'ID-',item.ID)}}">
|
||||
<RevokeMessage wx:if="{{item.isRevoked}}" message="{{item}}" isMine="{{item.flow === 'out'}}" bind:resendMessage="resendMessage"/>
|
||||
</view>
|
||||
<view class="t-message-item" wx:if="{{!item.isDeleted && !item.isRevoked }}" bindtap="handleEditToggleAvatar" >
|
||||
<view wx:if="{{Show}}" catchtap="handleEditToggleAvatar">
|
||||
<view class="label-pop" wx:if="{{messageID === concat.connect('ID-',item.ID)}}" class="{{item.flow === 'out' ? 'label-self-body' : 'label-recieve-body'}}" >
|
||||
<view class="label-pop-mask" >
|
||||
<view class="copymessage" wx:if="{{item.type === 'TIMTextElem'|| item.type === 'TIMFaceElem'}}" catchtap="copyMessage" > <text>复制</text>
|
||||
</view>
|
||||
<!-- <view class="deletemessage" catchtap="deleteMessage" > <text> 删除</text></view>
|
||||
<view class="revokemessage" wx:if="{{item.flow === 'out'}}" bindtap="revokeMessage"><text> |撤回</text></view> -->
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<TipMessage wx:if="{{item.type === 'TIMGroupTipElem'}}" message="{{item}}"/>
|
||||
<view wx:if="{{item.type !== 'TIMGroupTipElem'}}" class="{{item.flow === 'out' ? 't-self-message':'t-recieve-message'}}" >
|
||||
<image class="t-message-avatar" wx:if="{{item.flow === 'in' && !item.no_avatar }}" src="{{item.avatar || static_host+'/applet/doctor/static/images/default_photo.png'}}" data-value="{{item}}" bindtap="getMemberProfile" />
|
||||
<!-- <view class="read-receipts" wx:if="{{conversation.type === 'C2C' && item.flow==='out' }}">
|
||||
<view wx:if="{{item.isPeerRead}}" >已读</view>
|
||||
<view wx:else>未读</view>
|
||||
</view> -->
|
||||
<view class="message_send_status" wx:if="{{conversation.type === 'C2C' && item.flow==='out' }}">
|
||||
<van-loading type="spinner" wx:if="{{item.status == 'unSend'}}" size="24px" />
|
||||
<van-icon name="fail" color="red" wx:if="{{item.status == 'fail'}}" />
|
||||
<!-- <van-icon name="success" color="green" wx:if="{{item.status == 'success'}}" /> -->
|
||||
</view>
|
||||
<view wx:if="{{item.flow === 'out' && item.ID === errorMessageID || item.status === 'fail'}}" class="t-message-error-box">
|
||||
<image class="t-message-error" wx:if="{{showMessageError}}" src='../../../../static/images/tuikit-msg-error.png' bindtap="ResendMessage" />
|
||||
</view>
|
||||
<view class="{{item.flow === 'out' ? 't-self-message-body':'t-recieve-message-body'}}" catch:longpress="handleLongPress" data-index='{{index}}' data-value='{{item}}' id="{{concat.concat(conversation.type,'ID-',item.ID)}}" message-value="{{item}}" >
|
||||
<TextMessage wx:if="{{item.type === 'TIMTextElem'}}" message="{{item}}" isMine="{{item.flow === 'out'}}" />
|
||||
<ImageMessage wx:if="{{item.type === 'TIMImageElem'}}" message="{{item}}" isMine="{{item.flow === 'out'}}" />
|
||||
<VideoMessage wx:if="{{item.type === 'TIMVideoFileElem'}}" message="{{item}}" isMine="{{item.flow === 'out'}}"/>
|
||||
<AudioMessage wx:if="{{item.type === 'TIMSoundElem'}}" message="{{item}}" data-index ='{{index}}' messageList="{{messageList}}" bind:closeAudio="closeAudio" id="audio{{item.ID}}" isMine="{{item.flow === 'out'}}"/>
|
||||
<CustomMessage wx:if="{{item.type === 'TIMCustomElem'}}" message="{{item}}" isMine="{{item.flow === 'out'}}" bindtap="handleJumpLink" data-value = "{{item}}" patient_family_data="{{concat.formateText(item.cloudCustomData).patient_family_data}}"/>
|
||||
<FaceMessage wx:if="{{item.type === 'TIMFaceElem'}}" message="{{item}}" isMine="{{item.flow === 'out'}}"/>
|
||||
<FileMessage wx:if="{{item.type === 'TIMFileElem'}}" message="{{item}}" isMine="{{item.flow === 'out'}}"/>
|
||||
<MergerMessage wx:if="{{item.type === 'TIMRelayElem'}}" message="{{item}}" isMine="{{item.flow === 'out'}}"/>
|
||||
</view>
|
||||
|
||||
<image class="t-message-avatar" wx:if="{{item.flow === 'out' && !item.no_avatar }}" src="{{item.avatar || static_host+'/applet/doctor/static/images/default_photo.png'}}" data-value="{{item}}" bindtap="getMemberProfile"/>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="t-message" wx:if="{{conversation.type === '@TIM#SYSTEM'}}" wx:for="{{messageList}}" wx:key="index" id="{{filterSystemMessageID}}" data-value="{{item.ID}}">
|
||||
<SystemMessage message="{{item}}" bind:changeSystemMessageList="changeSystemMessageList"></SystemMessage>
|
||||
</view>
|
||||
</scroll-view>
|
||||
<image src="{{static_host}}/applet/doctor/static/images/yishi/medinceList.png" class="medList" mode="" bindtap="goMedinceList"/>
|
||||
</view>
|
||||
<view wx:if="{{showDownJump}}" bindtap="handleJumpNewMessage">
|
||||
<view class="new-message-item" >
|
||||
<view class="new-message-box">
|
||||
<image class="icon-left" src="../../../../static/assets/down.svg"/>
|
||||
<text>{{showNewMessageCount.length}}条新消息</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view wx:if="{{showUpJump}}" bindtap="handleJumpUnreadMessage" >
|
||||
<view class="unread-message-item" >
|
||||
<view class="unread-message-box">
|
||||
<image class="icon-left" src="../../../static/assets/up.svg"/>
|
||||
<text wx:if="{{isLostsOfUnread}}"> 99+条未读</text>
|
||||
<text wx:else> {{unreadCount}}条未读</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<t-message id="t-message" bindtap="handleMessagePath">
|
||||
<view slot="content">
|
||||
<view class="content_title">{{message_title}}</view>
|
||||
<view class="content_desc">{{message_desc}}</view>
|
||||
</view>
|
||||
</t-message>
|
||||
<wxs src = './concat.wxs' module = 'concat'/>
|
||||
|
||||
|
||||
@@ -0,0 +1,278 @@
|
||||
.container{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
position: relative;
|
||||
background-color: #F4F4F4;
|
||||
}
|
||||
.message-list-container {
|
||||
/* margin-top: 20rpx; */
|
||||
width: 100%;
|
||||
height: calc(100%);
|
||||
background-color: #F4F4F4;
|
||||
}
|
||||
.t-message-item {
|
||||
/*max-width: 60vw;*/
|
||||
padding: 14rpx 0;
|
||||
}
|
||||
.t-message{
|
||||
position: relative;
|
||||
z-index: -9;
|
||||
width: calc(100vw - 40rpx);
|
||||
padding: 10rpx 20rpx 20rpx 20rpx;
|
||||
}
|
||||
.t-recieve-message {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-items: flex-start;
|
||||
width: 100vw;
|
||||
}
|
||||
.t-message-avatar {
|
||||
margin-left: 20rpx;
|
||||
margin-right: 12rpx;
|
||||
border-radius: 50%;
|
||||
width: 80rpx;
|
||||
height: 80rpx;
|
||||
}
|
||||
.t-self-message {
|
||||
position: relative;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: flex-end;
|
||||
word-break: break-all;
|
||||
}
|
||||
.t-self-message-body {
|
||||
display: flex;
|
||||
justify-content: flex-start;
|
||||
flex-wrap: wrap;
|
||||
outline: none;
|
||||
}
|
||||
.t-recieve-message-body {
|
||||
display: flex;
|
||||
justify-content: flex-start;
|
||||
flex-wrap: wrap;
|
||||
outline: none;
|
||||
/*background: #F8F8F8;*/
|
||||
border-radius: 2px 10px 10px 10px;
|
||||
margin-left: 8rpx;
|
||||
}
|
||||
|
||||
.read-receipts {
|
||||
line-height: 42px;
|
||||
height: 42px;
|
||||
font-size: 12px;
|
||||
color: #6e7981;
|
||||
margin-right: 10px
|
||||
}
|
||||
.message_send_status {
|
||||
line-height: 42px;
|
||||
height: 42px;
|
||||
font-size: 12px;
|
||||
color: #6e7981;
|
||||
margin-right: 10px
|
||||
}
|
||||
.no-message {
|
||||
text-align: center;
|
||||
position: fixed;
|
||||
width: 100%;
|
||||
font-size: 12px;
|
||||
color: #a5b5c1;
|
||||
height: 40px;
|
||||
top: -40px;
|
||||
right: 0;
|
||||
}
|
||||
.label-pop{
|
||||
position: absolute;
|
||||
top: -15px;
|
||||
left: 70px;
|
||||
background: white;
|
||||
width: 200rpx;
|
||||
}
|
||||
.label-pop-mask {
|
||||
padding: 2px 4px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
.label-recieve-body{
|
||||
position: absolute;
|
||||
top: -25px;
|
||||
left: 65px;
|
||||
background: black;
|
||||
padding-right: 3px;
|
||||
padding-left: 3px;
|
||||
background-color: black;
|
||||
z-index: 100;
|
||||
box-shadow: 0 2px 16px 0 rgba(0,0,0,0.08);
|
||||
border-radius: 8rpx;
|
||||
}
|
||||
.label-recieve-body:after{
|
||||
content: "";
|
||||
display: block;
|
||||
border-width: 20px;
|
||||
position: absolute;
|
||||
bottom: -27px;
|
||||
left: 8px;
|
||||
border-style: solid dashed dashed;
|
||||
border-color: black transparent transparent;
|
||||
font-size: 0;
|
||||
line-height: 0;
|
||||
margin-left: 9px;
|
||||
border-top-width: 8px;
|
||||
border-right-width: 3px;
|
||||
border-bottom-width: 20px;
|
||||
border-left-width: 3px;
|
||||
border-top-style: solid;
|
||||
border-right-style: dashed;
|
||||
border-bottom-style: dashed;
|
||||
border-left-style: dashed;
|
||||
border-top-color: black;
|
||||
border-right-color: transparent;
|
||||
border-bottom-color: transparent;
|
||||
border-left-color: transparent;
|
||||
}
|
||||
.label-self-body{
|
||||
position: absolute;
|
||||
top: -25px;
|
||||
right: 50px;
|
||||
background: black;
|
||||
padding-right: 3px;
|
||||
padding-left: 3px;
|
||||
background-color: black;
|
||||
z-index: 100;
|
||||
box-shadow: 0 2px 16px 0 rgba(0,0,0,0.08);
|
||||
border-radius: 8rpx;
|
||||
}
|
||||
.label-self-body:after{
|
||||
content: "";
|
||||
display: block;
|
||||
border-width: 20px;
|
||||
position: absolute;
|
||||
bottom: -27px;
|
||||
left: 0px;
|
||||
border-style: solid dashed dashed;
|
||||
border-color: black transparent transparent;
|
||||
font-size: 0;
|
||||
line-height: 0;
|
||||
margin-left: 9px;
|
||||
border-top-width: 8px;
|
||||
border-right-width: 3px;
|
||||
border-bottom-width: 20px;
|
||||
border-left-width: 3px;
|
||||
border-top-style: solid;
|
||||
border-right-style: dashed;
|
||||
border-bottom-style: dashed;
|
||||
border-left-style: dashed;
|
||||
border-top-color: black;
|
||||
border-right-color: transparent;
|
||||
border-bottom-color: transparent;
|
||||
border-left-color: transparent;
|
||||
}
|
||||
.deletemessage{
|
||||
font-size: 14px;
|
||||
color: white;
|
||||
}
|
||||
.revokemessage{
|
||||
font-size: 14px;
|
||||
color: white;
|
||||
}
|
||||
.copymessage{
|
||||
font-size: 14px;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.new-message-item{
|
||||
position: absolute;
|
||||
right: 30px;
|
||||
bottom: 180px;
|
||||
background: black;
|
||||
padding-right: 3px;
|
||||
padding-left: 3px;
|
||||
background-color: black;
|
||||
z-index: 6;
|
||||
box-shadow: 0 2px 16px 0 rgba(0,0,0,0.08);
|
||||
border-radius: 8rpx;
|
||||
}
|
||||
.new-message-box{
|
||||
display: flex;
|
||||
font-size: 14px;
|
||||
color: white;
|
||||
padding: 2px;
|
||||
}
|
||||
.icon-left{
|
||||
height: 28rpx;
|
||||
width: 28rpx;
|
||||
color: black;
|
||||
background-color: black;
|
||||
padding-top: 2px;
|
||||
}
|
||||
.videomessage-show{
|
||||
background: black
|
||||
}
|
||||
.change-message{
|
||||
width: 100%;
|
||||
height: 200rpx
|
||||
}
|
||||
.unread-message-item{
|
||||
position: absolute;
|
||||
right: 30px;
|
||||
top: 180px;
|
||||
background: black;
|
||||
padding-right: 3px;
|
||||
padding-left: 3px;
|
||||
background-color: black;
|
||||
z-index: 9;
|
||||
box-shadow: 0 2px 16px 0 rgba(0,0,0,0.08);
|
||||
border-radius: 8rpx;
|
||||
}
|
||||
.unread-message-box{
|
||||
display: flex;
|
||||
font-size: 14px;
|
||||
color: white;
|
||||
padding: 2px;
|
||||
}
|
||||
.time-self-body{
|
||||
position: absolute;
|
||||
top: -14px;
|
||||
right: 67px;
|
||||
}
|
||||
.time-recieve-body{
|
||||
position: absolute;
|
||||
top: -13px;
|
||||
left: 65px;
|
||||
}
|
||||
.time{
|
||||
font-size: 26rpx;
|
||||
color: #333333;
|
||||
}
|
||||
.t-message-error-box{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding-right: 6px;
|
||||
}
|
||||
.t-message-error{
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
}
|
||||
.showmessagetime{
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
.rewrite{
|
||||
padding-left: 5px;
|
||||
color: blue;
|
||||
}
|
||||
.content_title{
|
||||
font-size: 32rpx;
|
||||
color: #000;
|
||||
}
|
||||
.content_desc{
|
||||
font-size: 28rpx;
|
||||
color: rgb(146, 144, 144);
|
||||
}
|
||||
.medList{
|
||||
position: absolute;
|
||||
left:0;
|
||||
bottom:10rpx;
|
||||
width:153rpx;
|
||||
height: 159rpx;
|
||||
}
|
||||
+67
@@ -0,0 +1,67 @@
|
||||
const commonWordsList = [
|
||||
'什么时候发货',
|
||||
'发什么物流',
|
||||
'为什么物流一直没更新',
|
||||
'最新优惠',
|
||||
'包邮吗',
|
||||
'修改地址信息',
|
||||
'修改收件人信息',
|
||||
'物流一直显示正在揽收',
|
||||
'问题A',
|
||||
'问题B',
|
||||
];
|
||||
|
||||
// eslint-disable-next-line no-undef
|
||||
Component({
|
||||
/**
|
||||
* 组件的属性列表
|
||||
*/
|
||||
properties: {
|
||||
display: {
|
||||
type: Boolean,
|
||||
value: '',
|
||||
observer(newVal) {
|
||||
this.setData({
|
||||
displayTag: newVal,
|
||||
});
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
/**
|
||||
* 组件的初始数据
|
||||
*/
|
||||
data: {
|
||||
displayTag: true,
|
||||
words: '',
|
||||
commonWordsMatch: commonWordsList,
|
||||
},
|
||||
|
||||
/**
|
||||
* 组件的方法列表
|
||||
*/
|
||||
methods: {
|
||||
handleClose() {
|
||||
this.triggerEvent('close', {
|
||||
key: '0',
|
||||
});
|
||||
},
|
||||
wordsInput(e) {
|
||||
this.data.commonWordsMatch = [],
|
||||
commonWordsList.forEach((item) => {
|
||||
if (item.indexOf(e.detail.value) > -1) {
|
||||
this.data.commonWordsMatch.push(item);
|
||||
}
|
||||
});
|
||||
this.setData({
|
||||
words: e.detail.value,
|
||||
commonWordsMatch: this.data.commonWordsMatch,
|
||||
});
|
||||
},
|
||||
sendMessage(e) {
|
||||
this.triggerEvent('sendMessage', {
|
||||
message: e.currentTarget.dataset.words,
|
||||
});
|
||||
},
|
||||
},
|
||||
});
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {}
|
||||
}
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
<view wx:if="{{displayTag}}" class="tui-common-words-container">
|
||||
<view class="tui-common-words-box">
|
||||
<view class="tui-common-words-title">
|
||||
<view>请选择你要发送的常用语</view>
|
||||
<view style="color: #006EFF; font-family: PingFangSC-Regular;" class="tui-common-words-close" bindtap="handleClose">关闭</view>
|
||||
</view>
|
||||
<view class="tui-search-bar">
|
||||
<image class="tui-searchcion" src="../../../../static/assets/serach-icon.svg" />
|
||||
<input class="tui-search-bar-input" value="{{words}}" placeholder="请输入您想要提出的问题" bindinput='wordsInput'/>
|
||||
</view>
|
||||
<scroll-view class="tui-common-words-list" scroll-y="true" enable-flex="true">
|
||||
<view class="tui-common-words-item" wx:key="index" bindtap="sendMessage" data-words="{{item}}" wx:for="{{commonWordsMatch}}">{{item}}</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</view>
|
||||
+82
@@ -0,0 +1,82 @@
|
||||
.tui-common-words-container {
|
||||
position: fixed;
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
z-index: 100;
|
||||
top: 0;
|
||||
background: rgba(0,0,0,0.5);
|
||||
}
|
||||
|
||||
.tui-common-words-box {
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
height: 60%;
|
||||
bottom: 0;
|
||||
background: rgba(255,255,255,1);
|
||||
padding-bottom: 68rpx;
|
||||
z-index: 200;
|
||||
}
|
||||
|
||||
.tui-common-words-title {
|
||||
display: flex;
|
||||
flex-wrap: nowrap;
|
||||
justify-content: space-between;
|
||||
padding-left: 40rpx;
|
||||
padding-right: 40rpx;
|
||||
padding-top: 48rpx;
|
||||
font-family: PingFangSC-Medium;
|
||||
font-size: 36rpx;
|
||||
color: #000000;
|
||||
letter-spacing: 0;
|
||||
line-height: 50rpx;
|
||||
}
|
||||
|
||||
.tui-search-bar {
|
||||
display: flex;
|
||||
flex-wrap: nowrap;
|
||||
align-items: center;
|
||||
margin: 32rpx 40rpx;
|
||||
width: 670rpx;
|
||||
height: 80rpx;
|
||||
background: #FFFFFF;
|
||||
border-radius: 40rpx;
|
||||
border-radius: 40rpx;
|
||||
background-color: #F8F8F8;
|
||||
}
|
||||
|
||||
.tui-searchcion {
|
||||
display: inline-block;
|
||||
margin-left: 24rpx;
|
||||
width: 48rpx;
|
||||
height: 48rpx;
|
||||
}
|
||||
|
||||
.tui-search-bar-input {
|
||||
margin-left: 16rpx;
|
||||
line-height: 40rpx;
|
||||
font-size: 28rpx;
|
||||
width: 100%;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.tui-common-words-list {
|
||||
position: absolute;
|
||||
top: 242rpx;
|
||||
bottom: 68rpx;
|
||||
width: 750rpx;
|
||||
}
|
||||
|
||||
.tui-common-words-item {
|
||||
width: 750rpx;
|
||||
height: 112rpx;
|
||||
border-bottom: 2rpx solid #EEF0F3;
|
||||
background-color: #FFFFFF;
|
||||
font-family: PingFangSC-Regular;
|
||||
font-size: 32rpx;
|
||||
color: #333333;
|
||||
letter-spacing: 0;
|
||||
line-height: 44rpx;
|
||||
padding: 0 40rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
+105
@@ -0,0 +1,105 @@
|
||||
import constant from '../../../../../utils/constant';
|
||||
|
||||
const orderList = [
|
||||
{
|
||||
orderNum: 1,
|
||||
time: '2021-7-20 20:45',
|
||||
title: '即时通信 IM 首购活动',
|
||||
description: '单用户限购1件',
|
||||
imageUrl: 'https://sdk-web-1252463788.cos.ap-hongkong.myqcloud.com/component/TUIKit/assets/im.jpg',
|
||||
link: 'https://cloud.tencent.com/act/pro/imnew?from=16262',
|
||||
imageWidth: 135,
|
||||
imageHeight: 135,
|
||||
price: '0.9折起',
|
||||
},
|
||||
{
|
||||
orderNum: 2,
|
||||
time: '2021-7-20 22:45',
|
||||
title: '即时通信 IM 老客户热销专区',
|
||||
description: '购买时长越长越优惠',
|
||||
imageUrl: 'https://sdk-web-1252463788.cos.ap-hongkong.myqcloud.com/component/TUIKit/assets/im.jpg',
|
||||
link: 'https://cloud.tencent.com/act/pro/imnew?from=16262',
|
||||
imageWidth: 135,
|
||||
imageHeight: 135,
|
||||
price: '7.2折起',
|
||||
},
|
||||
];
|
||||
// eslint-disable-next-line no-undef
|
||||
Component({
|
||||
/**
|
||||
* 组件的属性列表
|
||||
*/
|
||||
properties: {
|
||||
display: {
|
||||
type: Boolean,
|
||||
value: '',
|
||||
observer(newVal) {
|
||||
this.setData({
|
||||
displayTag: newVal,
|
||||
});
|
||||
},
|
||||
},
|
||||
conversation: {
|
||||
type: Object,
|
||||
value: {},
|
||||
observer(newVal) {
|
||||
this.setData({
|
||||
conversation: newVal,
|
||||
});
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
/**
|
||||
* 组件的初始数据
|
||||
*/
|
||||
data: {
|
||||
displayTag: true,
|
||||
words: '',
|
||||
orderMatch: orderList,
|
||||
},
|
||||
|
||||
/**
|
||||
* 组件的方法列表
|
||||
*/
|
||||
methods: {
|
||||
handleClose() {
|
||||
this.triggerEvent('close', {
|
||||
key: '1',
|
||||
});
|
||||
},
|
||||
wordsInput(e) {
|
||||
this.data.orderMatch = [],
|
||||
orderList.forEach((item) => {
|
||||
if (item.title.indexOf(e.detail.value) > -1 || item.orderNum === ~~e.detail.value) {
|
||||
this.data.orderMatch.push(item);
|
||||
}
|
||||
});
|
||||
this.setData({
|
||||
words: e.detail.value,
|
||||
orderMatch: this.data.orderMatch,
|
||||
});
|
||||
},
|
||||
sendMessage(e) {
|
||||
const { BUSINESS_ID_TEXT, FEAT_NATIVE_CODE } = constant;
|
||||
const { order } = e.currentTarget.dataset;
|
||||
this.triggerEvent('sendCustomMessage', { // 传递给父组件,在父组件处调用SDK的接口,来进行自定消息的发送
|
||||
payload: {
|
||||
data: JSON.stringify({
|
||||
businessID: BUSINESS_ID_TEXT.ORDER,
|
||||
version: FEAT_NATIVE_CODE.NATIVE_VERSION,
|
||||
title: order.title,
|
||||
imageUrl: order.imageUrl,
|
||||
imageWidth: order.imageWidth,
|
||||
imageHeight: order.imageHeight,
|
||||
link: order.link,
|
||||
price: order.price,
|
||||
description: order.description,
|
||||
}), // data字段用于标识该消息类型
|
||||
description: order.title, // 获取自定义消息的具体描述
|
||||
extension: order.title, // 自定义消息的具体内容
|
||||
},
|
||||
});
|
||||
},
|
||||
},
|
||||
});
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {}
|
||||
}
|
||||
+32
@@ -0,0 +1,32 @@
|
||||
<view wx:if="{{displayTag}}" class="tui-cards-container">
|
||||
<view class="tui-cards-box">
|
||||
<view class="tui-cards-title">
|
||||
<view>请选择你要发送的订单</view>
|
||||
<view style="color: #006EFF; font-family: PingFangSC-Regular;" class="tui-cards-close" bindtap="handleClose">关闭</view>
|
||||
</view>
|
||||
<view class="tui-search-bar">
|
||||
<image class="tui-searchcion" src="../../../../static/assets/serach-icon.svg" />
|
||||
<input class="tui-search-bar-input" value="{{words}}" placeholder="搜索" bindinput='wordsInput'/>
|
||||
</view>
|
||||
<scroll-view class="tui-order-list" scroll-y="true" enable-flex="true">
|
||||
<view class="tui-order-item" wx:key="index" wx:for="{{orderMatch}}" >
|
||||
<view class="order-title">
|
||||
<view class="order-number">订单编号: {{item.orderNum}}</view>
|
||||
<view class="order-time">{{item.time}}</view>
|
||||
</view>
|
||||
<view class="order-info">
|
||||
<image class="order-image" src="{{item.imageUrl}}" />
|
||||
<view class="order-content">
|
||||
<view class="order-content-title">{{item.title}}</view>
|
||||
<view class="order-content-description">{{item.description}}</view>
|
||||
<view style="display: flex; flex-wrap: no-wrap; justify-content: space-between;">
|
||||
<view class="order-content-price">{{item.price}}</view>
|
||||
<view class="btn-send-order" data-order="{{item}}" catch:tap="sendMessage">
|
||||
<text class="btn-send-text">发送此订单</text></view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</view>
|
||||
+173
@@ -0,0 +1,173 @@
|
||||
.tui-cards-container {
|
||||
position: fixed;
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
z-index: 100;
|
||||
top: 0;
|
||||
background: rgba(0,0,0,0.5);
|
||||
}
|
||||
|
||||
.tui-cards-box {
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
height: 60%;
|
||||
bottom: 0;
|
||||
background: #F4F5F9;
|
||||
padding-bottom: 68rpx;
|
||||
z-index: 200;
|
||||
}
|
||||
|
||||
.tui-cards-title {
|
||||
display: flex;
|
||||
flex-wrap: nowrap;
|
||||
justify-content: space-between;
|
||||
padding-left: 40rpx;
|
||||
padding-right: 40rpx;
|
||||
padding-top: 48rpx;
|
||||
font-family: PingFangSC-Medium;
|
||||
font-size: 36rpx;
|
||||
color: #000000;
|
||||
letter-spacing: 0;
|
||||
line-height: 50rpx;
|
||||
}
|
||||
|
||||
.tui-search-bar {
|
||||
display: flex;
|
||||
flex-wrap: nowrap;
|
||||
align-items: center;
|
||||
margin: 32rpx 40rpx;
|
||||
width: 670rpx;
|
||||
height: 80rpx;
|
||||
background: #FFFFFF;
|
||||
border-radius: 40rpx;
|
||||
border-radius: 40rpx;
|
||||
background-color: #F8F8F8;
|
||||
}
|
||||
|
||||
.tui-searchcion {
|
||||
display: inline-block;
|
||||
margin-left: 24rpx;
|
||||
width: 48rpx;
|
||||
height: 48rpx;
|
||||
}
|
||||
|
||||
.tui-search-bar-input {
|
||||
margin-left: 16rpx;
|
||||
line-height: 40rpx;
|
||||
font-size: 28rpx;
|
||||
width: 100%;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.tui-order-list {
|
||||
position: absolute;
|
||||
top: 242rpx;
|
||||
bottom: 68rpx;
|
||||
width: 750rpx;
|
||||
}
|
||||
|
||||
.tui-order-item {
|
||||
width: 670rpx;
|
||||
margin: 32rpx 40rpx;
|
||||
height: 388rpx;
|
||||
background-color: #FFFFFF;
|
||||
border-radius: 4px;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.order-title {
|
||||
width: 670rpx;
|
||||
height: 102rpx;
|
||||
padding: 32rpx 40rpx;
|
||||
padding-bottom: 0;
|
||||
border-bottom: 2rpx solid #EEF0F3;
|
||||
}
|
||||
|
||||
.order-title > .order-number {
|
||||
font-family: PingFangSC-Medium;
|
||||
font-size: 32rpx;
|
||||
line-height: 44rpx;
|
||||
color: #000000;
|
||||
letter-spacing: 0;
|
||||
margin-bottom: 8rpx;
|
||||
}
|
||||
|
||||
.order-title > .order-time {
|
||||
font-family: PingFangSC-Regular;
|
||||
font-size: 24rpx;
|
||||
line-height: 34rpx;
|
||||
color: #999999;
|
||||
letter-spacing: 0;
|
||||
}
|
||||
|
||||
.order-info {
|
||||
display: flex;
|
||||
flex-wrap: nowrap;
|
||||
width: 670rpx;
|
||||
height: 236rpx;
|
||||
padding: 32rpx 40rpx;
|
||||
}
|
||||
|
||||
.order-content {
|
||||
width: 450rpx;
|
||||
margin-left: 32rpx;
|
||||
}
|
||||
|
||||
.order-content-title {
|
||||
font-family: PingFangSC-Medium;
|
||||
width: 378rpx;
|
||||
line-height: 34rpx;
|
||||
font-size: 24rpx;
|
||||
color: #000000;
|
||||
letter-spacing: 0;
|
||||
margin-bottom: 12rpx;
|
||||
}
|
||||
|
||||
.order-content-description {
|
||||
display: flex;
|
||||
flex-wrap: nowrap;
|
||||
font-family: PingFangSC-Regular;
|
||||
max-width: 410rpx;
|
||||
line-height: 34rpx;
|
||||
font-size: 24rpx;
|
||||
color: #999999;
|
||||
letter-spacing: 0;
|
||||
margin-bottom: 12rpx;
|
||||
}
|
||||
|
||||
.order-content-price {
|
||||
font-family: PingFangSC-Medium;
|
||||
font-size: 36rpx;
|
||||
line-height: 50rpx;
|
||||
color: #FF7201;
|
||||
letter-spacing: 0;
|
||||
}
|
||||
|
||||
.order-image {
|
||||
width: 156rpx;
|
||||
height: 156rpx;
|
||||
}
|
||||
|
||||
.btn-send-order {
|
||||
width: 176rpx;
|
||||
height: 58rpx;
|
||||
background-color: #006EFF;
|
||||
border-radius: 14.5px;
|
||||
font-family: PingFangSC-Regular;
|
||||
font-size: 24rpx;
|
||||
color: #FFFFFF;
|
||||
line-height: 28px;
|
||||
text-align: center;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
margin-right: 40rpx;
|
||||
}
|
||||
.btn-send-text{
|
||||
font-family: PingFangSC-Regular;
|
||||
font-size: 12px;
|
||||
color: #FFFFFF;
|
||||
line-height: 14px;
|
||||
}
|
||||
+77
@@ -0,0 +1,77 @@
|
||||
import constant from '../../../../../utils/constant';
|
||||
|
||||
// eslint-disable-next-line no-undef
|
||||
Component({
|
||||
/**
|
||||
* 组件的属性列表
|
||||
*/
|
||||
properties: {
|
||||
display: {
|
||||
type: Boolean,
|
||||
value: '',
|
||||
observer(newVal) {
|
||||
this.setData({
|
||||
displayTag: newVal,
|
||||
});
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
/**
|
||||
* 组件的初始数据
|
||||
*/
|
||||
data: {
|
||||
displayTag: false,
|
||||
scoreList: [1, 2, 3, 4, 5],
|
||||
score: 0,
|
||||
comment: '',
|
||||
},
|
||||
|
||||
/**
|
||||
* 组件的方法列表
|
||||
*/
|
||||
methods: {
|
||||
handleClose() {
|
||||
this.triggerEvent('close', {
|
||||
key: '2',
|
||||
});
|
||||
},
|
||||
handleScore(e) {
|
||||
let { score } = e.currentTarget.dataset;
|
||||
if (score === this.data.score) {
|
||||
score = 0;
|
||||
}
|
||||
this.setData({
|
||||
score,
|
||||
});
|
||||
},
|
||||
bindTextAreaInput(e) {
|
||||
this.setData({
|
||||
comment: e.detail.value,
|
||||
});
|
||||
},
|
||||
sendMessage() {
|
||||
const { BUSINESS_ID_TEXT, STRING_TEXT, FEAT_NATIVE_CODE } = constant;
|
||||
this.triggerEvent('sendCustomMessage', {
|
||||
payload: {
|
||||
// data 字段作为表示,可以自定义
|
||||
data: JSON.stringify({
|
||||
businessID: BUSINESS_ID_TEXT.EVALUATION,
|
||||
version: FEAT_NATIVE_CODE.NATIVE_VERSION,
|
||||
score: this.data.score,
|
||||
comment: this.data.comment,
|
||||
}),
|
||||
description: STRING_TEXT.TYPETEXT, // 获取骰子点数
|
||||
extension: STRING_TEXT.TYPETEXT,
|
||||
},
|
||||
});
|
||||
|
||||
this.setData({
|
||||
score: 0,
|
||||
comment: '',
|
||||
});
|
||||
this.handleClose();
|
||||
},
|
||||
},
|
||||
|
||||
});
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {}
|
||||
}
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
<view class="tui-cards-container" catch:tap="handleClose" wx:if="{{displayTag}}">
|
||||
<view class="service-evaluation" catch:tap="()=>{}">
|
||||
<view class="header">
|
||||
<label>请对本次服务进行评价</label>
|
||||
<button class="btn" bind:tap="handleClose">关闭</button>
|
||||
</view>
|
||||
<view class="main">
|
||||
<view class="main-evaluation-score">
|
||||
<image class="score-star" wx:for="{{scoreList}}" wx:key="*this" data-score="{{item}}" src="{{'../../../../../static/images/star' + (item > score ? '-grey': '') + '.png'}}" bind:tap="handleScore" />
|
||||
</view>
|
||||
<textarea cols="30" rows="10" bindinput="bindTextAreaInput" placeholder="请输入评语" placeholder-style="textarea-placeholder"
|
||||
confirm-type="done"show-confirm-bar="{{false}}"></textarea>
|
||||
</view>
|
||||
<view class="footer">
|
||||
<button class="btn" bind:tap="sendMessage" disabled="{{score===0 && !comment}}">提交评价</button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
+73
@@ -0,0 +1,73 @@
|
||||
.tui-cards-container {
|
||||
position: fixed;
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
z-index: 100;
|
||||
top: 0;
|
||||
background: rgba(0,0,0,0.5);
|
||||
display: flex;
|
||||
align-items: flex-end;
|
||||
}
|
||||
|
||||
.service-evaluation {
|
||||
flex: 1;
|
||||
background: #FFFFFF;
|
||||
padding: 48rpx 40rpx;
|
||||
}
|
||||
.header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
font-family: PingFangSC-Regular;
|
||||
}
|
||||
.btn {
|
||||
width: auto !important;
|
||||
padding: 0;
|
||||
margin: 0 !important;
|
||||
background: none;
|
||||
}
|
||||
.header label {
|
||||
font-size: 18px;
|
||||
color: #000000;
|
||||
letter-spacing: 0;
|
||||
line-height: 25px;
|
||||
}
|
||||
.header .btn {
|
||||
font-size: 16px;
|
||||
color: #006EFF;
|
||||
letter-spacing: 0;
|
||||
line-height: 24px;
|
||||
}
|
||||
.main {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
padding: 48rpx 0;
|
||||
}
|
||||
.main-evaluation-score {
|
||||
padding: 0 60rpx 48rpx;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: flex-end;
|
||||
}
|
||||
.main-evaluation-score .score-star {
|
||||
width: 72rpx;
|
||||
height: 72rpx;
|
||||
}
|
||||
.main textarea {
|
||||
background: #F8F8F8;
|
||||
border: 0 solid #D9D9D9;
|
||||
border-radius: 4px;
|
||||
font-size: 14px;
|
||||
padding: 16rpx 32rpx;
|
||||
}
|
||||
.textarea-placeholder {
|
||||
color: #B0B0B0;
|
||||
}
|
||||
.footer .btn {
|
||||
width: 100%;
|
||||
padding: 26rpx 0;
|
||||
background: #006EFF;
|
||||
border-radius: 24px;
|
||||
border-radius: 24px;
|
||||
font-size: 16px;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
@@ -0,0 +1,584 @@
|
||||
// TUIKit-WChat/Chat/index.js
|
||||
import logger from '../../utils/logger';
|
||||
import constant from '../../utils/constant';
|
||||
import { API } from '../../../../utils/network/api'
|
||||
import { rpxTopx } from '../../../../utils/util'
|
||||
const dayjs = require("../../utils/dayjs.js");
|
||||
const api = new API()
|
||||
// eslint-disable-next-line no-undef
|
||||
const app = getApp();
|
||||
|
||||
const inputStyle = `
|
||||
--padding: 0px;
|
||||
`;
|
||||
|
||||
let newInputStyle = `
|
||||
--padding: 0px;
|
||||
position: absolute;
|
||||
`;
|
||||
|
||||
const setNewInputStyle = (number) => {
|
||||
const height = number;
|
||||
newInputStyle = `--padding: ${height}px`;
|
||||
};
|
||||
|
||||
Component({
|
||||
/**
|
||||
* 组件的属性列表
|
||||
*/
|
||||
properties: {
|
||||
currentConversationID: {
|
||||
type: String,
|
||||
value: '',
|
||||
observer(currentConversationID) {
|
||||
this.setData({
|
||||
conversationID: currentConversationID,
|
||||
});
|
||||
},
|
||||
},
|
||||
order_inquiry_id: {
|
||||
type: String,
|
||||
value: ''
|
||||
},
|
||||
from:{
|
||||
type: String,
|
||||
value: '',
|
||||
observer(from) {
|
||||
this.setData({
|
||||
from: from,
|
||||
});
|
||||
},
|
||||
},
|
||||
inquiry_type: {
|
||||
type: String,
|
||||
value: ''
|
||||
},
|
||||
unreadCount: {
|
||||
type: Number,
|
||||
value: '',
|
||||
observer(unreadCount) {
|
||||
this.setData({
|
||||
unreadCount,
|
||||
});
|
||||
},
|
||||
},
|
||||
hasCallKit: {
|
||||
type: Boolean,
|
||||
value: false,
|
||||
observer(hasCallKit) {
|
||||
this.setData({
|
||||
hasCallKit,
|
||||
});
|
||||
},
|
||||
},
|
||||
baseInfo: {
|
||||
type: Object,
|
||||
value: {},
|
||||
observer(baseInfo) {
|
||||
this.dealBasic(baseInfo);
|
||||
this.setData({
|
||||
"navbarData.title": baseInfo.patient_family_name
|
||||
});
|
||||
},
|
||||
}
|
||||
},
|
||||
|
||||
lifetimes: {
|
||||
attached() {
|
||||
if (app?.globalData?.reportType === constant.OPERATING_ENVIRONMENT) {
|
||||
this.setData({
|
||||
showTips: true,
|
||||
message_rounds: 0
|
||||
});
|
||||
}
|
||||
//console.log("000")
|
||||
this.getNavbarHeight()
|
||||
|
||||
// let _this = this
|
||||
// wx.onKeyboardHeightChange(res => {
|
||||
// let kb_height = res.height
|
||||
// console.log("键盘高度:", kb_height)
|
||||
// _this.setData({
|
||||
// kb_height: kb_height
|
||||
// })
|
||||
// console.log("111")
|
||||
// _this.getNavbarHeight();
|
||||
// })
|
||||
},
|
||||
|
||||
ready() {
|
||||
let hasTip=wx.getStorageSync('showNewerTip');
|
||||
if(hasTip){
|
||||
this.setData({
|
||||
showTip:false
|
||||
})
|
||||
}else{
|
||||
this.setData({
|
||||
showTip:true
|
||||
})
|
||||
}
|
||||
//修改为组件传值
|
||||
// this.getInquiryMessageBasic()
|
||||
// console.log("app.globalData.scene from TUIchat ready: ", app.globalData.scene);
|
||||
let pages = getCurrentPages();
|
||||
// console.log("pages:", pages)
|
||||
// console.log("pages.length:", pages.length)
|
||||
// console.log("pages:", pages[0])
|
||||
if(pages.length == 1){
|
||||
// console.log("navbarData.showCapsule");
|
||||
this.setData({
|
||||
"navbarData.showCapsule": 3
|
||||
})
|
||||
}
|
||||
this.setData({
|
||||
finsh_btn: false
|
||||
})
|
||||
|
||||
wx.onNetworkStatusChange((res) => {
|
||||
let msg = ''
|
||||
if (!res.isConnected) {
|
||||
msg = '当前网络不可用,请检查你的网络设置'
|
||||
} else if (res.networkType === 'none') {
|
||||
msg = '网络开小差了,请在网络良好后重试'
|
||||
}
|
||||
if (msg) {
|
||||
wx.showToast({
|
||||
title: msg,
|
||||
icon: 'none',
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
}
|
||||
},
|
||||
/**
|
||||
* 组件的初始数据
|
||||
*/
|
||||
data: {
|
||||
rest_time:0,
|
||||
total_rounds:0,
|
||||
timeData:{},
|
||||
showTip:false,
|
||||
conversationName: '',
|
||||
conversation: {},
|
||||
messageList: [],
|
||||
isShow: false,
|
||||
showImage: false,
|
||||
showChat: true,
|
||||
conversationID: '',
|
||||
config: {
|
||||
sdkAppID: '',
|
||||
userID: '',
|
||||
userSig: '',
|
||||
type: 1,
|
||||
tim: null,
|
||||
},
|
||||
unreadCount: 0,
|
||||
hasCallKit: false,
|
||||
viewData: {
|
||||
style: inputStyle,
|
||||
},
|
||||
input_area_style:"",
|
||||
KeyboardHeight: 0,
|
||||
showTips: false,
|
||||
showGroupTips: false,
|
||||
showAll: false,
|
||||
navbarData: {
|
||||
showCapsule: 2, //是否显示左上角图标 1表示显示 0表示不显示
|
||||
title: '', //导航栏 中间的标题
|
||||
},
|
||||
navbar_height: 120,
|
||||
dialog_visible: false,
|
||||
finsh_btn: false,
|
||||
KeysBoardsStatus: "down",
|
||||
message_rounds: 0,
|
||||
keysboards_height: 0,
|
||||
kb_height: 0,
|
||||
change_kb: false,
|
||||
static_host: api.getStaticHost()
|
||||
},
|
||||
|
||||
/**
|
||||
* 组件的方法列表
|
||||
*/
|
||||
methods: {
|
||||
refreshMessageRounds(e){
|
||||
// console.log("TUIchat refreshMessageRounds", e)
|
||||
let message_rounds = e.detail.message_rounds
|
||||
// console.log("TUIchat refreshMessageRounds message_rounds:", message_rounds)
|
||||
this.setData({
|
||||
message_rounds: message_rounds
|
||||
})
|
||||
//let total_rounds=this.data.total_rounds;
|
||||
// if(total_rounds>=0){
|
||||
// if(total_rounds-message_rounds<=0 && this.data.baseInfo.inquiry_status==4){
|
||||
// wx.showToast({
|
||||
// title: '沟通已达到限制的'+total_rounds+'个回合',
|
||||
// icon:"none"
|
||||
// })
|
||||
// this.finishConsult();
|
||||
// }
|
||||
// }
|
||||
|
||||
},
|
||||
onClickHide() {
|
||||
this.setData({ showTip: false });
|
||||
wx.setStorageSync('showNewerTip',true)
|
||||
},
|
||||
|
||||
noop() {},
|
||||
onChangeTime(e) {
|
||||
this.setData({
|
||||
'timeData': e.detail,
|
||||
});
|
||||
},
|
||||
getNavbarHeight(addHeight){
|
||||
|
||||
try {
|
||||
//console.log("getNavbarHeight: ", new Date().getTime())
|
||||
let rect = null;
|
||||
if (wx.getMenuButtonBoundingClientRect) {
|
||||
rect = wx.getMenuButtonBoundingClientRect();
|
||||
}
|
||||
// console.log("rect: ", rect)
|
||||
wx.getSystemInfo({
|
||||
success: (res) => {
|
||||
// const { statusBarHeight } = wx.getSystemInfoSync();
|
||||
// console.log("statusBarHeight: ", statusBarHeight);
|
||||
// console.log("${rect.height}px: ", `${rect.height}`);
|
||||
let height = Number.parseInt(res.statusBarHeight) + Number.parseInt(`${rect.height}`);
|
||||
|
||||
let KeysBoardsStatus = this.data.KeysBoardsStatus
|
||||
if(KeysBoardsStatus == 'pull'){
|
||||
height = height + rpxTopx(35)
|
||||
}else{
|
||||
height = height + rpxTopx(70)
|
||||
}
|
||||
if(addHeight > 0){
|
||||
height = height + addHeight
|
||||
}
|
||||
let kb_height = Number.parseInt(this.data.kb_height)
|
||||
let textarea_height = Number.parseInt(this.data.textarea_height)
|
||||
//console.log("getNavbarHeight 键盘高度:", kb_height)
|
||||
if(kb_height > 0){
|
||||
//console.log("height 1: ", height)
|
||||
height = height + kb_height
|
||||
//console.log("height 2: ", height)
|
||||
}
|
||||
if(textarea_height > 0){
|
||||
//console.log("height 1: ", height)
|
||||
height = height + textarea_height
|
||||
//console.log("height 2: ", height)
|
||||
}
|
||||
|
||||
this.setData({
|
||||
navbar_height: height
|
||||
})
|
||||
//console.log(444)
|
||||
},
|
||||
fail: (err) => {
|
||||
console.error('navbar 获取系统信息失败', err);
|
||||
},
|
||||
});
|
||||
} catch (error) {
|
||||
console.error(error)
|
||||
}
|
||||
|
||||
|
||||
},
|
||||
//结束问诊
|
||||
putDoctorInquiryFinish() {
|
||||
this.setData({
|
||||
dialog_visible: true
|
||||
})
|
||||
wx.hideKeyboard()
|
||||
},
|
||||
cancelDialog(){
|
||||
this.setData({
|
||||
dialog_visible: false
|
||||
})
|
||||
},
|
||||
finishConsult(){
|
||||
this.setData({
|
||||
finsh_btn: true
|
||||
})
|
||||
api.putDoctorInquiryFinish({order_inquiry_id: this.data.order_inquiry_id}).then(response => {
|
||||
// console.log(response);
|
||||
// this.getInquiryMessageBasic();
|
||||
//调用子组件中的跳到最新消息
|
||||
this.getNavbarHeight()
|
||||
this.selectComponent('#MessageList').handleJumpNewMessage();
|
||||
}).catch(errors => {
|
||||
console.error(errors);
|
||||
this.setData({
|
||||
message_rounds:this.data.total_rounds,
|
||||
finsh_btn: false
|
||||
})
|
||||
})
|
||||
},
|
||||
confirmDialog(){
|
||||
let finsh_btn = this.data.finsh_btn
|
||||
if(finsh_btn){
|
||||
return
|
||||
}
|
||||
this.finishConsult();
|
||||
this.setData({
|
||||
dialog_visible: false
|
||||
})
|
||||
},
|
||||
dealBasic(obj){
|
||||
let data=obj;
|
||||
console.log(data.duration)
|
||||
if(data.inquiry_status==4){
|
||||
if(data.times_number==0){
|
||||
this.setData({
|
||||
total_rounds:-1,//无线沟通
|
||||
})
|
||||
}else{
|
||||
this.setData({
|
||||
total_rounds:data.times_number,//无线沟通
|
||||
})
|
||||
}
|
||||
|
||||
if (data.duration != 0) {
|
||||
if (data.reception_time){
|
||||
let endtime = dayjs(data.reception_time).add(data.duration, 'minute').format('YYYY-MM-DD HH:mm:ss');
|
||||
let nowtime = dayjs().format('YYYY-MM-DD HH:mm:ss');
|
||||
let countdown = dayjs(endtime).diff(nowtime, "millisecond");
|
||||
let countdownTime = countdown > 0 ? countdown : 0;
|
||||
console.log("countdownTime--------");
|
||||
console.log(countdownTime);
|
||||
this.setData({
|
||||
"rest_time": countdownTime
|
||||
});
|
||||
//if(countdownTime==0){
|
||||
// wx.showToast({
|
||||
// title: '沟通时长已超过限制时间',
|
||||
// icon:"none"
|
||||
// })
|
||||
// this.finishConsult();
|
||||
// }
|
||||
} else {
|
||||
|
||||
this.setData({
|
||||
"rest_time": 0
|
||||
})
|
||||
}
|
||||
} else {
|
||||
console.log("wwww")
|
||||
this.setData({
|
||||
"rest_time": -1 //接诊不限时间
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
},
|
||||
//获取问诊订单消息内页基础数据
|
||||
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("11111111111111111111111111111111111111")
|
||||
// console.log(response);
|
||||
this.setData({
|
||||
baseInfo: response.data,
|
||||
})
|
||||
if(response.data.inquiry_status > 4){
|
||||
wx.hideKeyboard()
|
||||
this.getNavbarHeight()
|
||||
}
|
||||
}).catch(errors => {console.error(errors);})
|
||||
},
|
||||
init() {
|
||||
console.log("2222222222222222222222222222222")
|
||||
console.warn("TUIChat js: init", this.data.conversationID)
|
||||
wx.$TUIKit.setMessageRead({ conversationID: this.data.conversationID }).then(() => {
|
||||
logger.log('| TUI-chat | setMessageRead | ok');
|
||||
});
|
||||
wx.$TUIKit.getConversationProfile(this.data.conversationID).then((res) => {
|
||||
const { conversation } = res.data;
|
||||
this.setData({
|
||||
conversationName: this.getConversationName(conversation),
|
||||
conversation,
|
||||
isShow: conversation.type === wx.$TUIKitTIM.TYPES.CONV_GROUP,
|
||||
});
|
||||
if (conversation.type !== wx.$TUIKitTIM.TYPES.CONV_GROUP) return;
|
||||
if (!this.data.showTips) {
|
||||
this.setData({
|
||||
showGroupTips: true,
|
||||
});
|
||||
} else {
|
||||
this.setData({
|
||||
showAll: true,
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
getConversationName(conversation) {
|
||||
if (conversation.type === '@TIM#SYSTEM') {
|
||||
this.setData({
|
||||
showChat: false,
|
||||
});
|
||||
return '系统通知';
|
||||
}
|
||||
if (conversation.type === wx.$TUIKitTIM.TYPES.CONV_C2C) {
|
||||
return conversation.remark || conversation.userProfile.nick || conversation.userProfile.userID;
|
||||
}
|
||||
if (conversation.type === wx.$TUIKitTIM.TYPES.CONV_GROUP) {
|
||||
return conversation.groupProfile.name || conversation.groupProfile.groupID;
|
||||
}
|
||||
},
|
||||
sendMessage(event) {
|
||||
// 将自己发送的消息写进消息列表里面
|
||||
this.selectComponent('#MessageList').updateMessageList(event.detail.message);
|
||||
this.getNavbarHeight();
|
||||
},
|
||||
refreshMessageStatus(message) {
|
||||
//console.log("TUIchat refreshMessageStatus", message)
|
||||
this.selectComponent('#MessageList').refreshMessageStatus(message);
|
||||
},
|
||||
showMessageErrorImage(event) {
|
||||
this.selectComponent('#MessageList').sendMessageError(event);
|
||||
},
|
||||
triggerClose() {
|
||||
//console.log("message-list triggerClose")
|
||||
if(this.data.baseInfo.inquiry_status == 4){
|
||||
this.selectComponent('#MessageInput').handleClose();
|
||||
}
|
||||
wx.hideKeyboard()
|
||||
this.getNavbarHeight()
|
||||
},
|
||||
handleCall(event) {
|
||||
if (event.detail.conversationType === wx.$TUIKitTIM.TYPES.CONV_GROUP) {
|
||||
this.selectComponent('#TUIGroup').callShowMoreMember(event);
|
||||
} else {
|
||||
this.triggerEvent('handleCall', event.detail);
|
||||
}
|
||||
},
|
||||
groupCall(event) {
|
||||
const { selectedUserIDList, type, groupID } = event.detail;
|
||||
const userIDList = selectedUserIDList;
|
||||
this.triggerEvent('handleCall', { userIDList, type, groupID });
|
||||
},
|
||||
goBack() {
|
||||
this.triggerEvent('showConversationList');
|
||||
wx.$TUIKit.setMessageRead({
|
||||
conversationID: this.data.conversationID,
|
||||
}).then(() => {
|
||||
wx.navigateBack();
|
||||
});
|
||||
},
|
||||
showConversationList() {
|
||||
this.triggerEvent('showConversationList');
|
||||
},
|
||||
changeMemberCount(event) {
|
||||
this.selectComponent('#TUIGroup').updateMemberCount(event.detail.groupOptionsNumber);
|
||||
},
|
||||
resendMessage(event) {
|
||||
this.selectComponent('#MessageInput').onInputValueChange(event);
|
||||
},
|
||||
myhandleExtensions(e){
|
||||
//console.log("myhandleExtensionsmyhandleExtensions: ", e);
|
||||
wx.hideKeyboard()
|
||||
let displayFlag = e.detail.displayFlag;
|
||||
// setTimeout(() => {
|
||||
if(displayFlag){
|
||||
this.setData({
|
||||
input_area_style: "position: absolute; bottom: 20px;"
|
||||
})
|
||||
this.getNavbarHeight(100);
|
||||
this.selectComponent('#MessageList').handleJumpNewMessage();
|
||||
}else{
|
||||
this.setData({
|
||||
input_area_style: "",
|
||||
})
|
||||
this.getNavbarHeight();
|
||||
}
|
||||
// }, 100);
|
||||
},
|
||||
// 监听键盘,获取焦点时将输入框推到键盘上方
|
||||
pullKeysBoards(event) {
|
||||
//console.log("pullKeysBoardspullKeysBoards")
|
||||
let value = event.detail.event.detail.value;
|
||||
let height = event.detail.event.detail.height;
|
||||
|
||||
//console.log("pullKeysBoards value: ", height)
|
||||
setNewInputStyle(height);
|
||||
if(height){
|
||||
this.setData({
|
||||
kb_height: height
|
||||
})
|
||||
}
|
||||
//console.log("333")
|
||||
this.setData({
|
||||
'viewData.style': newInputStyle,
|
||||
// input_area_style: "position: absolute; bottom: 52rpx;",
|
||||
KeysBoardsStatus: "pull"
|
||||
});
|
||||
this.getNavbarHeight();
|
||||
this.selectComponent('#MessageList').handleJumpNewMessage();
|
||||
|
||||
},
|
||||
// 监听键盘,失去焦点时收起键盘
|
||||
downKeysBoards(event) {
|
||||
//console.log("downKeysBoardsdownKeysBoards")
|
||||
// //console.log(event)
|
||||
let value = event.detail.event.detail.value;
|
||||
//console.log("downKeysBoards value: ", value)
|
||||
if(value){
|
||||
this.setData({
|
||||
'viewData.style': inputStyle,
|
||||
KeysBoardsStatus: "down",
|
||||
kb_height: 0
|
||||
});
|
||||
}else{
|
||||
this.setData({
|
||||
'viewData.style': inputStyle,
|
||||
input_area_style: "",
|
||||
KeysBoardsStatus: "down",
|
||||
kb_height: 0
|
||||
});
|
||||
}
|
||||
//console.log("444")
|
||||
this.getNavbarHeight();
|
||||
},
|
||||
inputBindLinechange(event){
|
||||
console.log(event)
|
||||
let lineCount = event.detail.event.detail.lineCount;
|
||||
let height = event.detail.event.detail.height;
|
||||
if(height > 100){
|
||||
return
|
||||
}
|
||||
let lineHeight = height / lineCount;
|
||||
this.setData({
|
||||
textarea_height: lineHeight * (lineCount - 1)
|
||||
})
|
||||
this.getNavbarHeight();
|
||||
},
|
||||
typing(event) {
|
||||
const { STRING_TEXT, FEAT_NATIVE_CODE } = constant;
|
||||
if (this.data.conversation.type === wx.$TUIKitTIM.TYPES.CONV_C2C) {
|
||||
if (event.detail.typingMessage.typingStatus === FEAT_NATIVE_CODE.ISTYPING_STATUS && event.detail.typingMessage.actionParam === constant.TYPE_INPUT_STATUS_ING) {
|
||||
this.setData({
|
||||
conversationName: STRING_TEXT.TYPETYPING,
|
||||
});
|
||||
setTimeout(() => {
|
||||
this.setData({
|
||||
conversationName: this.getConversationName(this.data.conversation),
|
||||
});
|
||||
}, (1000 * 30));
|
||||
} else if (event.detail.typingMessage.typingStatus === FEAT_NATIVE_CODE.NOTTYPING_STATUS && event.detail.typingMessage.actionParam === constant.TYPE_INPUT_STATUS_END) {
|
||||
this.setData({
|
||||
conversationName: this.getConversationName(this.data.conversation),
|
||||
});
|
||||
}
|
||||
}
|
||||
},
|
||||
handleReport() {
|
||||
const url = '/pages/TUI-User-Center/webview/webview?url=https://cloud.tencent.com/apply/p/xc3oaubi98g';
|
||||
wx.navigateTo({
|
||||
url,
|
||||
});
|
||||
},
|
||||
},
|
||||
|
||||
});
|
||||
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {
|
||||
"MessageList": "./components/MessageList/index",
|
||||
"MessageInput": "./components/MessageInput/index",
|
||||
"TUIGroup": "../TUIGroup/index",
|
||||
"van-overlay": "@vant/weapp/overlay/index",
|
||||
"van-count-down": "@vant/weapp/count-down/index",
|
||||
"te-nav-bar": "../../../../commpents/te_navbar/index",
|
||||
"t-dialog": "tdesign-miniprogram/dialog/dialog"
|
||||
},
|
||||
"disableScroll":true
|
||||
}
|
||||
@@ -0,0 +1,113 @@
|
||||
<!--TUIKit-WChat/Chat/index.wxml-->
|
||||
<te-nav-bar navbar-data='{{navbarData}}' ></te-nav-bar>
|
||||
<view class="container">
|
||||
<view class="info" wx:if="{{ baseInfo.inquiry_status > 0 }}">
|
||||
<view class="left" >
|
||||
<view class="circle_top"></view>
|
||||
<view class="name" wx:if="{{baseInfo.inquiry_status!=4}}">{{baseInfo.patient_family_name}}</view>
|
||||
<view class="age" wx:if="{{baseInfo.inquiry_status!=4}}">{{baseInfo.patient_family_sex==1?'男':'女'}} | {{baseInfo.patient_family_age}}岁</view>
|
||||
|
||||
<view class="count_time" wx:else="{{baseInfo.inquiry_status==4}}">
|
||||
|
||||
问诊中|<text wx:if="{{rest_time==-1}}" class="time_desc">不限时间</text>
|
||||
<view wx:else="{{rest_time!=-1}}" class="time_desc">
|
||||
<text class="time_desc">剩余</text>
|
||||
|
||||
<van-count-down class="control-count-down" use-slot time="{{rest_time}}" bind:change="onChangeTime" format="HH:mm:ss">
|
||||
<text class="item" wx:if="{{timeData.hours!= 0 || timeData.days!=0}}">{{(timeData.days*24)+timeData.hours }}小时</text>
|
||||
<text class="item" wx:if="{{timeData.hours==0 && timeData.days==0}}">{{timeData.minutes }}分</text>
|
||||
<text class="item" wx:if="{{timeData.hours==0 && timeData.days==0}}">{{ timeData.seconds }}秒</text>
|
||||
</van-count-down>
|
||||
</view>
|
||||
|
||||
<text wx:if="{{total_rounds==-1}}" class="time_desc">不限沟通次数</text>
|
||||
<text wx:else class="time_desc">
|
||||
<text wx:if="{{total_rounds-message_rounds>0}}">{{total_rounds-message_rounds}}</text>
|
||||
<text wx:else>0</text>个沟通回合
|
||||
</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="right">
|
||||
<text class="right_txt" bindtap="putDoctorInquiryFinish" wx:if="{{baseInfo.inquiry_status==4}}">结束问诊</text>
|
||||
<view class="status {{baseInfo.inquiry_status==5?'status_complete':''}}" wx:else="{{baseInfo.inquiry_status!=4}}">{{baseInfo.inquiry_status==1?'待支付':baseInfo.inquiry_status==2?'待分配':baseInfo.inquiry_status==3?'待接诊':baseInfo.inquiry_status==4?'接诊中':baseInfo.inquiry_status==5?'问诊完成':baseInfo.inquiry_status==6?'已结束':baseInfo.inquiry_status==7?'已取消':'未知'}}</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- <view class="tui-navigatorbar">
|
||||
<image class="tui-navigatorbar-back" bindtap="goBack" src="../../static/assets/ic_back_black.svg" />
|
||||
<view class="conversation-title">{{conversationName}}</view>
|
||||
</view> -->
|
||||
<view class="list-box {{ showTips && 'list-box-notips'}} || {{ showGroupTips && 'list-box-group'}} || {{ showAll && 'list-box-group-notips'}}" style="height: calc(100vh {{baseInfo.inquiry_status==4?'- 197rpx':'- 196rpx'}} - 100rpx - {{navbar_height}}px);"><!-- 100vh -input-area高度 - info高度 -navbar高度 -->
|
||||
<!-- <view wx:if="{{showTips}}" class="safetytips-box"> -->
|
||||
<!-- <view class="safetytips">
|
||||
<text>【安全提示】本 APP 仅用于体验腾讯云即时通信 IM 产品功能,不可用于业务洽谈与拓展。请勿轻信汇款、中奖等涉及钱款等信息,勿轻易拨打陌生电话,谨防上当受骗。</text>
|
||||
<span class="report" bindtap="handleReport">点此投诉</span>
|
||||
</view> -->
|
||||
<!-- </view> -->
|
||||
<scroll-view class="message-list" bindtap="triggerClose">
|
||||
<MessageList
|
||||
bind:getInquiryMessageBasic="getInquiryMessageBasic"
|
||||
bind:freshInfo="freshInfo"
|
||||
baseInfo="{{baseInfo}}"
|
||||
bind:refreshMessageRounds="refreshMessageRounds"
|
||||
id="MessageList" conversation="{{conversation}}" unreadCount="{{unreadCount}}" bind:changeMemberCount="changeMemberCount" bind:resendMessage="resendMessage" bind:typing="typing" order_inquiry_id="{{order_inquiry_id}}"></MessageList>
|
||||
</scroll-view>
|
||||
</view>
|
||||
<view class="group-profile">
|
||||
<TUIGroup id="TUIGroup" wx:if="{{isShow}}" conversation="{{conversation}}" bind:groupCall="groupCall" bind:showConversationList="showConversationList"></TUIGroup>
|
||||
</view>
|
||||
<!-- wx:if="{{baseInfo.inquiry_status==4}}" -->
|
||||
<view class="input-area" style="{{input_area_style}}" >
|
||||
<!-- wx:if="{{showChat}}" -->
|
||||
<view class="message-input" style="{{viewData.style}}" >
|
||||
<MessageInput bind:myhandleExtensions="myhandleExtensions" id="MessageInput" inquiry_type="{{inquiry_type}}" baseInfo="{{baseInfo}}" order_inquiry_id="{{order_inquiry_id}}" conversation="{{conversation}}" from="{{from}}" hasCallKit="{{hasCallKit}}" bind:sendMessage="sendMessage" bind:downKeysBoards="downKeysBoards" bind:pullKeysBoards="pullKeysBoards" bind:showMessageErrorImage="showMessageErrorImage"
|
||||
bind:refreshMessageStatus="refreshMessageStatus"
|
||||
bind:inputBindLinechange="inputBindLinechange"
|
||||
bind:handleCall="handleCall" message_rounds="{{message_rounds}}"></MessageInput>
|
||||
</view>
|
||||
</view>
|
||||
<!-- wx:if="{{baseInfo.inquiry_status==4}}" -->
|
||||
<view style="height: 40px;position: fixed;bottom: 0;width: 100%;background-color: #fff;z-index: 1;" >
|
||||
|
||||
</view>
|
||||
</view>
|
||||
<t-dialog
|
||||
visible="{{ dialog_visible }}"
|
||||
title="温馨提示"
|
||||
content="您确定要结束本次问诊吗?"
|
||||
>
|
||||
<view slot="cancel-btn" class="dialog dialog_cancel_btn" bindtap="cancelDialog">
|
||||
取消
|
||||
</view>
|
||||
<view slot="confirm-btn" class="dialog dialog_confirm_btn" bindtap="confirmDialog">
|
||||
确定
|
||||
</view>
|
||||
</t-dialog>
|
||||
<van-overlay show="{{ showTip }}" z-index="999">
|
||||
<view class="wrapper">
|
||||
<view class="block">
|
||||
<image src="{{static_host}}/applet/doctor/static/images/yishi/yuyue_star.png" mode="" class="star" />
|
||||
<view class="title">视频问诊新手指引</view>
|
||||
<view class="con">
|
||||
<view class="msgcell">1、主动与患者确定视频时间,并点击下发【预约视频时间】按钮进行设置;
|
||||
</view>
|
||||
<view class="msgcell">2、如需修改视频时间,可在聊天页的上方点击黄色区域修改;</view>
|
||||
<view class="msgcell">3、请设置视频时间,方便给双方下发短信;</view>
|
||||
<view class="msgcell">4、请在预约的视频时间前进入聊天页,准时发起视频。</view>
|
||||
<!-- <view class="msgcell">1、通过文字等形式与患者沟通确定视频沟通时间;</view>
|
||||
<view class="msgcell">2、按照医患双方确定的视频时间进行预约;</view>
|
||||
<view class="msgcell">3、点击确定预约后,平台会给双方发送短信提醒;</view>
|
||||
<view class="msgcell">4、在预约时间前3分钟,平台也会发送短信提醒医患进入聊天室;</view>
|
||||
<view class="msgcell">5、如需要更改预约视频时间,可与患者进行图文沟通重新确认时间后,点击上方【如需要修改视频时间,请点击这里】按钮,会弹窗提示您重新预约时间,仅有一次修改机会,若确认修改时间,建议您重新设置,平台可以帮助提醒双方在规定时间内进行视频;</view>
|
||||
<view class="msgcell">6、视频发起方为医生,医生可根据实际需要随时发起视频交流请求</view> -->
|
||||
</view>
|
||||
<view class="imgcon">
|
||||
<image src="{{static_host}}/applet/doctor/static/images/yishi/yuyue.png" mode="" class="yuyue"/>
|
||||
</view>
|
||||
<view class="btnwraper">
|
||||
<view class="tipcancel" bindtap="onClickHide">不再提醒</view>
|
||||
<view class="tipok" bindtap="onClickHide">确 定</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</van-overlay>
|
||||
@@ -0,0 +1,307 @@
|
||||
.container {
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
background-color: #F4F4F4;
|
||||
z-index: 0;
|
||||
}
|
||||
.safetytips-box{
|
||||
background: rgba(255, 149, 0, 0.1);
|
||||
padding: 9px;
|
||||
}
|
||||
.safetytips{
|
||||
font-family: 'PingFang SC';
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
font-size: 24rpx;
|
||||
line-height: 36rpx;
|
||||
text-align: justify;
|
||||
color: #FF8C39;
|
||||
}
|
||||
.report{
|
||||
float: right;
|
||||
color: #006EFF;
|
||||
}
|
||||
.tui-navigatorbar{
|
||||
position: absolute;
|
||||
top: 0;
|
||||
width: 750rpx;
|
||||
height: 172rpx;
|
||||
background-color: #ffffff;
|
||||
}
|
||||
|
||||
.tui-navigatorbar-back{
|
||||
position: absolute;
|
||||
width: 48rpx;
|
||||
height: 48rpx;
|
||||
left: 40rpx;
|
||||
bottom: 20rpx;
|
||||
}
|
||||
|
||||
.conversation-title {
|
||||
position:absolute;
|
||||
width: 350rpx;
|
||||
height: 88rpx;
|
||||
line-height: 56rpx;
|
||||
font-size: 36rpx;
|
||||
color: #e68080;
|
||||
bottom: 0;
|
||||
left: 200rpx;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
.tui-chatroom-navigatorbar{
|
||||
position: relative;
|
||||
/*top: 0;*/
|
||||
flex-shrink: 0;
|
||||
width: 750rpx;
|
||||
height: 176rpx;
|
||||
background-color: #006EFF;
|
||||
}
|
||||
|
||||
.tui-chatroom-navigatorbar-back{
|
||||
position: absolute;
|
||||
width: 60rpx;
|
||||
height: 60rpx;
|
||||
left: 24rpx;
|
||||
bottom: 15rpx;
|
||||
}
|
||||
|
||||
.conversation-title {
|
||||
position: absolute;
|
||||
width: 350rpx;
|
||||
height: 88rpx;
|
||||
line-height: 56rpx;
|
||||
font-size: 36rpx;
|
||||
color: #000000;
|
||||
bottom: 0;
|
||||
left: 200rpx;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
.list-box {
|
||||
/* position: absolute; */
|
||||
width: 100vw;
|
||||
/* position: fixed; */
|
||||
}
|
||||
.list-box-notips {
|
||||
height: calc(100vh - 284px);
|
||||
}
|
||||
.list-box-group {
|
||||
height: calc(100vh - 248px);
|
||||
top: 254rpx;
|
||||
}
|
||||
.list-box-group-notips {
|
||||
height: calc(100vh - 320px) !important;
|
||||
top: 246rpx;
|
||||
}
|
||||
.input-area {
|
||||
position: relative;
|
||||
z-index: 2;
|
||||
/* z-index: 999999; */
|
||||
/* position: absolute;
|
||||
bottom: 20px; */
|
||||
}
|
||||
.message-list {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.message-input {
|
||||
flex-shrink: 0;
|
||||
width: 100%;
|
||||
padding-bottom: var(--padding);
|
||||
background-color: #ffffff;
|
||||
/* z-index: 999999; */
|
||||
}
|
||||
.calling {
|
||||
position: fixed;
|
||||
z-index: 199;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
right: 0;
|
||||
}
|
||||
.group-profile {
|
||||
top: 151rpx;
|
||||
left: 0;
|
||||
z-index: 8;
|
||||
position: absolute;
|
||||
}
|
||||
.info{
|
||||
/* position: relative; */
|
||||
z-index: 9;
|
||||
height: 100rpx;
|
||||
background-color: rgb(255, 255, 255);
|
||||
display: flex;
|
||||
padding:0 10rpx;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
box-shadow: 0px 2px 4px 0px rgba(0,0,0,0.08);
|
||||
}
|
||||
.left{
|
||||
display: flex;
|
||||
justify-content:space-between;
|
||||
align-items: center;
|
||||
|
||||
}
|
||||
.right{
|
||||
|
||||
font-size: 28rpx;
|
||||
color: #FFFFFF;
|
||||
/* padding-right: 20rpx; */
|
||||
}
|
||||
.time_desc{
|
||||
color:#E34D59;
|
||||
display: flex;
|
||||
font-size: 32rpx;
|
||||
white-space: nowrap;
|
||||
align-items: center;
|
||||
}
|
||||
.control-count-down{
|
||||
display: flex;
|
||||
}
|
||||
.time_desc .item{
|
||||
color:#E34D59;
|
||||
margin-top:3rpx;
|
||||
display:inline-flex;
|
||||
white-space: nowrap;
|
||||
align-items: center;
|
||||
font-size: 32rpx;
|
||||
}
|
||||
.count_time{
|
||||
font-size: 32rpx;
|
||||
display: flex;
|
||||
height:100rpx;
|
||||
align-items: center;
|
||||
}
|
||||
.circle_top{
|
||||
width: 10rpx;
|
||||
height: 10rpx;
|
||||
margin-right: 10rpx;
|
||||
background: #3CC7C0;
|
||||
border-radius: 50%;
|
||||
}
|
||||
.right_txt{
|
||||
background: #3CC7C0;
|
||||
border-radius: 29rpx;
|
||||
padding: 10rpx 20rpx;
|
||||
}
|
||||
.name{
|
||||
font-size: 34rpx;
|
||||
color: #3CC7C0;
|
||||
text-align: center;
|
||||
}
|
||||
.age{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-left: 20rpx;
|
||||
font-size: 34rpx;
|
||||
color: #666666;
|
||||
}
|
||||
.status{
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
background: #FFF2E8;
|
||||
box-shadow: 0px 2px 4px 0px rgba(0,0,0,0.08);
|
||||
border-radius: 10rpx;
|
||||
font-size: 24rpx;
|
||||
color: #FA541C;
|
||||
padding: 10rpx 20rpx;
|
||||
}
|
||||
.status_complete{
|
||||
color: #ffffff;
|
||||
background-color: #c5c5c5;
|
||||
}
|
||||
.dialog{
|
||||
width: 50%;
|
||||
text-align: center;
|
||||
height: 100rpx;
|
||||
line-height: 100rpx;
|
||||
}
|
||||
.dialog_cancel_btn{
|
||||
border-top: 1px solid #E9E9E9;
|
||||
border-right: 1px solid #E9E9E9;
|
||||
}
|
||||
.dialog_confirm_btn{
|
||||
border-top: 1px solid #E9E9E9;
|
||||
color: #3CC7C0;
|
||||
}
|
||||
|
||||
.wrapper {
|
||||
|
||||
width:100%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.block .title{
|
||||
text-align: center;
|
||||
font-size: 48rpx;
|
||||
|
||||
font-weight: 500;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
.wrapper .con{
|
||||
margin-top: 30rpx;
|
||||
background-color: #f2fcff;
|
||||
border-radius: 20rpx;
|
||||
padding: 50rpx 40rpx 30rpx;
|
||||
}
|
||||
.msgcell{
|
||||
margin-top: 10rpx;
|
||||
font-size: 32rpx;
|
||||
}
|
||||
.yuyue{
|
||||
width:343rpx;
|
||||
height:274rpx;
|
||||
}
|
||||
.wrapper .block{
|
||||
margin-top:400rpx;
|
||||
position: relative;
|
||||
width:90%;
|
||||
}
|
||||
.imgcon{
|
||||
margin-top: 0rpx;
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
}
|
||||
.btnwraper{
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
.tipcancel{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: 32rpx;
|
||||
font-weight: 500;
|
||||
color: #FFFFFF;
|
||||
width: 240rpx;
|
||||
height: 88rpx;
|
||||
background: rgba(255,255,255,0.12);
|
||||
border-radius: 44rpx;
|
||||
border: 1rpx solid #FFFFFF;
|
||||
}
|
||||
.tipok{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: 32rpx;
|
||||
font-weight: 500;
|
||||
width: 240rpx;
|
||||
height: 88rpx;
|
||||
background: #3CC7C0;
|
||||
border-radius: 50rpx;
|
||||
color: #FFFFFF;
|
||||
margin-left: 32rpx;
|
||||
}
|
||||
.star{
|
||||
left:50rpx;
|
||||
top:25rpx;
|
||||
position: absolute;
|
||||
width: 150rpx;
|
||||
height: 150rpx;
|
||||
}
|
||||
Reference in New Issue
Block a user