From 8eeea1742ad6225e5684f517a31c4edf12ff600f Mon Sep 17 00:00:00 2001 From: Jafeng <2998840497@qq.com> Date: Thu, 28 May 2026 18:56:44 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=A2=9E=E5=8A=A0=E5=88=A4=E6=96=AD?= =?UTF-8?q?=E7=94=A8=E6=88=B7=E6=98=AF=E5=90=A6=E4=B8=BA=E5=88=9B=E5=BB=BA?= =?UTF-8?q?=E8=80=85=E7=9A=84=E9=80=BB=E8=BE=91=EF=BC=8C=E4=BC=98=E5=8C=96?= =?UTF-8?q?=E6=94=B6=E8=97=8F=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/case/plan-list.vue | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/pages/case/plan-list.vue b/pages/case/plan-list.vue index ccbe7e8..6df936a 100644 --- a/pages/case/plan-list.vue +++ b/pages/case/plan-list.vue @@ -240,10 +240,21 @@ function onSearchInput() { function canToggleFavorite(plan) { if (!plan || !plan._id) return false; + if (isCreatedByCurrentUser(plan)) return false; if (activeViewType.value !== 'my') return true; return Boolean(plan.isFavorite); } +function isCreatedByCurrentUser(plan = {}) { + const userId = getUserId(); + if (!userId) return false; + if (String(plan.createor || plan.creator || '') === userId) return true; + const signature = plan.creatorSignature && typeof plan.creatorSignature === 'object' + ? plan.creatorSignature + : null; + return signature?.type === 'personal' && String(signature.person?.userId || '') === userId; +} + async function toggleFavorite(plan) { const corpId = getCorpId(); const userId = getUserId();