111
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user