From 01575ef51add7f0d5e953738de1d5c1ba6693c71 Mon Sep 17 00:00:00 2001
From: wangdongbo <949818794@qq.com>
Date: Fri, 30 Jan 2026 14:25:09 +0800
Subject: [PATCH 1/5] no message
---
.env.development | 2 +-
pages/message/article-list.vue | 17 +++++++++++++++--
pages/message/components/chat-input.vue | 3 ++-
pages/message/index.vue | 8 ++++++++
4 files changed, 26 insertions(+), 4 deletions(-)
diff --git a/.env.development b/.env.development
index c00ccb1..40eeb46 100644
--- a/.env.development
+++ b/.env.development
@@ -1,7 +1,7 @@
MP_API_BASE_URL=http://localhost:8080
MP_IMAGE_URL=https://patient.youcan365.com
MP_CACHE_PREFIX=development
-MP_WX_APP_ID=wx93af55767423938e
+MP_WX_APP_ID=wx1d8337a40c11d66c
MP_CORP_ID=wwe3fb2faa52cf9dfb
MP_TIM_SDK_APP_ID=1600123876
MP_INVITE_TEAMMATE_QRCODE=https://patient.youcan365.com/invite-teammate
diff --git a/pages/message/article-list.vue b/pages/message/article-list.vue
index 97e66ac..023d7d1 100644
--- a/pages/message/article-list.vue
+++ b/pages/message/article-list.vue
@@ -120,7 +120,7 @@ const corpId = env.MP_CORP_ID;
// 从页面参数获取群组信息
const pageParams = ref({
groupId: "",
- userId: "",
+ patientId: "",
corpId: "",
});
@@ -325,6 +325,19 @@ const sendArticle = async (article) => {
});
if (result.success) {
+ // 记录文章发送记录
+ try {
+ await api("addArticleSendRecord", {
+ articleId: article._id,
+ doctorId: doctorInfo.userId,
+ customerId: pageParams.value.patientId,
+ corpId: corpId,
+ });
+ } catch (recordError) {
+ console.error("记录文章发送失败:", recordError);
+ // 记录失败不影响发送流程
+ }
+
uni.navigateBack();
} else {
throw new Error(result.message || "发送失败");
@@ -351,7 +364,7 @@ onLoad((options) => {
pageParams.value.groupId = options.groupId;
}
if (options.userId) {
- pageParams.value.userId = options.userId;
+ pageParams.value.patientId = options.patientId;
}
if (options.corpId) {
pageParams.value.corpId = options.corpId;
diff --git a/pages/message/components/chat-input.vue b/pages/message/components/chat-input.vue
index b6727d1..2ef7f6c 100644
--- a/pages/message/components/chat-input.vue
+++ b/pages/message/components/chat-input.vue
@@ -75,6 +75,7 @@ const props = defineProps({
formatTime: { type: Function, required: true },
groupId: { type: String, default: '' },
userId: { type: String, default: '' },
+ patientId: { type: String, default: '' },
corpId: { type: String, default: '' },
});
@@ -385,7 +386,7 @@ const goToCommonPhrases = () => {
// 跳转到宣教文章页面
const goToArticleList = () => {
uni.navigateTo({
- url: `/pages/message/article-list?groupId=${props.groupId}&userId=${props.userId}&corpId=${props.corpId}`
+ url: `/pages/message/article-list?groupId=${props.groupId}&patientId=${props.patientId}&corpId=${props.corpId}`
});
};
diff --git a/pages/message/index.vue b/pages/message/index.vue
index 5357584..a022062 100644
--- a/pages/message/index.vue
+++ b/pages/message/index.vue
@@ -164,6 +164,7 @@
: ''
"
:userId="openid"
+ :patientId="patientId"
:corpId="corpId"
@scrollToBottom="() => scrollToBottom(true)"
@messageSent="() => scrollToBottom(true)"
@@ -247,6 +248,9 @@ const patientInfo = ref({
mobile: "",
});
+// 患者ID
+const patientId = ref("");
+
// 计算弹框显示状态 - 只有 pending 状态才显示接受问诊组件
const showConsultAccept = computed(() => orderStatus.value === "pending");
@@ -320,6 +324,10 @@ const fetchGroupOrderStatus = async () => {
mobile: result.data.patient.mobile || "",
};
}
+ // 更新患者ID
+ if (result.data.patientId) {
+ patientId.value = result.data.patientId.toString();
+ }
console.log("获取群组订单状态:", {
orderStatus: orderStatus.value,
From e26785bf4be1ba7ba3e98fc5ddd361c5b28d667c Mon Sep 17 00:00:00 2001
From: wangdongbo <949818794@qq.com>
Date: Fri, 30 Jan 2026 14:47:52 +0800
Subject: [PATCH 2/5] no message
---
pages/message/article-list.vue | 8 +++-----
utils/api.js | 2 +-
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/pages/message/article-list.vue b/pages/message/article-list.vue
index 023d7d1..a20b2cb 100644
--- a/pages/message/article-list.vue
+++ b/pages/message/article-list.vue
@@ -323,19 +323,17 @@ const sendArticle = async (article) => {
imgUrl: article.cover || "",
desc: "点击查看详情",
});
-
if (result.success) {
// 记录文章发送记录
try {
- await api("addArticleSendRecord", {
+ await api("addCustomerArticleSendRecord", {
articleId: article._id,
- doctorId: doctorInfo.userId,
+ doctorId: doctorInfo.userid,
customerId: pageParams.value.patientId,
corpId: corpId,
});
} catch (recordError) {
console.error("记录文章发送失败:", recordError);
- // 记录失败不影响发送流程
}
uni.navigateBack();
@@ -363,7 +361,7 @@ onLoad((options) => {
if (options.groupId) {
pageParams.value.groupId = options.groupId;
}
- if (options.userId) {
+ if (options.patientId) {
pageParams.value.patientId = options.patientId;
}
if (options.corpId) {
diff --git a/utils/api.js b/utils/api.js
index c6779ef..36f4707 100644
--- a/utils/api.js
+++ b/utils/api.js
@@ -47,7 +47,7 @@ const urlsConfig = {
getArticleCateList: 'getArticleCateList',
getArticleList: 'getArticleList',
getArticle: 'getArticle',
- addArticleSendRecord: 'addArticleSendRecord'
+ addCustomerArticleSendRecord: 'addCustomerArticleSendRecord'
},
survery: {
From 18675de48b70bff237dc86ce5890b38b1c4733f7 Mon Sep 17 00:00:00 2001
From: wangdongbo <949818794@qq.com>
Date: Fri, 30 Jan 2026 16:41:12 +0800
Subject: [PATCH 3/5] no message
---
manifest.json | 2 +-
pages/login/login.vue | 8 ++++----
pages/message/article-list.vue | 4 ++--
pages/message/chat.scss | 14 ++++++++++----
pages/message/index.vue | 22 +++-------------------
pages/message/message.vue | 16 +++++-----------
store/account.js | 4 ++--
utils/api.js | 8 ++++----
utils/conversation-merger.js | 2 +-
9 files changed, 32 insertions(+), 48 deletions(-)
diff --git a/manifest.json b/manifest.json
index dbbc303..36d7ad9 100644
--- a/manifest.json
+++ b/manifest.json
@@ -50,7 +50,7 @@
"quickapp" : {},
/* 小程序特有相关 */
"mp-weixin" : {
- "appid" : "wx93af55767423938e",
+ "appid" : "wx1d8337a40c11d66c",
"setting" : {
"urlCheck" : false
},
diff --git a/pages/login/login.vue b/pages/login/login.vue
index d339408..6cd4ed2 100644
--- a/pages/login/login.vue
+++ b/pages/login/login.vue
@@ -5,12 +5,12 @@
生命全周期健康管理伙伴
-
-