diff --git a/lib/retrofit/retrofit_api.g.dart b/lib/retrofit/retrofit_api.g.dart index aaa817ba..d50828da 100644 --- a/lib/retrofit/retrofit_api.g.dart +++ b/lib/retrofit/retrofit_api.g.dart @@ -92,7 +92,7 @@ class _ApiService implements ApiService { data: _data); final value = BaseData.fromJson( _result.data, - (json) => LoginInfo.fromJson(json), + (json) => LoginInfo.fromJson(json), ); return value; } @@ -293,7 +293,7 @@ class _ApiService implements ApiService { data: _data); final value = BaseData.fromJson( _result.data, - (json) => json as dynamic, + (json) => json as dynamic, ); return value; } @@ -352,13 +352,15 @@ class _ApiService implements ApiService { const _extra = {}; final queryParameters = {}; final _data = {}; + final _headers = {}; + _headers.addAll({"Environment":"app"}); _data.addAll(param ?? {}); final _result = await _dio.request>( '/creditOrder/create', queryParameters: queryParameters, options: RequestOptions( method: 'POST', - headers: {}, + headers: _headers, extra: _extra, baseUrl: baseUrl), data: _data); @@ -1013,7 +1015,8 @@ class _ApiService implements ApiService { const _extra = {}; final queryParameters = {}; final _data = {}; - final _result = await _dio.request>('/app-msg/stats', + final _result = await _dio.request>( + '/app-msg/stats', queryParameters: queryParameters, options: RequestOptions( method: 'GET', @@ -1023,7 +1026,7 @@ class _ApiService implements ApiService { data: _data); final value = BaseData>.fromJson( _result.data, - (json) => (json as List) + (json) => (json as List) .map((i) => MsgStats.fromJson(i as Map)) .toList()); return value; @@ -1189,7 +1192,7 @@ class _ApiService implements ApiService { } @override - Future> orderCancel(id) async { + Future> orderCancel(id) async { ArgumentError.checkNotNull(id, 'id'); const _extra = {}; final queryParameters = {}; @@ -1203,9 +1206,9 @@ class _ApiService implements ApiService { extra: _extra, baseUrl: baseUrl), data: _data); - final value = BaseData.fromJson( + final value = BaseData.fromJson( _result.data, - (json) => json as dynamic, + (json) => json as bool, ); return value; } @@ -1389,9 +1392,8 @@ class _ApiService implements ApiService { data: _data); final value = BaseData>.fromJson( _result.data, - (json) => (json as List) - .map( - (i) => CategorySelectList.fromJson(i as Map)) + (json) => (json as List) + .map((i) => CategorySelectList.fromJson(i as Map)) .toList()); return value; } @@ -1413,7 +1415,7 @@ class _ApiService implements ApiService { data: _data); final value = BaseData>.fromJson( _result.data, - (json) => (json as List) + (json) => (json as List) .map((i) => Chapter.fromJson(i as Map)) .toList()); return value; @@ -1426,7 +1428,8 @@ class _ApiService implements ApiService { final queryParameters = {}; final _data = {}; _data.addAll(map ?? {}); - final _result = await _dio.request>('/course/list', + final _result = await _dio.request>( + '/course/list', queryParameters: queryParameters, options: RequestOptions( method: 'POST', @@ -1436,9 +1439,9 @@ class _ApiService implements ApiService { data: _data); final value = BaseData>.fromJson( _result.data, - (json) => PageInfo.fromJson( + (json) => PageInfo.fromJson( json, - (json) => CourseList.fromJson(json), + (json) => CourseList.fromJson(json), ), ); return value; @@ -1460,9 +1463,8 @@ class _ApiService implements ApiService { data: _data); final value = BaseData>.fromJson( _result.data, - (json) => (json as List) - .map( - (i) => CollectClassList.fromJson(i as Map)) + (json) => (json as List) + .map((i) => CollectClassList.fromJson(i as Map)) .toList()); return value; } @@ -1484,9 +1486,8 @@ class _ApiService implements ApiService { data: _data); final value = BaseData>.fromJson( _result.data, - (json) => (json as List) - .map( - (i) => CourseList.fromJson(i as Map)) + (json) => (json as List) + .map((i) => CourseList.fromJson(i as Map)) .toList()); return value; } @@ -1497,7 +1498,8 @@ class _ApiService implements ApiService { const _extra = {}; final queryParameters = {}; final _data = {}; - final _result = await _dio.request>('/course/$id', + final _result = await _dio.request>( + '/course/$id', queryParameters: queryParameters, options: RequestOptions( method: 'GET', @@ -1507,7 +1509,7 @@ class _ApiService implements ApiService { data: _data); final value = BaseData.fromJson( _result.data, - (json) => CourseDetails.fromJson(json), + (json) => CourseDetails.fromJson(json), ); return value; } @@ -1529,20 +1531,19 @@ class _ApiService implements ApiService { data: _data); final value = BaseData.fromJson( _result.data, - (json) => json as dynamic, + (json) => json as dynamic, ); return value; } @override - Future>> findBadges(map) async { - ArgumentError.checkNotNull(map, 'map'); + Future>> findBadges(param) async { + ArgumentError.checkNotNull(param, 'param'); const _extra = {}; final queryParameters = {}; final _data = {}; - _data.addAll(map ?? {}); - final _result = await _dio.request>( - '/app-memberAchievement/findBadges', + _data.addAll(param ?? {}); + final _result = await _dio.request>('/app-memberAchievement/findBadges', queryParameters: queryParameters, options: RequestOptions( method: 'POST', @@ -1552,16 +1553,14 @@ class _ApiService implements ApiService { data: _data); final value = BaseData>.fromJson( _result.data, - (json) => (json as List) - .map( - (i) => VipBadgesList.fromJson(i as Map)) + (json) => (json as List) + .map((i) => VipBadgesList.fromJson(i as Map)) .toList()); return value; } @override - Future>> getAchievementDetail( - achievementCategoryId) async { + Future>> getAchievementDetail(achievementCategoryId) async { ArgumentError.checkNotNull(achievementCategoryId, 'achievementCategoryId'); const _extra = {}; final queryParameters = {}; @@ -1577,9 +1576,8 @@ class _ApiService implements ApiService { data: _data); final value = BaseData>.fromJson( _result.data, - (json) => (json as List) - .map((i) => - AchievementDetailList.fromJson(i as Map)) + (json) => (json as List) + .map((i) => AchievementDetailList.fromJson(i as Map)) .toList()); return value; } @@ -1600,9 +1598,8 @@ class _ApiService implements ApiService { data: _data); final value = BaseData>.fromJson( _result.data, - (json) => (json as List) - .map( - (i) => VipBenefitList.fromJson(i as Map)) + (json) => (json as List) + .map((i) => VipBenefitList.fromJson(i as Map)) .toList()); return value; } @@ -1612,7 +1609,8 @@ class _ApiService implements ApiService { const _extra = {}; final queryParameters = {}; final _data = {}; - final _result = await _dio.request>('/home/vipBenefit', + final _result = await _dio.request>( + '/home/vipBenefit', queryParameters: queryParameters, options: RequestOptions( method: 'GET', @@ -1622,7 +1620,7 @@ class _ApiService implements ApiService { data: _data); final value = BaseData.fromJson( _result.data, - (json) => VipRuleDetails.fromJson(json), + (json) => VipRuleDetails.fromJson(json), ); return value; } @@ -1643,9 +1641,8 @@ class _ApiService implements ApiService { data: _data); final value = BaseData>.fromJson( _result.data, - (json) => (json as List) - .map( - (i) => SecondCardList.fromJson(i as Map)) + (json) => (json as List) + .map((i) => SecondCardList.fromJson(i as Map)) .toList()); return value; } @@ -1667,7 +1664,7 @@ class _ApiService implements ApiService { data: _data); final value = BaseData.fromJson( _result.data, - (json) => json as dynamic, + (json) => json as dynamic, ); return value; } @@ -1689,7 +1686,7 @@ class _ApiService implements ApiService { data: _data); final value = BaseData.fromJson( _result.data, - (json) => json as dynamic, + (json) => json as dynamic, ); return value; } @@ -1711,7 +1708,7 @@ class _ApiService implements ApiService { data: _data); final value = BaseData.fromJson( _result.data, - (json) => Logistics.fromJson(json), + (json) => Logistics.fromJson(json), ); return value; } @@ -1733,7 +1730,7 @@ class _ApiService implements ApiService { data: _data); final value = BaseData.fromJson( _result.data, - (json) => json as dynamic, + (json) => json as dynamic, ); return value; } @@ -1754,9 +1751,8 @@ class _ApiService implements ApiService { data: _data); final value = BaseData>.fromJson( _result.data, - (json) => (json as List) - .map( - (i) => HeadlinesList.fromJson(i as Map)) + (json) => (json as List) + .map((i) => HeadlinesList.fromJson(i as Map)) .toList()); return value; } @@ -1778,7 +1774,7 @@ class _ApiService implements ApiService { data: _data); final value = BaseData.fromJson( _result.data, - (json) => HeadlinesListDetails.fromJson(json), + (json) => HeadlinesListDetails.fromJson(json), ); return value; } @@ -1801,9 +1797,9 @@ class _ApiService implements ApiService { data: _data); final value = BaseData>.fromJson( _result.data, - (json) => PageInfo.fromJson( + (json) => PageInfo.fromJson( json, - (json) => InvitationList.fromJson(json), + (json) => InvitationList.fromJson(json), ), ); return value; @@ -1826,7 +1822,7 @@ class _ApiService implements ApiService { data: _data); final value = BaseData.fromJson( _result.data, - (json) => json as dynamic, + (json) => json as dynamic, ); return value; } @@ -1837,7 +1833,8 @@ class _ApiService implements ApiService { const _extra = {}; final queryParameters = {}; final _data = {}; - final _result = await _dio.request>('coupon/detail/', + final _result = await _dio.request>( + 'coupon/detail/$memberCouponId', queryParameters: queryParameters, options: RequestOptions( method: 'GET', @@ -1847,7 +1844,7 @@ class _ApiService implements ApiService { data: _data); final value = BaseData.fromJson( _result.data, - (json) => CouponDetail.fromJson(json), + (json) => CouponDetail.fromJson(json), ); return value; }