24 lines
775 B
Dart
24 lines
775 B
Dart
import 'package:starwork_flutter/api/api_path.dart';
|
|
import 'package:starwork_flutter/api/api_response.dart';
|
|
import 'package:starwork_flutter/api/base_api_service.dart';
|
|
import 'package:starwork_flutter/api/model/common/request/send_validation_code_request.dart';
|
|
import 'package:starwork_flutter/common/constant/http_constant.dart';
|
|
|
|
class CommonApiService {
|
|
final BaseApiService _api;
|
|
|
|
CommonApiService(this._api); // 通过构造函数注入
|
|
// 发送验证码
|
|
Future<ApiResponse<void>> sendValidationCode({
|
|
required SendValidationCodeRequest request,
|
|
}) {
|
|
return _api.makeRequest(
|
|
// 通过实例调用
|
|
path: ApiPath.sendValidationCode,
|
|
method: HttpConstant.post,
|
|
data: request.toJson(),
|
|
fromJson: (data) {},
|
|
);
|
|
}
|
|
}
|