Procházet zdrojové kódy

feat(story): 完成故事017.013 - 首页样式对照原型调整

实现内容:
- 个人信息卡片3列统计布局(本月出勤/异常记录/本月薪资)
- 圆形头像显示(用户姓名首字) + 右侧二维码按钮
- 打卡状态模块: 绿点脉冲动画 + 时间日期显示 + 圆形图标卡片
- 快捷功能入口4列圆角方形布局(蓝/绿/紫/黄配色)
- 最新通知彩色圆形图标 + 标题副标题格式
- 底部padding预留TabBar空间(pb-20)

图标调整:
- 考勤记录: document-text图标
- 薪资查询: chart-bar图标
- 薪资通知: check-circle图标

布局修复:
- 统计数据列使用flex flex-col items-center垂直对齐
- 底部padding改为pb-20避免内容被TabBar遮挡

验收标准: 全部通过 ✅

🤖 Generated with [Claude Code](https://claude.com/claude-code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
yourname před 3 týdny
rodič
revize
a3a6e4ee5b

+ 1 - 1
docs/prd/epic-017-talent-mini-program-implementation.md

@@ -17,7 +17,7 @@
   - ✅ 故事017.009已完成 (管理后台用户管理功能完善 - P0阻塞性任务)
   - ✅ 故事017.011已完成 (登录界面支持手机号登录提示 + 修复登录API调用bug - P1用户体验改进)
   - ✅ 故事017.012已完成 (统一Navbar导航栏组件规范 - P1用户体验改进)
-  - 📝 故事017.013已批准 (首页样式对照原型调整 - P1用户体验改进)
+  - ✅ 故事017.013已完成 (首页样式对照原型调整 - P1用户体验改进)
   - ⏳ 故事017.003-017.008、017.010待开始
 
 ## 史诗描述

+ 6 - 0
docs/stories/017.013.story.md

@@ -114,6 +114,7 @@
 - [x] 移动端显示效果良好
 - [x] 现有功能不受影响
 - [x] 类型检查通过 (`pnpm typecheck`)
+- [x] 底部预留TabBar高度(pb-20),确保滚动到底部
 
 ## 任务列表
 
@@ -164,6 +165,7 @@
 - [x] 6.2 验证首页与原型样式一致性
 - [x] 6.3 验证移动端显示效果
 - [x] 6.4 回归测试确保现有功能不受影响
+- [x] 6.5 修复底部padding,预留TabBar高度避免内容被遮挡
 
 ## Dev Notes
 
@@ -308,6 +310,8 @@ interface Notification {
 4. **最新通知**: 成功添加彩色圆形图标,调整为标题+副标题格式,移除右侧红点
 5. **脉冲动画**: 使用Taro内置animate-pulse类实现,无需额外创建共享组件
 6. **类型检查**: rencai-dashboard-ui包无新增类型错误(原有错误与本次修改无关)
+7. **图标调整**: 更换考勤记录和薪资查询图标为项目内已有图标(document-text、chart-bar),薪资通知图标更换为check-circle
+8. **布局修复**: 统计数据列使用flex flex-col items-center实现垂直对齐,底部padding改为pb-20预留TabBar空间
 
 ### File List
 - `mini-ui-packages/rencai-dashboard-ui/src/pages/Dashboard/Dashboard.tsx` - 修改
@@ -320,6 +324,8 @@ interface Notification {
   - 调整最新通知为彩色圆形图标+标题+副标题格式
   - 更新数据结构(ClockInData、Notification)支持新样式需求
   - 添加时间格式化工具函数(formatCurrentTime、formatCurrentDate)
+  - 更换图标为项目内已有图标(document-text、chart-bar、check-circle)
+  - 修复统计数据列和底部padding布局问题
 
 ### Status
 Ready for Review

+ 7 - 7
mini-ui-packages/rencai-dashboard-ui/src/pages/Dashboard/Dashboard.tsx

@@ -66,7 +66,7 @@ const Dashboard: React.FC = () => {
 
   // 模拟通知数据
   const notifications: Notification[] = [
-    { id: 1, iconClass: 'i-heroicons-banknote-20-solid', iconColor: 'green', title: '薪资发放通知', subtitle: '11月薪资已发放,请查收' },
+    { id: 1, iconClass: 'i-heroicons-check-circle-20-solid', iconColor: 'green', title: '薪资发放通知', subtitle: '11月薪资已发放,请查收' },
     { id: 2, iconClass: 'i-heroicons-exclamation-circle-20-solid', iconColor: 'blue', title: '考勤异常提醒', subtitle: '11月20日考勤异常,请及时处理' },
     { id: 3, iconClass: 'i-heroicons-building-office-2-20-solid', iconColor: 'yellow', title: '企业通知', subtitle: '下周培训安排已更新' },
     { id: 4, iconClass: 'i-heroicons-wrench-screwdriver-20-solid', iconColor: 'red', title: '系统维护通知', subtitle: '系统将于12月1日维护' },
@@ -168,7 +168,7 @@ const Dashboard: React.FC = () => {
           placeholder={true}
         />
 
-        <View className="px-4 pb-4">
+        <View className="px-4 pb-20">
           {/* 个人概览卡片 - 蓝色渐变背景 */}
           <View
             className="rounded-2xl p-6 mb-4 shadow-md"
@@ -202,15 +202,15 @@ const Dashboard: React.FC = () => {
 
             {/* 3列统计数据 */}
             <View className="flex justify-between mt-4">
-              <View className="text-center">
+              <View className="flex flex-col items-center">
                 <Text className="text-white text-2xl font-bold">28</Text>
                 <Text className="text-white/80 text-xs">本月出勤</Text>
               </View>
-              <View className="text-center">
+              <View className="flex flex-col items-center">
                 <Text className="text-white text-2xl font-bold">0</Text>
                 <Text className="text-white/80 text-xs">异常记录</Text>
               </View>
-              <View className="text-center">
+              <View className="flex flex-col items-center">
                 <Text className="text-white text-2xl font-bold">¥4,800</Text>
                 <Text className="text-white/80 text-xs">本月薪资</Text>
               </View>
@@ -280,7 +280,7 @@ const Dashboard: React.FC = () => {
               className="bg-green-50 rounded-xl p-3 flex flex-col items-center justify-center"
               onClick={() => handleQuickAction('attendance')}
             >
-              <View className="i-heroicons-calendar-check-20-solid text-green-500 text-lg mb-1" />
+              <View className="i-heroicons-document-text-20-solid text-green-500 text-lg mb-1" />
               <Text className="text-xs text-gray-700">考勤记录</Text>
             </View>
 
@@ -288,7 +288,7 @@ const Dashboard: React.FC = () => {
               className="bg-purple-50 rounded-xl p-3 flex flex-col items-center justify-center"
               onClick={() => handleQuickAction('employment')}
             >
-              <View className="i-heroicons-banknote-20-solid text-purple-500 text-lg mb-1" />
+              <View className="i-heroicons-chart-bar-20-solid text-purple-500 text-lg mb-1" />
               <Text className="text-xs text-gray-700">薪资查询</Text>
             </View>