tasks.md 5.0 KB

Implementation Plan

  • [x] 1. 完善图片资源配置

    • 1.1 扩展 constants/images.ts 添加缺失的图片资源
    • 添加 common 分类下的 itemBg, windowBg, closeBut 等图片
    • 添加 mine 分类下的缺失图片
    • 添加 address, order 相关图片
    • Requirements: 8.1, 8.2
  • [ ] 2. 完善地址服务层

    • 2.1 创建/更新 services/address.ts
    • 实现 getAddressList, getDefaultAddress, addAddress, updateAddress, deleteAddress, getArea 方法
    • 对接小程序的 API 端点
    • Requirements: 9.1, 9.3
    • [ ]* 2.2 Write property test for address service API calls
    • Property 13: API service function mapping
    • Validates: Requirements 9.1
  • [x] 3. 完善登录页面样式

    • 3.1 更新 app/login.tsx 使用小程序样式
    • 使用 ImageBackground 设置 loginBg 背景
    • 登录按钮使用 loginBug 背景图
    • 调整表单样式匹配小程序
    • Requirements: 1.1, 1.2, 1.3, 1.4
    • [ ]* 3.2 Write property test for login navigation
    • Property 2: Navigation after login success
    • Validates: Requirements 1.4
  • [x] 4. 完善个人中心页面

    • 4.1 更新 app/(tabs)/mine.tsx 完善样式和功能
    • 使用 kaixinMineBg 和 kaixinMineHeadBg 背景图
    • 完善用户信息展示区域
    • 完善数据统计区域使用 kaixinUserDataBg 背景
    • 完善功能入口区域使用 userSection1Bg 背景
    • 完善订单入口区域使用 userSection2Bg 背景
    • Requirements: 2.1, 2.2, 2.3, 2.4, 2.5
    • [ ]* 4.2 Write property test for user profile display
    • Property 3: User profile data display
    • Validates: Requirements 2.2
    • [ ]* 4.3 Write property test for statistics display
    • Property 4: Statistics data display
    • Validates: Requirements 2.3
  • [x] 5. 完善地址列表页面

    • 5.1 更新 app/address/index.tsx 使用小程序样式
    • 使用 ImageBackground 设置 kaixinMineBg 背景
    • 添加新地址按钮使用 loginBug 背景图
    • 调整地址卡片样式
    • Requirements: 3.1, 3.2, 3.3
    • [ ]* 5.2 Write property test for address list rendering
    • Property 6: Address list rendering
    • Validates: Requirements 3.2
  • [x] 6. 完善地址编辑页面

    • 6.1 更新 app/address/edit.tsx 使用小程序样式
    • 使用 ImageBackground 设置 kaixinMineBg 背景
    • 表单区域使用 itemBg 背景
    • 保存按钮使用 loginBug 背景图
    • 添加省市区三级联动选择器
    • Requirements: 3.4, 3.5
    • [ ]* 6.2 Write property test for address save
    • Property 7: Address save API call
    • Validates: Requirements 3.5
  • [ ] 7. Checkpoint - 确保所有测试通过

    • Ensure all tests pass, ask the user if questions arise.
  • [x] 8. 完善订单列表页面

    • 8.1 更新 app/orders/index.tsx 完善样式和功能
    • 完善 Tab 栏样式
    • 完善订单卡片样式
    • 实现订单操作按钮(支付、确认收货)
    • Requirements: 4.1, 4.2, 4.3, 4.4
    • [ ]* 8.2 Write property test for order item rendering
    • Property 8: Order item rendering
    • Validates: Requirements 4.2
    • [ ]* 8.3 Write property test for order action handling
    • Property 10: Order action handling
    • Validates: Requirements 4.4
  • [x] 9. 完善订单详情页面

    • 9.1 更新 app/orders/[tradeNo].tsx 完善功能
    • 显示订单状态和商品信息
    • 显示收货地址信息
    • 显示物流信息(如有)
    • 实现订单操作按钮
    • Requirements: 5.1, 5.2, 5.3
  • [x] 10. 完善福利页面

    • 10.1 更新 app/(tabs)/welfare.tsx 完善样式
    • 确保使用 kaixinWelfareBg 背景
    • 确保房间列表使用 kaixinRoomBg 背景
    • 实现房间点击跳转逻辑
    • Requirements: 6.1, 6.2, 6.3
    • [ ]* 10.2 Write property test for welfare room navigation
    • Property 11: Welfare room navigation
    • Validates: Requirements 6.3
  • [x] 11. 完善商品详情页面

    • 11.1 更新 app/product/[id].tsx 完善功能
    • 完善商品图片轮播
    • 完善商品信息展示
    • 完善推荐商品列表
    • 完善购买按钮和结算弹窗
    • Requirements: 7.1, 7.2, 7.3
  • [x] 12. 完善 Award 服务层

    • 12.1 更新 services/award.ts 添加缺失方法
    • 确保 getMagicIndex 方法正确实现
    • 确保 getPoolList 方法正确实现
    • 确保 getIPList 方法正确实现
    • Requirements: 9.1
  • [x] 13. 完善 HTTP 请求层

    • 13.1 更新 services/http.ts 完善错误处理
    • 实现 401 状态码处理(跳转登录)
    • 实现通用错误处理
    • 确保 token 正确添加到请求头
    • Requirements: 9.2, 9.3
    • [ ]* 13.2 Write property test for authentication token
    • Property 15: Authentication token inclusion
    • Validates: Requirements 9.3
    • [ ]* 13.3 Write property test for error handling
    • Property 14: API error handling
    • Validates: Requirements 9.2
  • [ ] 14. Final Checkpoint - 确保所有测试通过

    • Ensure all tests pass, ask the user if questions arise.