作为 人才小程序用户, 我想要 首页样式与原型设计完全一致, 以便 获得符合预期的用户体验和视觉一致性。
原型设计参考:
docs/小程序原型/rencai.html 行160-301 (首页/个人主页)当前实现状态:
问题分析: 对照原型设计首页部分(rencai.html 行160-301),发现以下样式差异:
| 模块 | 原型要求 | 当前实现 | 优先级 |
|---|---|---|---|
| 个人信息卡片 | 3列统计:本月出勤/异常记录/本月薪资 | 只有2列,缺少"异常记录" | P1 |
| 头像区域 | 圆形头像(首字) + 右侧二维码按钮 | 无头像显示,无二维码按钮 | P2 |
| 打卡模块标题 | "今日打卡" | 无标题 | P2 |
| 打卡状态指示器 | 绿点脉冲动画 + "已打卡"文字 | 简单标签,无动画 | P1 |
| 时间显示 | 大号时间"09:27" + 日期"2023年11月25日 星期六" | 无时间显示,无日期 | P1 |
| 上班/下班卡片 | 圆形图标 + 灰色背景,未打卡灰色 | 蓝色方形背景 | P1 |
| 远程打卡按钮 | 文案"小程序远程打卡" | 文案"远程打卡" | P2 |
| 功能入口 | 4个彩色圆角方形背景 | 圆形图标卡片 | P2 |
| 通知列表 | 彩色圆形图标 + 标题 + 副标题 | 红点 + 标题 + 日期 | P1 |
1. 顶部个人信息卡片 (原型行174-204)
- 蓝色渐变背景: linear-gradient(135deg, #3b82f6 0%, #1e40af 100%)
- 左侧: 圆形头像(首字,60px,白色边框) + 姓名 + 残疾类型
- 右侧: 二维码图标按钮 (白色半透明背景)
- 3列统计数据: 本月出勤(28) | 异常记录(0) | 本月薪资(¥4,800)
2. 打卡状态模块 (原型行206-233)
- 标题: "今日打卡"
- 状态指示器: 绿点(带脉冲动画) + "已打卡"文字
- 大号时间: "09:27" (text-2xl font-bold)
- 日期: "2023年11月25日 星期六"
- 上班/下班卡片:
- 圆形图标背景(蓝色/灰色)
- 上班打卡: 08:30 (已打卡,蓝色)
- 下班打卡: --:-- (未打卡,灰色)
- 按钮: "小程序远程打卡" (蓝色,手机图标)
3. 快捷功能入口 (原型行235-253)
- 4个彩色圆角方形(不是圆形):
- 个人信息: bg-blue-50, 蓝色图标
- 考勤记录: bg-green-50, 绿色图标
- 薪资查询: bg-purple-50, 紫色图标
- 企业信息: bg-yellow-50, 黄色图标
4. 最新通知 (原型行255-278)
- 通知项结构:
- 彩色圆形图标(bg-blue-100/bg-green-100)
- 标题 + 副标题(不是日期)
- 示例: "薪资发放通知" + "11月薪资已发放,请查收"
pnpm typecheck)文件: mini-ui-packages/rencai-dashboard-ui/src/pages/Dashboard/Dashboard.tsx
文件: mini-ui-packages/rencai-dashboard-ui/src/pages/Dashboard/Dashboard.tsx
文件: mini-ui-packages/rencai-dashboard-ui/src/pages/Dashboard/Dashboard.tsx
文件: mini-ui-packages/rencai-dashboard-ui/src/pages/Dashboard/Dashboard.tsx
文件: mini-ui-packages/rencai-shared-ui/src/components/PulseDot.tsx
pnpm typecheck1. 蓝色渐变背景:
style={{
background: 'linear-gradient(135deg, #3b82f6 0%, #1e40af 100%)'
}}
2. 脉冲动画 (原型行92-105):
@keyframes pulse {
0% {
transform: scale(0.95);
box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
}
70% {
transform: scale(1);
box-shadow: 0 0 0 10px rgba(16, 185, 129, 0);
}
100% {
transform: scale(0.95);
box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
}
}
3. 打卡状态指示器:
<View className="flex items-center justify-center mb-4">
<View className="w-3 h-3 rounded-full bg-green-500 mr-2 animate-pulse" />
<Text className="text-green-500 font-medium">已打卡</Text>
</View>
4. 上班/下班卡片:
<View className="w-12 h-12 rounded-full bg-blue-100 flex items-center justify-center mx-auto mb-2">
<Text className="text-xl">→</Text>
</View>
<Text className="text-xs text-gray-600">上班打卡</Text>
<Text className="text-sm font-semibold text-gray-800">08:30</Text>
5. 通知图标:
<View className="w-8 h-8 rounded-full bg-blue-100 flex items-center justify-center mr-3 mt-1">
<Text className="text-blue-500 text-sm">🔔</Text>
</View>
个人信息卡片统计:
interface Stats {
attendanceDays: number // 本月出勤: 28
abnormalRecords: number // 异常记录: 0
monthlySalary: number // 本月薪资: 4800
}
打卡状态:
interface ClockInStatus {
status: '已打卡' | '未打卡'
clockInTime?: string // "08:30"
clockOutTime?: string // "--:--"
displayTime?: string // "09:27"
date?: string // "2023年11月25日 星期六"
}
interface Notification {
id: number
iconColor: 'blue' | 'green' | 'yellow' | 'red'
icon: string // emoji或图标
title: string
subtitle: string // 副标题,不是日期
}
| 功能模块 | 原型行号 |
|---|---|
| 顶部个人信息卡片 | 174-204 |
| 打卡状态模块 | 206-233 |
| 快捷功能入口 | 235-253 |
| 最新通知 | 255-278 |
mini-ui-packages/rencai-dashboard-ui/src/pages/Dashboard/Dashboard.tsx - 首页主要修改mini-ui-packages/rencai-shared-ui/src/components/PulseDot.tsx - 脉冲动画点组件(可选)注意: 其他页面的完整实现应该归到各自的故事中:
本故事仅关注首页的样式调整,其他页面的样式对照应该在各自的故事中完成。
mini-ui-packages/rencai-dashboard-ui/src/pages/Dashboard/Dashboard.tsx - 修改Ready for Review