refactor: 多项UI优化和品牌更名

- 品牌更名: 将"榴莲女皇"全部替换为"榴莲皇后"(前端+后端共15处)
- 导航优化: 将"交易"Tab改名为"兑换"
- 创建钱包页: 添加返回按钮,可返回向导页第5页(仅账号未创建时显示)
- 兑换页面: 禁用"一键结算"和"卖出DST"按钮,提款按钮在余额为0时禁用

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
hailin 2025-12-15 01:43:47 -08:00
parent 5219a5a39f
commit 09e66cef10
21 changed files with 133 additions and 72 deletions

View File

@ -186,7 +186,13 @@
"Bash(node -e \"\nconst { ethers } = require(''ethers'');\n\nconst KAVA_TESTNET_RPC = ''https://evm.testnet.kava.io'';\nconst privateKey = ''0xd42a6e6021ebd884f3f179d3793a32e97b9f1001db6ff44441ec455d748b9aa6'';\nconst USDT_CONTRACT = ''0xc12f6A4A7Fd0965085B044A67a39CcA2ff7fe0dF'';\nconst TO_ADDRESS = ''0x132883f6d80786109cf64004f6b5c4de99c1b3db'';\n\nasync function transfer() {\n const provider = new ethers.JsonRpcProvider(KAVA_TESTNET_RPC);\n const wallet = new ethers.Wallet(privateKey, provider);\n \n const abi = [''function transfer(address to, uint256 amount) returns (bool)'', ''function balanceOf(address) view returns (uint256)''];\n const contract = new ethers.Contract(USDT_CONTRACT, abi, wallet);\n \n const amount = BigInt(1000000) * BigInt(1000000);\n \n console.log(''Transferring 1,000,000 USDT to'', TO_ADDRESS);\n const tx = await contract.transfer(TO_ADDRESS, amount, { gasLimit: 100000 });\n console.log(''TX Hash:'', tx.hash);\n await tx.wait();\n \n const newBalance = await contract.balanceOf(TO_ADDRESS);\n console.log(''New balance:'', Number(newBalance) / 1e6, ''USDT'');\n}\n\ntransfer().catch(e => console.error(''Error:'', e.message));\n\")", "Bash(node -e \"\nconst { ethers } = require(''ethers'');\n\nconst KAVA_TESTNET_RPC = ''https://evm.testnet.kava.io'';\nconst privateKey = ''0xd42a6e6021ebd884f3f179d3793a32e97b9f1001db6ff44441ec455d748b9aa6'';\nconst USDT_CONTRACT = ''0xc12f6A4A7Fd0965085B044A67a39CcA2ff7fe0dF'';\nconst TO_ADDRESS = ''0x132883f6d80786109cf64004f6b5c4de99c1b3db'';\n\nasync function transfer() {\n const provider = new ethers.JsonRpcProvider(KAVA_TESTNET_RPC);\n const wallet = new ethers.Wallet(privateKey, provider);\n \n const abi = [''function transfer(address to, uint256 amount) returns (bool)'', ''function balanceOf(address) view returns (uint256)''];\n const contract = new ethers.Contract(USDT_CONTRACT, abi, wallet);\n \n const amount = BigInt(1000000) * BigInt(1000000);\n \n console.log(''Transferring 1,000,000 USDT to'', TO_ADDRESS);\n const tx = await contract.transfer(TO_ADDRESS, amount, { gasLimit: 100000 });\n console.log(''TX Hash:'', tx.hash);\n await tx.wait();\n \n const newBalance = await contract.balanceOf(TO_ADDRESS);\n console.log(''New balance:'', Number(newBalance) / 1e6, ''USDT'');\n}\n\ntransfer().catch(e => console.error(''Error:'', e.message));\n\")",
"Bash(node -e \"\nconst { ethers } = require(''ethers'');\n\nconst KAVA_TESTNET_RPC = ''https://evm.testnet.kava.io'';\nconst privateKey = ''0xd42a6e6021ebd884f3f179d3793a32e97b9f1001db6ff44441ec455d748b9aa6'';\nconst USDT_CONTRACT = ''0xc12f6A4A7Fd0965085B044A67a39CcA2ff7fe0dF'';\nconst TO_ADDRESS = ''0x14fcc4cad17f65ed4060ac6e89dd6dcbe8464b70'';\n\nasync function transfer() {\n const provider = new ethers.JsonRpcProvider(KAVA_TESTNET_RPC);\n const wallet = new ethers.Wallet(privateKey, provider);\n \n const abi = [''function transfer(address to, uint256 amount) returns (bool)'', ''function balanceOf(address) view returns (uint256)''];\n const contract = new ethers.Contract(USDT_CONTRACT, abi, wallet);\n \n const amount = BigInt(1000000) * BigInt(1000000);\n \n console.log(''Transferring 1,000,000 USDT to'', TO_ADDRESS);\n const tx = await contract.transfer(TO_ADDRESS, amount, { gasLimit: 100000 });\n console.log(''TX Hash:'', tx.hash);\n await tx.wait();\n \n const newBalance = await contract.balanceOf(TO_ADDRESS);\n console.log(''New balance:'', Number(newBalance) / 1e6, ''USDT'');\n}\n\ntransfer().catch(e => console.error(''Error:'', e.message));\n\")", "Bash(node -e \"\nconst { ethers } = require(''ethers'');\n\nconst KAVA_TESTNET_RPC = ''https://evm.testnet.kava.io'';\nconst privateKey = ''0xd42a6e6021ebd884f3f179d3793a32e97b9f1001db6ff44441ec455d748b9aa6'';\nconst USDT_CONTRACT = ''0xc12f6A4A7Fd0965085B044A67a39CcA2ff7fe0dF'';\nconst TO_ADDRESS = ''0x14fcc4cad17f65ed4060ac6e89dd6dcbe8464b70'';\n\nasync function transfer() {\n const provider = new ethers.JsonRpcProvider(KAVA_TESTNET_RPC);\n const wallet = new ethers.Wallet(privateKey, provider);\n \n const abi = [''function transfer(address to, uint256 amount) returns (bool)'', ''function balanceOf(address) view returns (uint256)''];\n const contract = new ethers.Contract(USDT_CONTRACT, abi, wallet);\n \n const amount = BigInt(1000000) * BigInt(1000000);\n \n console.log(''Transferring 1,000,000 USDT to'', TO_ADDRESS);\n const tx = await contract.transfer(TO_ADDRESS, amount, { gasLimit: 100000 });\n console.log(''TX Hash:'', tx.hash);\n await tx.wait();\n \n const newBalance = await contract.balanceOf(TO_ADDRESS);\n console.log(''New balance:'', Number(newBalance) / 1e6, ''USDT'');\n}\n\ntransfer().catch(e => console.error(''Error:'', e.message));\n\")",
"Bash(dir /s /b c:UsersdongDesktoprwadurianbackend*.env*)", "Bash(dir /s /b c:UsersdongDesktoprwadurianbackend*.env*)",
"Bash(echo:*)" "Bash(echo:*)",
"Bash(git commit -m \"$(cat <<''EOF''\nfeat(profile): 添加市团队/省团队/市区域/省区域权益考核显示\n\n在\"我的\"页面社区权益考核下方,根据用户拥有的角色显示对应的权益考核组件:\n- 市团队每新增认种1棵可获得30 USDT\n- 省团队每新增认种1棵可获得10 USDT \n- 市区域每新增认种1棵可获得20 USDT\n- 省区域每新增认种1棵可获得10 USDT\n\n🤖 Generated with [Claude Code](https://claude.com/claude-code)\n\nCo-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>\nEOF\n)\")",
"Bash(git commit -m \"$(cat <<''EOF''\nfix(guide): 修复向导页5导入助记词按钮导航问题\n\n将 Navigator.of(context).pushNamed() 改为 context.push()\n使用 go_router 进行页面导航,与 onboarding_page 保持一致。\n\n🤖 Generated with [Claude Code](https://claude.com/claude-code)\n\nCo-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>\nEOF\n)\")",
"Bash(git commit -m \"$(cat <<''EOF''\nfeat(profile): 添加我的伞下功能 - 展示下级用户树形结构\n\n- 后端新增 GET /referral/user/:accountSequence/direct-referrals API\n- 前端新增伞下树组件,支持懒加载、缓存、展开/收起\n- 使用 CustomPaint 绘制父子节点连接线\n- 超出屏幕宽度时显示省略号,点击弹出底部列表\n\n🤖 Generated with [Claude Code](https://claude.com/claude-code)\n\nCo-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>\nEOF\n)\")",
"Bash(git tag -a v1.0.0-beta1 -m \"$(cat <<''EOF''\nv1.0.0-beta1: 用户首次测试通过\n\n主要修复:\n- fix(reward): 修复 accountSequence 转 userId 时字母前缀导致的 BigInt 转换失败\n- fix(authorization): 修复下级团队认种数重复减去自己认种数的 BUG\n- fix(frontend): 修正权益金额显示与后端实际配置一致\n\n功能完善:\n- 社区权益激活正常\n- 市团队/省团队/市区域/省区域权益考核显示\n- 我的伞下功能 - 展示下级用户树形结构\n\n此版本可作为回滚基准点\nEOF\n)\")",
"Bash(ls -la \"c:\\Users\\dong\\Desktop\\rwadurian\\frontend\\mobile-app\\assets\\images\\splash_frames\"\" 2>/dev/null || dir \"c:UsersdongDesktoprwadurianfrontendmobile-appassetsimagessplash_frames\" 2>nul || echo \"目录不存在 \")",
"Bash(ls -la \"c:\\Users\\dong\\Desktop\\rwadurian\\frontend\\mobile-app\\lib\\features\"\" | grep -E \"^d \")"
], ],
"deny": [], "deny": [],
"ask": [] "ask": []

