erio
78ecd206de
fix: resolve GitHub Actions CI failures (lint, typecheck, test, format)
...
- Remove unused `Locale` type imports from admin pages
- Fix type annotations in easy-pay client test (CID fields as string | undefined)
- Replace `as any` with proper types in limits test
- Fix listSubscriptions test mock response structure (data.data.items)
- Fix formatting with Prettier
2026-03-14 03:42:16 +08:00
erio
3b5a3ba5df
fix: 暗色主题全面优化 - 滚动条、颜色适配、dark:伪类修复
...
- 添加全局暗色滚动条样式 (globals.css)
- 修复 channels/subscriptions 页面 dark: 伪类无效的bug (改用 isDark)
- 修复 RefundDialog 暗色下退款金额、disabled 按钮颜色
- 修复 admin OrderTable 暗色下缺少背景色
- 统一所有 admin 页面 text-gray-500 为 slate 色系
- 修复 UserSubscriptions 续费按钮暗色适配
- 修复日期标签文字缺少暗色颜色类
- MainTabs 暗色容器改用 slate-900 提升对比度
- OpenAI 默认模型区域暗色边框透明度提升
- 更新 README 文档
2026-03-14 03:19:39 +08:00
erio
bc9ae8370c
fix: /admin 直接显示数据概览,去掉管理首页导航项
2026-03-13 22:15:19 +08:00
erio
b1c90d4b04
refactor: /admin 聚合入口(数据概览优先),订单管理移至 /admin/orders
2026-03-13 22:08:14 +08:00
erio
41f7059585
revert: 去掉总览入口,/admin 直接显示订单管理
2026-03-13 22:03:06 +08:00
erio
1399cd277b
refactor: /admin 改为聚合入口页面,订单管理移至 /admin/orders
...
- 新建 /admin/orders 页面(原 /admin 订单管理内容)
- /admin 重写为卡片式导航入口(订单/数据/渠道/订阅)
- 导航栏新增"总览"项,更新所有交叉引用链接
- README 管理后台章节同步更新
2026-03-13 21:54:37 +08:00
erio
9f621713c3
style: 统一代码格式 (prettier)
2026-03-10 18:20:36 +08:00
erio
2492031e13
feat: 全站多语言支持 (i18n),lang=en 显示英文,其余默认中文
...
新增 src/lib/locale.ts 作为统一多语言入口,覆盖前台支付链路、
管理后台、API/服务层错误文案,共 35 个文件。URL 参数 lang 全链路透传,
包括 Stripe return_url、页面跳转、layout html lang 属性等。
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
2026-03-09 18:33:57 +08:00
erio
0a35ba9002
style: 全量 prettier 格式化
2026-03-05 23:10:44 +08:00
miwei
3a9a32e2c2
feat: 管理后台数据看板
...
新增 /admin/dashboard 页面,提供充值订单统计与分析:
- 汇总统计卡片(今日/累计充值金额、订单数、成功率、平均充值)
- 每日充值趋势折线图(recharts,支持 7/30/90 天切换)
- 充值排行榜(Top 10 用户)
- 支付方式分布(水平条形图)
- 与 /admin 订单管理页面互相导航
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
2026-03-04 17:06:27 +08:00
erio
42da18484c
feat: 管理后台订单列表展示用户备注,用户信息摊平显示
...
- 新增 userNotes 字段,创建订单时从 Sub2API 读取用户 notes 保存
- 管理后台订单列表将用户名、邮箱、备注拆分为独立列,节约行高
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
2026-03-03 04:37:39 +08:00
erio
880f0211f3
feat: 管理后台统一 PayPageLayout 布局,支持 dark mode
...
管理后台使用与充值页面相同的 PayPageLayout 组件,OrderTable 和
OrderDetail 组件新增 dark prop,所有样式支持暗色模式切换。
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
2026-03-03 03:31:20 +08:00
erio
c9462f4f14
feat: 管理后台订单列表显示来源域名(srcHost)
...
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
2026-03-03 00:19:01 +08:00
erio
d952942627
feat: 订单来源追踪,保存 src_host / src_url 到订单记录
...
iframe 嵌入充值页面时 URL 自动附带来源参数,写入数据库用于追踪分析。
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
2026-03-02 20:40:16 +08:00
erio
b4eebb0b1b
feat: 分页组件统一封装 + 移动端无限滚动
...
- 新增 PaginationBar 组件,支持 isDark / loading / 页码导航 / 每页大小切换
- 重写 pay/orders/page.tsx 使用 PaginationBar,summary 来自 API groupBy 全量统计
- admin/page.tsx 替换内联分页 UI 为 PaginationBar
- MobileOrderList 支持无限滚动:IntersectionObserver 哨兵 + hasMore/loadingMore props
- pay/page.tsx 新增 loadMoreOrders(append 模式),初始化/刷新时重置分页状态
2026-03-01 20:12:32 +08:00
erio
292c14b882
feat: 订单列表支持分页查询,分页大小可选 20/50/100
...
- /api/orders/my 新增 page/page_size 参数,返回分页信息和全局状态统计
- 用户订单页:分页控件(首/上/下/末页)+ 分页大小选择,摘要卡片改为全局统计
- 管理员订单页:分页大小选择器(20/50/100)+ 首尾页跳转按钮
2026-03-01 20:04:49 +08:00
erio
d9ab65ecf2
feat: integrate Stripe payment with bugfixes and active timeout cancellation
...
- Add Stripe payment provider with Checkout Session flow
- Payment provider abstraction layer (EasyPay + Stripe unified interface)
- Stripe webhook with proper raw body handling and signature verification
- Frontend: Stripe button with URL validation, anti-duplicate click, noopener
- Active timeout cancellation: query platform before expiring, recover paid orders
- Singleton Stripe client, idempotency keys, Math.round for amounts
- Handle async_payment events, return null for unknown webhook events
- Set Checkout Session expires_at aligned with order timeout
- Add cancelPayment to provider interface (Stripe: sessions.expire, EasyPay: no-op)
- Enable stripe in frontend payment type list
2026-03-01 17:58:08 +08:00
erio
ceb09659f8
feat: add refresh button to orders panel and admin page
...
- Desktop orders card in pay/page.tsx: refresh button next to "订单中心"
- Admin orders page: refresh button next to the page title
2026-03-01 14:17:18 +08:00
erio
d5719bf213
feat: migrate payment provider to easy-pay, add order history and refund support
...
- Replace zpay with easy-pay payment provider (new lib/easy-pay/ module)
- Add order history page for users (pay/orders)
- Add GET /api/orders/my endpoint to list user's own orders
- Add GET /api/users/[id] endpoint for sub2api user lookup
- Add order status tracking module (lib/order/status.ts)
- Update config to support easy-pay credentials (merchant ID, key, gateway)
- Update PaymentForm and PaymentQRCode components for easy-pay flow
- Update pay page and admin page with new order management UI
- Update order service to support easy-pay, cancellation, and refund
2026-03-01 03:04:24 +08:00