From ef3c53c671e91a7fc95db4c5a53e55aee426c17e Mon Sep 17 00:00:00 2001 From: yuetsh <517252939@qq.com> Date: Tue, 3 Nov 2026 16:12:23 +0800 Subject: [PATCH] =?UTF-8?q?feat(=E7=9C=8B=E6=9D=BF=E5=A8=98):=20=E7=82=B9?= =?UTF-8?q?=E5=A5=B9=E4=BC=9A=E6=8C=89=E9=A1=B5=E9=9D=A2=E8=AF=B4=E4=B8=80?= =?UTF-8?q?=E5=8F=A5=E5=82=B2=E5=A8=87=E7=9A=84=E8=AF=9D=EF=BC=8C=E5=86=8D?= =?UTF-8?q?=E7=BB=99=E4=B8=A4=E4=B8=89=E4=B8=AA=E8=83=BD=E7=9B=B4=E6=8E=A5?= =?UTF-8?q?=E5=8A=9E=E4=BA=8B=E7=9A=84=E6=8C=89=E9=92=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 她从不主动开口,点一下才冒气泡;比赛里不弹。台词 326 句(shared/mascot/lines.ts), 口吻照「小鲸鱼」角色卡,学校里舍掉英文、粗口,「用户」改叫「同学」 - 按情况换话:题目页分没写、没交、例子没对上/对上、答错、编译错误、运行出错、超时、 错很多次、做对、一次就对、终于对了、以前做过;首页、题目列表、提交、专题、自学、排名等各有一组 - 按钮真的去办:运行例子、我错在哪(切到结果里出错的那一段)、举手、输题号、随便来一道、 下一道、选题…… - 老师也看得到:有学生举手时任何页面先说这件事;首页、课堂任务、统计、题目页各有一组 - 页面用 useMascotGuide 告诉她现在的情况(shared/mascot/guide.ts),以后按学生行为调整也接在这一层 - 修:连点时像卡住了(快点时按压过渡来不及显示,改成每下播一遍压扁回弹); 一打开从左上角飞到右下角;去掉单击的摆动 设计稿与台词表:https://claude.ai/artifact/Qz2zPCfq2zCrqmxyms1UGx Co-Authored-By: Claude Opus 5.5 --- apps/web/src/oj/achievement/index.vue | 4 + apps/web/src/oj/announcement/list.vue | 4 + apps/web/src/oj/contest/list.vue | 9 + apps/web/src/oj/home/student.vue | 12 + apps/web/src/oj/home/teacher.vue | 20 ++ apps/web/src/oj/learn/index.vue | 9 + apps/web/src/oj/learn/tutorial.vue | 11 + apps/web/src/oj/pk/index.vue | 5 + .../src/oj/problem/composables/mascotGuide.ts | 117 +++++++ apps/web/src/oj/problem/detail.vue | 8 + apps/web/src/oj/problem/list.vue | 13 + apps/web/src/oj/problemset/detail.vue | 12 + apps/web/src/oj/problemset/list.vue | 11 + apps/web/src/oj/rank/list.vue | 12 + apps/web/src/oj/statistics/index.vue | 3 + apps/web/src/oj/submission/detail.vue | 35 +- apps/web/src/oj/submission/list.vue | 13 + .../web/src/oj/task/components/LessonForm.vue | 3 + apps/web/src/oj/task/index.vue | 35 +- apps/web/src/oj/user/index.vue | 8 + apps/web/src/shared/components/Mascot.vue | 328 +++++++++++++++--- apps/web/src/shared/components/NotFound.vue | 4 + .../src/shared/components/ProblemJumpBox.vue | 5 +- apps/web/src/shared/mascot/guide.ts | 72 ++++ apps/web/src/shared/mascot/lines.ts | 164 +++++++++ 25 files changed, 860 insertions(+), 57 deletions(-) create mode 100644 apps/web/src/oj/problem/composables/mascotGuide.ts create mode 100644 apps/web/src/shared/mascot/guide.ts create mode 100644 apps/web/src/shared/mascot/lines.ts diff --git a/apps/web/src/oj/achievement/index.vue b/apps/web/src/oj/achievement/index.vue index 0ab2bf2..448b2bc 100644 --- a/apps/web/src/oj/achievement/index.vue +++ b/apps/web/src/oj/achievement/index.vue @@ -6,6 +6,7 @@ import { useBreakpoints } from 'shared/composables/breakpoints' import UserName from 'shared/components/UserName.vue' import AdminLink from 'shared/components/AdminLink.vue' import { useUserStore } from 'shared/store/user' +import { useMascotGuide } from 'shared/mascot/guide' import { RARITY_COLOR, RARITY_LABEL } from 'utils/constants' import type { AchievementList, AchievementRarity, UserBadge } from 'utils/types' import ClassCard from './components/ClassCard.vue' @@ -59,6 +60,9 @@ async function load() { onMounted(load) watch(name, load) + +// 看板娘:只在看自己的成就时说话 +useMascotGuide(() => (data.value && !other.value && !userStore.isTeacherOrAbove ? { situation: 'achievement' } : null))