feat(pre-planting): Mobile App 预种计划路由注册 + 占位页面
[2026-02-17] 新增预种计划的 GoRouter 路由和占位页面: 1. route_paths.dart / route_names.dart(各 +5 行) - /pre-planting/purchase 购买页 - /pre-planting/position 持仓页 - /pre-planting/merge/:mergeNo 合并详情页 2. app_router.dart(+28 行) - 3 个 GoRoute 注册 3. 占位页面(3 个新文件) - pre_planting_purchase_page.dart - pre_planting_position_page.dart - pre_planting_merge_detail_page.dart 后续将逐步填充完整 UI Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
27751731e8
commit
1f9129d220
|
|
@ -0,0 +1,18 @@
|
|||
import 'package:flutter/material.dart';
|
||||
|
||||
/// [2026-02-17] 预种合并详情页面(占位 - 待完整实现)
|
||||
///
|
||||
/// 功能:显示合并记录详情、合同签署状态、挖矿状态、来源订单列表
|
||||
class PrePlantingMergeDetailPage extends StatelessWidget {
|
||||
final String mergeNo;
|
||||
|
||||
const PrePlantingMergeDetailPage({super.key, required this.mergeNo});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
appBar: AppBar(title: const Text('合并详情')),
|
||||
body: Center(child: Text('合并详情页 - $mergeNo - 开发中')),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
import 'package:flutter/material.dart';
|
||||
|
||||
/// [2026-02-17] 预种持仓页面(占位 - 待完整实现)
|
||||
///
|
||||
/// 功能:显示累计份数、合并进度条(N/5)、已合成树数、订单列表
|
||||
class PrePlantingPositionPage extends StatelessWidget {
|
||||
const PrePlantingPositionPage({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
appBar: AppBar(title: const Text('预种持仓')),
|
||||
body: const Center(child: Text('预种持仓页 - 开发中')),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
import 'package:flutter/material.dart';
|
||||
|
||||
/// [2026-02-17] 预种计划购买页面(占位 - 待完整实现)
|
||||
///
|
||||
/// 功能:选择购买份数(通常 1 份)、显示余额、确认支付 3171 USDT
|
||||
/// 首次购买需选择省市,续购自动复用。
|
||||
class PrePlantingPurchasePage extends StatelessWidget {
|
||||
const PrePlantingPurchasePage({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
appBar: AppBar(title: const Text('预种计划')),
|
||||
body: const Center(child: Text('预种购买页 - 开发中')),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
@ -44,6 +44,10 @@ import '../features/kyc/presentation/pages/change_phone_page.dart';
|
|||
import '../features/contract_signing/presentation/pages/contract_signing_page.dart';
|
||||
import '../features/contract_signing/presentation/pages/pending_contracts_page.dart';
|
||||
import '../features/pending_actions/presentation/pages/pending_actions_page.dart';
|
||||
// [2026-02-17] 新增:预种计划页面(3171 USDT/份,累计 5 份合成 1 棵树)
|
||||
import '../features/pre_planting/presentation/pages/pre_planting_purchase_page.dart';
|
||||
import '../features/pre_planting/presentation/pages/pre_planting_position_page.dart';
|
||||
import '../features/pre_planting/presentation/pages/pre_planting_merge_detail_page.dart';
|
||||
import 'route_paths.dart';
|
||||
import 'route_names.dart';
|
||||
|
||||
|
|
@ -434,6 +438,30 @@ final appRouterProvider = Provider<GoRouter>((ref) {
|
|||
builder: (context, state) => const ChangePhonePage(),
|
||||
),
|
||||
|
||||
// [2026-02-17] Pre-Planting Purchase Page (预种计划 - 购买页)
|
||||
GoRoute(
|
||||
path: RoutePaths.prePlantingPurchase,
|
||||
name: RouteNames.prePlantingPurchase,
|
||||
builder: (context, state) => const PrePlantingPurchasePage(),
|
||||
),
|
||||
|
||||
// [2026-02-17] Pre-Planting Position Page (预种计划 - 持仓页)
|
||||
GoRoute(
|
||||
path: RoutePaths.prePlantingPosition,
|
||||
name: RouteNames.prePlantingPosition,
|
||||
builder: (context, state) => const PrePlantingPositionPage(),
|
||||
),
|
||||
|
||||
// [2026-02-17] Pre-Planting Merge Detail Page (预种计划 - 合并详情)
|
||||
GoRoute(
|
||||
path: '${RoutePaths.prePlantingMergeDetail}/:mergeNo',
|
||||
name: RouteNames.prePlantingMergeDetail,
|
||||
builder: (context, state) {
|
||||
final mergeNo = state.pathParameters['mergeNo'] ?? '';
|
||||
return PrePlantingMergeDetailPage(mergeNo: mergeNo);
|
||||
},
|
||||
),
|
||||
|
||||
// Pending Contracts Page (待签署合同列表)
|
||||
// 注意:必须放在 contractSigning/:orderNo 前面,否则 "pending" 会被当成 orderNo
|
||||
GoRoute(
|
||||
|
|
|
|||
|
|
@ -55,6 +55,11 @@ class RouteNames {
|
|||
static const kycIdCard = 'kyc-id-card'; // 层级3: KYC (证件照)
|
||||
static const changePhone = 'change-phone';
|
||||
|
||||
// [2026-02-17] Pre-Planting (预种计划)
|
||||
static const prePlantingPurchase = 'pre-planting-purchase'; // 购买页
|
||||
static const prePlantingPosition = 'pre-planting-position'; // 持仓页
|
||||
static const prePlantingMergeDetail = 'pre-planting-merge'; // 合并详情页
|
||||
|
||||
// Contract Signing (合同签署)
|
||||
static const contractSigning = 'contract-signing';
|
||||
static const pendingContracts = 'pending-contracts';
|
||||
|
|
|
|||
|
|
@ -55,6 +55,11 @@ class RoutePaths {
|
|||
static const kycIdCard = '/kyc/id-card'; // 层级3: KYC (证件照)
|
||||
static const changePhone = '/kyc/change-phone';
|
||||
|
||||
// [2026-02-17] Pre-Planting (预种计划)
|
||||
static const prePlantingPurchase = '/pre-planting/purchase'; // 购买页
|
||||
static const prePlantingPosition = '/pre-planting/position'; // 持仓页
|
||||
static const prePlantingMergeDetail = '/pre-planting/merge'; // 合并详情页
|
||||
|
||||
// Contract Signing (合同签署)
|
||||
static const contractSigning = '/contract-signing';
|
||||
static const pendingContracts = '/contract-signing/pending';
|
||||
|
|
|
|||
Loading…
Reference in New Issue