View File

@ -2,7 +2,7 @@
## 项目概述 ## 项目概述
Authorization Service 是 RWA 榴莲皇平台的授权管理微服务,负责社区授权、省/市公司授权、阶梯式考核管理、月度考核评估与排名、权益激活/失效管理等功能。 Authorization Service 是 RWA 榴莲皇平台的授权管理微服务,负责社区授权、省/市公司授权、阶梯式考核管理、月度考核评估与排名、权益激活/失效管理等功能。
### 核心职责 ✅ ### 核心职责 ✅
- 社区/省公司/市公司授权管理 - 社区/省公司/市公司授权管理

View File

@ -4,7 +4,7 @@
### 1.1 服务定位 ### 1.1 服务定位
blockchain-service 是 RWA 榴莲皇平台的区块链基础设施服务,负责: blockchain-service 是 RWA 榴莲皇平台的区块链基础设施服务,负责:
- **公钥→地址派生**:从 MPC 公钥派生多链钱包地址 (EVM/Cosmos) - **公钥→地址派生**:从 MPC 公钥派生多链钱包地址 (EVM/Cosmos)
- **链上事件监听**:监听 ERC20 Transfer 事件,检测用户充值 - **链上事件监听**:监听 ERC20 Transfer 事件,检测用户充值

View File

