1. 13 Feb, 2026 13 commits
  2. 12 Feb, 2026 27 commits
    • 创建统一的配置文件 src/config/app.js 管理 Mock 开关
      
      变更内容:
      - 新增 src/config/app.js 统一配置文件
      - 更新 8 个页面使用统一的 USE_MOCK_DATA 配置:
        - src/pages/material-list/index.vue
        - src/pages/feedback-list/index.vue
        - src/pages/message/index.vue
        - src/pages/week-hot-material/index.vue
        - src/pages/favorites/index.vue
        - src/pages/plan/index.vue
        - src/pages/search/index.vue
        - src/pages/product-center/index.vue
      
      收益:
      - 便于开发和测试环境的 Mock 数据切换
      - 统一代码风格,提升可维护性
      - 符合 DRY 原则
      
      Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
      hookehuyr authored
    • - 消息详情页获取详情后调用 userStore.fetchUserInfo(true)
      - 刷新用户信息以更新 unreadMsgCount
      - 从而使 TabBar 红点状态同步更新
      
      修改文件:
      - src/pages/message-detail/index.vue: 添加 useUserStore 导入和刷新调用
      - src/api/news.js: 修复注释格式(全角分号)
      
      Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
      hookehuyr authored
    • Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
      hookehuyr authored
    • - 新增 optimizeImageUrl 工具函数,自动为 CDN 图片添加缩略图参数
      - 反馈列表图片使用 200px 缩略图(200x 质量 70),点击预览加载原图
      - 消息详情页优化布局和样式(背景色、间距、字号)
      - 消息列表优化卡片样式(标题、状态标签、预览文本)
      
      Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
      hookehuyr authored
    • - 更新 CLAUDE.md:添加 2026-02-12 最新变更记录
      - 更新 README.md:完善项目说明和最新更新内容
      - 更新经验教训总结:新增 3 个重要实践案例
        * 权限检查 Composable 模式
        * 全局状态管理与页面生命周期协调
        * 导航返回按钮与路由栈协调
      
      记录了计划书模块、认证权限、消息功能等最佳实践
      
      Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
      hookehuyr authored
    • - 创建 usePlanPermission composable 统一权限检查逻辑
      - 首页:在模板层添加权限检查
      - 搜索页:在模板层添加权限检查
      - 产品中心页:保持 openPlanPopup 函数内的权限检查
      - 产品详情页:在模板层添加权限检查
      - 修复权限重复调用问题(只在模板层检查一次)
      
      影响文件:
      - src/composables/usePlanPermission.js
      - src/pages/index/index.vue
      - src/pages/search/index.vue
      - src/pages/product-center/index.vue
      - src/pages/product-detail/index.vue
      hookehuyr authored
    • - 在 logout() 函数中添加 unreadMsgCount.value = 0
      - 确保用户退出登录后 TabBar 红点正确消失
      
      Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
      hookehuyr authored
    • hookehuyr authored
    • hookehuyr authored
    • hookehuyr authored
    • - 移除 PlanFormContainer 中的 "提交成功" toast
      - 避免用户从结果页返回时看到重复提示
      - 结果页已清晰显示成功/失败状态,无需额外 toast
      
      影响文件:
      - src/components/plan/PlanFormContainer.vue
      - components.d.ts
      
      Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
      hookehuyr authored
    • - 创建 usePlanSubmit composable 统一处理弹窗关闭、状态清空、导航跳转
      - 重构 index、search、product-detail、product-center 页面使用 composable
      - 移除重复的 handlePlanSubmit 函数实现(~100 行)
      
      🤖 Generated with assistance from Claude Code
      hookehuyr authored
    • - 移除 console.log 调试语句
      
      Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
      hookehuyr authored
    • - 添加 unreadMsgCount 状态单独存储未读消息数
      - 修复从 res.data 读取 unread_msg_count 字段(该字段不在 user 对象中)
      - 优化 TabBarBadges 计算逻辑,直接从 unreadMsgCount 读取
      - 消息列表页面添加自动刷新已读状态功能
      
      影响文件:
      - src/stores/user.js
      - src/pages/message/index.vue
      
      Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
      hookehuyr authored
    • hookehuyr authored
    • 优化计划书提交成功后的用户体验,消除模态框关闭与页面跳转之间的延迟。
      
      ## 核心改动
      
      ### PlanFormContainer 组件优化
      - 添加 isClosingFromChild 状态,避免弹窗关闭时重复重置表单
      - 优化 visible watch 逻辑,在弹窗关闭时正确清理状态
      - 移除提交成功后的 toast 提示,改为立即触发 close 事件
      
      ### 父组件优化(index, search, product-center, product-detail)
      - handlePlanSubmit 改为 async 函数
      - 移除 500ms 延迟跳转,改为立即导航
      - 使用双 nextTick 确保 DOM 更新后再重置状态
      - 添加 handlePlanClose 函数统一处理弹窗关闭逻辑
      
      ## 技术细节
      
      **问题根源**:
      - 原流程:提交成功 → API 返回 → 500ms 延迟 → 关闭弹窗 → 导航
      - 用户感知:点击提交后模态框停留 1-2 秒才关闭,体验不佳
      
      **解决方案**:
      - PlanFormContainer:API 成功后立即 emit('close'),不等待 toast
      - 父组件:close 事件触发后,使用双 nextTick 确保:
        1. 第一次 nextTick:DOM 更新,模态框关闭动画开始
        2. 第二次 nextTick:动画完成,表单重置
        3. 立即导航到结果页
      
      ## 影响范围
      
      - src/components/plan/PlanFormContainer.vue
      - src/pages/index/index.vue
      - src/pages/search/index.vue
      - src/pages/product-center/index.vue
      - src/pages/product-detail/index.vue
      
      ## 测试建议
      
      1. 测试计划书提交流程是否正常工作
      2. 验证模态框关闭是否立即响应
      3. 确认表单数据在导航后正确清理
      4. 检查返回上一页时不会显示残留数据
      
      Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
      hookehuyr authored
    • hookehuyr authored
    • Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
      hookehuyr authored
    • hookehuyr authored
    • hookehuyr authored
    • - 增大按钮字体
      - 调整圆角样式
      - 使用真实API
      
      Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
      hookehuyr authored
    • …字段名为 unread_msg_count
      hookehuyr authored
    • hookehuyr authored
    • - 统一所有储蓄型产品的提取币种为 USD
      - 新增每年提取金额字段 (annual_withdrawal_amount)
      - 新增每年递增提取百分比字段 (annual_increase_percentage)
      - 添加 inputLabel prop 支持动态提示文字
      - 修复百分比输入的类型转换和实时验证
      - 修复 AmountKeyboard 组件属性类型不匹配问题
      - 修复 ESLint 警告:使用 Number.isNaN() 替代 isNaN()
      
      影响文件:
      - src/config/plan-templates.js: 币种统一为 USD
      - src/components/plan/PlanFields/AmountKeyboard.vue: 添加 inputLabel prop
      - src/components/plan/PlanTemplates/SavingsTemplate.vue: 新增字段和验证逻辑
      - src/components/plan/PlanFormContainer.vue: 添加字段映射和数据转换
      - src/components/plan/PlanTemplates/*Template.vue: 添加 inputLabel 使用
      
      Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
      hookehuyr authored
    • - 调整缴费年期组件内边距(px-4 py-2 替代 p-4)
      - 添加提取计划区域输入框左侧内边距修复
      - 移除 SavingsTemplate 样式 scoped 属性以应用样式修复
      - 禁用消息列表Mock数据以使用真实API
      
      Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
      hookehuyr authored
    • 为新闻详情和我的新闻列表API文档添加正式环境服务器URL,确保开发者能够正确访问线上API端点。
      hookehuyr authored
    • - 移除 fn() 中的自动 toast,避免双重提示
      - 扩展 toast 显示时长从 2 秒到 3 秒
      - PlanFormContainer emit 时包含 message 字段
      - 所有父组件使用 result.message 传递后端错误信息到结果页面
      - 修复 index.vue 中硬编码错误消息的问题
      hookehuyr authored