Преглед на файлове

📝 docs(story): 更新人才小程序项目路由配置文档

- 细化任务7的步骤,明确从yongren迁移到rencai的具体操作
- 更新项目结构说明,展示新的页面目录结构
- 提供完整的app.config.ts配置示例,包含页面路由和TabBar配置
- 列出重要变更摘要,确保配置与原型设计一致
yourname преди 3 седмици
родител
ревизия
a2e0fea57c
променени са 1 файла, в които са добавени 90 реда и са изтрити 13 реда
  1. 90 13
      docs/stories/017.001.story.md

+ 90 - 13
docs/stories/017.001.story.md

@@ -199,10 +199,27 @@
 - [ ] 6.6 支持身份证号/残疾证号密码登录模式
 
 ### 任务7: 配置mini-talent项目的路由结构 (AC: 项目集成)
-- [ ] 7.1 配置mini-talent的app.config.ts,添加新页面路由
-- [ ] 7.2 配置底部TabBar导航 (首页、考勤、我的、更多)
-- [ ] 7.3 使用`TabBarLayout`组件包装TabBar页面
-- [ ] 7.4 确保路由配置与原型设计一致
+- [ ] 7.1 **删除旧的yongren页面**: 删除`mini-talent/src/pages/yongren/`目录及其所有子目录
+  ```bash
+  rm -rf mini-talent/src/pages/yongren
+  ```
+- [ ] 7.2 **更新app.config.ts配置**:
+  - 删除所有yongren相关的页面路由
+  - 删除yongren相关的TabBar配置
+  - 更新窗口标题为"人才小程序"
+  - 添加rencai系列页面路由和TabBar配置
+- [ ] 7.3 创建rencai系列页面目录结构:
+  ```bash
+  mkdir -p mini-talent/src/pages/login
+  mkdir -p mini-talent/src/pages/index
+  mkdir -p mini-talent/src/pages/attendance
+  mkdir -p mini-talent/src/pages/personal-info
+  mkdir -p mini-talent/src/pages/employment
+  mkdir -p mini-talent/src/pages/settings
+  ```
+- [ ] 7.4 配置底部TabBar导航 (首页、考勤、我的、更多)
+- [ ] 7.5 使用`TabBarLayout`组件包装TabBar页面
+- [ ] 7.6 确保路由配置与原型设计一致
 
 ### 任务8: 编写基础测试 (AC: 测试验证)
 - [ ] 8.1 为每个UI包编写基础测试,验证包结构正确性
@@ -462,21 +479,27 @@ import { <rencai>Client } from '@/api/<rencai>Client'
 
 **mini-talent项目结构:**
 ```
-mini/                           # 人才小程序项目 (从mini复制)
+mini-talent/                   # 人才小程序项目
 ├── src/
 │   ├── app.tsx                # 小程序入口
-│   ├── app.config.ts          # 小程序配置 (需添加路由)
+│   ├── app.config.ts          # 小程序配置 (需替换为rencai页面路由)
 │   ├── api.ts                 # API客户端 (rencai系列由UI包管理)
 │   ├── components/ui/         # UI组件库 (通用组件)
 │   ├── layouts/               # 布局组件
 │   │   └── tab-bar-layout.tsx # TabBar布局
-│   ├── pages/                 # 页面目录 (需添加页面路由)
-│   │   ├── login/             # 登录页
-│   │   ├── index/             # 首页
-│   │   ├── attendance/        # 考勤记录
-│   │   ├── personal-info/     # 个人信息
-│   │   ├── employment/        # 就业信息
-│   │   └── settings/          # 设置页
+│   ├── pages/                 # 页面目录
+│   │   ├── login/             # 登录页 (从UI包导入)
+│   │   │   └── index.tsx
+│   │   ├── index/             # 首页/个人主页 (从UI包导入)
+│   │   │   └── index.tsx
+│   │   ├── attendance/        # 考勤记录 (从UI包导入)
+│   │   │   └── index.tsx
+│   │   ├── personal-info/     # 个人信息 (从UI包导入)
+│   │   │   └── index.tsx
+│   │   ├── employment/        # 就业信息 (从UI包导入)
+│   │   │   └── index.tsx
+│   │   └── settings/          # 设置页 (从UI包导入)
+│   │       └── index.tsx
 │   ├── schemas/               # 验证模式
 │   └── utils/                 # 工具函数
 ├── config/                    # 配置文件
@@ -485,6 +508,60 @@ mini/                           # 人才小程序项目 (从mini复制)
 └── tsconfig.json
 ```
 
+**mini-talent/src/app.config.ts配置 (新):**
+
+完全替换现有的yongren配置为rencai配置:
+```typescript
+export default defineAppConfig({
+  pages: [
+    'pages/login/index',           // 登录页
+    'pages/index/index',           // 首页/个人主页
+    'pages/attendance/index',      // 考勤记录
+    'pages/personal-info/index',   // 个人信息
+    'pages/employment/index',      // 就业信息
+    'pages/settings/index',        // 设置页
+  ],
+  window: {
+    backgroundTextStyle: 'light',
+    navigationBarBackgroundColor: '#3b82f6',
+    navigationBarTitleText: '人才小程序',
+    navigationBarTextStyle: 'white',
+    navigationStyle: 'custom'
+  },
+  tabBar: {
+    custom: true,
+    color: "#6b7280",
+    selectedColor: "#3b82f6",
+    backgroundColor: "#ffffff",
+    list: [
+      {
+        pagePath: 'pages/index/index',
+        text: '首页'
+      },
+      {
+        pagePath: 'pages/attendance/index',
+        text: '考勤'
+      },
+      {
+        pagePath: 'pages/personal-info/index',
+        text: '我的'
+      },
+      {
+        pagePath: 'pages/settings/index',
+        text: '更多'
+      }
+    ]
+  },
+  usingComponents: {}
+})
+```
+
+**重要变更**:
+- ✅ 删除所有yongren相关页面路由
+- ✅ 更新导航栏标题为"人才小程序"
+- ✅ TabBar配置: 首页、考勤、我的、更多 (4个标签)
+- ✅ 页面组件从rencai系列UI包导入
+
 **mini-ui-packages目录结构:**
 ```
 mini-ui-packages/