From 253970b86017ee8bf8bfe9a70663ea0e18fe4682 Mon Sep 17 00:00:00 2001
From: wangdongbo <949818794@qq.com>
Date: Thu, 12 Feb 2026 15:06:49 +0800
Subject: [PATCH] no message
---
pages/article/article-detail.vue | 52 ++++++++++++---------
pages/message/chat.scss | 10 ++--
pages/message/components/consult-apply.vue | 2 +
pages/message/components/consult-cancel.vue | 7 +--
pages/message/hooks/use-group-chat.js | 18 +++----
pages/message/index.vue | 5 +-
store/team.js | 6 +--
7 files changed, 54 insertions(+), 46 deletions(-)
diff --git a/pages/article/article-detail.vue b/pages/article/article-detail.vue
index 5e1e900..4de34d3 100644
--- a/pages/article/article-detail.vue
+++ b/pages/article/article-detail.vue
@@ -1,31 +1,34 @@
-
-
-
- 加载中...
-
-
-
- {{ error }}
-
-
-
-
-
- {{ articleData.title }}
- {{ articleData.date }}
+
+
+
+
+ 加载中...
-
-
-
+
+
+ {{ error }}
+
+
+
+
+
+ {{ articleData.title }}
+ {{ articleData.date }}
-
-
-
+
+
+
+
+
+
+
+
@@ -26,6 +25,8 @@ const handleCancel = () => {
padding: 20rpx 32rpx;
background-color: #f5f5f5;
box-sizing: border-box;
+ position: absolute;
+ bottom: 40rpx;
}
.cancel-card {
diff --git a/pages/message/hooks/use-group-chat.js b/pages/message/hooks/use-group-chat.js
index 9b09377..6e7014c 100644
--- a/pages/message/hooks/use-group-chat.js
+++ b/pages/message/hooks/use-group-chat.js
@@ -58,8 +58,8 @@ export default function useGroupChat(groupID) {
return member.isTeamMember ? '/static/default-avatar.svg' : '/static/default-patient-avatar.png'
}
// 获取群聊信息和成员头像
- async function getGroupInfo() {
- const gid = typeof groupID === 'string' ? groupID : groupID.value
+ async function getGroupInfo(id) {
+ const gid = id || groupID;
if (!gid) return
try {
@@ -73,7 +73,6 @@ export default function useGroupChat(groupID) {
status: groupResult.data.orderStatus || 'active',
teamId: groupResult.data.teamId
}
-
// 2. 如果有teamId,获取团队成员头像和名称
if (groupResult.data.teamId) {
const memberMap = await teamStore.getTeamMemberAvatarsAndName(groupResult.data.teamId)
@@ -111,13 +110,14 @@ export default function useGroupChat(groupID) {
}
}
- onShow(() => {
- getGroupInfo()
- })
+ // onShow(() => {
- onUnload(() => {
- // 清理资源
- })
+ // getGroupInfo()
+ // })
+
+ // onUnload(() => {
+ // // 清理资源
+ // })
return {
groupInfo,
diff --git a/pages/message/index.vue b/pages/message/index.vue
index 88a2618..3dd1fb0 100644
--- a/pages/message/index.vue
+++ b/pages/message/index.vue
@@ -456,7 +456,7 @@ onLoad(async (options) => {
if (options.userID) {
chatInfo.value.userID = options.userID;
}
-
+ await getGroupInfo(groupId.value);
// 监听键盘高度变化
uni.onKeyboardHeightChange((res) => {
console.log("键盘高度变化:", res.height);
@@ -474,8 +474,7 @@ onLoad(async (options) => {
});
// 先获取群组信息和成员信息,确保 chatMember 已初始化
- await getGroupInfo();
-
+
checkLoginAndInitTIM();
updateNavigationTitle();
});
diff --git a/store/team.js b/store/team.js
index 0b1956e..63661ac 100644
--- a/store/team.js
+++ b/store/team.js
@@ -40,10 +40,10 @@ export default defineStore("teamStore", () => {
// 获取团队成员头像和名称映射
async function getTeamMemberAvatarsAndName(teamId) {
- if (!teamId || !account.value?.corpId) return {};
+
+ if (!teamId) return {};
const res = await api('getTeamMemberAvatarsAndName', {
- teamId,
- corpId: account.value.corpId
+ teamId
}, false);
if (res && res.success && res.data) {
return res.data;