feat(client): pay v2 支付渠道 switch + 订单列表/详情端到端

购买/支付(Phase B):
- 新 SegSwitch 段控 widget(镜像 .segswitch 原子)
- 购买页重构:顶部支付渠道 switch(默认 USDT→加密货币 / 人民币→支付宝),套餐价随渠道分币种显示,删底部弹窗选方式;点购买直达支付页
- 支付页加订单信息卡(套餐/渠道/金额按币种)
- models:PayChannel + PayCatalogItem.priceUsdtMicro/priceLabel(ch)/perMonthLabel(ch)

订单(P0,全新):
- payment_api.listOrders() + orders_provider(列表 + 详情 family)
- OrdersScreen 列表→详情(状态 pill / 可复制订单号 / 继续支付·重新购买)
- 导航:NavView.orders + desktop_shell 分支 + account 入口

配套:
- l10n +19 getter(支付渠道 4 + 订单 15)×6 语言,l10n 闸绿
- 图标单源迁移 lucide_icons_flutter + pangolin_icons.dart(codegen)
- 联系渠道订正(Telegram/邮件 support@yanmeiai.com/官网) + 前端去广告&时长
- 测试:购买 switch 分币种 + 订单列表/空态/详情 + 假 API listOrders;golden 重录
- flutter analyze 0 error,flutter test 226 全绿

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013nMthbVEmQquxBRKb9Fj8u
This commit is contained in:
wangjia
2026-07-12 00:07:15 +08:00
parent f6ce5267d5
commit 272eca04ce
66 changed files with 1398 additions and 262 deletions
+5 -1
View File
@@ -9,6 +9,7 @@ import '../screens/account_page.dart';
import '../screens/connect_page.dart';
import '../screens/contact_page.dart';
import '../screens/nodes_page.dart';
import '../screens/orders_page.dart';
import '../screens/payment_page.dart';
import '../screens/purchase_page.dart';
import '../screens/settings_page.dart';
@@ -33,7 +34,7 @@ class DesktopShell extends ConsumerWidget {
final items = <NavSidebarItem>[
(icon: PangolinIcons.power, label: t.tabConnect, view: NavView.connect),
(icon: PangolinIcons.globe, label: t.tabServers, view: NavView.servers),
(icon: PangolinIcons.barChart, label: t.tabStats, view: NavView.stats),
(icon: PangolinIcons.chartNoAxesColumn, label: t.tabStats, view: NavView.stats),
(icon: PangolinIcons.settings, label: t.settingsTitle, view: NavView.settings),
(icon: PangolinIcons.messageCircle, label: t.contactTitle, view: NavView.contact),
];
@@ -50,6 +51,7 @@ class DesktopShell extends ConsumerWidget {
NavView.devices: t.myDevices,
NavView.purchase: t.purchaseTitle,
NavView.payment: t.paymentTitle,
NavView.orders: t.ordersTitle,
};
void go(NavView v) => ref.read(navViewProvider.notifier).state = v;
@@ -80,6 +82,8 @@ class DesktopShell extends ConsumerWidget {
return PurchaseScreen(t: t, embedded: true, onOrderCreated: () => go(NavView.payment));
case NavView.payment:
return PaymentScreen(t: t, embedded: true, onDone: () => go(NavView.account));
case NavView.orders:
return OrdersScreen(t: t, embedded: true);
}
}
+1 -1
View File
@@ -31,7 +31,7 @@ class TabletShell extends ConsumerWidget {
final items = <NavSidebarItem>[
(icon: PangolinIcons.power, label: t.tabConnect, view: NavView.connect),
(icon: PangolinIcons.globe, label: t.tabServers, view: NavView.servers),
(icon: PangolinIcons.barChart, label: t.tabStats, view: NavView.stats),
(icon: PangolinIcons.chartNoAxesColumn, label: t.tabStats, view: NavView.stats),
(icon: PangolinIcons.settings, label: t.settingsTitle, view: NavView.settings),
(icon: PangolinIcons.messageCircle, label: t.contactTitle, view: NavView.contact),
];