9.23提交

This commit is contained in:
zoujiandong
2025-09-23 19:00:32 +08:00
parent ae08b222af
commit 70eeb19867
70 changed files with 3187 additions and 140 deletions
+5 -5
View File
@@ -2,7 +2,7 @@
<div class="msg-custom" :style="{ fontSize: (fontSize || 16) + 'px' }">
<view
class="customCell cloumn"
v-if="JSON.parse(msg.attachment.raw).gdxz_ext_data == '[肝胆商城]'"
v-if="JSON.parse(msg.attachment.raw).gdxz_ext_data == '[肝胆商城]' || JSON.parse(msg.attachment.raw).gdxz_type == '[肝胆商城]'"
@click="goToDetail(JSON.parse(msg.attachment.raw).gdxz_url)"
>
<view class="title">{{ JSON.parse(msg.attachment.raw).gdxz_title }}</view>
@@ -18,7 +18,7 @@
</view>
<view
class="customCell cloumn"
v-else-if="JSON.parse(msg.attachment.raw).gdxz_ext_data == '[公益咨询]'"
v-else-if="JSON.parse(msg.attachment.raw).gdxz_ext_data == '[公益咨询]' || JSON.parse(msg.attachment.raw).gdxz_type == '[公益咨询]'"
@click="goDetail(JSON.parse(msg.attachment.raw).gdxz_id)"
>
<view class="title">{{ JSON.parse(msg.attachment.raw).gdxz_title }}</view>
@@ -34,7 +34,7 @@
</view>
<view
class="customCell cloumn"
v-else-if="JSON.parse(msg.attachment.raw).gdxz_ext_data == '[门诊公告]'"
v-else-if="JSON.parse(msg.attachment.raw).gdxz_ext_data == '[门诊公告]' || JSON.parse(msg.attachment.raw).gdxz_type == '[门诊公告]'"
@click="goToDetail(JSON.parse(msg.attachment.raw).gdxz_url)"
>
@@ -53,7 +53,7 @@
class="customCell cloumn"
v-else-if="
JSON.parse(msg.attachment.raw).gdxz_ext_data == '[图文科普]' ||
JSON.parse(msg.attachment.raw).gdxz_ext_data == '[视频科普]'
JSON.parse(msg.attachment.raw).gdxz_ext_data == '[视频科普]' || JSON.parse(msg.attachment.raw).gdxz_type == '[患教科普]' || JSON.parse(msg.attachment.raw).gdxz_type == '[视频科普]'
"
@click="goToDetail(JSON.parse(msg.attachment.raw).gdxz_url)"
>
@@ -73,7 +73,7 @@
<view
class="customCell cloumn"
v-else-if="JSON.parse(msg.attachment.raw).gdxz_ext_data == '[互联网医院]'"
v-else-if="JSON.parse(msg.attachment.raw).gdxz_ext_data == '[互联网医院]' || JSON.parse(msg.attachment.raw).gdxz_type == '[互联网医院]'"
@click="goToMiniProgram"
>
+94 -13
View File
@@ -56,7 +56,7 @@
<div class="msg-button-group">
<div
@tap="handleAudioVisible"
v-if="!(isWeb || isHarmonyOs)"
v-if="!(isWeb || isHarmonyOs || isGroupSend)"
class="msg-input-button"
>
<Icon
@@ -139,7 +139,7 @@
class="send-more-panel"
@click.stop="() => {}"
>
<div class="send-more-panel-item-wrapper">
<div class="send-more-panel-item-wrapper" v-if="!(isGroupSend)">
<div
class="send-more-panel-item"
@tap="(event:any) => handleSendVideoMsg('camera', event)"
@@ -148,7 +148,7 @@
</div>
<div class="icon-text">{{ t('shootText') }}</div>
</div>
<div class="send-more-panel-item-wrapper">
<div class="send-more-panel-item-wrapper" v-if="!(isGroupSend)">
<div
class="send-more-panel-item"
@tap="(event: any) => handleSendVideoMsg('album', event)"
@@ -306,6 +306,7 @@ import {
isAndroidOrIosApp,
isHarmonyOs,
} from '@/utils/im/index'
// @ts-ignore
import UniPopup from '@/components/uni-components/uni-popup/components/uni-popup/uni-popup.vue'
// @ts-ignore
@@ -362,12 +363,14 @@ const props = withDefaults(
defineProps<{
conversationType: V2NIMConst.V2NIMConversationType
to: string
isGroupSend?: boolean
replyMsgsMap?: {
[key: string]: V2NIMMessageForUI
}
}>(),
{}
)
const emits = defineEmits(['send'])
/** 会话ID */
const conversationId =
props.conversationType ===
@@ -418,6 +421,22 @@ const handleCall = (type: number) => {
})
}
}
const outPatientList = ref([]);
const getListOutPatient = async () => {
const res = await api.listOutPatient({
page:1,
});
if(res.code == 200){
outPatientList.value = res.data.list.list;
}
}
const stopOutPatientList = ref([]);
const getStopOutPatientList = async () => {
const res = await api.stopOutPatientList();
if(res.code == 200){
stopOutPatientList.value = res.data;
}
}
onShow(() => {
uni.$on('articelItem', (article) => {
console.log('article', article);
@@ -433,6 +452,8 @@ onShow(() => {
uni.$on('quickReply', (reply) => {
inputText.value= reply;
});
getListOutPatient();
getStopOutPatientList();
});
onUnload(() => {
uni.$off('articelItem');
@@ -539,6 +560,7 @@ const onSelectSince = (type: string) => {
}
}
/** 点击@ 群成员 */
const handleMentionItemClick = (member: MentionedMember) => {
//@ts-ignore
@@ -619,8 +641,19 @@ const handleSendTextMsg = (type:string) => {
let mallText='纽娃复合营养素固体饮料主要成分是:蜂花粉、乳清蛋白粉、灰树花粉、低聚木糖、蚕蛹氨基酸、麦芽粉、薏苡仁粉、烟酸、磷脂,以及其他调味品、辅助原料。科学配比制成,含有丰富的蛋白质、氨基酸、维生素、微量元素及其他营养元素,点击链接了解详情。'
let text = type==='mall'?mallText:replaceEmoji(inputText.value)
const textMsg = uni.$UIKitNIM.V2NIMMessageCreator.createTextMessage(text)
let serverExtension={"gdxz_nickName":"测试","gdxz_sessionType":"general"};
uni.$UIKitStore.msgStore
//let serverExtension={"gdxz_nickName":"测试","gdxz_sessionType":"general"};
if(props.isGroupSend){
emits('send',{
content:textMsg,
msg_type:1,
})
inputText.value = ''
isReplyMsg.value = false
replyMsg.value = undefined
selectedAtMembers.value = [];
}else{
uni.$UIKitStore.msgStore
.sendMessageActive({
msg: textMsg as unknown as V2NIMMessage,
conversationId,
@@ -648,6 +681,7 @@ const handleSendTextMsg = (type:string) => {
senCustomMsg('mall');
}
}
}
/** 发送文件消息 */
const handleSendFileMsg = () => {
@@ -763,7 +797,22 @@ const handleSendImageMsg = () => {
const imgMsg = uni.$UIKitNIM.V2NIMMessageCreator.createImageMessage(
res.tempFilePaths[0]
)
if(props.isGroupSend){
const fileManager = uni.getFileSystemManager();
fileManager.readFile({
filePath: res.tempFilePaths[0],
encoding: 'base64',
success: (res) => {
emits('send',{
content:res.data,
msg_type:2,
})
},
fail: (error) => {
console.log('chooseImage', error)
}
})
}else{
uni.$UIKitStore.msgStore
.sendMessageActive({
msg: imgMsg as unknown as V2NIMMessage,
@@ -783,28 +832,43 @@ const handleSendImageMsg = () => {
title: t('sendImageFailedText'),
})
})
},
/** uniapp 提供的chooseImage api 在鸿蒙上表现为不支持选择gif,在其他端支持 */
fail: (error) => {
}
},
/** uniapp 提供的chooseImage api 在鸿蒙上表现为不支持选择gif,在其他端支持 */
fail: (error) => {
console.log('chooseImage', error)
},
/** 没有开启权限时,提示开启权限 */
complete: handleNoPermission,
})
}
const senCustomMsg = (type:string) => {
let rawStr="";
let text="";
let msg_type=0;
let msg_content="";
let doctor_id="";
if(type == 'hospital'){
doctor_id='';
msg_type=8;
msg_content="https://img.applets.igandanyiyuan.com/applet/admin/avatar/2023071813261420200708181049.png";
text="[互联网医院]";
rawStr=`{\"gdxz_content\":\"我已入驻肝胆相照互联网医院,复诊购药一站式服务,快来看看吧\",\"gdxz_ext_data\":\"[互联网医院]\",\"gdxz_id\":\"1681174885629431808\",\"gdxz_img\":\"https://img.applets.igandanyiyuan.com/applet/admin/avatar/2023071813261420200708181049.png\",\"gdxz_title\":\"肝胆相照互联网医院\",\"gdxz_type\":\"[互联网医院]\",\"gdxz_url\":\"\"}`;
}else if(type == 'mall'){
msg_type=6;
msg_content="";
text="[肝胆商城]";
rawStr=`{\"gdxz_content\":\"肝胆相照®肝胆病在线公共服务平台\",\"gdxz_ext_data\":\"[肝胆商城]\",\"gdxz_id\":\"\",\"gdxz_img\":\"\",\"gdxz_title\":\"纽娃复合营养素固体饮料\",\"gdxz_type\":\"[肝胆商城]\",\"gdxz_url\":\"https://wx.igandan.com/shop_notify/setInfo?patient_uuid=${patient_uuid}&expert_uuid=${expert_uuid}\"}`;
}else if(type == 'outpatient'){
msg_type=5;
msg_content="";
text="[门诊公告]";
rawStr=`{\"gdxz_content\":\"门诊详情\",\"gdxz_ext_data\":\"[门诊公告]\",\"gdxz_id\":\"\",\"gdxz_img\":\"\",\"gdxz_title\":\"${expert_name}医生门诊详情\",\"gdxz_type\":\"[门诊公告]\",\"gdxz_url\":\"https://dev-wx.igandan.com/wxPatient/index.htm#/outPatient?link=share&expertUuid=${expert_uuid}\"}`
}else if(type == 'article'){
msg_type=3;
msg_content=articleInfo.value.uuid;
text="[图文科普]";
let content='"'+articleInfo.value.summary+'"';
let id='"'+articleInfo.value.uuid+'"';
@@ -812,6 +876,8 @@ const senCustomMsg = (type:string) => {
let path='"'+docUrl+articleInfo.value.path+'"';
rawStr=`{\"gdxz_content\":${content},\"gdxz_ext_data\":\"[图文科普]\",\"gdxz_id\":${id},\"gdxz_img\":\"http://doc.igandan.org/app/book/pdf/2019/20190613152617.png\",\"gdxz_title\":${title},\"gdxz_type\":\"[图文科普]\",\"gdxz_url\":${path}}`
}else if(type == 'video'){
msg_type=4;
msg_content=videoInfo.value.uuid;
let content='"'+videoInfo.value.note+'"';
let id='"'+videoInfo.value.uuid+'"';
let title='"'+videoInfo.value.name+'"';
@@ -820,6 +886,12 @@ const senCustomMsg = (type:string) => {
rawStr=`{\"gdxz_content\":${content},\"gdxz_ext_data\":\"[视频科普]\",\"gdxz_id\":${id},\"gdxz_img\":\"http://doc.igandan.org/app/book/pdf/2019/20190613152617.png\",\"gdxz_title\":${title},\"gdxz_type\":\"[视频科普]\",\"gdxz_url\":${path}}`
}
const customMsg = uni.$UIKitNIM.V2NIMMessageCreator.createCustomMessage(text,rawStr)
if(props.isGroupSend){
emits('send',{
content:msg_content,
msg_type:msg_type,
})
}else{
uni.$UIKitStore.msgStore
.sendMessageActive({
msg: customMsg as unknown as V2NIMMessage,
@@ -839,6 +911,7 @@ const senCustomMsg = (type:string) => {
title: '发送失败',
})
})
}
}
const handleCustom = (type: string, event: any) => {
@@ -853,10 +926,18 @@ const handleCustom = (type: string, event: any) => {
showMallModal.value = true
patientListByGBK();
}else if(type == 'outpatient'){
senCustomMsg('outpatient');
// navTo({
// url: '/pages_chat/outpatient/outpatient',
// })
// navTo({
// url: '/pages_chat/outpatient/outpatient',
// })
if( outPatientList.value.length==0 && stopOutPatientList.value.length==0 ){
navTo({
url: '/pages_chat/outpatient/outpatient',
})
}else{
senCustomMsg('outpatient');
}
}else if(type == 'hospital'){
senCustomMsg('hospital');
}