refactor(frontend): replace all '认种' with '参与'
- Update terminology across all pages and entities - Change '认种' to '参与' in user-facing text - Update comments and documentation Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
e48bf3e81f
commit
1efe39c6bd
|
|
@ -25,9 +25,9 @@ class Contribution extends Equatable {
|
|||
final String teamBonusContribution;
|
||||
/// 总算力
|
||||
final String totalContribution;
|
||||
/// 是否已认种
|
||||
/// 是否已参与
|
||||
final bool hasAdopted;
|
||||
/// 直推认种用户数
|
||||
/// 直推参与用户数
|
||||
final int directReferralAdoptedCount;
|
||||
/// 已解锁层级深度
|
||||
final int unlockedLevelDepth;
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ import 'package:equatable/equatable.dart';
|
|||
|
||||
/// 贡献值来源类型
|
||||
enum ContributionSourceType {
|
||||
personal, // 个人 - 认种
|
||||
personal, // 个人 - 参与
|
||||
teamLevel, // 团队层级 - 直推/间推奖励
|
||||
teamBonus, // 团队奖励 - 额外奖励
|
||||
}
|
||||
|
|
@ -45,7 +45,7 @@ class ContributionRecord extends Equatable {
|
|||
String get displayTitle {
|
||||
switch (sourceType) {
|
||||
case ContributionSourceType.personal:
|
||||
return '认种';
|
||||
return '参与';
|
||||
case ContributionSourceType.teamLevel:
|
||||
if (levelDepth == 1) {
|
||||
return '直推奖励';
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ class ContributionStats extends Equatable {
|
|||
/// 有算力的账户数
|
||||
final int accountsWithContribution;
|
||||
|
||||
/// 总认种数
|
||||
/// 总参与数
|
||||
final int totalAdoptions;
|
||||
|
||||
/// 全网总算力
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import 'package:equatable/equatable.dart';
|
||||
|
||||
/// 认种状态枚举
|
||||
/// 参与状态枚举
|
||||
enum PlantingStatus {
|
||||
created,
|
||||
paid,
|
||||
|
|
@ -10,25 +10,25 @@ enum PlantingStatus {
|
|||
expired,
|
||||
}
|
||||
|
||||
/// 认种记录
|
||||
/// 参与记录
|
||||
class PlantingRecord extends Equatable {
|
||||
/// 订单ID
|
||||
final String orderId;
|
||||
/// 订单号
|
||||
final String orderNo;
|
||||
/// 原始认种ID
|
||||
/// 原始参与ID
|
||||
final String? originalAdoptionId;
|
||||
/// 认种数量
|
||||
/// 参与数量
|
||||
final int treeCount;
|
||||
/// 单棵算力
|
||||
final String contributionPerTree;
|
||||
/// 总算力
|
||||
final String totalContribution;
|
||||
/// 认种金额
|
||||
/// 参与金额
|
||||
final String totalAmount;
|
||||
/// 状态
|
||||
final PlantingStatus status;
|
||||
/// 认种日期
|
||||
/// 参与日期
|
||||
final DateTime? adoptionDate;
|
||||
/// 创建时间
|
||||
final DateTime createdAt;
|
||||
|
|
@ -74,21 +74,21 @@ class PlantingRecord extends Equatable {
|
|||
List<Object?> get props => [orderId, orderNo, treeCount, status];
|
||||
}
|
||||
|
||||
/// 认种汇总
|
||||
/// 参与汇总
|
||||
class PlantingSummary extends Equatable {
|
||||
/// 总订单数
|
||||
final int totalOrders;
|
||||
/// 总认种量
|
||||
/// 总参与量
|
||||
final int totalTreeCount;
|
||||
/// 总金额(理论贡献值)
|
||||
final String totalAmount;
|
||||
/// 有效认种量
|
||||
/// 有效参与量
|
||||
final int effectiveTreeCount;
|
||||
/// 有效贡献值(实际个人算力)
|
||||
final String effectiveContribution;
|
||||
/// 首次认种时间
|
||||
/// 首次参与时间
|
||||
final DateTime? firstPlantingAt;
|
||||
/// 最近认种时间
|
||||
/// 最近参与时间
|
||||
final DateTime? lastPlantingAt;
|
||||
|
||||
const PlantingSummary({
|
||||
|
|
@ -113,7 +113,7 @@ class PlantingSummary extends Equatable {
|
|||
];
|
||||
}
|
||||
|
||||
/// 认种分类账分页数据
|
||||
/// 参与分类账分页数据
|
||||
class PlantingLedgerPage extends Equatable {
|
||||
final PlantingSummary summary;
|
||||
final List<PlantingRecord> items;
|
||||
|
|
|
|||
|
|
@ -416,7 +416,7 @@ class ContributionPage extends ConsumerWidget {
|
|||
icon: Icons.eco_outlined,
|
||||
iconColor: _orange,
|
||||
title: '本人种植',
|
||||
subtitle: '个人认种产生的贡献值',
|
||||
subtitle: '个人参与产生的贡献值',
|
||||
amount: contribution?.personalContribution ?? '0',
|
||||
hideAmounts: hideAmounts,
|
||||
),
|
||||
|
|
@ -425,7 +425,7 @@ class ContributionPage extends ConsumerWidget {
|
|||
icon: Icons.groups_outlined,
|
||||
iconColor: Colors.blue,
|
||||
title: '团队下级',
|
||||
subtitle: '引荐及间推用户认种产生的贡献值',
|
||||
subtitle: '引荐及间推用户参与产生的贡献值',
|
||||
amount: contribution?.teamLevelContribution ?? '0',
|
||||
hideAmounts: hideAmounts,
|
||||
),
|
||||
|
|
@ -472,7 +472,7 @@ class ContributionPage extends ConsumerWidget {
|
|||
),
|
||||
SizedBox(height: 2),
|
||||
ShimmerText(
|
||||
placeholder: '个人认种产生的贡献值',
|
||||
placeholder: '个人参与产生的贡献值',
|
||||
style: TextStyle(fontSize: 12, color: _grayText),
|
||||
),
|
||||
],
|
||||
|
|
@ -575,7 +575,7 @@ class ContributionPage extends ConsumerWidget {
|
|||
),
|
||||
const SizedBox(width: 16),
|
||||
_buildTeamStatItem(
|
||||
'是否认种',
|
||||
'是否参与',
|
||||
contribution != null ? (contribution.hasAdopted == true ? '是' : '否') : null,
|
||||
'',
|
||||
isLoading,
|
||||
|
|
|
|||
|
|
@ -221,7 +221,7 @@ class _ContributionRecordsListPageState extends ConsumerState<ContributionRecord
|
|||
),
|
||||
const SizedBox(height: 8),
|
||||
Text(
|
||||
'认种后将产生贡献值',
|
||||
'参与后将产生贡献值',
|
||||
style: TextStyle(fontSize: 14, color: _grayText.withOpacity(0.7)),
|
||||
),
|
||||
],
|
||||
|
|
@ -300,7 +300,7 @@ class _ContributionRecordsListPageState extends ConsumerState<ContributionRecord
|
|||
const SizedBox(width: 4),
|
||||
Text(
|
||||
record.sourceType == ContributionSourceType.personal
|
||||
? '本人认种'
|
||||
? '本人参与'
|
||||
: record.sourceAccountSequence ?? '未知用户',
|
||||
style: TextStyle(fontSize: 13, color: _grayText),
|
||||
),
|
||||
|
|
@ -383,7 +383,7 @@ class _ContributionRecordsListPageState extends ConsumerState<ContributionRecord
|
|||
|
||||
switch (type) {
|
||||
case ContributionSourceType.personal:
|
||||
label = '个人认种';
|
||||
label = '个人参与';
|
||||
bgColor = _orange.withOpacity(0.1);
|
||||
textColor = _orange;
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -151,8 +151,8 @@ class _AboutPageState extends State<AboutPage> {
|
|||
_buildSectionTitle('应用简介'),
|
||||
const SizedBox(height: 12),
|
||||
Text(
|
||||
'股行是一款创新的数字资产管理平台,致力于为用户提供便捷、安全的认种和积分管理服务。'
|
||||
'通过认种,用户可以获得贡献值,并根据贡献值占比获得每日积分股分配。',
|
||||
'股行是一款创新的数字资产管理平台,致力于为用户提供便捷、安全的参与和积分管理服务。'
|
||||
'通过参与,用户可以获得贡献值,并根据贡献值占比获得每日积分股分配。',
|
||||
style: TextStyle(
|
||||
fontSize: 14,
|
||||
color: _grayText.withOpacity(0.9),
|
||||
|
|
@ -179,8 +179,8 @@ class _AboutPageState extends State<AboutPage> {
|
|||
const SizedBox(height: 16),
|
||||
_buildFeatureItem(
|
||||
icon: Icons.eco,
|
||||
title: '认种',
|
||||
description: '参与认种,获得贡献值奖励',
|
||||
title: '参与',
|
||||
description: '参与活动,获得贡献值奖励',
|
||||
),
|
||||
const SizedBox(height: 12),
|
||||
_buildFeatureItem(
|
||||
|
|
|
|||
|
|
@ -39,12 +39,12 @@ class HelpCenterPage extends StatelessWidget {
|
|||
// 常见问题分类
|
||||
_buildSection('常见问题', [
|
||||
_FAQItem(
|
||||
question: '如何认种?',
|
||||
answer: '在首页点击"去认种"按钮,选择认种数量和支付方式,完成支付后即可认种成功。认种成功后,您将获得对应的贡献值。',
|
||||
question: '如何参与?',
|
||||
answer: '在首页点击"去参与"按钮,选择参与数量和支付方式,完成支付后即可参与成功。参与成功后,您将获得对应的贡献值。',
|
||||
),
|
||||
_FAQItem(
|
||||
question: '贡献值是什么?',
|
||||
answer: '贡献值是您在平台认种后获得的一种权益凭证。贡献值越高,您每日可获得的积分股分配越多。贡献值有效期为730天。',
|
||||
answer: '贡献值是您在平台参与后获得的一种权益凭证。贡献值越高,您每日可获得的积分股分配越多。贡献值有效期为730天。',
|
||||
),
|
||||
_FAQItem(
|
||||
question: '如何获得积分股?',
|
||||
|
|
@ -89,7 +89,7 @@ class HelpCenterPage extends StatelessWidget {
|
|||
),
|
||||
_FAQItem(
|
||||
question: '团队收益如何计算?',
|
||||
answer: '当您引荐的好友认种后,您将获得团队下级贡献值奖励。引荐的用户越多、认种数量越多,您的团队收益越高。',
|
||||
answer: '当您引荐的好友参与后,您将获得团队下级贡献值奖励。引荐的用户越多、参与数量越多,您的团队收益越高。',
|
||||
),
|
||||
]),
|
||||
const SizedBox(height: 16),
|
||||
|
|
|
|||
|
|
@ -179,7 +179,7 @@ class _MiningRecordsListPageState extends ConsumerState<MiningRecordsListPage> {
|
|||
),
|
||||
const SizedBox(height: 8),
|
||||
Text(
|
||||
'认种后将开始产生收益',
|
||||
'参与后将开始产生收益',
|
||||
style: TextStyle(fontSize: 14, color: _grayText.withOpacity(0.7)),
|
||||
),
|
||||
],
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ import '../../../domain/entities/planting_record.dart';
|
|||
import '../../providers/user_providers.dart';
|
||||
import '../../providers/mining_providers.dart';
|
||||
|
||||
/// 认种记录页面
|
||||
/// 参与记录页面
|
||||
class PlantingRecordsPage extends ConsumerStatefulWidget {
|
||||
const PlantingRecordsPage({super.key});
|
||||
|
||||
|
|
@ -48,7 +48,7 @@ class _PlantingRecordsPageState extends ConsumerState<PlantingRecordsPage> {
|
|||
onPressed: () => Navigator.of(context).pop(),
|
||||
),
|
||||
title: const Text(
|
||||
'认种记录',
|
||||
'参与记录',
|
||||
style: TextStyle(
|
||||
fontSize: 18,
|
||||
fontWeight: FontWeight.w600,
|
||||
|
|
@ -196,12 +196,12 @@ class _PlantingRecordsPageState extends ConsumerState<PlantingRecordsPage> {
|
|||
Icon(Icons.eco_outlined, size: 64, color: _grayText.withOpacity(0.5)),
|
||||
const SizedBox(height: 16),
|
||||
Text(
|
||||
'暂无认种记录',
|
||||
'暂无参与记录',
|
||||
style: TextStyle(fontSize: 16, color: _grayText),
|
||||
),
|
||||
const SizedBox(height: 8),
|
||||
Text(
|
||||
'认种后将显示记录',
|
||||
'参与后将显示记录',
|
||||
style: TextStyle(fontSize: 14, color: _grayText.withOpacity(0.7)),
|
||||
),
|
||||
],
|
||||
|
|
@ -242,7 +242,7 @@ class _PlantingRecordsPageState extends ConsumerState<PlantingRecordsPage> {
|
|||
Icon(Icons.eco, size: 20, color: _green),
|
||||
const SizedBox(width: 8),
|
||||
const Text(
|
||||
'认种汇总',
|
||||
'参与汇总',
|
||||
style: TextStyle(
|
||||
fontSize: 16,
|
||||
fontWeight: FontWeight.bold,
|
||||
|
|
@ -256,7 +256,7 @@ class _PlantingRecordsPageState extends ConsumerState<PlantingRecordsPage> {
|
|||
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
||||
children: [
|
||||
_buildSummaryItem('总订单数', summary.totalOrders.toString()),
|
||||
_buildSummaryItem('总认种量', summary.totalTreeCount.toString(), color: _green),
|
||||
_buildSummaryItem('总参与量', summary.totalTreeCount.toString(), color: _green),
|
||||
_buildSummaryItem('总贡献值', formatAmount(summary.effectiveContribution), color: _orange),
|
||||
],
|
||||
),
|
||||
|
|
@ -264,15 +264,15 @@ class _PlantingRecordsPageState extends ConsumerState<PlantingRecordsPage> {
|
|||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
||||
children: [
|
||||
_buildSummaryItem('有效认种', summary.effectiveTreeCount.toString(), color: _blue),
|
||||
_buildSummaryItem('有效参与', summary.effectiveTreeCount.toString(), color: _blue),
|
||||
_buildSummaryItem(
|
||||
'首次认种',
|
||||
'首次参与',
|
||||
summary.firstPlantingAt != null
|
||||
? DateFormat('MM-dd').format(summary.firstPlantingAt!)
|
||||
: '-',
|
||||
),
|
||||
_buildSummaryItem(
|
||||
'最近认种',
|
||||
'最近参与',
|
||||
summary.lastPlantingAt != null
|
||||
? DateFormat('MM-dd').format(summary.lastPlantingAt!)
|
||||
: '-',
|
||||
|
|
@ -341,19 +341,19 @@ class _PlantingRecordsPageState extends ConsumerState<PlantingRecordsPage> {
|
|||
),
|
||||
const SizedBox(height: 12),
|
||||
|
||||
// 第二行:认种数量 + 单棵算力 + 总算力
|
||||
// 第二行:参与数量 + 单棵算力 + 总算力
|
||||
Wrap(
|
||||
spacing: 12,
|
||||
runSpacing: 8,
|
||||
children: [
|
||||
_buildInfoItem('认种数量', '${record.treeCount}棵'),
|
||||
_buildInfoItem('参与数量', '${record.treeCount}棵'),
|
||||
_buildInfoItem('单棵算力', formatAmount(record.contributionPerTree)),
|
||||
_buildInfoItem('总算力', formatAmount(record.totalContribution), isHighlight: true),
|
||||
],
|
||||
),
|
||||
const SizedBox(height: 8),
|
||||
|
||||
// 第三行:认种日期
|
||||
// 第三行:参与日期
|
||||
Row(
|
||||
children: [
|
||||
Icon(Icons.calendar_today_outlined, size: 12, color: _grayText.withOpacity(0.7)),
|
||||
|
|
|
|||
|
|
@ -228,8 +228,8 @@ class ProfilePage extends ConsumerWidget {
|
|||
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
||||
children: [
|
||||
_buildStatItem(
|
||||
'认种状态',
|
||||
stats?.hasAdopted == true ? '已认种' : '未认种',
|
||||
'参与状态',
|
||||
stats?.hasAdopted == true ? '已参与' : '未参与',
|
||||
isLoading,
|
||||
),
|
||||
_buildDivider(),
|
||||
|
|
@ -379,7 +379,7 @@ class ProfilePage extends ConsumerWidget {
|
|||
children: [
|
||||
_buildRecordIcon(
|
||||
icon: Icons.eco,
|
||||
label: '认种记录',
|
||||
label: '参与记录',
|
||||
onTap: () => context.push(Routes.plantingRecords),
|
||||
),
|
||||
_buildRecordIcon(
|
||||
|
|
|
|||
|
|
@ -195,13 +195,13 @@ class _TeamPageState extends ConsumerState<TeamPage> {
|
|||
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
||||
children: [
|
||||
_buildStatItem(
|
||||
'个人认种',
|
||||
'个人参与',
|
||||
'${_rootNode?.personalPlantingCount ?? 0} 棵',
|
||||
Icons.eco,
|
||||
),
|
||||
_buildDivider(),
|
||||
_buildStatItem(
|
||||
'团队认种',
|
||||
'团队参与',
|
||||
'${_rootNode?.teamPlantingCount ?? 0} 棵',
|
||||
Icons.groups,
|
||||
),
|
||||
|
|
|
|||
|
|
@ -126,7 +126,7 @@ final miningRecordsProvider = FutureProvider.family<MiningRecordsPage?, MiningRe
|
|||
},
|
||||
);
|
||||
|
||||
/// 认种记录请求参数
|
||||
/// 参与记录请求参数
|
||||
class PlantingRecordsParams {
|
||||
final String accountSequence;
|
||||
final int page;
|
||||
|
|
@ -151,7 +151,7 @@ class PlantingRecordsParams {
|
|||
int get hashCode => accountSequence.hashCode ^ page.hashCode ^ pageSize.hashCode;
|
||||
}
|
||||
|
||||
/// 认种记录 Provider
|
||||
/// 参与记录 Provider
|
||||
final plantingRecordsProvider = FutureProvider.family<PlantingLedgerPage?, PlantingRecordsParams>(
|
||||
(ref, params) async {
|
||||
if (params.accountSequence.isEmpty) {
|
||||
|
|
|
|||
|
|
@ -7,10 +7,10 @@ import 'user_providers.dart';
|
|||
|
||||
/// 用户统计数据 - 来自贡献值服务
|
||||
class UserStats {
|
||||
/// 是否已认种
|
||||
/// 是否已参与
|
||||
final bool hasAdopted;
|
||||
|
||||
/// 直推认种用户数
|
||||
/// 直推参与用户数
|
||||
final int directReferralAdoptedCount;
|
||||
|
||||
/// 已解锁层级深度(可理解为团队层数)
|
||||
|
|
@ -47,7 +47,7 @@ class UserStats {
|
|||
return 'V$unlockedBonusTiers';
|
||||
}
|
||||
|
||||
/// 认种数量(简化展示直推数)
|
||||
/// 参与数量(简化展示直推数)
|
||||
int get adoptionCount => hasAdopted ? 1 : 0;
|
||||
|
||||
/// 团队人数估算(基于已解锁层级)
|
||||
|
|
|
|||
|
|
@ -207,7 +207,7 @@ class _TeamTreeWidgetState extends State<TeamTreeWidget> {
|
|||
overflow: TextOverflow.ellipsis,
|
||||
),
|
||||
const SizedBox(height: 2),
|
||||
// 个人/团队认种数
|
||||
// 个人/团队参与数
|
||||
FittedBox(
|
||||
fit: BoxFit.scaleDown,
|
||||
child: Text(
|
||||
|
|
@ -472,12 +472,12 @@ class _NodeDetailsSheet extends StatelessWidget {
|
|||
_buildDetailRow('序列号', node.accountSequence),
|
||||
const SizedBox(height: 12),
|
||||
|
||||
// 个人认种数
|
||||
_buildDetailRow('个人认种', '${node.personalPlantingCount} 棵'),
|
||||
// 个人参与数
|
||||
_buildDetailRow('个人参与', '${node.personalPlantingCount} 棵'),
|
||||
const SizedBox(height: 12),
|
||||
|
||||
// 团队认种数
|
||||
_buildDetailRow('团队认种', '${node.teamPlantingCount} 棵'),
|
||||
// 团队参与数
|
||||
_buildDetailRow('团队参与', '${node.teamPlantingCount} 棵'),
|
||||
const SizedBox(height: 12),
|
||||
|
||||
// 直推人数
|
||||
|
|
|
|||
Loading…
Reference in New Issue