Files
x-server-mobile/frontend
root 09a7220e76 feat: 实现无感快速审批操作
问题:
- 用户点击飞书消息按钮需要跳转到web界面
- 需要登录才能操作,体验不流畅

解决方案:
1. 创建快速审批页面 (quick-action.tsx)
2. 用户点击按钮后自动执行审批操作
3. 操作成功后自动关闭页面或返回
4. 全流程无需用户手动跳转

工作流程:
1. 用户在飞书中点击"通过"/"拒绝"按钮
2. 打开快速审批页面
3. 自动执行审批操作(如果已登录)
4. 显示操作成功/失败
5. 自动关闭页面(飞书客户端)或返回列表

优势:
- 一步完成审批,无需跳转
- 已登录用户无感操作
- 未登录用户会引导登录后返回

相关文件:
- frontend/src/pages/approval/quick-action.tsx (新建)
- frontend/src/router/index.tsx
- backend/app/service/FeishuNotificationService.php

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-26 19:30:12 +08:00
..
2026-02-26 19:30:12 +08:00
2026-02-26 09:59:41 +08:00

React + TypeScript + Vite

This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.

Currently, two official plugins are available:

React Compiler

The React Compiler is not enabled on this template because of its impact on dev & build performances. To add it, see this documentation.

Expanding the ESLint configuration

If you are developing a production application, we recommend updating the configuration to enable type-aware lint rules:

export default defineConfig([
  globalIgnores(['dist']),
  {
    files: ['**/*.{ts,tsx}'],
    extends: [
      // Other configs...

      // Remove tseslint.configs.recommended and replace with this
      tseslint.configs.recommendedTypeChecked,
      // Alternatively, use this for stricter rules
      tseslint.configs.strictTypeChecked,
      // Optionally, add this for stylistic rules
      tseslint.configs.stylisticTypeChecked,

      // Other configs...
    ],
    languageOptions: {
      parserOptions: {
        project: ['./tsconfig.node.json', './tsconfig.app.json'],
        tsconfigRootDir: import.meta.dirname,
      },
      // other options...
    },
  },
])

You can also install eslint-plugin-react-x and eslint-plugin-react-dom for React-specific lint rules:

// eslint.config.js
import reactX from 'eslint-plugin-react-x'
import reactDom from 'eslint-plugin-react-dom'

export default defineConfig([
  globalIgnores(['dist']),
  {
    files: ['**/*.{ts,tsx}'],
    extends: [
      // Other configs...
      // Enable lint rules for React
      reactX.configs['recommended-typescript'],
      // Enable lint rules for React DOM
      reactDom.configs.recommended,
    ],
    languageOptions: {
      parserOptions: {
        project: ['./tsconfig.node.json', './tsconfig.app.json'],
        tsconfigRootDir: import.meta.dirname,
      },
      // other options...
    },
  },
])