This commit is contained in:
sion
2026-04-07 01:05:05 +08:00
parent edad10ff06
commit 5ca1274607
83 changed files with 1561 additions and 1241 deletions

View File

@@ -5,13 +5,13 @@ import '../../core/network/api_response.dart';
import '../../core/network/dio_client.dart';
import '../models/user.dart';
/// 用户服务
/// 用戶服務
class UserService {
final DioClient _client;
UserService(this._client);
/// 用户登录
/// 用戶登錄
Future<ApiResponse<Map<String, dynamic>>> login(
String username,
String password,
@@ -22,7 +22,7 @@ class UserService {
);
}
/// 用户注册multipart含身份证图片和可选推广码
/// 用戶註冊multipart含身份證圖片和可選推廣碼
Future<ApiResponse<Map<String, dynamic>>> register(
String username,
String password, {
@@ -43,7 +43,7 @@ class UserService {
);
}
/// 取用信息
/// 取用信息
Future<ApiResponse<User>> getUserInfo() async {
return _client.get<User>(
ApiEndpoints.userInfo,
@@ -51,8 +51,8 @@ class UserService {
);
}
/// 上 KYC 料(身份正反面片字
/// 使用 fromBytes 以兼容 Web 和移
/// 上 KYC 料(身份正反面片字
/// 使用 fromBytes 以兼容 Web 和移
Future<ApiResponse<void>> uploadKyc(
Uint8List frontBytes,
Uint8List backBytes,
@@ -67,7 +67,7 @@ class UserService {
);
}
/// 退出登
/// 退出登
Future<ApiResponse<void>> logout() async {
return _client.post<void>(ApiEndpoints.logout);
}