111
This commit is contained in:
@@ -11,7 +11,7 @@ import '../../../providers/auth_provider.dart';
|
||||
import '../../components/glass_panel.dart';
|
||||
import '../../components/neon_glow.dart';
|
||||
|
||||
/// KYC 实名认证页面
|
||||
/// KYC 實名認證頁面
|
||||
class KycPage extends StatefulWidget {
|
||||
final bool returnToWithdraw;
|
||||
|
||||
@@ -64,7 +64,7 @@ class _KycPageState extends State<KycPage> {
|
||||
backgroundColor: colorScheme.surface.withOpacity(0.0),
|
||||
elevation: 0,
|
||||
title: Text(
|
||||
'实名认证',
|
||||
'實名認證',
|
||||
style: AppTextStyles.headlineLarge(context),
|
||||
),
|
||||
leading: IconButton(
|
||||
@@ -77,17 +77,17 @@ class _KycPageState extends State<KycPage> {
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
// 步骤指示器
|
||||
// 步驟指示器
|
||||
_buildStepIndicator(colorScheme),
|
||||
SizedBox(height: AppSpacing.xl),
|
||||
|
||||
// 主表单区
|
||||
// 主表單區
|
||||
GlassPanel(
|
||||
padding: EdgeInsets.all(AppSpacing.lg),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
// 标题区
|
||||
// 標題區
|
||||
Row(
|
||||
children: [
|
||||
Container(
|
||||
@@ -107,12 +107,12 @@ class _KycPageState extends State<KycPage> {
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
'身份验证',
|
||||
'身份驗證',
|
||||
style: AppTextStyles.headlineLarge(context),
|
||||
),
|
||||
SizedBox(height: 2),
|
||||
Text(
|
||||
'上传身份证正反面完成实名认证',
|
||||
'上傳身份證正反面完成實名認證',
|
||||
style: AppTextStyles.bodyMedium(context),
|
||||
),
|
||||
],
|
||||
@@ -121,9 +121,9 @@ class _KycPageState extends State<KycPage> {
|
||||
),
|
||||
SizedBox(height: AppSpacing.xl),
|
||||
|
||||
// 身份证正面上传区
|
||||
// 身份證正面上傳區
|
||||
Text(
|
||||
'身份证正面(人像面)',
|
||||
'身份證正面(人像面)',
|
||||
style: AppTextStyles.headlineSmall(context),
|
||||
),
|
||||
SizedBox(height: AppSpacing.sm),
|
||||
@@ -136,26 +136,26 @@ class _KycPageState extends State<KycPage> {
|
||||
),
|
||||
SizedBox(height: AppSpacing.lg),
|
||||
|
||||
// 身份证反面上传区
|
||||
// 身份證反面上傳區
|
||||
Text(
|
||||
'身份证反面(国徽面)',
|
||||
'身份證反面(國徽面)',
|
||||
style: AppTextStyles.headlineSmall(context),
|
||||
),
|
||||
SizedBox(height: AppSpacing.sm),
|
||||
_buildUploadZone(
|
||||
imageFile: _backFile,
|
||||
imageBytes: _backBytes,
|
||||
label: '国徽面',
|
||||
label: '國徽面',
|
||||
onTap: () => _pickImage(false),
|
||||
colorScheme: colorScheme,
|
||||
),
|
||||
SizedBox(height: AppSpacing.xl),
|
||||
|
||||
// 提交按钮
|
||||
// 提交按鈕
|
||||
SizedBox(
|
||||
width: double.infinity,
|
||||
child: NeonButton(
|
||||
text: _isSubmitting ? '提交中...' : '提交认证',
|
||||
text: _isSubmitting ? '提交中...' : '提交認證',
|
||||
type: NeonButtonType.primary,
|
||||
onPressed: _canSubmit ? _submitKyc : null,
|
||||
height: 48,
|
||||
@@ -187,7 +187,7 @@ class _KycPageState extends State<KycPage> {
|
||||
SizedBox(width: AppSpacing.sm),
|
||||
Expanded(
|
||||
child: Text(
|
||||
'您的身份信息将被加密存储,仅用于身份验证',
|
||||
'您的身份信息將被加密存儲,僅用於身份驗證',
|
||||
style: AppTextStyles.bodySmall(context).copyWith(
|
||||
color: AppColorScheme.up.withOpacity(0.8),
|
||||
),
|
||||
@@ -209,7 +209,7 @@ class _KycPageState extends State<KycPage> {
|
||||
children: [
|
||||
_buildStepCircle(
|
||||
number: '1',
|
||||
label: '上传证件',
|
||||
label: '上傳證件',
|
||||
isActive: true,
|
||||
isComplete: isComplete,
|
||||
colorScheme: colorScheme,
|
||||
@@ -224,7 +224,7 @@ class _KycPageState extends State<KycPage> {
|
||||
),
|
||||
_buildStepCircle(
|
||||
number: '2',
|
||||
label: '认证完成',
|
||||
label: '認證完成',
|
||||
isActive: false,
|
||||
isComplete: false,
|
||||
colorScheme: colorScheme,
|
||||
@@ -317,12 +317,12 @@ class _KycPageState extends State<KycPage> {
|
||||
child: Stack(
|
||||
fit: StackFit.expand,
|
||||
children: [
|
||||
// 图片预览 - 使用 memory 以兼容 Web
|
||||
// 圖片預覽 - 使用 memory 以兼容 Web
|
||||
Image.memory(
|
||||
imageBytes!,
|
||||
fit: BoxFit.cover,
|
||||
),
|
||||
// 底部渐变遮罩 + 文字
|
||||
// 底部漸變遮罩 + 文字
|
||||
Positioned(
|
||||
left: 0,
|
||||
right: 0,
|
||||
@@ -348,7 +348,7 @@ class _KycPageState extends State<KycPage> {
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text(
|
||||
'$label已选择',
|
||||
'$label已選擇',
|
||||
style: AppTextStyles.labelLarge(context).copyWith(
|
||||
color: colorScheme.onPrimary,
|
||||
),
|
||||
@@ -400,7 +400,7 @@ class _KycPageState extends State<KycPage> {
|
||||
),
|
||||
SizedBox(height: AppSpacing.sm),
|
||||
Text(
|
||||
'点击上传$label',
|
||||
'點擊上傳$label',
|
||||
style: AppTextStyles.bodyLarge(context).copyWith(
|
||||
color: colorScheme.onSurfaceVariant.withOpacity(0.6),
|
||||
),
|
||||
@@ -442,13 +442,13 @@ class _KycPageState extends State<KycPage> {
|
||||
size: 20,
|
||||
),
|
||||
SizedBox(width: AppSpacing.sm),
|
||||
const Text('认证成功'),
|
||||
const Text('認證成功'),
|
||||
],
|
||||
),
|
||||
description: const Text('您的实名认证已通过,现在可以进行提现操作'),
|
||||
description: const Text('您的實名認證已通過,現在可以進行提現操作'),
|
||||
actions: [
|
||||
ShadButton(
|
||||
child: const Text('确定'),
|
||||
child: const Text('確定'),
|
||||
onPressed: () {
|
||||
Navigator.of(ctx).pop();
|
||||
Navigator.of(context).pop();
|
||||
@@ -461,11 +461,11 @@ class _KycPageState extends State<KycPage> {
|
||||
showShadDialog(
|
||||
context: context,
|
||||
builder: (ctx) => ShadDialog.alert(
|
||||
title: const Text('认证失败'),
|
||||
description: Text(response.message ?? '请稍后重试'),
|
||||
title: const Text('認證失敗'),
|
||||
description: Text(response.message ?? '請稍後重試'),
|
||||
actions: [
|
||||
ShadButton(
|
||||
child: const Text('确定'),
|
||||
child: const Text('確定'),
|
||||
onPressed: () => Navigator.of(ctx).pop(),
|
||||
),
|
||||
],
|
||||
@@ -477,11 +477,11 @@ class _KycPageState extends State<KycPage> {
|
||||
showShadDialog(
|
||||
context: context,
|
||||
builder: (ctx) => ShadDialog.alert(
|
||||
title: const Text('认证失败'),
|
||||
title: const Text('認證失敗'),
|
||||
description: Text(e.toString()),
|
||||
actions: [
|
||||
ShadButton(
|
||||
child: const Text('确定'),
|
||||
child: const Text('確定'),
|
||||
onPressed: () => Navigator.of(ctx).pop(),
|
||||
),
|
||||
],
|
||||
@@ -494,7 +494,7 @@ class _KycPageState extends State<KycPage> {
|
||||
}
|
||||
}
|
||||
|
||||
/// 虚线边框画笔
|
||||
/// 虛線邊框畫筆
|
||||
class _DashedBorderPainter extends CustomPainter {
|
||||
final Color color;
|
||||
final double borderRadius;
|
||||
|
||||
Reference in New Issue
Block a user