From 12d7d093e913bacfe513b600421e045e6fb92223 Mon Sep 17 00:00:00 2001 From: Jafeng <2998840497@qq.com> Date: Wed, 4 Feb 2026 16:21:31 +0800 Subject: [PATCH 1/6] =?UTF-8?q?style:=20=E8=B0=83=E6=95=B4=E6=96=87?= =?UTF-8?q?=E7=AB=A0=E5=92=8C=E5=AE=A2=E6=88=B7=E5=8D=A1=E7=89=87=E7=9A=84?= =?UTF-8?q?=E6=A0=B7=E5=BC=8F=EF=BC=8C=E4=BC=98=E5=8C=96=E5=B8=83=E5=B1=80?= =?UTF-8?q?=E5=92=8C=E9=AB=98=E5=BA=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/home/article-list.vue | 4 ++++ pages/home/customer-archive.vue | 21 ++------------------- 2 files changed, 6 insertions(+), 19 deletions(-) diff --git a/pages/home/article-list.vue b/pages/home/article-list.vue index 79e85d7..8ee522a 100644 --- a/pages/home/article-list.vue +++ b/pages/home/article-list.vue @@ -68,6 +68,8 @@ watch(articleIds, n => { margin: 0 30rpx; margin-top: 24rpx; padding-bottom: 40rpx; + width: calc(100% - 60rpx); + box-sizing: border-box; } .arrow-icon { @@ -91,6 +93,8 @@ watch(articleIds, n => { min-height: 188rpx; padding: 20rpx; align-items: flex-start; + width: 100%; + box-sizing: border-box; } .article-card:active { diff --git a/pages/home/customer-archive.vue b/pages/home/customer-archive.vue index 6323910..ce1696b 100644 --- a/pages/home/customer-archive.vue +++ b/pages/home/customer-archive.vue @@ -24,20 +24,10 @@ {{ i.relationship }} - {{ i.name }} - - - - {{ i.age > 0 ? i.age + '岁' : '' }} - - @@ -203,7 +193,7 @@ watch(() => props.corpId, n => { .customer-card { width: 160rpx; - height: 160rpx; + height: 110rpx; display: flex; align-items: center; justify-content: center; @@ -219,9 +209,6 @@ watch(() => props.corpId, n => { border: 2rpx solid #065BD6; } -.customer-name { - margin-top: 12rpx; -} .relationship-tag { position: absolute; @@ -307,10 +294,6 @@ watch(() => props.corpId, n => { margin-bottom: 12rpx; } -.sex-icon { - width: 32rpx; - height: 32rpx; -} .info-card-new { position: relative; From bb7d294ef6da252e63f240bff20077f53781f499 Mon Sep 17 00:00:00 2001 From: wangdongbo <949818794@qq.com> Date: Wed, 4 Feb 2026 17:12:59 +0800 Subject: [PATCH 2/6] =?UTF-8?q?=E6=9B=B4=E6=8D=A2=E5=A4=B4=E5=83=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/group-avatar.vue | 2 +- pages/home/team-mate.vue | 2 +- pages/message/hooks/use-group-avatars.js | 2 +- pages/message/hooks/use-group-chat.js | 6 +++--- pages/team/friend.vue | 2 +- pages/team/team-detail.vue | 6 +++--- utils/conversation-merger.js | 2 +- utils/tim-chat.js | 4 ++-- 8 files changed, 13 insertions(+), 13 deletions(-) diff --git a/components/group-avatar.vue b/components/group-avatar.vue index 0370611..7961f21 100644 --- a/components/group-avatar.vue +++ b/components/group-avatar.vue @@ -25,7 +25,7 @@ const props = defineProps({ } }) -const list = computed(() => props.avatarList.map(i => i || '/static/default-avatar.png')) +const list = computed(() => props.avatarList.map(i => i || '/static/default-avatar.svg')) const size = computed(() => { const val = Number.isInteger(props.size) && props.size > 0 ? props.size : 144; diff --git a/pages/home/team-mate.vue b/pages/home/team-mate.vue index 16ef2c6..3645836 100644 --- a/pages/home/team-mate.vue +++ b/pages/home/team-mate.vue @@ -13,7 +13,7 @@ - + diff --git a/pages/message/hooks/use-group-avatars.js b/pages/message/hooks/use-group-avatars.js index c5f9d14..a4749cf 100644 --- a/pages/message/hooks/use-group-avatars.js +++ b/pages/message/hooks/use-group-avatars.js @@ -9,7 +9,7 @@ import useTeamStore from '@/store/team.js' export default function useGroupAvatars() { const groupAvatarMap = ref({}) // { groupID: [avatarUrl1, avatarUrl2, ...] } const teamStore = useTeamStore() - const patientDefaultAvatar = '/static/default-avatar.png' + const patientDefaultAvatar = '/static/default-avatar.svg' /** * 获取单个群聊的头像列表 diff --git a/pages/message/hooks/use-group-chat.js b/pages/message/hooks/use-group-chat.js index 9860650..7d4a0fc 100644 --- a/pages/message/hooks/use-group-chat.js +++ b/pages/message/hooks/use-group-chat.js @@ -45,8 +45,8 @@ export default function useGroupChat(groupID) { const member = chatMember.value[userId] if (!member) { // 如果找不到成员信息,根据是否为团队成员返回默认头像 - // 团队成员和患者都使用 default-avatar.png - return '/static/default-avatar.png' + // 团队成员和患者都使用 default-avatar.svg + return '/static/default-avatar.svg' } // 如果有头像且不为空字符串,返回头像 @@ -55,7 +55,7 @@ export default function useGroupChat(groupID) { } // 否则使用默认头像 - return '/static/default-avatar.png' + return '/static/default-avatar.svg' } // 获取群聊信息和成员头像 diff --git a/pages/team/friend.vue b/pages/team/friend.vue index 56ba737..d2ca011 100644 --- a/pages/team/friend.vue +++ b/pages/team/friend.vue @@ -2,7 +2,7 @@ - + {{ member.anotherName }} diff --git a/pages/team/team-detail.vue b/pages/team/team-detail.vue index 149037f..06430d2 100644 --- a/pages/team/team-detail.vue +++ b/pages/team/team-detail.vue @@ -20,7 +20,7 @@ - + {{ i.anotherName }} @@ -45,7 +45,7 @@ - + {{ i.anotherName }} @@ -83,7 +83,7 @@ const { memberJob, memberList: list } = useJob(); const memberList = computed(() => team.value && Array.isArray(team.value.memberList) ? team.value.memberList : []) -const avatarList = computed(() => memberList.value.map(i => i.avatar || '/static/default-avatar.png').filter(Boolean)) +const avatarList = computed(() => memberList.value.map(i => i.avatar || '/static/default-avatar.svg').filter(Boolean)) const teammate = computed(() => { const memberLeaderList = team.value && Array.isArray(team.value.memberLeaderList) ? team.value.memberLeaderList : []; diff --git a/utils/conversation-merger.js b/utils/conversation-merger.js index 186bf5a..78aa260 100644 --- a/utils/conversation-merger.js +++ b/utils/conversation-merger.js @@ -144,7 +144,7 @@ function mergeConversationData(conversation, groupDetailsMap) { name: formatConversationName(groupDetail), // 更新头像(优先使用已有头像,避免闪动) - avatar: conversation.avatar || groupDetail.patient?.avatar || '/static/default-avatar.png' + avatar: conversation.avatar || groupDetail.patient?.avatar || '/static/default-avatar.svg' } } diff --git a/utils/tim-chat.js b/utils/tim-chat.js index 80131f5..2571c51 100644 --- a/utils/tim-chat.js +++ b/utils/tim-chat.js @@ -2625,7 +2625,7 @@ class TimChatManager { conversationID, groupID, name: patientName ? `${patientName}的问诊` : groupName || '问诊群聊', - avatar: '/static/default-avatar.png', + avatar: '/static/default-avatar.svg', lastMessage, lastMessageTime, unreadCount: conversation.unreadCount || 0, @@ -2638,7 +2638,7 @@ class TimChatManager { conversationID: conversation.conversationID, groupID: conversation.conversationID?.replace('GROUP', '') || '', name: '问诊群聊', - avatar: '/static/default-avatar.png', + avatar: '/static/default-avatar.svg', lastMessage: '暂无消息', lastMessageTime: Date.now(), unreadCount: 0, From c452ea29e926b75d6a9d05f6f885216659b3efba Mon Sep 17 00:00:00 2001 From: Jafeng <2998840497@qq.com> Date: Wed, 4 Feb 2026 18:39:57 +0800 Subject: [PATCH 3/6] =?UTF-8?q?feat:=20=E6=B7=BB=E5=8A=A0=E6=96=87?= =?UTF-8?q?=E7=AB=A0=E9=98=85=E8=AF=BB=E8=AE=B0=E5=BD=95=E5=92=8C=E9=97=AE?= =?UTF-8?q?=E5=8D=B7=E8=B0=83=E6=9F=A5=E7=9B=B8=E5=85=B3API=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=EF=BC=8C=E4=BC=98=E5=8C=96=E6=96=87=E7=AB=A0=E5=92=8C?= =?UTF-8?q?=E9=97=AE=E5=8D=B7=E5=88=97=E8=A1=A8=E5=8A=A0=E8=BD=BD=E7=8A=B6?= =?UTF-8?q?=E6=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/article/article-detail.vue | 14 ++ pages/article/article-list.vue | 238 ++++++++++++++++++++++------- pages/survey/survey-list.vue | 249 ++++++++++++++++++++++--------- utils/api.js | 7 +- 4 files changed, 381 insertions(+), 127 deletions(-) diff --git a/pages/article/article-detail.vue b/pages/article/article-detail.vue index 5d8927f..9ef3aaf 100644 --- a/pages/article/article-detail.vue +++ b/pages/article/article-detail.vue @@ -28,8 +28,11 @@ import { onLoad } from "@dcloudio/uni-app"; import api from "@/utils/api.js"; import { ref } from "vue"; +import { storeToRefs } from "pinia"; +import useAccountStore from "@/store/account.js"; const env = __VITE_ENV__; const corpId = env.MP_CORP_ID; +const { account } = storeToRefs(useAccountStore()); const loading = ref(true); const error = ref(""); const articleData = ref({ @@ -40,6 +43,16 @@ const articleData = ref({ let articleId = ""; +const markArticleRead = async () => { + const unionid = account.value?.unionid; + if (!unionid || !articleId) return; + try { + await api("addArticleReadRecord", { corpId, articleId, unionid }, false); + } catch (err) { + console.warn("markArticleRead failed:", err?.message || err); + } +}; + // 处理富文本内容,使图片自适应 const processRichTextContent = (html) => { if (!html) return ""; @@ -107,6 +120,7 @@ const loadArticle = async () => { onLoad((options) => { if (options.id) { articleId = options.id; + markArticleRead(); loadArticle(); } else { error.value = "文章信息不完整"; diff --git a/pages/article/article-list.vue b/pages/article/article-list.vue index 6cf29d1..ed0c095 100644 --- a/pages/article/article-list.vue +++ b/pages/article/article-list.vue @@ -11,16 +11,25 @@ ? 'bg-orange-100 text-orange-500 border-orange-500' : 'bg-white text-gray-600 border-gray-200' ]" - @click="activeTab = tab.value" + @click="selectTab(tab.value)" > {{ tab.name }} - + + + 加载中... + + + + + + + - {{ item.type }} + 宣教文章 @@ -44,86 +53,168 @@ class="text-sm mr-2" :class="item.status === 'UNREAD' ? 'text-red-500' : 'text-gray-400'" > - {{ item.status === 'UNREAD' ? '未阅读' : '查看' }} + {{ item.status === 'UNREAD' ? '未阅读' : '已阅读' }} - - - 人员: - {{ item.person }} + + 人员: + {{ item.person || '-' }} - - - 团队: - {{ item.team }} + + + 团队: + {{ item.team || '-' }} - 发送时间: {{ item.time }} + 发送时间: {{ item.time || '-' }} + + + + 加载中... + + + + 没有更多了 + diff --git a/pages/survey/survey-list.vue b/pages/survey/survey-list.vue index e213a83..1613e69 100644 --- a/pages/survey/survey-list.vue +++ b/pages/survey/survey-list.vue @@ -11,16 +11,25 @@ ? 'bg-orange-100 text-orange-500 border-orange-500' : 'bg-white text-gray-600 border-gray-200' ]" - @click="activeTab = tab.value" + @click="selectTab(tab.value)" > {{ tab.name }} - + + + 加载中... + + + + + + + - {{ item.type }} + 问卷调查 @@ -38,93 +47,166 @@ - + - - {{ item.status === 'UNFILLED' ? '未填写' : '查看' }} - - + 查看 + - - - 人员: - {{ item.person }} + + 人员: + {{ item.person || '-' }} - - - 团队: - {{ item.team }} + + + 团队: + {{ item.team || '-' }} - 发送时间: {{ item.time }} + 发送时间: {{ item.time || '-' }} + + + + 加载中... + + + + 没有更多了 + \ No newline at end of file + +.field-label { + flex-shrink: 0; + white-space: nowrap; +} + +.loading-container, +.empty-container { + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; + padding: 100rpx 0; +} + +.loading-text { + margin-top: 20rpx; + font-size: 28rpx; + color: #999; +} + +.loading-more, +.no-more { + display: flex; + align-items: center; + justify-content: center; + padding: 30rpx 0; + font-size: 24rpx; + color: #999; + gap: 10rpx; +} + diff --git a/utils/api.js b/utils/api.js index bec6614..7a1dd49 100644 --- a/utils/api.js +++ b/utils/api.js @@ -31,7 +31,9 @@ const urlsConfig = { getArticleCateList: 'getArticleCateList', getArticleList: 'getArticleList', getArticle: 'getArticle', - addArticleSendRecord: 'addArticleSendRecord' + addArticleSendRecord: 'addArticleSendRecord', + addArticleReadRecord: 'addArticleReadRecord', + getMiniAppReceivedArticleList: 'getMiniAppReceivedArticleList' }, member: { addCustomer: 'add', @@ -63,6 +65,9 @@ const urlsConfig = { createConsultGroup: "createConsultGroup", cancelConsultApplication: "cancelConsultApplication", getGroupList: "getGroupList" + }, + survery: { + getMiniAppReceivedSurveryList: 'getMiniAppReceivedSurveryList' } } const urls = Object.keys(urlsConfig).reduce((acc, path) => { From e6ee42c3d17577022cd0851847270b93839b3d36 Mon Sep 17 00:00:00 2001 From: Jafeng <2998840497@qq.com> Date: Wed, 4 Feb 2026 19:07:58 +0800 Subject: [PATCH 4/6] =?UTF-8?q?feat:=20=E6=B7=BB=E5=8A=A0=E6=9B=B4?= =?UTF-8?q?=E5=A4=9A=E6=96=87=E7=AB=A0=E5=88=97=E8=A1=A8=E9=A1=B5=E9=9D=A2?= =?UTF-8?q?=E5=8F=8A=E7=9B=B8=E5=85=B3=E8=B7=AF=E7=94=B1=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages.json | 6 + pages/article/article-cate-list.vue | 410 ++++++++++++++++++++++++++++ pages/home/article-list.vue | 100 +++++-- routes/index.js | 4 + 4 files changed, 491 insertions(+), 29 deletions(-) create mode 100644 pages/article/article-cate-list.vue diff --git a/pages.json b/pages.json index 427334c..641d9dc 100644 --- a/pages.json +++ b/pages.json @@ -13,6 +13,12 @@ "navigationBarTitleText": "我的宣教" } }, + { + "path": "pages/article/article-cate-list", + "style": { + "navigationBarTitleText": "健康宣教" + } + }, { "path": "pages/survey/survey-list", "style": { diff --git a/pages/article/article-cate-list.vue b/pages/article/article-cate-list.vue new file mode 100644 index 0000000..97ed96b --- /dev/null +++ b/pages/article/article-cate-list.vue @@ -0,0 +1,410 @@ + + + + + diff --git a/pages/home/article-list.vue b/pages/home/article-list.vue index 8ee522a..a7acf0d 100644 --- a/pages/home/article-list.vue +++ b/pages/home/article-list.vue @@ -2,16 +2,25 @@ 健康宣教 - + 更多 + - - + :class="{ 'mb-15': index < articles.length - 1 }" + @click="goToDetail(article)" + > + {{ article.title }} @@ -25,7 +34,7 @@ \ No newline at end of file + diff --git a/routes/index.js b/routes/index.js index 48f6c8d..05fd767 100644 --- a/routes/index.js +++ b/routes/index.js @@ -28,6 +28,10 @@ export default [ path: 'pages/article/article-list', meta: { title: '健康宣教', login: true } }, + { + path: 'pages/article/article-cate-list', + meta: { title: '健康宣教', login: true } + }, { path: 'pages/health/list', meta: { title: '健康信息', login: true } From c1a0090279f17158728df0f16d3860436867b47c Mon Sep 17 00:00:00 2001 From: Jafeng <2998840497@qq.com> Date: Thu, 5 Feb 2026 09:35:21 +0800 Subject: [PATCH 5/6] =?UTF-8?q?refactor:=20=E7=A7=BB=E9=99=A4=E5=AE=A2?= =?UTF-8?q?=E6=88=B7=E6=A1=A3=E6=A1=88=E9=A1=B5=E9=9D=A2=E4=B8=AD=E7=9A=84?= =?UTF-8?q?=E6=80=A7=E5=88=AB=E5=92=8C=E5=B9=B4=E9=BE=84=E4=BF=A1=E6=81=AF?= =?UTF-8?q?=E5=B1=95=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/home/customer-archive.vue | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/pages/home/customer-archive.vue b/pages/home/customer-archive.vue index 4acdb0b..5da5684 100644 --- a/pages/home/customer-archive.vue +++ b/pages/home/customer-archive.vue @@ -27,13 +27,6 @@ :class="current && i._id === current._id ? 'text-primary' : 'text-dark'"> {{ i.name }} - - - - {{ i.age > 0 ? i.age + '岁' : '' }} - - @@ -299,10 +292,6 @@ watch(() => props.corpId, n => { margin-top: -8rpx; } -.customer-age { - color: #999999; -} - .mr-15 { margin-right: 20rpx; } From 47303b3a3624d0c691340d0096fe6c7a94506888 Mon Sep 17 00:00:00 2001 From: wangdongbo <949818794@qq.com> Date: Thu, 5 Feb 2026 09:53:49 +0800 Subject: [PATCH 6/6] =?UTF-8?q?=E6=9B=B4=E6=94=B9=E5=B0=8F=E7=A8=8B?= =?UTF-8?q?=E5=BA=8F=20appId?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- manifest.json | 74 ++++----- pages/home/customer-archive.vue | 266 +++++++++++++++++++++----------- 2 files changed, 210 insertions(+), 130 deletions(-) diff --git a/manifest.json b/manifest.json index 6966ae3..8a40fb3 100644 --- a/manifest.json +++ b/manifest.json @@ -1,28 +1,28 @@ { - "name": "ykt-team-wxapp", - "appid": "__UNI__3EBDA15", - "description": "", - "versionName": "1.0.0", - "versionCode": "100", - "transformPx": false, + "name" : "ykt-team-wxapp", + "appid" : "__UNI__3EBDA15", + "description" : "", + "versionName" : "1.0.0", + "versionCode" : "100", + "transformPx" : false, /* 5+App特有相关 */ - "app-plus": { - "usingComponents": true, - "nvueStyleCompiler": "uni-app", - "compilerVersion": 3, - "splashscreen": { - "alwaysShowBeforeRender": true, - "waiting": true, - "autoclose": true, - "delay": 0 + "app-plus" : { + "usingComponents" : true, + "nvueStyleCompiler" : "uni-app", + "compilerVersion" : 3, + "splashscreen" : { + "alwaysShowBeforeRender" : true, + "waiting" : true, + "autoclose" : true, + "delay" : 0 }, /* 模块配置 */ - "modules": {}, + "modules" : {}, /* 应用发布信息 */ - "distribute": { + "distribute" : { /* android打包配置 */ - "android": { - "permissions": [ + "android" : { + "permissions" : [ "", "", "", @@ -41,32 +41,32 @@ ] }, /* ios打包配置 */ - "ios": {}, + "ios" : {}, /* SDK配置 */ - "sdkConfigs": {} + "sdkConfigs" : {} } }, /* 快应用特有相关 */ - "quickapp": {}, + "quickapp" : {}, /* 小程序特有相关 */ - "mp-weixin": { - "appid": "wx93af55767423938e", - "setting": { - "urlCheck": false + "mp-weixin" : { + "appid" : "wx93af55767423938e", + "setting" : { + "urlCheck" : false }, - "usingComponents": true + "usingComponents" : true }, - "mp-alipay": { - "usingComponents": true + "mp-alipay" : { + "usingComponents" : true }, - "mp-baidu": { - "usingComponents": true + "mp-baidu" : { + "usingComponents" : true }, - "mp-toutiao": { - "usingComponents": true + "mp-toutiao" : { + "usingComponents" : true }, - "uniStatistics": { - "enable": false + "uniStatistics" : { + "enable" : false }, - "vueVersion": "3" -} \ No newline at end of file + "vueVersion" : "3" +} diff --git a/pages/home/customer-archive.vue b/pages/home/customer-archive.vue index 4acdb0b..087bbda 100644 --- a/pages/home/customer-archive.vue +++ b/pages/home/customer-archive.vue @@ -1,53 +1,89 @@