refactor(mobile-app): 树转让入口从"我"页面迁移至"实名认证"页面
将"发起转让"和"转让记录"按钮从 ProfilePage 顶部移除, 归类为"树服务"放入 KycEntryPage(实名认证入口页), 位于"其他操作 > 验证/更换手机号"的下方。 变更详情: - profile_page.dart: · 移除 _buildTransferButtons() 方法及其调用 · 移除 _goToTransferInitiate() / _goToTransferList() 导航方法 - kyc_entry_page.dart: · 在"验证/更换手机号"下方新增"树服务"分类标题 · 新增"发起转让"操作卡片 → /transfer/initiate · 新增"转让记录"操作卡片 → /transfer/list · 复用页面已有的 _buildActionCard 样式,保持 UI 一致 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
b3984c861c
commit
0e34896d0b
|
|
@ -136,6 +136,34 @@ class KycEntryPage extends ConsumerWidget {
|
||||||
|
|
||||||
SizedBox(height: 24.h),
|
SizedBox(height: 24.h),
|
||||||
|
|
||||||
|
// 树服务
|
||||||
|
Text(
|
||||||
|
'树服务',
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 16.sp,
|
||||||
|
fontWeight: FontWeight.w600,
|
||||||
|
color: const Color(0xFF333333),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
SizedBox(height: 12.h),
|
||||||
|
_buildActionCard(
|
||||||
|
context: context,
|
||||||
|
icon: Icons.swap_horiz,
|
||||||
|
title: '发起转让',
|
||||||
|
description: '向其他用户发起树转让',
|
||||||
|
onTap: () => context.push(RoutePaths.transferInitiate),
|
||||||
|
),
|
||||||
|
SizedBox(height: 8.h),
|
||||||
|
_buildActionCard(
|
||||||
|
context: context,
|
||||||
|
icon: Icons.receipt_long_outlined,
|
||||||
|
title: '转让记录',
|
||||||
|
description: '查看树转让历史记录',
|
||||||
|
onTap: () => context.push(RoutePaths.transferList),
|
||||||
|
),
|
||||||
|
|
||||||
|
SizedBox(height: 24.h),
|
||||||
|
|
||||||
// 说明文字
|
// 说明文字
|
||||||
_buildInfoCard(),
|
_buildInfoCard(),
|
||||||
],
|
],
|
||||||
|
|
|
||||||
|
|
@ -1366,16 +1366,6 @@ class _ProfilePageState extends ConsumerState<ProfilePage> {
|
||||||
context.push(RoutePaths.prePlantingPosition);
|
context.push(RoutePaths.prePlantingPosition);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// [2026-02-19] 进入转让发起页
|
|
||||||
void _goToTransferInitiate() {
|
|
||||||
context.push(RoutePaths.transferInitiate);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// [2026-02-19] 进入转让记录页
|
|
||||||
void _goToTransferList() {
|
|
||||||
context.push(RoutePaths.transferList);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// 谷歌验证器
|
/// 谷歌验证器
|
||||||
void _goToGoogleAuth() {
|
void _goToGoogleAuth() {
|
||||||
context.push(RoutePaths.googleAuth);
|
context.push(RoutePaths.googleAuth);
|
||||||
|
|
@ -1567,8 +1557,6 @@ class _ProfilePageState extends ConsumerState<ProfilePage> {
|
||||||
_buildPrePlantingButtons(),
|
_buildPrePlantingButtons(),
|
||||||
const SizedBox(height: 8),
|
const SizedBox(height: 8),
|
||||||
],
|
],
|
||||||
// [2026-02-19] 纯新增:树转让按钮(发起转让 + 转让记录)
|
|
||||||
_buildTransferButtons(),
|
|
||||||
const SizedBox(height: 16),
|
const SizedBox(height: 16),
|
||||||
// 主要内容卡片(懒加载:收益数据)
|
// 主要内容卡片(懒加载:收益数据)
|
||||||
VisibilityDetector(
|
VisibilityDetector(
|
||||||
|
|
@ -2140,91 +2128,6 @@ class _ProfilePageState extends ConsumerState<ProfilePage> {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// [2026-02-19] 构建树转让按钮行(发起转让 + 转让记录)
|
|
||||||
///
|
|
||||||
/// 复用预种按钮的样式,使用绿色系配色区分
|
|
||||||
Widget _buildTransferButtons() {
|
|
||||||
return Row(
|
|
||||||
children: [
|
|
||||||
// 发起转让按钮
|
|
||||||
Expanded(
|
|
||||||
child: GestureDetector(
|
|
||||||
onTap: _goToTransferInitiate,
|
|
||||||
child: Container(
|
|
||||||
height: 44,
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
color: const Color(0xFF2E7D32).withValues(alpha: 0.15),
|
|
||||||
borderRadius: BorderRadius.circular(8),
|
|
||||||
border: Border.all(
|
|
||||||
color: const Color(0xFF2E7D32).withValues(alpha: 0.4),
|
|
||||||
width: 1,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
child: const Row(
|
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
|
||||||
children: [
|
|
||||||
Icon(
|
|
||||||
Icons.swap_horiz,
|
|
||||||
color: Color(0xFF4CAF50),
|
|
||||||
size: 18,
|
|
||||||
),
|
|
||||||
SizedBox(width: 6),
|
|
||||||
Text(
|
|
||||||
'发起转让',
|
|
||||||
style: TextStyle(
|
|
||||||
fontSize: 14,
|
|
||||||
fontFamily: 'Inter',
|
|
||||||
fontWeight: FontWeight.w600,
|
|
||||||
color: Color(0xFF4CAF50),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
const SizedBox(width: 8),
|
|
||||||
// 转让记录按钮
|
|
||||||
Expanded(
|
|
||||||
child: GestureDetector(
|
|
||||||
onTap: _goToTransferList,
|
|
||||||
child: Container(
|
|
||||||
height: 44,
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
color: const Color(0xFF1565C0).withValues(alpha: 0.1),
|
|
||||||
borderRadius: BorderRadius.circular(8),
|
|
||||||
border: Border.all(
|
|
||||||
color: const Color(0xFF1565C0).withValues(alpha: 0.25),
|
|
||||||
width: 1,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
child: const Row(
|
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
|
||||||
children: [
|
|
||||||
Icon(
|
|
||||||
Icons.receipt_long_outlined,
|
|
||||||
color: Color(0xFF42A5F5),
|
|
||||||
size: 18,
|
|
||||||
),
|
|
||||||
SizedBox(width: 6),
|
|
||||||
Text(
|
|
||||||
'转让记录',
|
|
||||||
style: TextStyle(
|
|
||||||
fontSize: 14,
|
|
||||||
fontFamily: 'Inter',
|
|
||||||
fontWeight: FontWeight.w600,
|
|
||||||
color: Color(0xFF42A5F5),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// 构建主要内容卡片
|
/// 构建主要内容卡片
|
||||||
Widget _buildMainContentCard() {
|
Widget _buildMainContentCard() {
|
||||||
// Widget 结构始终保持,数据值根据状态显示 "0" 或实际值
|
// Widget 结构始终保持,数据值根据状态显示 "0" 或实际值
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue