This commit is contained in:
sion
2026-03-30 00:30:42 +08:00
parent 41c1288616
commit 2a901de2c3
27 changed files with 1324 additions and 650 deletions

View File

@@ -1,3 +1,4 @@
import 'dart:typed_data';
import 'package:flutter/material.dart';
import '../core/network/api_response.dart';
import '../core/network/dio_client.dart';
@@ -134,6 +135,21 @@ class AuthProvider extends ChangeNotifier {
}
}
/// 提交KYC实名认证真实图片上传
Future<ApiResponse<void>> submitKyc(
Uint8List frontBytes, Uint8List backBytes) async {
try {
final response =
await _userService.uploadKyc(frontBytes, backBytes);
if (response.success) {
await refreshUserInfo();
}
return response;
} catch (e) {
return ApiResponse.fail('KYC提交失败: $e');
}
}
void _setLoading(bool value) {
_isLoading = value;
notifyListeners();