Commit Graph

7 Commits

Author SHA1 Message Date
root 6357e5dbdc fix: 修复飞书扫码登录 404 问题
1. 后端路由修正
   - 将 /login/qrcode/{id} 移出 /api/v1 路由组
   - 修正路由参数获取方式,使用参数注入而非 getRouteParam()

2. OpenResty 配置
   - 添加 /login/qrcode/ 路径代理到后端

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-26 10:06:27 +08:00
root df07b16c7a feat: 实现多端飞书登录功能
1. 飞书客户端内:静默自动登录
   - 检测飞书环境 (userAgent + ttjsBridge)
   - 调用 ttjsBridge.getAuthCode() 获取授权码
   - 自动登录到后台

2. 飞书客户端外:扫码登录
   - 后端新增三个接口:
     * POST /api/v1/auth/qrcode-login - 生成登录会话和二维码
     * GET /api/v1/auth/qrcode-login/status - 轮询登录状态
     * GET /login/qrcode/{id} - 飞书授权回调
   - 前端新增 QRCodeLogin 组件:
     * 使用 qrcode.react 生成二维码
     * 每 2 秒轮询登录状态
     * 状态:loading → pending → scanning → success/expired

3. 数据库表:feishu_login_session
   - 存储 session_id, auth_url, status, user_id
   - 状态:pending, scanning, success, expired
   - 2 分钟过期机制

4. 其他优化
   - 移除审批详情页的 header
   - 更新 PROJECT_ISSUES.md 文档

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-26 09:58:19 +08:00
root 66b61eada4 refactor: 使用官方support\Db和support\Model
- 创建 support/Db.php 和 support/Model.php
- 在 bootstrap.php 中自动初始化数据库
- 移除 app/util/Db.php
- 更新所有模型和控制器使用官方类

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-25 18:15:17 +08:00
root 81cde28aa5 fix: 添加数据库初始化到AuthController
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-25 18:10:49 +08:00
root 582f454a5a refactor: 重构后端目录结构和命名规范
- 将后端目录名从大写改为小写 (Controller->controller 等)
- 将命名空间从 App\ 改为 app\ (符合 webman 官方规范)
- 移除不必要的 bootstrap 目录
- 完善出差审批业务功能:
  - 添加删除草稿功能
  - 添加审批操作功能(同意/拒绝)
  - 完善审批详情页,显示审批人和审批记录
- 前端优化:
  - 调整列表页行高
  - 隐藏底部导航栏
  - 仪表盘只显示3个快捷入口

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-25 18:09:04 +08:00
root 09d4cb8054 fix: 修复页面间状态丢失问题并优化选择页面
- 修复选择审批人后再选择抄送人导致状态丢失的问题
- 使用独立的 sessionStorage key (selectedApprovers, selectedCc)
- 组件每次挂载时从 sessionStorage 恢复状态
- 只在提交/保存成功后清除 sessionStorage
- 优化人员选择页面布局和样式
- 更新 CLAUDE.md 文档记录问题和解决方案

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-25 15:22:12 +08:00
root 8629f4a4ce refactor: fix directory structure and namespaces for webman conventions
- Rename directories to lowercase: Controller→controller, Model→model, Service→service, Util→util, Bootstrap→bootstrap
- Update all namespaces from App\Xxx to app\xxx (webman convention)
- Update all import statements across the codebase
- Update route.php to use lowercase namespaces
- Remove unused CompanyFeishuApp model
- Comment out unimplemented controller routes

Following webman 2.x framework conventions:
- Models: app\model\{ClassName}
- Controllers: app\controller\{ClassName}
- Services: app\service\{ClassName}
- Utils: app\util\{ClassName}
- Middleware: app\middleware\{ClassName}

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 18:28:23 +08:00