feat(miniprogram): 访客模式 + 长辈模式 + MCP 自动化脚本
Some checks failed
CI / rust-check (push) Has been cancelled
CI / rust-test (push) Has been cancelled
CI / frontend-build (push) Has been cancelled
CI / security-audit (push) Has been cancelled

访客模式:
- 未登录用户可见首页(轮播图+健康资讯+登录引导)和"我的"页面
- 健康和消息 tab 显示 GuestGuard 登录拦截
- 登录页增加"暂不登录,先看看"跳过入口
- 401 拦截器增加 hasToken 检查,避免访客被重定向到登录页
- 退出登录后 reLaunch 到首页而非登录页

长辈模式:
- 新增 stores/ui.ts 管理显示模式(标准/长辈)
- 长辈模式放大字体 ×1.3、间距 ×1.2、按钮加大
- "我的 → 账号 → 长辈模式"切换页
- 设置持久化到 Storage

修复:
- Health/Messages 页面 Hooks 顺序违规(条件 return 在 hooks 之间)
  导致访客模式下页面白屏,所有 hooks 移到条件判断之前

工程:
- scripts/mpsync.sh/ps1 自动清理残留 DevTools 进程
- project.config.json 默认关闭域名校验
This commit is contained in:
iven
2026-05-09 11:42:44 +08:00
parent 0c28969c3b
commit 085163ec7a
23 changed files with 1385 additions and 312 deletions

View File

@@ -0,0 +1,173 @@
// 长辈模式 CSS 覆写
// 字号 ×1.3 / 间距 ×1.2 / 按钮 48→60px
// 通过页面根 View 添加 .elder-mode class 激活
.elder-mode {
font-size: 36px; // 28 × 1.3
// ─── 全局触控放大 ───
.vital-card,
.checkin-card,
.reminder-item,
.menu-item,
.action-btn {
min-height: 60px;
}
.action-btn {
height: 64px;
}
.action-btn-text {
font-size: 22px; // 17 × 1.3
}
// ─── 首页 ───
.greeting-text {
font-size: 34px; // 26 × 1.3
}
.checkin-title {
font-size: 21px; // 16 × 1.3
}
.vital-label {
font-size: 17px; // 13 × 1.3
}
.vital-value {
font-size: 39px; // 30 × 1.3
}
.vital-tag {
font-size: 14px; // 11 × 1.3
padding: 3px 10px;
}
.capsule {
font-size: 14px; // 11 × 1.3
padding: 4px 10px;
}
.reminder-title {
font-size: 20px; // 15 × 1.3
}
.reminder-text {
font-size: 17px; // 13 × 1.3
}
.section-title {
font-size: 34px; // 26 × 1.3
}
// ─── 个人页 ───
.profile-name {
font-size: 29px; // 22 × 1.3
}
.stat-value {
font-size: 36px; // 28 × 1.3
}
.stat-label {
font-size: 17px; // 13 × 1.3
}
.menu-group-title {
font-size: 18px; // 14 × 1.3
}
.menu-label {
font-size: 20px; // 15 × 1.3
}
.menu-icon {
width: 44px;
height: 44px;
border-radius: 14px;
}
.menu-icon-text {
font-size: 21px; // 16 × 1.3
}
.logout-text {
font-size: 18px; // 14 × 1.3
}
// ─── 访客首页 ───
.guest-slide-title {
font-size: 34px; // 26 × 1.3
}
.guest-slide-desc {
font-size: 21px; // 16 × 1.3
}
.guest-article-title {
font-size: 21px; // 16 × 1.3
}
.guest-article-summary {
font-size: 17px; // 13 × 1.3
}
.guest-login-btn {
height: 72px; // 56 × 1.3
font-size: 26px; // 20 × 1.3
}
.guest-institution-name {
font-size: 21px; // 16 × 1.3
}
.guest-institution-desc {
font-size: 17px; // 13 × 1.3
}
// ─── 登录页 ───
.login-title {
font-size: 62px; // 48 × 1.3
}
.login-subtitle {
font-size: 34px; // 26 × 1.3
}
.login-btn {
height: 108px; // 96 × 1.13
font-size: 36px; // 32 × 1.13
}
.skip-btn {
font-size: 26px; // 20 × 1.3
height: 64px;
}
// ─── 间距放大 ×1.2 ───
.vitals-grid {
gap: 14px;
}
.checkin-card {
padding: 24px;
}
.reminder-card {
padding: 22px;
}
.home-page,
.guest-page {
padding: 24px 28px 120px;
}
.profile-page {
padding: 24px 28px 120px;
}
.menu-item {
padding: 17px 18px;
}
}