Commit Graph

5 Commits

Author SHA1 Message Date
hailin 856354690d fix(mobile/profile): fix HoldingsSummaryModel import path
Was importing from profile/data/models/ (nonexistent),
should be coupons/data/models/.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-07 20:22:56 -08:00
hailin 4065d586a9 feat(mobile/coupons): complete coupon holdings feature
- wallet_coupons_page: pass full CouponModel to detail route (was coupon.id)
- wallet_coupons_page: fix status filters (in_circulation=可使用, listed=挂售中)
- my_coupon_detail_page: full rewrite — StatefulWidget, accept CouponModel or String ID,
  real QR code via qr_flutter, barcode toggle, real data (faceValue/price/expiry/orderNo/resale),
  conditional action buttons per isTransferable + resaleCount, grey gradient for expired coupons
- profile_page: convert to StatefulWidget, load holdingsSummary on init, show real hold
  count & totalSaved in quick stats (tappable → /wallet/coupons), add "我的持仓" menu entry
- i18n: add myCoupon.switchQr + common.notFound to all 4 locales

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-07 20:09:31 -08:00
hailin 46d2404d19 feat(genex-mobile): 邀请好友 — 分享二维码页面全链路实现
- 新增 SharePage:推荐码 QR 码 + 邀请进度 + 一键复制/原生分享
- ProfilePage 添加「邀请好友」渐变横幅入口
- 新增 ReferralService(getMyInfo / getDirectReferrals)
- pubspec.yaml 引入 qr_flutter ^4.1.0、share_plus ^10.0.2
- 路由 /share 注册
- i18n:4 语言新增 share.* 共 20 个翻译键(zh-CN / zh-TW / en / ja)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-04 01:28:22 -08:00
hailin 5bc1cbe4d8 feat: 完成全量国际化(i18n),支持简中/繁中/英文/日文四语言
## 概述
实现 Genex Mobile 全量国际化支持,覆盖全部 UI 字符串。
支持语言:简体中文(zh_CN)、繁体中文(zh_TW)、英文(en)、日文(ja)。
共计 720+ 翻译键值对,涉及 51 个文件。

## 新增文件
- lib/app/i18n/strings/zh_cn.dart — 简体中文翻译(基础语言)
- lib/app/i18n/strings/zh_tw.dart — 繁体中文翻译
- lib/app/i18n/strings/en.dart — 英文翻译
- lib/app/i18n/strings/ja.dart — 日文翻译
- lib/app/i18n/locale_manager.dart — 全局语言/货币状态管理器

## i18n 基础架构
- AppLocalizations: 基于 Map<String, String> 的翻译查找
- AppLocalizationsDelegate: Flutter 本地化委托集成
- context.t('key') 扩展方法:便捷取用翻译文本
- 回退链:缺失 key → zh_CN → key 本身
- LocaleManager: ValueNotifier<Locale?> 响应式语言切换
- 货币绑定:根据 locale 自动匹配货币符号(CNY/TWD/USD/JPY)

## 页面级国际化(46 个文件)
### 认证模块 (auth)
- welcome_page, login_page, register_page, forgot_password_page

### 券模块 (coupons)
- home_page, market_page, search_page, coupon_detail_page
- my_coupons_page, my_coupon_detail_page, wallet_coupons_page
- order_confirm_page, payment_page, payment_success_page
- redeem_qr_page, receive_coupon_sheet

### 交易模块 (trading)
- trading_page, trading_detail_page, sell_order_page, transfer_page

### 钱包模块 (wallet)
- wallet_page, deposit_page, withdraw_page, transaction_records_page

### 用户模块 (profile)
- profile_page, settings_page, kyc_page
- payment_management_page, pro_mode_page

### 消息模块 (message)
- message_page, message_detail_page

### 商户模块 (merchant)
- merchant_home_page, merchant_ai_assistant_page

### 发行方模块 (issuer)
- issuer_main_page

