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:
hailin 2026-01-19 04:39:15 -08:00
parent e48bf3e81f
commit 1efe39c6bd
15 changed files with 60 additions and 60 deletions

View File

@ -25,9 +25,9 @@ class Contribution extends Equatable {
final String teamBonusContribution; final String teamBonusContribution;
/// ///
final String totalContribution; final String totalContribution;
/// ///
final bool hasAdopted; final bool hasAdopted;
/// ///
final int directReferralAdoptedCount; final int directReferralAdoptedCount;
/// ///
final int unlockedLevelDepth; final int unlockedLevelDepth;

View File

@ -2,7 +2,7 @@ import 'package:equatable/equatable.dart';
/// ///
enum ContributionSourceType { enum ContributionSourceType {
personal, // - personal, // -
teamLevel, // - / teamLevel, // - /
teamBonus, // - teamBonus, // -
} }
@ -45,7 +45,7 @@ class ContributionRecord extends Equatable {
String get displayTitle { String get displayTitle {
switch (sourceType) { switch (sourceType) {
case ContributionSourceType.personal: case ContributionSourceType.personal:
return '认种'; return '参与';
case ContributionSourceType.teamLevel: case ContributionSourceType.teamLevel:
if (levelDepth == 1) { if (levelDepth == 1) {
return '直推奖励'; return '直推奖励';

View File

@ -11,7 +11,7 @@ class ContributionStats extends Equatable {
/// ///
final int accountsWithContribution; final int accountsWithContribution;
/// ///
final int totalAdoptions; final int totalAdoptions;
/// ///

View File

@ -1,6 +1,6 @@
import 'package:equatable/equatable.dart'; import 'package:equatable/equatable.dart';
/// ///
enum PlantingStatus { enum PlantingStatus {
created, created,
paid, paid,
@ -10,25 +10,25 @@ enum PlantingStatus {
expired, expired,
} }
/// ///
class PlantingRecord extends Equatable { class PlantingRecord extends Equatable {
/// ID /// ID
final String orderId; final String orderId;
/// ///
final String orderNo; final String orderNo;
/// ID /// ID
final String? originalAdoptionId; final String? originalAdoptionId;
/// ///
final int treeCount; final int treeCount;
/// ///
final String contributionPerTree; final String contributionPerTree;
/// ///
final String totalContribution; final String totalContribution;
/// ///
final String totalAmount; final String totalAmount;
/// ///
final PlantingStatus status; final PlantingStatus status;
/// ///
final DateTime? adoptionDate; final DateTime? adoptionDate;
/// ///
final DateTime createdAt; final DateTime createdAt;
@ -74,21 +74,21 @@ class PlantingRecord extends Equatable {
List<Object?> get props => [orderId, orderNo, treeCount, status]; List<Object?> get props => [orderId, orderNo, treeCount, status];
} }
/// ///
class PlantingSummary extends Equatable { class PlantingSummary extends Equatable {
/// ///
final int totalOrders; final int totalOrders;
/// ///
final int totalTreeCount; final int totalTreeCount;
/// ///
final String totalAmount; final String totalAmount;
/// ///
final int effectiveTreeCount; final int effectiveTreeCount;
/// ///
final String effectiveContribution; final String effectiveContribution;
/// ///
final DateTime? firstPlantingAt; final DateTime? firstPlantingAt;
/// ///
final DateTime? lastPlantingAt; final DateTime? lastPlantingAt;
const PlantingSummary({ const PlantingSummary({
@ -113,7 +113,7 @@ class PlantingSummary extends Equatable {
]; ];
} }
/// ///
class PlantingLedgerPage extends Equatable { class PlantingLedgerPage extends Equatable {
final PlantingSummary summary; final PlantingSummary summary;
final List<PlantingRecord> items; final List<PlantingRecord> items;

View File

@ -416,7 +416,7 @@ class ContributionPage extends ConsumerWidget {
icon: Icons.eco_outlined, icon: Icons.eco_outlined,
iconColor: _orange, iconColor: _orange,
title: '本人种植', title: '本人种植',
subtitle: '个人认种产生的贡献值', subtitle: '个人参与产生的贡献值',
amount: contribution?.personalContribution ?? '0', amount: contribution?.personalContribution ?? '0',
hideAmounts: hideAmounts, hideAmounts: hideAmounts,
), ),
@ -425,7 +425,7 @@ class ContributionPage extends ConsumerWidget {
icon: Icons.groups_outlined, icon: Icons.groups_outlined,
iconColor: Colors.blue, iconColor: Colors.blue,
title: '团队下级', title: '团队下级',
subtitle: '引荐及间推用户认种产生的贡献值', subtitle: '引荐及间推用户参与产生的贡献值',
amount: contribution?.teamLevelContribution ?? '0', amount: contribution?.teamLevelContribution ?? '0',
hideAmounts: hideAmounts, hideAmounts: hideAmounts,
), ),
@ -472,7 +472,7 @@ class ContributionPage extends ConsumerWidget {
), ),
SizedBox(height: 2), SizedBox(height: 2),
ShimmerText( ShimmerText(
placeholder: '个人认种产生的贡献值', placeholder: '个人参与产生的贡献值',
style: TextStyle(fontSize: 12, color: _grayText), style: TextStyle(fontSize: 12, color: _grayText),
), ),
], ],
@ -575,7 +575,7 @@ class ContributionPage extends ConsumerWidget {
), ),
const SizedBox(width: 16), const SizedBox(width: 16),
_buildTeamStatItem( _buildTeamStatItem(
'是否认种', '是否参与',
contribution != null ? (contribution.hasAdopted == true ? '' : '') : null, contribution != null ? (contribution.hasAdopted == true ? '' : '') : null,
'', '',
isLoading, isLoading,

View File

@ -221,7 +221,7 @@ class _ContributionRecordsListPageState extends ConsumerState<ContributionRecord
), ),
const SizedBox(height: 8), const SizedBox(height: 8),
Text( Text(
'认种后将产生贡献值', '参与后将产生贡献值',
style: TextStyle(fontSize: 14, color: _grayText.withOpacity(0.7)), style: TextStyle(fontSize: 14, color: _grayText.withOpacity(0.7)),
), ),
], ],
@ -300,7 +300,7 @@ class _ContributionRecordsListPageState extends ConsumerState<ContributionRecord
const SizedBox(width: 4), const SizedBox(width: 4),
Text( Text(
record.sourceType == ContributionSourceType.personal record.sourceType == ContributionSourceType.personal
? '本人认种' ? '本人参与'
: record.sourceAccountSequence ?? '未知用户', : record.sourceAccountSequence ?? '未知用户',
style: TextStyle(fontSize: 13, color: _grayText), style: TextStyle(fontSize: 13, color: _grayText),
), ),
@ -383,7 +383,7 @@ class _ContributionRecordsListPageState extends ConsumerState<ContributionRecord
switch (type) { switch (type) {
case ContributionSourceType.personal: case ContributionSourceType.personal:
label = '个人认种'; label = '个人参与';
bgColor = _orange.withOpacity(0.1); bgColor = _orange.withOpacity(0.1);
textColor = _orange; textColor = _orange;
break; break;

View File

@ -151,8 +151,8 @@ class _AboutPageState extends State<AboutPage> {
_buildSectionTitle('应用简介'), _buildSectionTitle('应用简介'),
const SizedBox(height: 12), const SizedBox(height: 12),
Text( Text(
'股行是一款创新的数字资产管理平台,致力于为用户提供便捷、安全的认种和积分管理服务。' '股行是一款创新的数字资产管理平台,致力于为用户提供便捷、安全的参与和积分管理服务。'
'通过认种,用户可以获得贡献值,并根据贡献值占比获得每日积分股分配。', '通过参与,用户可以获得贡献值,并根据贡献值占比获得每日积分股分配。',
style: TextStyle( style: TextStyle(
fontSize: 14, fontSize: 14,
color: _grayText.withOpacity(0.9), color: _grayText.withOpacity(0.9),
@ -179,8 +179,8 @@ class _AboutPageState extends State<AboutPage> {
const SizedBox(height: 16), const SizedBox(height: 16),
_buildFeatureItem( _buildFeatureItem(
icon: Icons.eco, icon: Icons.eco,
title: '认种', title: '参与',
description: '参与认种,获得贡献值奖励', description: '参与活动,获得贡献值奖励',
), ),
const SizedBox(height: 12), const SizedBox(height: 12),
_buildFeatureItem( _buildFeatureItem(

View File

@ -39,12 +39,12 @@ class HelpCenterPage extends StatelessWidget {
// //
_buildSection('常见问题', [ _buildSection('常见问题', [
_FAQItem( _FAQItem(
question: '如何认种', question: '如何参与',
answer: '在首页点击"去认种"按钮,选择认种数量和支付方式,完成支付后即可认种成功。认种成功后,您将获得对应的贡献值。', answer: '在首页点击"去参与"按钮,选择参与数量和支付方式,完成支付后即可参与成功。参与成功后,您将获得对应的贡献值。',
), ),
_FAQItem( _FAQItem(
question: '贡献值是什么?', question: '贡献值是什么?',
answer: '贡献值是您在平台认种后获得的一种权益凭证。贡献值越高您每日可获得的积分股分配越多。贡献值有效期为730天。', answer: '贡献值是您在平台参与后获得的一种权益凭证。贡献值越高您每日可获得的积分股分配越多。贡献值有效期为730天。',
), ),
_FAQItem( _FAQItem(
question: '如何获得积分股?', question: '如何获得积分股?',
@ -89,7 +89,7 @@ class HelpCenterPage extends StatelessWidget {
), ),
_FAQItem( _FAQItem(
question: '团队收益如何计算?', question: '团队收益如何计算?',
answer: '当您引荐的好友认种后,您将获得团队下级贡献值奖励。引荐的用户越多、认种数量越多,您的团队收益越高。', answer: '当您引荐的好友参与后,您将获得团队下级贡献值奖励。引荐的用户越多、参与数量越多,您的团队收益越高。',
), ),
]), ]),
const SizedBox(height: 16), const SizedBox(height: 16),

View File

@ -179,7 +179,7 @@ class _MiningRecordsListPageState extends ConsumerState<MiningRecordsListPage> {
), ),
const SizedBox(height: 8), const SizedBox(height: 8),
Text( Text(
'认种后将开始产生收益', '参与后将开始产生收益',
style: TextStyle(fontSize: 14, color: _grayText.withOpacity(0.7)), style: TextStyle(fontSize: 14, color: _grayText.withOpacity(0.7)),
), ),
], ],

View File

@ -7,7 +7,7 @@ import '../../../domain/entities/planting_record.dart';
import '../../providers/user_providers.dart'; import '../../providers/user_providers.dart';
import '../../providers/mining_providers.dart'; import '../../providers/mining_providers.dart';
/// ///
class PlantingRecordsPage extends ConsumerStatefulWidget { class PlantingRecordsPage extends ConsumerStatefulWidget {
const PlantingRecordsPage({super.key}); const PlantingRecordsPage({super.key});
@ -48,7 +48,7 @@ class _PlantingRecordsPageState extends ConsumerState<PlantingRecordsPage> {
onPressed: () => Navigator.of(context).pop(), onPressed: () => Navigator.of(context).pop(),
), ),
title: const Text( title: const Text(
'认种记录', '参与记录',
style: TextStyle( style: TextStyle(
fontSize: 18, fontSize: 18,
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
@ -196,12 +196,12 @@ class _PlantingRecordsPageState extends ConsumerState<PlantingRecordsPage> {
Icon(Icons.eco_outlined, size: 64, color: _grayText.withOpacity(0.5)), Icon(Icons.eco_outlined, size: 64, color: _grayText.withOpacity(0.5)),
const SizedBox(height: 16), const SizedBox(height: 16),
Text( Text(
'暂无认种记录', '暂无参与记录',
style: TextStyle(fontSize: 16, color: _grayText), style: TextStyle(fontSize: 16, color: _grayText),
), ),
const SizedBox(height: 8), const SizedBox(height: 8),
Text( Text(
'认种后将显示记录', '参与后将显示记录',
style: TextStyle(fontSize: 14, color: _grayText.withOpacity(0.7)), 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), Icon(Icons.eco, size: 20, color: _green),
const SizedBox(width: 8), const SizedBox(width: 8),
const Text( const Text(
'认种汇总', '参与汇总',
style: TextStyle( style: TextStyle(
fontSize: 16, fontSize: 16,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
@ -256,7 +256,7 @@ class _PlantingRecordsPageState extends ConsumerState<PlantingRecordsPage> {
mainAxisAlignment: MainAxisAlignment.spaceAround, mainAxisAlignment: MainAxisAlignment.spaceAround,
children: [ children: [
_buildSummaryItem('总订单数', summary.totalOrders.toString()), _buildSummaryItem('总订单数', summary.totalOrders.toString()),
_buildSummaryItem('认种', summary.totalTreeCount.toString(), color: _green), _buildSummaryItem('参与', summary.totalTreeCount.toString(), color: _green),
_buildSummaryItem('总贡献值', formatAmount(summary.effectiveContribution), color: _orange), _buildSummaryItem('总贡献值', formatAmount(summary.effectiveContribution), color: _orange),
], ],
), ),
@ -264,15 +264,15 @@ class _PlantingRecordsPageState extends ConsumerState<PlantingRecordsPage> {
Row( Row(
mainAxisAlignment: MainAxisAlignment.spaceAround, mainAxisAlignment: MainAxisAlignment.spaceAround,
children: [ children: [
_buildSummaryItem('有效认种', summary.effectiveTreeCount.toString(), color: _blue), _buildSummaryItem('有效参与', summary.effectiveTreeCount.toString(), color: _blue),
_buildSummaryItem( _buildSummaryItem(
'首次认种', '首次参与',
summary.firstPlantingAt != null summary.firstPlantingAt != null
? DateFormat('MM-dd').format(summary.firstPlantingAt!) ? DateFormat('MM-dd').format(summary.firstPlantingAt!)
: '-', : '-',
), ),
_buildSummaryItem( _buildSummaryItem(
'最近认种', '最近参与',
summary.lastPlantingAt != null summary.lastPlantingAt != null
? DateFormat('MM-dd').format(summary.lastPlantingAt!) ? DateFormat('MM-dd').format(summary.lastPlantingAt!)
: '-', : '-',
@ -341,19 +341,19 @@ class _PlantingRecordsPageState extends ConsumerState<PlantingRecordsPage> {
), ),
const SizedBox(height: 12), const SizedBox(height: 12),
// + + // + +
Wrap( Wrap(
spacing: 12, spacing: 12,
runSpacing: 8, runSpacing: 8,
children: [ children: [
_buildInfoItem('认种数量', '${record.treeCount}'), _buildInfoItem('参与数量', '${record.treeCount}'),
_buildInfoItem('单棵算力', formatAmount(record.contributionPerTree)), _buildInfoItem('单棵算力', formatAmount(record.contributionPerTree)),
_buildInfoItem('总算力', formatAmount(record.totalContribution), isHighlight: true), _buildInfoItem('总算力', formatAmount(record.totalContribution), isHighlight: true),
], ],
), ),
const SizedBox(height: 8), const SizedBox(height: 8),
// //
Row( Row(
children: [ children: [
Icon(Icons.calendar_today_outlined, size: 12, color: _grayText.withOpacity(0.7)), Icon(Icons.calendar_today_outlined, size: 12, color: _grayText.withOpacity(0.7)),

View File

@ -228,8 +228,8 @@ class ProfilePage extends ConsumerWidget {
mainAxisAlignment: MainAxisAlignment.spaceEvenly, mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: [ children: [
_buildStatItem( _buildStatItem(
'认种状态', '参与状态',
stats?.hasAdopted == true ? '认种' : '未认种', stats?.hasAdopted == true ? '参与' : '未参与',
isLoading, isLoading,
), ),
_buildDivider(), _buildDivider(),
@ -379,7 +379,7 @@ class ProfilePage extends ConsumerWidget {
children: [ children: [
_buildRecordIcon( _buildRecordIcon(
icon: Icons.eco, icon: Icons.eco,
label: '认种记录', label: '参与记录',
onTap: () => context.push(Routes.plantingRecords), onTap: () => context.push(Routes.plantingRecords),
), ),
_buildRecordIcon( _buildRecordIcon(

View File

@ -195,13 +195,13 @@ class _TeamPageState extends ConsumerState<TeamPage> {
mainAxisAlignment: MainAxisAlignment.spaceAround, mainAxisAlignment: MainAxisAlignment.spaceAround,
children: [ children: [
_buildStatItem( _buildStatItem(
'个人认种', '个人参与',
'${_rootNode?.personalPlantingCount ?? 0}', '${_rootNode?.personalPlantingCount ?? 0}',
Icons.eco, Icons.eco,
), ),
_buildDivider(), _buildDivider(),
_buildStatItem( _buildStatItem(
'团队认种', '团队参与',
'${_rootNode?.teamPlantingCount ?? 0}', '${_rootNode?.teamPlantingCount ?? 0}',
Icons.groups, Icons.groups,
), ),

View File

@ -126,7 +126,7 @@ final miningRecordsProvider = FutureProvider.family<MiningRecordsPage?, MiningRe
}, },
); );
/// ///
class PlantingRecordsParams { class PlantingRecordsParams {
final String accountSequence; final String accountSequence;
final int page; final int page;
@ -151,7 +151,7 @@ class PlantingRecordsParams {
int get hashCode => accountSequence.hashCode ^ page.hashCode ^ pageSize.hashCode; int get hashCode => accountSequence.hashCode ^ page.hashCode ^ pageSize.hashCode;
} }
/// Provider /// Provider
final plantingRecordsProvider = FutureProvider.family<PlantingLedgerPage?, PlantingRecordsParams>( final plantingRecordsProvider = FutureProvider.family<PlantingLedgerPage?, PlantingRecordsParams>(
(ref, params) async { (ref, params) async {
if (params.accountSequence.isEmpty) { if (params.accountSequence.isEmpty) {

View File

@ -7,10 +7,10 @@ import 'user_providers.dart';
/// - /// -
class UserStats { class UserStats {
/// ///
final bool hasAdopted; final bool hasAdopted;
/// ///
final int directReferralAdoptedCount; final int directReferralAdoptedCount;
/// ///
@ -47,7 +47,7 @@ class UserStats {
return 'V$unlockedBonusTiers'; return 'V$unlockedBonusTiers';
} }
/// ///
int get adoptionCount => hasAdopted ? 1 : 0; int get adoptionCount => hasAdopted ? 1 : 0;
/// ///

View File

@ -207,7 +207,7 @@ class _TeamTreeWidgetState extends State<TeamTreeWidget> {
overflow: TextOverflow.ellipsis, overflow: TextOverflow.ellipsis,
), ),
const SizedBox(height: 2), const SizedBox(height: 2),
// / // /
FittedBox( FittedBox(
fit: BoxFit.scaleDown, fit: BoxFit.scaleDown,
child: Text( child: Text(
@ -472,12 +472,12 @@ class _NodeDetailsSheet extends StatelessWidget {
_buildDetailRow('序列号', node.accountSequence), _buildDetailRow('序列号', node.accountSequence),
const SizedBox(height: 12), const SizedBox(height: 12),
// //
_buildDetailRow('个人认种', '${node.personalPlantingCount}'), _buildDetailRow('个人参与', '${node.personalPlantingCount}'),
const SizedBox(height: 12), const SizedBox(height: 12),
// //
_buildDetailRow('团队认种', '${node.teamPlantingCount}'), _buildDetailRow('团队参与', '${node.teamPlantingCount}'),
const SizedBox(height: 12), const SizedBox(height: 12),
// //