提交
This commit is contained in:
parent
afbbb12ec7
commit
b475223370
@ -26,7 +26,7 @@
|
||||
|
||||
<script setup>
|
||||
import { onLoad } from "@dcloudio/uni-app";
|
||||
import { getArticle } from "@/utils/api.js";
|
||||
import api from "@/utils/api.js";
|
||||
import { ref } from "vue";
|
||||
const env = __VITE_ENV__;
|
||||
const corpId = env.MP_CORP_ID;
|
||||
@ -75,7 +75,7 @@ const loadArticle = async () => {
|
||||
loading.value = true;
|
||||
error.value = "";
|
||||
try {
|
||||
const res = await getArticle({ id: articleId, corpId });
|
||||
const res = await api("getArticle", { id: articleId, corpId });
|
||||
|
||||
if (res.success && res.data) {
|
||||
// 格式化日期
|
||||
|
||||
@ -109,12 +109,7 @@
|
||||
<script setup>
|
||||
import { ref, onMounted } from "vue";
|
||||
import { onLoad } from "@dcloudio/uni-app";
|
||||
import {
|
||||
getArticleCateList,
|
||||
getArticleList,
|
||||
getArticle,
|
||||
sendArticleMessage,
|
||||
} from "@/utils/api.js";
|
||||
import api from "@/utils/api.js";
|
||||
import useAccountStore from "@/store/account.js";
|
||||
import EmptyData from "@/components/empty-data.vue";
|
||||
|
||||
@ -154,7 +149,7 @@ const previewPopup = ref(null);
|
||||
// 获取分类列表
|
||||
const getCategoryList = async () => {
|
||||
try {
|
||||
const res = await getArticleCateList({ corpId: corpId });
|
||||
const res = await api("getArticleCateList", { corpId: corpId });
|
||||
if (res.success && res.list) {
|
||||
const cates = res.list || [];
|
||||
categoryList.value = [{ _id: "", label: "全部" }, ...cates];
|
||||
@ -203,7 +198,7 @@ const loadArticleList = async () => {
|
||||
params.cateIds = [currentCateId.value];
|
||||
}
|
||||
|
||||
const res = await getArticleList(params);
|
||||
const res = await api("getArticleList", params);
|
||||
if (res.success && res.list) {
|
||||
const { list = [], total: count = 0 } = res;
|
||||
const formattedList = list.map((item) => {
|
||||
@ -286,7 +281,7 @@ const processRichTextContent = (html) => {
|
||||
const previewArticle = async (article) => {
|
||||
try {
|
||||
uni.showLoading({ title: "加载中..." });
|
||||
const res = await getArticle({ id: article._id, corpId: corpId });
|
||||
const res = await api("getArticle", { id: article._id, corpId: corpId });
|
||||
uni.hideLoading();
|
||||
|
||||
if (res.success && res.data) {
|
||||
@ -320,9 +315,9 @@ const closePreview = () => {
|
||||
const sendArticle = async (article) => {
|
||||
try {
|
||||
const { doctorInfo } = useAccountStore();
|
||||
const result = await sendArticleMessage({
|
||||
const result = await api("sendArticleMessage", {
|
||||
groupId: pageParams.value.groupId,
|
||||
fromAccount: doctorInfo.weChatOpenId,
|
||||
fromAccount: doctorInfo.userid,
|
||||
articleId: article._id,
|
||||
title: article.title || "宣教文章",
|
||||
imgUrl: article.cover || "",
|
||||
|
||||
@ -85,7 +85,6 @@
|
||||
}}</text>
|
||||
</view>
|
||||
|
||||
|
||||
<view class="message-bubble" :class="getBubbleClass(message)">
|
||||
<!-- 消息内容 -->
|
||||
<MessageTypes
|
||||
@ -132,7 +131,11 @@
|
||||
ref="chatInputRef"
|
||||
:timChatManager="timChatManager"
|
||||
:formatTime="formatTime"
|
||||
:groupId="chatInfo.conversationID ? chatInfo.conversationID.replace('GROUP', '') : ''"
|
||||
:groupId="
|
||||
chatInfo.conversationID
|
||||
? chatInfo.conversationID.replace('GROUP', '')
|
||||
: ''
|
||||
"
|
||||
:userId="openid"
|
||||
:corpId="corpId"
|
||||
@scrollToBottom="() => scrollToBottom(true)"
|
||||
@ -165,7 +168,7 @@ import {
|
||||
handleViewDetail,
|
||||
checkIMConnectionStatus,
|
||||
} from "@/utils/chat-utils.js";
|
||||
import { sendConsultRejectedMessage, endConsultation, sendArticleMessage } from "@/utils/api.js";
|
||||
import api from "@/utils/api.js";
|
||||
import useGroupChat from "./hooks/use-group-chat";
|
||||
import MessageTypes from "./components/message-types.vue";
|
||||
import ChatInput from "./components/chat-input.vue";
|
||||
@ -177,7 +180,7 @@ const timChatManager = globalTimChatManager;
|
||||
|
||||
// 获取环境变量
|
||||
const env = __VITE_ENV__;
|
||||
const corpId = env.MP_CORP_ID || '';
|
||||
const corpId = env.MP_CORP_ID || "";
|
||||
|
||||
// 获取登录状态
|
||||
const { account, openid, isIMInitialized } = storeToRefs(useAccountStore());
|
||||
@ -202,21 +205,21 @@ const chatInfo = ref({
|
||||
userID: "",
|
||||
avatar: "/static/home/avatar.svg",
|
||||
});
|
||||
|
||||
// 评价弹窗状态
|
||||
const isEvaluationPopupOpen = ref(false);
|
||||
|
||||
// 接受问诊状态
|
||||
const showConsultAccept = ref(false);
|
||||
// 订单状态
|
||||
const orderStatus = ref("");
|
||||
|
||||
// 计算弹框显示状态 - 只有 pending 状态才显示接受问诊组件
|
||||
const showConsultAccept = computed(() => orderStatus.value === "pending");
|
||||
|
||||
// 拒绝原因对话框状态
|
||||
const showRejectReasonModal = ref(false);
|
||||
|
||||
// 消息列表相关状态
|
||||
const messageList = ref([]);
|
||||
const isLoading = ref(false);
|
||||
const scrollIntoView = ref("");
|
||||
|
||||
// 分页加载相关状态
|
||||
const isLoadingMore = ref(false);
|
||||
const isCompleted = ref(false);
|
||||
@ -258,46 +261,31 @@ function isSystemMessage(message) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// 获取群组订单状态
|
||||
const fetchGroupOrderStatus = async () => {
|
||||
try {
|
||||
const result = await api("getGroupListByGroupId", {
|
||||
groupId: groupId.value,
|
||||
});
|
||||
|
||||
if (result.success && result.data) {
|
||||
orderStatus.value = result.data.orderStatus || "";
|
||||
console.log("获取群组订单状态:", {
|
||||
orderStatus: orderStatus.value,
|
||||
groupId: groupId.value,
|
||||
});
|
||||
} else {
|
||||
console.error("获取群组订单状态失败:", result.message);
|
||||
}
|
||||
} catch (error) {
|
||||
console.error("获取群组订单状态异常:", error);
|
||||
}
|
||||
};
|
||||
|
||||
// 检查是否有待接诊的系统消息
|
||||
function checkConsultPendingStatus() {
|
||||
// 查找最新的系统消息
|
||||
for (let i = messageList.value.length - 1; i >= 0; i--) {
|
||||
const message = messageList.value[i];
|
||||
|
||||
if (message.type === "TIMCustomElem" && message.payload?.data) {
|
||||
try {
|
||||
const data =
|
||||
typeof message.payload.data === "string"
|
||||
? JSON.parse(message.payload.data)
|
||||
: message.payload.data;
|
||||
|
||||
// 如果是 consult_pending 类型的系统消息,显示接受组件
|
||||
if (
|
||||
data.type === "system_message" &&
|
||||
data.messageType === "consult_pending"
|
||||
) {
|
||||
showConsultAccept.value = true;
|
||||
return;
|
||||
}
|
||||
|
||||
// 如果是其他系统消息类型(如已接诊、已结束、已拒绝等),隐藏接受组件
|
||||
if (
|
||||
data.type === "system_message" &&
|
||||
(data.messageType === "consult_accepted" ||
|
||||
data.messageType === "consult_ended" ||
|
||||
data.messageType === "consult_rejected")
|
||||
) {
|
||||
showConsultAccept.value = false;
|
||||
return;
|
||||
}
|
||||
} catch (error) {
|
||||
console.error("解析系统消息失败:", error);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 如果没有找到相关系统消息,隐藏接受组件
|
||||
showConsultAccept.value = false;
|
||||
// 直接获取最新的订单状态
|
||||
fetchGroupOrderStatus();
|
||||
}
|
||||
|
||||
// 获取消息气泡样式类
|
||||
@ -336,7 +324,7 @@ const checkLoginAndInitTIM = async () => {
|
||||
uni.showLoading({
|
||||
title: "连接中...",
|
||||
});
|
||||
const success = await initIMAfterLogin(openid.value);
|
||||
const success = await initIMAfterLogin();
|
||||
uni.hideLoading();
|
||||
if (!success) {
|
||||
uni.showToast({
|
||||
@ -391,8 +379,10 @@ const initTIMCallbacks = async () => {
|
||||
messageList.value.push(message);
|
||||
console.log("✓ 添加消息到列表,当前消息数量:", messageList.value.length);
|
||||
|
||||
// 检查是否有待接诊的系统消息
|
||||
checkConsultPendingStatus();
|
||||
// 如果是系统消息,重新获取订单状态
|
||||
if (isSystemMessage(message)) {
|
||||
fetchGroupOrderStatus();
|
||||
}
|
||||
|
||||
// 立即滚动到底部,不使用延迟
|
||||
nextTick(() => {
|
||||
@ -514,7 +504,7 @@ const initTIMCallbacks = async () => {
|
||||
};
|
||||
|
||||
// 加载消息列表
|
||||
const loadMessageList = () => {
|
||||
const loadMessageList = async () => {
|
||||
if (isLoading.value) {
|
||||
console.log("正在加载中,跳过重复加载");
|
||||
return;
|
||||
@ -531,6 +521,9 @@ const loadMessageList = () => {
|
||||
mask: false,
|
||||
});
|
||||
|
||||
// 获取群组订单状态
|
||||
await fetchGroupOrderStatus();
|
||||
|
||||
timChatManager.enterConversation(chatInfo.value.conversationID || "test1");
|
||||
|
||||
// 标记会话为已读
|
||||
@ -703,7 +696,6 @@ onHide(() => {
|
||||
stopIMMonitoring();
|
||||
});
|
||||
|
||||
|
||||
const sendCommonPhrase = (content) => {
|
||||
if (chatInputRef.value) {
|
||||
chatInputRef.value.sendTextMessageFromPhrase(content);
|
||||
@ -721,35 +713,27 @@ const handleAcceptConsult = async () => {
|
||||
title: "处理中...",
|
||||
});
|
||||
|
||||
// 发送接受问诊的系统消息
|
||||
const customMessage = {
|
||||
data: JSON.stringify({
|
||||
type: "system_message",
|
||||
messageType: "consult_accepted",
|
||||
content: "医生已接诊",
|
||||
timestamp: Date.now(),
|
||||
}),
|
||||
description: "系统消息标记",
|
||||
extension: "",
|
||||
};
|
||||
|
||||
const message = timChatManager.tim.createCustomMessage({
|
||||
to: chatInfo.value.conversationID.replace("GROUP", ""),
|
||||
conversationType: timChatManager.TIM.TYPES.CONV_GROUP,
|
||||
payload: customMessage,
|
||||
// 调用后端接口接受问诊
|
||||
const result = await api("acceptConsultation", {
|
||||
groupId: groupId.value,
|
||||
adminAccount: account.value?.userId || "",
|
||||
extraData: {
|
||||
acceptedBy: account.value?.userId || "",
|
||||
acceptedByName: account.value?.name || "医生",
|
||||
},
|
||||
});
|
||||
|
||||
const sendResult = await timChatManager.tim.sendMessage(message);
|
||||
uni.hideLoading();
|
||||
|
||||
if (sendResult.code === 0) {
|
||||
showConsultAccept.value = false;
|
||||
uni.hideLoading();
|
||||
if (result.success) {
|
||||
// 重新获取订单状态
|
||||
await fetchGroupOrderStatus();
|
||||
uni.showToast({
|
||||
title: "已接受问诊",
|
||||
icon: "success",
|
||||
});
|
||||
} else {
|
||||
throw new Error(sendResult.message || "发送失败");
|
||||
throw new Error(result.message || "操作失败");
|
||||
}
|
||||
} catch (error) {
|
||||
console.error("接受问诊失败:", error);
|
||||
@ -780,11 +764,11 @@ const handleRejectReasonConfirm = async (reason) => {
|
||||
const memberName = account.value?.name || "医生";
|
||||
|
||||
// 获取群组ID
|
||||
const groupId = chatInfo.value.conversationID.replace("GROUP", "");
|
||||
const currentGroupId = chatInfo.value.conversationID.replace("GROUP", "");
|
||||
|
||||
// 调用后端接口发送拒绝消息
|
||||
const result = await sendConsultRejectedMessage({
|
||||
groupId,
|
||||
const result = await api("sendConsultRejectedMessage", {
|
||||
groupId: currentGroupId,
|
||||
memberName,
|
||||
reason,
|
||||
});
|
||||
@ -792,7 +776,8 @@ const handleRejectReasonConfirm = async (reason) => {
|
||||
uni.hideLoading();
|
||||
|
||||
if (result.success) {
|
||||
showConsultAccept.value = false;
|
||||
// 重新获取订单状态
|
||||
await fetchGroupOrderStatus();
|
||||
uni.showToast({
|
||||
title: "已拒绝问诊",
|
||||
icon: "success",
|
||||
@ -821,7 +806,7 @@ const handleEndConsult = async () => {
|
||||
title: "处理中...",
|
||||
});
|
||||
// 调用结束问诊接口,直接传入 groupId
|
||||
const result = await endConsultation({
|
||||
const result = await api("endConsultation", {
|
||||
groupId: groupId.value,
|
||||
adminAccount: account.value?.userId || "",
|
||||
extraData: {
|
||||
@ -862,7 +847,6 @@ onUnmounted(() => {
|
||||
uni.$off("sendSurvey");
|
||||
});
|
||||
|
||||
|
||||
// 监听问卷发送事件
|
||||
uni.$on("sendSurvey", async (data) => {
|
||||
const { survey, corpId, userId, sendSurveyId } = data;
|
||||
@ -885,8 +869,7 @@ uni.$on("sendSurvey", async (data) => {
|
||||
const customerName = chatInfo.value.customerName || "";
|
||||
|
||||
// 创建问卷记录
|
||||
const { createSurveyRecord } = await import("@/utils/api.js");
|
||||
const recordRes = await createSurveyRecord({
|
||||
const recordRes = await api("createSurveyRecord", {
|
||||
corpId,
|
||||
userId,
|
||||
surveryId: survey._id,
|
||||
|
||||
@ -95,7 +95,7 @@ const initIM = async () => {
|
||||
uni.showLoading({
|
||||
title: "连接中...",
|
||||
});
|
||||
const success = await initIMAfterLogin(openid.value);
|
||||
const success = await initIMAfterLogin();
|
||||
uni.hideLoading();
|
||||
|
||||
if (!success) {
|
||||
@ -122,7 +122,7 @@ const initIM = async () => {
|
||||
// 加载会话列表
|
||||
const loadConversationList = async () => {
|
||||
if (loading.value) return;
|
||||
// loading.value = true;
|
||||
loading.value = true;
|
||||
|
||||
try {
|
||||
console.log("开始加载群聊列表");
|
||||
@ -224,8 +224,10 @@ const setupConversationListener = () => {
|
||||
console.log("会话列表更新事件:", eventData);
|
||||
|
||||
// 如果是新消息导致的会话更新
|
||||
if (eventData.reason === "NEW_MESSAGE_RECEIVED_IN_CURRENT_CONVERSATION" ||
|
||||
eventData.reason === "NEW_MESSAGE_RECEIVED") {
|
||||
if (
|
||||
eventData.reason === "NEW_MESSAGE_RECEIVED_IN_CURRENT_CONVERSATION" ||
|
||||
eventData.reason === "NEW_MESSAGE_RECEIVED"
|
||||
) {
|
||||
const conversation = eventData.conversation;
|
||||
if (!conversation) return;
|
||||
|
||||
@ -237,8 +239,10 @@ const setupConversationListener = () => {
|
||||
if (conversationIndex !== -1) {
|
||||
// 更新现有会话
|
||||
const existingConversation = conversationList.value[conversationIndex];
|
||||
existingConversation.lastMessage = conversation.lastMessage || "暂无消息";
|
||||
existingConversation.lastMessageTime = conversation.lastMessageTime || Date.now();
|
||||
existingConversation.lastMessage =
|
||||
conversation.lastMessage || "暂无消息";
|
||||
existingConversation.lastMessageTime =
|
||||
conversation.lastMessageTime || Date.now();
|
||||
existingConversation.unreadCount = conversation.unreadCount || 0;
|
||||
|
||||
// 将该会话移到顶部
|
||||
@ -365,36 +369,36 @@ onLoad(() => {
|
||||
});
|
||||
|
||||
// 页面显示
|
||||
// onShow(async () => {
|
||||
// try {
|
||||
// // 初始化IM
|
||||
// const imReady = await initIM();
|
||||
// if (!imReady) {
|
||||
// console.error("IM初始化失败");
|
||||
// return;
|
||||
// }
|
||||
onShow(async () => {
|
||||
try {
|
||||
// 初始化IM
|
||||
const imReady = await initIM();
|
||||
if (!imReady) {
|
||||
console.error("IM初始化失败");
|
||||
return;
|
||||
}
|
||||
|
||||
// // 先加载初始会话列表
|
||||
// await loadConversationList();
|
||||
// 先加载初始会话列表
|
||||
await loadConversationList();
|
||||
|
||||
// // 再设置监听器,后续通过事件更新列表
|
||||
// setupConversationListener();
|
||||
// } catch (error) {
|
||||
// console.error("页面初始化失败:", error);
|
||||
// uni.showToast({
|
||||
// title: "初始化失败,请重试",
|
||||
// icon: "none",
|
||||
// });
|
||||
// }
|
||||
// });
|
||||
// 再设置监听器,后续通过事件更新列表
|
||||
setupConversationListener();
|
||||
} catch (error) {
|
||||
console.error("页面初始化失败:", error);
|
||||
uni.showToast({
|
||||
title: "初始化失败,请重试",
|
||||
icon: "none",
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
// 页面隐藏
|
||||
onHide(() => {
|
||||
// 移除消息监听
|
||||
// if (globalTimChatManager) {
|
||||
// globalTimChatManager.setCallback("onConversationListUpdated", null);
|
||||
// globalTimChatManager.setCallback("onMessageReceived", null);
|
||||
// }
|
||||
if (globalTimChatManager) {
|
||||
globalTimChatManager.setCallback("onConversationListUpdated", null);
|
||||
globalTimChatManager.setCallback("onMessageReceived", null);
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
@ -87,11 +87,7 @@
|
||||
|
||||
<script setup>
|
||||
import { ref, onMounted } from "vue";
|
||||
import {
|
||||
getSurveyCateList,
|
||||
getSurveyList,
|
||||
createSurveyRecord,
|
||||
} from "@/utils/api.js";
|
||||
import api from "@/utils/api.js";
|
||||
import useAccountStore from "@/store/account.js";
|
||||
import EmptyData from "@/components/empty-data.vue";
|
||||
|
||||
@ -119,7 +115,7 @@ const emptyText = ref("");
|
||||
// 获取分类列表
|
||||
const getCategoryList = async () => {
|
||||
try {
|
||||
const res = await getSurveyCateList({ corpId: corpId });
|
||||
const res = await api("getSurveyCateList", { corpId: corpId });
|
||||
if (res.success && res.list) {
|
||||
const cates = res.list || [];
|
||||
categoryList.value = [{ _id: "", label: "全部" }, ...cates];
|
||||
@ -169,7 +165,7 @@ const loadSurveyList = async () => {
|
||||
params.cateIds = [currentCateId.value];
|
||||
}
|
||||
|
||||
const res = await getSurveyList(params);
|
||||
const res = await api("getSurveyList", params);
|
||||
if (res.success && res) {
|
||||
const { list = [], total: count = 0 } = res;
|
||||
|
||||
|
||||
@ -52,15 +52,7 @@ export default defineStore("accountStore", () => {
|
||||
account.value = res.data;
|
||||
openid.value = res.data.openid;
|
||||
// 登录成功后初始化腾讯IM
|
||||
try {
|
||||
console.log('开始初始化腾讯IM,userID:', res.data.openid);
|
||||
await initGlobalTIM(res.data.openid);
|
||||
isIMInitialized.value = true;
|
||||
console.log('腾讯IM初始化成功');
|
||||
} catch (imError) {
|
||||
console.error('腾讯IM初始化失败:', imError);
|
||||
// IM初始化失败不影响登录流程
|
||||
}
|
||||
|
||||
await getDoctorInfo(openid.value);
|
||||
return res.data
|
||||
}
|
||||
@ -79,18 +71,21 @@ export default defineStore("accountStore", () => {
|
||||
weChatOpenId: account.value.openid,
|
||||
});
|
||||
doctorInfo.value = res?.data || null;
|
||||
await initIMAfterLogin();
|
||||
} catch (e) {
|
||||
console.error('获取医生信息失败:', e);
|
||||
}
|
||||
}
|
||||
|
||||
async function initIMAfterLogin(userID) {
|
||||
async function initIMAfterLogin() {
|
||||
if (isIMInitialized.value) {
|
||||
return true;
|
||||
}
|
||||
try {
|
||||
const userID = doctorInfo.value.userid;
|
||||
console.log('开始初始化腾讯IM,userID:', userID);
|
||||
await initGlobalTIM(userID);
|
||||
isIMInitialized.value = true;
|
||||
console.log('腾讯IM初始化成功');
|
||||
return true;
|
||||
} catch (error) {
|
||||
console.error('IM初始化失败:', error);
|
||||
|
||||
79
utils/api.js
79
utils/api.js
@ -40,7 +40,7 @@ const urlsConfig = {
|
||||
getArticle: 'getArticle',
|
||||
addArticleSendRecord: 'addArticleSendRecord'
|
||||
},
|
||||
|
||||
|
||||
survery: {
|
||||
getSurveyCateList: 'getSurveryCateList',
|
||||
getSurveyList: 'getList',
|
||||
@ -65,7 +65,9 @@ const urlsConfig = {
|
||||
getChatRecordsByGroupId: "getChatRecordsByGroupId",
|
||||
sendConsultRejectedMessage: "sendConsultRejectedMessage",
|
||||
endConsultation: "endConsultation",
|
||||
getGroupListByGroupId: "getGroupListByGroupId"
|
||||
getGroupListByGroupId: "getGroupListByGroupId",
|
||||
acceptConsultation: "acceptConsultation",
|
||||
sendArticleMessage: "sendArticleMessage"
|
||||
}
|
||||
|
||||
}
|
||||
@ -99,76 +101,3 @@ export default async function api(urlId, data) {
|
||||
})
|
||||
}
|
||||
|
||||
// 宣教文章相关 API
|
||||
export async function getArticleCateList(data) {
|
||||
return api('getArticleCateList', data);
|
||||
}
|
||||
|
||||
export async function getArticleList(data) {
|
||||
return api('getArticleList', data);
|
||||
}
|
||||
|
||||
export async function getArticle(data) {
|
||||
return api('getArticle', data);
|
||||
}
|
||||
|
||||
export async function addArticleSendRecord(data) {
|
||||
return api('addArticleSendRecord', data);
|
||||
}
|
||||
|
||||
// 问卷相关 API
|
||||
export async function getSurveyCateList(data) {
|
||||
return api('getSurveyCateList', data);
|
||||
}
|
||||
|
||||
export async function getSurveyList(data) {
|
||||
return api('getSurveyList', data);
|
||||
}
|
||||
|
||||
export async function createSurveyRecord(data) {
|
||||
return api('createSurveyRecord', data);
|
||||
}
|
||||
|
||||
export async function getSurveyDetail(data) {
|
||||
return api('getSurveyDetail', data);
|
||||
}
|
||||
|
||||
|
||||
|
||||
// IM 系统消息相关 API
|
||||
export async function sendConsultRejectedMessage(data) {
|
||||
return request({
|
||||
url: '/getYoucanData/im',
|
||||
data: {
|
||||
type: 'sendConsultRejectedMessage',
|
||||
...data
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// 发送宣教文章消息
|
||||
export async function sendArticleMessage(data) {
|
||||
return request({
|
||||
url: '/getYoucanData/im',
|
||||
data: {
|
||||
type: 'sendArticleMessage',
|
||||
...data
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// 结束问诊接口
|
||||
export async function endConsultation(data) {
|
||||
return request({
|
||||
url: '/getYoucanData/im',
|
||||
data: {
|
||||
type: 'endConsultation',
|
||||
...data
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// 根据群组ID获取群组记录
|
||||
export async function getGroupListByGroupId(data) {
|
||||
return api('getGroupListByGroupId', data);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user