### AI 模块 (ai_agent)
- agent_chat_page, ai_fab

### 公共组件 (shared/widgets)
- coupon_card, price_tag, status_tag, empty_state
- ai_confirm_dialog, kyc_badge

### 应用层 (app)
- main.dart (本地化委托/Locale解析配置)
- main_shell.dart, app_localizations.dart, pubspec.yaml

## 技术处理
- Widget getter → method(BuildContext): 需要 context 的属性转为方法
- const 默认参数 → nullable: 无法在 const 中使用 context.t(),改为可空参数在 build() 中解析
- Mock 数据保留中文:示例/演示数据将来自 API,无需国际化
- 语言选择器原生显示:中文/English/日本語 等按各语言原生名称展示

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-12 00:16:00 -08:00
hailin b63414542b feat: Create genex-mobile app with coupon lifecycle management redesign
基于 frontend/mobile 创建全新的 genex-mobile 应用,重新设计为券的生命周期管理平台。

## 底部导航重构 (5 tabs → 4 tabs)
- 首页 / 交易 / 消息 / 我的
- 移除独立的"我的券"Tab,功能合并到首页券钱包中
- "市场"重命名为"交易",图标改为行情图标

## 首页改造
### 券钱包(替代原Banner轮播区域)
- 紫色渐变卡片展示"我的钱包",含券数量统计(可使用/待核销/已过期)
- 水平滚动的券迷你卡片列表,支持Tab筛选(全部/可使用/待核销/已过期)
- 快捷操作栏:接收 / 转赠 / 出售 / 核销
- 接收功能:点击弹出底部Sheet,展示接收ID和接收二维码
  - 对方可通过扫码或输入ID转赠券到钱包
  - 接收ID支持一键复制

### 分类网格重新设计(从商品品类改为省钱机制)
- 原8个商品分类(餐饮/购物/娱乐/出行/生活/品牌/折扣/全部)
- 改为6个省钱导向分类:限时抢购 / 新券首发 / 折扣排行 / 即将到期 / 比价 / 全部分类
- 3列×2行布局,每个入口强调"怎么省"而非"卖什么"

### 其他区域保持不变
- AI智能推荐卡片
- 精选好券列表
- AI FAB浮动按钮

## 交易页(币安交易所风格)
### 一级市场(打新申购 / Launchpad风格)
- 券发行卡片:品牌信息 / 发行价 / 面值 / 折扣 / 发行量
- 销售进度条和百分比
- 状态标签:即将开始(含倒计时)/ 申购中 / 已结束

### 二级市场(交易所行情列表)
- 交易对分类Tab:券/法币 | 券/数字货币 | 券/稳定币 | 收藏
- 行情列表:交易对名称 / 最新价格 / 24h涨跌幅(红绿色块)
- 成交量和USD等价显示
- 支持的交易对示例:SBUX/USD, NIKE/BTC, AMZN/USDT 等

### 交易对详情页(K线 + 盘口 + 下单)
- 价格头部:当前价 / 24h涨跌 / OHLC数据(高/低/开盘/成交量)
- K线图(含模拟蜡烛图渲染 + 成交量柱状图)
- 时间周期选择器:1m / 5m / 15m / 1h / 4h / 1D / 1W
- 交易深度:买卖盘口(Bid/Ask)带深度条可视化
- 下单表单:买入/卖出切换 / 限价单/市价单 / 价格数量输入 / 比例快选(25%/50%/75%/100%)
- 当前委托和历史委托列表
- 底部买入/卖出快捷按钮

## 券详情页增强
- 新增"附近可用门店"区域(LBS定位功能入口)
- 展示附近门店列表:门店名 / 距离 / 营业状态

## 技术细节
- 保持原有设计系统:紫色主色调 #6C5CE7 / Material 3 / 亮色模式
- Flutter analyze 零错误通过
- 所有新增页面使用 mock 数据,便于后续接入真实API

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-11 17:57:16 -08:00