Files
x-server-mobile/frontend
root 6d08695a7d feat: 优化飞书免登失败后的用户体验
问题:
- 移动端飞书 WebView 中 JSBridge SDK 未注入
- 导致免登功能不可用

修复:
1. debug-feishu.tsx - 多次检测环境,添加重试和重新检测功能
2. login/index.tsx - 支持 redirect 参数,登录成功后返回原页面
3. QRCodeLogin.tsx - 支持 redirect 参数

用户体验改进:
- 免登失败时,友好提示用户使用其他登录方式
- 登录成功后自动返回到原页面(审批详情页)
- 用户完成登录后可直接进行审批操作

替代方案:
1. 点击飞书消息中的"查看详情"按钮
2. 跳转到登录页面
3. 使用邮箱/密码或扫码登录
4. 登录成功后自动返回审批详情页
5. 直接进行审批操作

相关文件:
- frontend/src/pages/debug-feishu.tsx
- frontend/src/pages/login/index.tsx
- frontend/src/pages/login/QRCodeLogin.tsx

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-26 19:24:20 +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...
    },
  },
])