refactor: 将前端从 uni-app x 重构为 Flutter
变更内容: - 删除 uni-app x 项目 (app/ 目录) - 新增 Flutter 项目 (flutter_monisuo/ 目录) - 新增部署脚本 (deploy/ 目录) Flutter 项目功能: - 用户登录/注册 - 首页资产概览 - 行情币种列表 - 交易买卖操作 - 资产账户管理 - 充值/提现/划转 - 深色主题 - JWT Token 认证 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
80
flutter_monisuo/lib/core/constants/api_endpoints.dart
Normal file
80
flutter_monisuo/lib/core/constants/api_endpoints.dart
Normal file
@@ -0,0 +1,80 @@
|
||||
/// API 端点配置
|
||||
class ApiEndpoints {
|
||||
ApiEndpoints._();
|
||||
|
||||
/// 基础URL
|
||||
static const String baseUrl = 'http://8.155.172.147:5010';
|
||||
|
||||
// ==================== 用户模块 ====================
|
||||
|
||||
/// 用户登录
|
||||
static const String login = '/api/user/login';
|
||||
|
||||
/// 用户注册
|
||||
static const String register = '/api/user/register';
|
||||
|
||||
/// 获取用户信息
|
||||
static const String userInfo = '/api/user/info';
|
||||
|
||||
/// 上传KYC资料
|
||||
static const String kyc = '/api/user/kyc';
|
||||
|
||||
/// 退出登录
|
||||
static const String logout = '/api/user/logout';
|
||||
|
||||
// ==================== 行情模块 ====================
|
||||
|
||||
/// 获取币种列表
|
||||
static const String coinList = '/api/market/list';
|
||||
|
||||
/// 获取币种详情
|
||||
static const String coinDetail = '/api/market/detail';
|
||||
|
||||
/// 搜索币种
|
||||
static const String coinSearch = '/api/market/search';
|
||||
|
||||
// ==================== 交易模块 ====================
|
||||
|
||||
/// 买入
|
||||
static const String buy = '/api/trade/buy';
|
||||
|
||||
/// 卖出
|
||||
static const String sell = '/api/trade/sell';
|
||||
|
||||
/// 获取交易记录
|
||||
static const String tradeOrders = '/api/trade/orders';
|
||||
|
||||
/// 获取订单详情
|
||||
static const String tradeOrderDetail = '/api/trade/order/detail';
|
||||
|
||||
// ==================== 资产模块 ====================
|
||||
|
||||
/// 获取资产总览
|
||||
static const String assetOverview = '/api/asset/overview';
|
||||
|
||||
/// 获取资金账户
|
||||
static const String fundAccount = '/api/asset/fund';
|
||||
|
||||
/// 获取交易账户
|
||||
static const String tradeAccount = '/api/asset/trade';
|
||||
|
||||
/// 资金划转
|
||||
static const String transfer = '/api/asset/transfer';
|
||||
|
||||
/// 获取资金流水
|
||||
static const String assetFlow = '/api/asset/flow';
|
||||
|
||||
// ==================== 充提模块 ====================
|
||||
|
||||
/// 申请充值
|
||||
static const String deposit = '/api/fund/deposit';
|
||||
|
||||
/// 申请提现
|
||||
static const String withdraw = '/api/fund/withdraw';
|
||||
|
||||
/// 取消订单
|
||||
static const String cancelOrder = '/api/fund/cancel';
|
||||
|
||||
/// 获取充提记录
|
||||
static const String fundOrders = '/api/fund/orders';
|
||||
}
|
||||
62
flutter_monisuo/lib/core/constants/app_colors.dart
Normal file
62
flutter_monisuo/lib/core/constants/app_colors.dart
Normal file
@@ -0,0 +1,62 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
/// 应用颜色常量
|
||||
class AppColors {
|
||||
AppColors._();
|
||||
|
||||
// 主题色
|
||||
static const Color primary = Color(0xFF00D4AA);
|
||||
static const Color primaryLight = Color(0xFF00E6B8);
|
||||
static const Color primaryDark = Color(0xFF00B894);
|
||||
|
||||
// 状态色
|
||||
static const Color success = Color(0xFF00C853);
|
||||
static const Color warning = Color(0xFFFF9800);
|
||||
static const Color error = Color(0xFFFF5252);
|
||||
static const Color info = Color(0xFF2196F3);
|
||||
|
||||
// 涨跌色
|
||||
static const Color up = Color(0xFF00C853);
|
||||
static const Color down = Color(0xFFFF5252);
|
||||
|
||||
// 深色主题背景
|
||||
static const Color background = Color(0xFF1A1A2E);
|
||||
static const Color cardBackground = Color(0xFF16213E);
|
||||
static const Color scaffoldBackground = Color(0xFF1A1A2E);
|
||||
|
||||
// 文字颜色
|
||||
static const Color textPrimary = Colors.white;
|
||||
static const Color textSecondary = Color(0x99FFFFFF);
|
||||
static const Color textHint = Color(0x4DFFFFFF);
|
||||
static const Color textDisabled = Color(0x33FFFFFF);
|
||||
|
||||
// 边框和分割线
|
||||
static const Color border = Color(0x1AFFFFFF);
|
||||
static const Color divider = Color(0x1AFFFFFF);
|
||||
|
||||
// 输入框
|
||||
static const Color inputBackground = Color(0xFF16213E);
|
||||
static const Color inputBorder = Color(0x33FFFFFF);
|
||||
static const Color inputFocusBorder = Color(0xFF00D4AA);
|
||||
|
||||
// 按钮渐变
|
||||
static const LinearGradient primaryGradient = LinearGradient(
|
||||
colors: [primary, primaryDark],
|
||||
begin: Alignment.topLeft,
|
||||
end: Alignment.bottomRight,
|
||||
);
|
||||
|
||||
// 买入按钮渐变
|
||||
static const LinearGradient buyGradient = LinearGradient(
|
||||
colors: [Color(0xFF00C853), Color(0xFF00A844)],
|
||||
begin: Alignment.topLeft,
|
||||
end: Alignment.bottomRight,
|
||||
);
|
||||
|
||||
// 卖出按钮渐变
|
||||
static const LinearGradient sellGradient = LinearGradient(
|
||||
colors: [Color(0xFFFF5252), Color(0xFFD32F2F)],
|
||||
begin: Alignment.topLeft,
|
||||
end: Alignment.bottomRight,
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user