Files
PolyHermes/frontend
WrBug 0f50939625 feat(尾盘策略): 触发记录分页与时间筛选、策略列表与表单优化
触发记录:
- 成功/失败分 Tab,失败展示失败原因
- 分页与按天时间范围筛选(日历,结束日不超过今天)
- 后端 startDate/endDate、Repository 时间范围查询
- 弹窗美化:时间范围卡片、空状态、分页总数;移除订单 ID 列
- 查看触发记录按钮文案改为「订单」

策略列表:
- 状态列恢复为 Switch,PC 端放在第一列
- 新增账户列;移除最近触发列
- 文案换行(wordBreak/whiteSpace);时间区间 PC 换行、移动端单行
- 时间区间列宽缩小;移动端 Switch 在底部操作区
- 编辑时账户不可修改;策略名称 placeholder 改为「选填,留空将自动生成」
- 多语言:account、viewTriggers、strategyNamePlaceholder 等

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-15 01:41:53 +08:00
..
2025-12-07 16:15:59 +08:00
2025-12-07 16:15:59 +08:00
2026-01-31 07:27:36 +08:00
2026-01-31 07:27:36 +08:00

Polymarket 跟单系统前端

技术栈

  • 框架: React 18 + TypeScript
  • 构建工具: Vite
  • UI 库: Ant Design + Ant Design Mobile
  • HTTP 客户端: axios
  • 状态管理: Zustand
  • 路由: React Router
  • 以太坊库: ethers.js

功能特性

  • 账户管理(通过私钥导入,支持多账户)
  • Leader 管理(被跟单者管理)
  • 跟单配置管理
  • 订单管理
  • 统计信息
  • 移动端适配

开发

# 安装依赖
npm install

# 启动开发服务器
npm run dev

# 构建生产版本
npm run build

项目结构

frontend/
├── src/
│   ├── components/      # 公共组件
│   │   └── Layout.tsx   # 布局组件(支持移动端)
│   ├── pages/           # 页面组件
│   │   ├── AccountList.tsx
│   │   ├── AccountImport.tsx
│   │   ├── LeaderList.tsx
│   │   ├── LeaderAdd.tsx
│   │   ├── ConfigPage.tsx
│   │   ├── OrderList.tsx
│   │   └── Statistics.tsx
│   ├── services/        # API 服务
│   │   └── api.ts
│   ├── store/           # 状态管理
│   │   └── accountStore.ts
│   ├── types/           # TypeScript 类型定义
│   │   └── index.ts
│   ├── utils/           # 工具函数
│   │   └── ethers.ts
│   ├── styles/          # 样式文件
│   │   └── index.css
│   ├── App.tsx          # 根组件
│   └── main.tsx         # 入口文件
├── index.html
├── package.json
├── tsconfig.json
└── vite.config.ts

移动端适配

  • 使用 react-responsive 检测设备类型
  • 移动端使用 Ant Design Mobile 组件
  • 响应式布局(移动端 < 768px,桌面端 >= 768px
  • 触摸友好的按钮尺寸(>= 44x44px