9 Commits
| Author | SHA1 | Message | Date |
|---|---|---|---|
|
|
af5aba8efe |
fix(admin-app): fix 4 compile errors
- credit_page.dart: remove const from Padding containing context.t() call - issuer_coupon_service/redemption_service/issuer_finance_service: cast inner['total'] to int? to match named record return type Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> |
|
|
|
24400ad663 |
fix(admin-app): 消除UI层硬编码中文,补充i18n keys(zh/en/ja)
- 新增 29 个 i18n keys 到三语言文件(credit_score_unit, finance_confirm_withdraw, redemption_failed, store_no_stores, settings_confirm_logout, coupon_status_* 等) - 修复 10 个页面中的硬编码中文字符串: credit_page: 分数单位、权重、空状态 finance_page: 提现对话框、SnackBar、时间格式、空状态 redemption_page: 错误消息、批量结果、空状态、时间格式 store_management_page: 门店/员工空状态 settings_page: 退出确认对话框、层级权益描述 coupon_list_page: 状态徽章(在售/待审/售罄/下架) coupon_detail_page: 面值/发行价标签 ai_agent_page: 错误回复消息 issuer_dashboard_page: 信用分单位 - 剩余中文仅存于 /// 注释和 mock 数据数组中(将被真实API数据替换) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> |
|
|
|
c29067eee7 |
feat(miniapp+admin-app): 同步 SMS 认证 API 变更
Phase 7 — Taro miniapp + admin-app 前端同步后端 SMS 认证系统: miniapp (Taro/React): - auth.ts: 新增 SmsCodeType 类型,sendSmsCode 支持 type 参数 · 端点从 /auth/send-sms-code → /auth/sms/send · 新增 loginByPassword / resetPassword API · register 支持 password + nickname 可选参数 - store/auth.ts: sendSmsCode 同步 type 参数 + 新端点 - login/index.tsx: 发送验证码时指定 type='LOGIN' - h5-register/index.tsx: 发送验证码时指定 type='REGISTER' · 修复注册后 token 存储使用 config.TOKEN_KEY 而非硬编码 - i18n: 3语言新增 7 key (login_code_sent, login_error_*, register_success, register_error_agree) admin-app (Flutter): - auth_service.dart: 新增 SmsCodeType 枚举 · sendSmsCode 支持 type 参数,端点同步 /auth/sms/send · 返回 expiresIn (秒) - issuer_login_page.dart: 发送验证码时指定 SmsCodeType.login - i18n: 3语言新增 4 key (login_error_phone, login_error_code, login_error_network, login_code_sent) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> |
|
|
|
3a57b0fd4d |
feat: 全平台API对齐 — 4个前端应用55+页面接入真实后端API
跨越 genex-mobile、admin-app、admin-web、miniapp 四个前端应用,
将所有页面从 mock 硬编码数据替换为真实后端 API 调用,
同时补建后端缺失的 27+ 个端点,实现前后端完整联通。
## 后端新增 (4个微服务, 27+端点)
### issuer-service — 5个新Controller, 19个新文件
- IssuerStatsController: GET /issuers/me/stats, /credit (发行商仪表盘统计+信用)
- IssuerFinanceController: GET/POST balance/stats/transactions/withdraw/reconciliation
- IssuerStoreController: CRUD /issuers/me/stores + /employees (门店+员工管理)
- RedemptionController: POST scan/manual/batch, GET history/today-stats (核销)
- CouponBatchController: POST issue/recall/price-adjust, GET operations (批量操作)
- CouponController扩展: GET /search, /:id/nearby-stores, /:id/similar
- 新实体: Employee, Redemption; Store 增加 level/parentId
- 新迁移: 032_create_stores_employees_redemptions.sql
### trading-service (Go)
- GET /api/v1/trades/my/orders — 用户订单列表(分页+状态筛选)
- POST /api/v1/trades/coupons/:id/transfer — 券转赠
### user-service
- GET/PUT /api/v1/users/me/settings — 用户偏好设置(语言/货币/通知)
### auth-service
- POST /api/v1/auth/send-sms-code — 发送短信验证码(Redis存储, 5分钟TTL)
- POST /api/v1/auth/login-phone — 手机号+验证码登录(自动注册)
### Kong 路由
- 新增5条路由: issuers/me, redemptions, coupons/batch, trades/my, trades/coupons
## genex-mobile (Flutter, 2页)
- HomePage: 接入 CouponApiService.getFeaturedCoupons() + getHoldingsSummary()
- WalletCouponsPage: 接入持仓列表API, 支持Tab状态筛选
- 修复 NotificationService/PushService 7+2个路径缺少 /api/v1/ 前缀
- 新增 CouponApiService, CouponModel, HoldingsSummaryModel
## admin-app (Flutter发行商控制台, 11页 + router + i18n)
- 修复 NotificationService 7个路径 + PushService 2个路径前缀
- 新增9个Service: auth, issuer, coupon, finance, credit, store, redemption, analytics, ai_chat
- 11页全部从 StatelessWidget→StatefulWidget, mock→API:
IssuerLoginPage(SMS登录), Dashboard(统计), CouponList(分页+筛选),
CreateCoupon(提交审核), CouponDetail(详情), Redemption(扫码/手动/批量核销),
Finance(余额/流水/对账), Credit(评分), StoreManagement(门店+员工),
AiAgent(真实AI对话), Settings(资料+登出)
- 所有页面添加 loading/error/pull-to-refresh 状态
## admin-web (Next.js 15管理后台, 24页)
- 新建API基础设施: api-client.ts(axios), auth-context.tsx, use-api.ts(react-query)
- providers.tsx 接入 QueryClientProvider + AuthProvider
- 24页全部替换 useState(mockArray) 为 useApi<T>('/api/v1/admin/...'):
Dashboard, Users, Issuers, Coupons, Trading, Risk, Finance, System,
Compliance(SAR/SEC/License/SOX/Tax/IPO), Analytics(User/Coupon/MM/Consumer),
Disputes, Chain, Reports, Merchant, Agent, Insurance
- 所有页面添加 TypeScript 接口, loading/error 状态, 'use client' 指令
- 状态比较改用原始API字符串(非t()翻译值)
## miniapp (Taro/React小程序, 20页)
- 新建API基础设施: config/index.ts, utils/request.ts(Taro.request封装), store/auth.ts
- 新增8个Service: auth, coupon, my-coupon, user, trading, wallet, notification, ai
- 20页全部替换硬编码数据为Service调用:
Home, Search, Detail, Purchase, PaymentSuccess,
MyCoupons, MyCouponDetail, Redeem, Transfer,
Profile, Orders, Messages, Wallet, Settings, KYC, AIChat,
Login, H5Share, H5Activity, H5Register
- 统一 useState+useEffect 数据获取模式, 错误处理, 加载状态
## 统计
- 新建文件: ~51个 (后端26 + 前端25)
- 修改文件: ~93个 (后端24 + 前端69)
- 新增后端端点: 27+
- 前端页面接入API: 55+ (genex-mobile 2 + admin-app 11 + admin-web 24 + miniapp 20)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
|
|
|
295ebcdac7 |
feat(branding): 全平台品牌Logo替换 — 新双色渐变券印标识
## 概述
将全平台(5个前端应用)的品牌Logo从旧版钻石图标统一替换为新设计的
双色渐变券印标识(紫色#9B5CF6 + 品红#D946EF),体现券金融平台定位。
## 新Logo资源
- logo/genex-icon.svg: 纯图标(72x72),用于App图标和favicon
- logo/genex-04.svg: 带品牌名(380x72),用于启动画面和品牌展示
## 替换范围
### Flutter Apps(genex-mobile / admin-app / mobile)
- Android: 5个密度mipmap ic_launcher.png (48~192px)
- iOS: 15个AppIcon尺寸 (20~1024px) + 3个LaunchImage尺寸
- assets/images/: 新增 logo.png(760x144) + logo_icon.png(192x192)
- pubspec.yaml: 新增 assets 声明
- welcome_page.dart: Icons.diamond_rounded → Image.asset('logo_icon.png')
- issuer_login_page.dart: Icons.storefront_rounded → Image.asset('logo_icon.png')
- issuer_dashboard_page.dart: 同上
- settings_page.dart: 同上
### admin-web(Next.js 15)
- public/: favicon.ico/png, logo.png, logo_icon.png, icon-512.png, SVG源文件
- layout.tsx: 更新metadata icons配置
- AdminLayout.tsx: 侧栏inline "G"文字 → <img src="/logo_icon.png">
### miniapp(Taro/React 小程序)
- login/index.tsx: "G"文字Logo → CSS双色分割旋转方块
- share-card/index.tsx: 同上 + 品牌色从#6C5CE7更新为#9B5CF6/#D946EF
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
|
|
|
184a7d16db |
feat: 三端集成 App升级 + 内部推送 + FCM外部推送框架 (genex-mobile/admin-app/mobile)
从 rwadurian/frontend/mobile-app 移植升级系统和通知系统到 Genex 三个 Flutter 客户端, 适配目标项目轻量架构(ValueNotifier 替代 Riverpod,Dio HTTP 客户端,移除 screenutil)。 ## 新增核心模块 (每个 app 13 个 Dart 文件) ### 升级系统 (core/updater/) - UpdateService: 统一升级服务单例,支持 Google Play + 自建服务器双渠道 - VersionChecker: 版本检测器,调用 GET /api/app/version/check - DownloadManager: APK 下载管理,支持断点续传 + SHA256 校验 - ApkInstaller: APK 安装器 (Platform Channel) - AppMarketDetector: 应用市场来源检测 - SelfHostedUpdater: 自建服务器渠道更新对话框 (i18n 化) - GooglePlayUpdater: Google Play 应用内更新 ### 通知系统 (core/services/ + core/providers/) - NotificationService: 通知 + 公告 API 服务 - GET /notifications, /notifications/unread-count - PUT /notifications/:id/read - GET /announcements, /announcements/unread-count - PUT /announcements/:id/read, /announcements/read-all - NotificationBadgeManager: 未读徽章管理器 - ValueNotifier<int> 驱动 UI - 30秒定时自动刷新 + 前后台切换刷新 (WidgetsBindingObserver) ### FCM 推送框架 (core/push/) - PushService: Firebase 推送服务框架 - Firebase 代码注释保护,无配置文件时静默跳过 - 设备 token 注册 POST /device-tokens - 待 Firebase 配置文件就绪后取消注释即可启用 ### HTTP 客户端 (core/network/) - ApiClient: Dio 封装单例,baseUrl = https://api.gogenex.cn ## Android 原生配置 (每个 app) - AndroidManifest.xml: 添加 REQUEST_INSTALL_PACKAGES 权限 + FileProvider - res/xml/file_paths.xml: FileProvider 路径配置 - MainActivity.kt: APK 安装器 + 应用市场检测 MethodChannel ## UI 层改造 (每个 app) - main.dart: 异步启动,初始化 UpdateService/PushService/NotificationBadgeManager - MainShell: 消息 Tab 徽章改为 ValueListenableBuilder 动态未读数,进入后 3 秒检查更新 - SettingsPage: StatefulWidget 化,动态版本号 (PackageInfo),点击版本号手动检查更新 - MessagePage: 移除 mock 数据,接入 NotificationService API,4 Tab 分类 + 下拉刷新 + 标记已读 ## i18n 新增 (~35 keys/语言) - update.*: 25 个升级相关 keys - notification.*: 9 个通知相关 keys - genex-mobile: 4 语言 (zh_CN/zh_TW/en/ja) 分文件 - admin-app: 3 语言 (zh_CN/en_US/ja_JP) 内联单文件 - mobile: 4 语言 (zh_CN/zh_TW/en/ja) 分文件 ## 三端差异化配置 | App | MethodChannel 前缀 | applicationId | |-----|-------------------|---------------| | genex-mobile | cn.gogenex.consumer | cn.gogenex.consumer | | admin-app | cn.gogenex.issuer | cn.gogenex.issuer | | mobile | cn.gogenex.mobile | cn.gogenex.mobile | Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> |
|
|
|
3cdb6a5eb9 |
feat: 全部前端项目完成国际化(i18n),支持中/英/日三语言
- miniapp (Taro/React): 11个页面/组件,~300翻译键 - admin-app (Flutter): 19个页面,475翻译键 (zh_CN/en_US/ja_JP) - admin-web (Next.js): 25个视图+布局,2000+翻译键 - mobile (Flutter): 33+页面/组件,686翻译键 (zh_CN/zh_TW/en/ja) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> |
|
|
|
5abb614d03 |
feat: Wire all navigation callbacks across mobile and admin-app
Replace empty onPressed/onTap placeholder callbacks with actual Navigator route calls so all pages are navigable during testing. Mobile (16 pages): - Auth flow: welcome → login/register → main shell, forgot password - Home: search bar → /search, coupon cards → /coupon/detail, AI FAB → /ai-chat - Market: coupon cards → /coupon/detail - Coupon detail: buy → /order/confirm - Order confirm: payment auth → /payment - Payment: confirm → /payment/success (fixed route typo) - Payment success: buttons → /main (clear stack) - My coupons: cards → /coupon/mine/detail - My coupon detail: transfer → /transfer, sell → /sell - Search: result cards → /coupon/detail - Profile: KYC → /kyc, payment → /payment/manage, wallet → /wallet, trading → /trading, pro mode → /pro-mode, settings → /settings, logout → / (clear stack) - Settings: KYC → /kyc, logout → / (clear stack) - Wallet: deposit → /wallet/deposit, withdraw → /wallet/withdraw, records → /wallet/records - Messages: items → /message/detail Admin-app (13 pages): - Dashboard: AI insight → createCoupon, credit suggestion → credit - Coupon list: coupon cards → couponDetail, FAB → createCoupon - Create coupon: save draft → pop back - Settings: store mgmt, employee mgmt → storeManagement, AI assistant → aiAgent, tier upgrade → credit, logout → login - Financing analysis: AI recommendation → aiAgent - Onboarding: complete → main shell - Login: register link → onboarding - Fix: pass BuildContext to _buildTierCard in settings_page.dart Both apps verified building successfully (flutter build apk --debug). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> |
|
|
|
e450bef7cd |
feat: Complete all 4 frontend UI prototypes covering guides 00-04
Add 116 UI prototype files across 4 frontend applications, achieving ~95% coverage of all functional requirements from development guides. ## mobile/ (Flutter Consumer + Merchant App) — 48 files - Auth: welcome, login, register, forgot-password - Coupons: home, market, search, detail, my-coupons, my-coupon-detail, order-confirm, payment, payment-success, redeem-qr - Trading: trading, sell-order (AI pricing), transfer - Wallet: wallet, deposit, withdraw, transaction-records - Profile: profile, kyc (L0-L3), settings, payment-management, pro-mode (WalletConnect, chain address, tx hash, track selection) - AI Agent: agent-chat, ai-fab (floating button with unread count) - Merchant: merchant-home (scanner, confirm, success, history, dashboard), merchant-ai-assistant (redeem assist, traffic prediction, anomaly alerts) - Message: message-list, message-detail - Issuer: issuer-main-page - Shared widgets: coupon-card, price-tag, credit-badge, kyc-badge, status-tag, empty-state, skeleton-loader, confirm-sheet, genex-button, ai-confirm-dialog (3-level risk confirmation) - Theme: app-colors, app-typography, app-spacing, app-theme - i18n: zh-CN, en-US, ja-JP ## admin-app/ (Flutter Issuer Console) — 27 files - Auth: issuer-login - Onboarding: 5-step enterprise onboarding with AI compliance check - Dashboard: issuer-dashboard (stats, AI insight, credit/quota), user-portrait (age/geo/preference/repurchase/AI insight) - Coupon management: list, create (template-based, AI pricing), detail (recall/delist), batch-operations (issue/recall/price-adjust) - Redemption: scan-to-redeem with offline mode - Finance: overview, reconciliation (auto-reconcile, export PDF/Excel), financing-analysis (cost-benefit, liquidity, risk indicators, AI strategy) - Credit: credit-scoring (4-factor, tier progress, AI suggestions), quota-management (usage gauge, type breakdown, tier upgrade, increase requests) - AI Agent: full conversation UI with quick actions - Settings: account, notification, support, tier display - Store management: hierarchy (HQ/regional/store), employee roles - Shared: ai-suggestion-card - Theme: app-colors, app-theme, app-typography, app-spacing - i18n: zh-CN, en-US, ja-JP ## admin-web/ (React + Next.js Platform Admin) — 26 files - Layout: AdminLayout with collapsible sidebar, 10 nav sections - Dashboard: key metrics, transaction feed, system health - Users: user management with KYC filtering, risk tags - Issuers: issuer review with AI pre-screening, credit rating display - Trading: real-time monitor, order book, abnormal detection - Risk: risk dashboard, AI warnings, suspicious transactions, OFAC logs - Compliance: SAR/CTR management, audit logs, AI report generation - SEC Filing: S-1/10-K/10-Q/8-K tracker, filing timeline, auto-disclosure - License management: FinCEN MSB, BitLicense, MTL (48 states), renewal alerts - SOX compliance: ICFR/ITGC/access/change-mgmt controls, deficiency tracking - Tax compliance: Federal + 4 states, 8 IRS forms, tax calendar - IPO readiness: 28-item checklist (legal/financial/SOX/governance/insurance), blocker tracking, milestone timeline, category progress, key contacts - Finance: fee revenue, settlement queue, breakage tracking - Disputes: case management with SLA countdown, chain evidence - Analytics: user (DAU/MAU, cohort retention, geographic), coupon (category, breakage, secondary market), market-maker (TVL, spread, health, risk alerts), consumer-protection (complaints, CSAT, fund utilization, non-compliant issuers) - Insurance: consumer protection fund, claims, IPO checklist overview - Chain monitor: smart contract status, blockchain metrics - Reports: platform-wide report center - AI Agent panel: session stats, top questions, module accuracy - Merchant redemption: stats, store ranking, real-time feed - Design tokens: CSS custom properties (colors, typography, spacing, shadows) - i18n: zh-CN, en-US, ja-JP ## miniapp/ (Taro Mini Program + H5) — 15 files - Pages: home, detail, purchase, orders, my-coupons, login, redeem, profile - H5 pages: h5-share, h5-activity (countdown, featured coupons), h5-register (benefits, phone/SMS form, WeChat login) - Components: coupon-card, ai-guide (recommendation bar + purchase bubble), share-card (brand header, QR code, coupon info) - i18n: zh-CN, en-US, ja-JP ## Design System - Primary: #6C5CE7 (innovation purple), Material 3 style - Consistent design tokens across all platforms - Zero blockchain terminology — "我的券" not "NFT", "订单号" not "TX Hash" - Utility Track MVP only; Securities Track reserved as "coming soon" ## Not included (by design) - Data/Domain layers (API, state management, business logic) — UI prototypes only - Securities Track full UI — MVP focuses on Utility Track - P2 "求购" (want-to-buy) feature — marked as optional Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> |