diff --git a/lib/controller/home/home_controller.dart b/lib/controller/home/home_controller.dart index a9ee598..456fe71 100644 --- a/lib/controller/home/home_controller.dart +++ b/lib/controller/home/home_controller.dart @@ -76,6 +76,7 @@ class HomeController extends GetxController { // 初始化时加载数据 loadInitialData(); getFriendFootprintInfo(); + userAction(); _timer = Timer.periodic(const Duration(minutes: 1), (timer) { getFriendFootprintInfo(); @@ -84,6 +85,12 @@ class HomeController extends GetxController { } + userAction() async { + + final response = await _homeApi.userCreateUserAction({"actionType": 2}); + + } + final count = 3.obs; diff --git a/lib/network/api_urls.dart b/lib/network/api_urls.dart index 3be49e1..ce53955 100644 --- a/lib/network/api_urls.dart +++ b/lib/network/api_urls.dart @@ -255,4 +255,7 @@ class ApiUrls { static const String userCreateUserFeedback = 'dating-agency-service/user/create/user-feedback'; + static const String userCreateUserAction = + 'dating-agency-service/user/create/user-action'; + } diff --git a/lib/network/home_api.dart b/lib/network/home_api.dart index 6e7e5db..1c4eb8c 100644 --- a/lib/network/home_api.dart +++ b/lib/network/home_api.dart @@ -106,4 +106,9 @@ abstract class HomeApi { @Body() Map data, ); + @POST(ApiUrls.userCreateUserAction) + Future>> userCreateUserAction( + @Body() Map data, + ); + } \ No newline at end of file diff --git a/lib/network/home_api.g.dart b/lib/network/home_api.g.dart index ae36f34..93b0da6 100644 --- a/lib/network/home_api.g.dart +++ b/lib/network/home_api.g.dart @@ -567,6 +567,40 @@ class _HomeApi implements HomeApi { return httpResponse; } + @override + Future>> userCreateUserAction( + Map data, + ) async { + final _extra = {}; + final queryParameters = {}; + final _headers = {}; + final _data = {}; + _data.addAll(data); + final _options = _setStreamType>>( + Options(method: 'POST', headers: _headers, extra: _extra) + .compose( + _dio.options, + 'dating-agency-service/user/create/user-action', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: _combineBaseUrls(_dio.options.baseUrl, baseUrl)), + ); + final _result = await _dio.fetch>(_options); + late BaseResponse _value; + try { + _value = BaseResponse.fromJson( + _result.data!, + (json) => json as dynamic, + ); + } on Object catch (e, s) { + errorLogger?.logError(e, s, _options); + rethrow; + } + final httpResponse = HttpResponse(_value, _result); + return httpResponse; + } + RequestOptions _setStreamType(RequestOptions requestOptions) { if (T != dynamic && !(requestOptions.responseType == ResponseType.bytes ||