@ -2,7 +2,7 @@
* *
*/ */
// 生成用户名: 榴莲皇x号 // 生成用户名: 榴莲x号
// accountSequence 格式: D + YYMMDD + 5位序号 (如 D24121400001) // accountSequence 格式: D + YYMMDD + 5位序号 (如 D24121400001)
// 提取后5位序号去掉前导零 // 提取后5位序号去掉前导零
export function generateUsername(accountSequence: string): string { export function generateUsername(accountSequence: string): string {
@ -10,7 +10,7 @@ export function generateUsername(accountSequence: string): string {
const serialPart = accountSequence.slice(-5); const serialPart = accountSequence.slice(-5);
// 去掉前导零,转为数字再转回字符串 // 去掉前导零,转为数字再转回字符串
const serialNumber = parseInt(serialPart, 10).toString(); const serialNumber = parseInt(serialPart, 10).toString();
return `榴莲${serialNumber}`; return `榴莲${serialNumber}`;
} }
// 预定义的柔和配色方案 // 预定义的柔和配色方案

View File

@ -2,7 +2,7 @@
## 项目概述 ## 项目概述
Leaderboard Service 是 RWA 榴莲皇平台的龙虎榜微服务,负责管理用户排名计算、虚拟账户管理、榜单数据聚合与缓存、日/周/月榜单管理等功能。 Leaderboard Service 是 RWA 榴莲皇平台的龙虎榜微服务,负责管理用户排名计算、虚拟账户管理、榜单数据聚合与缓存、日/周/月榜单管理等功能。
### 核心职责 ✅ ### 核心职责 ✅
- 龙虎榜排名计算(日榜、周榜、月榜) - 龙虎榜排名计算(日榜、周榜、月榜)

View File

@ -2,7 +2,7 @@
## 项目概述 ## 项目概述
Planting Service 是 RWA 榴莲皇平台的认种微服务,负责管理认种订单生命周期、省市选择确认、资金分配规则计算、底池注入批次管理和挖矿资格管理。 Planting Service 是 RWA 榴莲皇平台的认种微服务,负责管理认种订单生命周期、省市选择确认、资金分配规则计算、底池注入批次管理和挖矿资格管理。
## 技术栈 ## 技术栈

View File

@ -31,7 +31,7 @@ async function bootstrap() {
// Swagger API 文档 // Swagger API 文档
const config = new DocumentBuilder() const config = new DocumentBuilder()
.setTitle('Planting Service API') .setTitle('Planting Service API')
.setDescription('RWA 榴莲皇平台认种服务 API') .setDescription('RWA 榴莲平台认种服务 API')
.setVersion('1.0.0') .setVersion('1.0.0')
.addBearerAuth() .addBearerAuth()
.addTag('认种订单', '认种订单相关接口') .addTag('认种订单', '认种订单相关接口')

View File

@ -2,7 +2,7 @@
## 项目概述 ## 项目概述
Referral Service 是 RWA 榴莲皇平台的推荐团队微服务,负责管理推荐关系树、团队统计维护、龙虎榜分值计算、省市团队占比统计等功能。 Referral Service 是 RWA 榴莲皇平台的推荐团队微服务,负责管理推荐关系树、团队统计维护、龙虎榜分值计算、省市团队占比统计等功能。
### 核心职责 ✅ ### 核心职责 ✅
- 推荐关系树构建(基于序列号/推荐码) - 推荐关系树构建(基于序列号/推荐码)

View File

@ -2,7 +2,7 @@
## 项目概述 ## 项目概述
Reporting & Analytics Service 是 RWA 榴莲皇平台的报表分析微服务,负责多维报表生成、数据统计与分析、报表导出、数据大屏支持等功能。 Reporting & Analytics Service 是 RWA 榴莲皇平台的报表分析微服务,负责多维报表生成、数据统计与分析、报表导出、数据大屏支持等功能。
### 核心职责 ✅ ### 核心职责 ✅
- 多维报表生成(按时间/地域/权益类型等维度) - 多维报表生成(按时间/地域/权益类型等维度)

View File

@ -2,7 +2,7 @@
## 项目概述 ## 项目概述
Reward Service 是 RWA 榴莲皇平台的权益奖励微服务负责管理奖励计算与分配、24小时倒计时管理、收益状态流转、结算处理等功能。 Reward Service 是 RWA 榴莲皇平台的权益奖励微服务负责管理奖励计算与分配、24小时倒计时管理、收益状态流转、结算处理等功能。
### 核心职责 ✅ ### 核心职责 ✅
- 权益规则定义6种权益类型 - 权益规则定义6种权益类型

View File

@ -31,7 +31,7 @@ async function bootstrap() {
// Swagger 配置 // Swagger 配置
const config = new DocumentBuilder() const config = new DocumentBuilder()
.setTitle('Reward Service API') .setTitle('Reward Service API')
.setDescription('RWA榴莲皇平台 - 权益奖励微服务 API 文档') .setDescription('RWA榴莲平台 - 权益奖励微服务 API 文档')
.setVersion('1.0') .setVersion('1.0')
.addBearerAuth() .addBearerAuth()
.build(); .build();

View File

@ -502,7 +502,7 @@ rwa_android_app/
```yaml ```yaml
name: rwa_android_app name: rwa_android_app
description: RWA榴莲皇移动应用 description: RWA榴莲皇移动应用
publish_to: 'none' publish_to: 'none'
version: 1.0.0+1 version: 1.0.0+1

View File

@ -2,7 +2,7 @@ class AppConstants {
AppConstants._(); AppConstants._();
// App Info // App Info
static const String appName = 'RWA榴莲'; static const String appName = 'RWA榴莲';
static const String appVersion = '1.0.0'; static const String appVersion = '1.0.0';
// Animation Durations // Animation Durations

View File

@ -305,7 +305,7 @@ class _BackupMnemonicPageState extends ConsumerState<BackupMnemonicPage> {
// //
final content = ''' final content = '''
===================================== =====================================
RWA - RWA -
===================================== =====================================

View File

@ -28,19 +28,25 @@ class GuidePageData {
/// - /// -
/// ///
class GuidePage extends ConsumerStatefulWidget { class GuidePage extends ConsumerStatefulWidget {
const GuidePage({super.key}); /// 0-40
final int initialPage;
const GuidePage({super.key, this.initialPage = 0});
@override @override
ConsumerState<GuidePage> createState() => _GuidePageState(); ConsumerState<GuidePage> createState() => _GuidePageState();
} }
class _GuidePageState extends ConsumerState<GuidePage> { class _GuidePageState extends ConsumerState<GuidePage> {
final PageController _pageController = PageController(); late final PageController _pageController;
int _currentPage = 0; late int _currentPage;
@override @override
void initState() { void initState() {
super.initState(); super.initState();
// 使
_currentPage = widget.initialPage.clamp(0, 4);
_pageController = PageController(initialPage: _currentPage);
// build // build
WidgetsBinding.instance.addPostFrameCallback((_) { WidgetsBinding.instance.addPostFrameCallback((_) {
_logScreenInfo(); _logScreenInfo();

View File

@ -276,11 +276,53 @@ class _OnboardingPageState extends ConsumerState<OnboardingPage> {
); );
} }
/// 5
void _goBackToGuide() {
debugPrint('[OnboardingPage] _goBackToGuide - 返回向导页第5页');
// 45
context.go(RoutePaths.guide, extra: 4);
}
/// Logo /// Logo
Widget _buildHeader() { Widget _buildHeader() {
return Column( return Column(
children: [ children: [
const SizedBox(height: 32), // -
SizedBox(
height: 32,
child: (!_isLoading && !_isAccountCreated)
? Align(
alignment: Alignment.centerLeft,
child: GestureDetector(
onTap: _goBackToGuide,
behavior: HitTestBehavior.opaque,
child: const Padding(
padding: EdgeInsets.symmetric(vertical: 4),
child: Row(
mainAxisSize: MainAxisSize.min,
children: [
Icon(
Icons.arrow_back_ios,
size: 18,
color: Color(0xFF5D4037),
),
SizedBox(width: 4),
Text(
'返回',
style: TextStyle(
fontSize: 14,
fontFamily: 'Inter',
fontWeight: FontWeight.w500,
color: Color(0xFF5D4037),
),
),
],
),
),
),
)
: null,
),
// Logo // Logo
Container( Container(
width: 100, width: 100,
@ -310,7 +352,7 @@ class _OnboardingPageState extends ConsumerState<OnboardingPage> {
const SizedBox(height: 24), const SizedBox(height: 24),
// //
const Text( const Text(
'榴莲', '榴莲',
style: TextStyle( style: TextStyle(
fontSize: 32, fontSize: 32,
fontFamily: 'Inter', fontFamily: 'Inter',

View File

@ -60,7 +60,7 @@ class _HomeShellPageState extends ConsumerState<HomeShellPage>
int _getCurrentIndex(BuildContext context) { int _getCurrentIndex(BuildContext context) {
final location = GoRouterState.of(context).uri.path; final location = GoRouterState.of(context).uri.path;
// Tab暂时隐藏: 0-, 1-, 2- // Tab暂时隐藏: 0-, 1-, 2-
if (location.startsWith(RoutePaths.ranking)) return 0; if (location.startsWith(RoutePaths.ranking)) return 0;
// if (location.startsWith(RoutePaths.mining)) return 1; // // if (location.startsWith(RoutePaths.mining)) return 1; //
if (location.startsWith(RoutePaths.trading)) return 1; if (location.startsWith(RoutePaths.trading)) return 1;
@ -69,7 +69,7 @@ class _HomeShellPageState extends ConsumerState<HomeShellPage>
} }
void _onTabTapped(BuildContext context, int index) { void _onTabTapped(BuildContext context, int index) {
// Tab暂时隐藏: 0-, 1-, 2- // Tab暂时隐藏: 0-, 1-, 2-
switch (index) { switch (index) {
case 0: case 0:
context.go(RoutePaths.ranking); context.go(RoutePaths.ranking);

View File

@ -1,7 +1,7 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
/// ///
/// Tab /// Tab
/// Tab暂时隐藏便 /// Tab暂时隐藏便
/// 使 LayoutBuilder /// 使 LayoutBuilder
class BottomNavBar extends StatelessWidget { class BottomNavBar extends StatelessWidget {
@ -53,7 +53,7 @@ class BottomNavBar extends StatelessWidget {
index: 1, // index: 2 index: 1, // index: 2
icon: Icons.swap_horiz_outlined, icon: Icons.swap_horiz_outlined,
activeIcon: Icons.swap_horiz, activeIcon: Icons.swap_horiz,
label: '交易', label: '兑换',
), ),
_buildNavItem( _buildNavItem(
index: 2, // index: 3 index: 2, // index: 3

View File

@ -7,7 +7,7 @@ import '../../../../routes/route_paths.dart';
/// ///
enum SettlementCurrency { bnb, og, usdt, dst } enum SettlementCurrency { bnb, og, usdt, dst }
/// - /// -
/// DST转USDT /// DST转USDT
class TradingPage extends ConsumerStatefulWidget { class TradingPage extends ConsumerStatefulWidget {
const TradingPage({super.key}); const TradingPage({super.key});
@ -282,7 +282,7 @@ class _TradingPageState extends ConsumerState<TradingPage> {
padding: const EdgeInsets.symmetric(horizontal: 16), padding: const EdgeInsets.symmetric(horizontal: 16),
child: const Center( child: const Center(
child: Text( child: Text(
'交易', '兑换',
style: TextStyle( style: TextStyle(
fontSize: 18, fontSize: 18,
fontFamily: 'Inter', fontFamily: 'Inter',
@ -346,40 +346,33 @@ class _TradingPageState extends ConsumerState<TradingPage> {
} }
/// ///
///
Widget _buildSettlementButton() { Widget _buildSettlementButton() {
final bool canSettle = !_isLoading && !_isSettling && _settleableAmount > 0; //
const bool canSettle = false;
return Padding( return Padding(
padding: const EdgeInsets.symmetric(horizontal: 16), padding: const EdgeInsets.symmetric(horizontal: 16),
child: GestureDetector( child: GestureDetector(
onTap: canSettle ? _onSettlement : null, onTap: null, //
child: Container( child: Container(
width: double.infinity, width: double.infinity,
height: 56, height: 56,
decoration: BoxDecoration( decoration: BoxDecoration(
color: canSettle ? const Color(0xFFD4AF37) : const Color(0x80D4AF37), color: const Color(0x80D4AF37), //
borderRadius: BorderRadius.circular(12), borderRadius: BorderRadius.circular(12),
), ),
child: Center( child: const Center(
child: _isSettling child: Text(
? const SizedBox( '一键结算(暂未开放)',
width: 24, style: TextStyle(
height: 24, fontSize: 16,
child: CircularProgressIndicator( fontFamily: 'Inter',
strokeWidth: 2, fontWeight: FontWeight.w700,
valueColor: AlwaysStoppedAnimation<Color>(Colors.white), height: 1.5,
), letterSpacing: 0.24,
) color: Colors.white,
: const Text( ),
'一键结算', ),
style: TextStyle(
fontSize: 16,
fontFamily: 'Inter',
fontWeight: FontWeight.w700,
height: 1.5,
letterSpacing: 0.24,
color: Colors.white,
),
),
), ),
), ),
), ),
@ -468,32 +461,33 @@ class _TradingPageState extends ConsumerState<TradingPage> {
} }
/// DST按钮 /// DST按钮
/// DST功能暂时禁用
Widget _buildSellDstButton() { Widget _buildSellDstButton() {
return Padding( return Padding(
padding: const EdgeInsets.symmetric(horizontal: 16), padding: const EdgeInsets.symmetric(horizontal: 16),
child: GestureDetector( child: GestureDetector(
onTap: _onSellDst, onTap: null, //
child: Container( child: Container(
width: double.infinity, width: double.infinity,
height: 56, height: 56,
decoration: BoxDecoration( decoration: BoxDecoration(
color: const Color(0x338B5A2B), color: const Color(0x1A8B5A2B), //
borderRadius: BorderRadius.circular(12), borderRadius: BorderRadius.circular(12),
border: Border.all( border: Border.all(
color: const Color(0x808B5A2B), color: const Color(0x408B5A2B), //
width: 1, width: 1,
), ),
), ),
child: const Center( child: const Center(
child: Text( child: Text(
'卖出 DST 转换为 USDT', '卖出 DST 转换为 USDT(暂未开放)',
style: TextStyle( style: TextStyle(
fontSize: 16, fontSize: 16,
fontFamily: 'Inter', fontFamily: 'Inter',
fontWeight: FontWeight.w700, fontWeight: FontWeight.w700,
height: 1.5, height: 1.5,
letterSpacing: 0.24, letterSpacing: 0.24,
color: Color(0xFF8B5A2B), color: Color(0x808B5A2B), //
), ),
), ),
), ),
@ -525,37 +519,46 @@ class _TradingPageState extends ConsumerState<TradingPage> {
} }
/// / /// /
/// USDT 0
Widget _buildWithdrawButton() { Widget _buildWithdrawButton() {
// 0
final bool canWithdraw = !_isLoading && _usdtBalance > 0;
return Padding( return Padding(
padding: const EdgeInsets.symmetric(horizontal: 16), padding: const EdgeInsets.symmetric(horizontal: 16),
child: GestureDetector( child: GestureDetector(
onTap: () { onTap: canWithdraw
context.push(RoutePaths.withdrawUsdt); ? () {
}, context.push(RoutePaths.withdrawUsdt);
}
: null,
child: Container( child: Container(
width: double.infinity, width: double.infinity,
height: 56, height: 56,
decoration: BoxDecoration( decoration: BoxDecoration(
color: const Color(0xFFD4AF37), color: canWithdraw
? const Color(0xFFD4AF37)
: const Color(0x80D4AF37), //
borderRadius: BorderRadius.circular(12), borderRadius: BorderRadius.circular(12),
boxShadow: const [ boxShadow: canWithdraw
BoxShadow( ? const [
color: Color(0x4DD4AF37), BoxShadow(
blurRadius: 14, color: Color(0x4DD4AF37),
offset: Offset(0, 4), blurRadius: 14,
), offset: Offset(0, 4),
], ),
]
: null, //
), ),
child: const Center( child: Center(
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
children: [ children: [
Icon( Icon(
Icons.account_balance_wallet_outlined, Icons.account_balance_wallet_outlined,
color: Colors.white, color: canWithdraw ? Colors.white : Colors.white70,
size: 20, size: 20,
), ),
SizedBox(width: 8), const SizedBox(width: 8),
Text( Text(
'提款 / 转账', '提款 / 转账',
style: TextStyle( style: TextStyle(
@ -564,7 +567,7 @@ class _TradingPageState extends ConsumerState<TradingPage> {
fontWeight: FontWeight.w700, fontWeight: FontWeight.w700,
height: 1.5, height: 1.5,
letterSpacing: 0.24, letterSpacing: 0.24,
color: Colors.white, color: canWithdraw ? Colors.white : Colors.white70,
), ),
), ),
], ],

View File

@ -106,7 +106,11 @@ final appRouterProvider = Provider<GoRouter>((ref) {
GoRoute( GoRoute(
path: RoutePaths.guide, path: RoutePaths.guide,
name: RouteNames.guide, name: RouteNames.guide,
builder: (context, state) => const GuidePage(), builder: (context, state) {
//
final initialPage = state.extra as int? ?? 0;
return GuidePage(initialPage: initialPage);
},
), ),
// Onboarding / Create Account // Onboarding / Create Account

View File

@ -1,5 +1,5 @@
name: rwa_android_app name: rwa_android_app
description: RWA榴莲皇移动应用 description: RWA榴莲移动应用
publish_to: 'none' publish_to: 'none'
version: 1.0.0+1 version: 1.0.0+1