|
|
|
@ -9,7 +9,7 @@ part of 'retrofit_api.dart';
|
|
|
|
|
class _ApiService implements ApiService { |
|
|
|
|
_ApiService(this._dio, {this.baseUrl}) { |
|
|
|
|
ArgumentError.checkNotNull(_dio, '_dio'); |
|
|
|
|
baseUrl ??= 'http://192.168.10.236:8766/app/'; |
|
|
|
|
baseUrl ??= 'https://pos.platform.lotus-wallet.com/app/'; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
final Dio _dio; |
|
|
|
@ -74,28 +74,6 @@ class _ApiService implements ApiService {
|
|
|
|
|
return value; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// @override |
|
|
|
|
// Future<BaseData<dynamic>> memberLogin(param) async { |
|
|
|
|
// ArgumentError.checkNotNull(param, 'param'); |
|
|
|
|
// const _extra = <String, dynamic>{}; |
|
|
|
|
// final queryParameters = <String, dynamic>{}; |
|
|
|
|
// final _data = <String, dynamic>{}; |
|
|
|
|
// _data.addAll(param ?? <String, dynamic>{}); |
|
|
|
|
// final _result = await _dio.request<Map<String, dynamic>>( |
|
|
|
|
// '/auth/platform/memberLogin', |
|
|
|
|
// queryParameters: queryParameters, |
|
|
|
|
// options: RequestOptions( |
|
|
|
|
// method: 'POST', |
|
|
|
|
// headers: <String, dynamic>{}, |
|
|
|
|
// extra: _extra, |
|
|
|
|
// baseUrl: baseUrl), |
|
|
|
|
// data: _data); |
|
|
|
|
// final value = BaseData<dynamic>.fromJson( |
|
|
|
|
// _result.data, |
|
|
|
|
// (json) => json as dynamic, |
|
|
|
|
// ); |
|
|
|
|
// return value; |
|
|
|
|
// } |
|
|
|
|
@override |
|
|
|
|
Future<BaseData<LoginInfo>> memberLogin(param) async { |
|
|
|
|
ArgumentError.checkNotNull(param, 'param'); |
|
|
|
@ -374,15 +352,13 @@ class _ApiService implements ApiService {
|
|
|
|
|
const _extra = <String, dynamic>{}; |
|
|
|
|
final queryParameters = <String, dynamic>{}; |
|
|
|
|
final _data = <String, dynamic>{}; |
|
|
|
|
final _headers = <String, dynamic>{}; |
|
|
|
|
_headers.addAll({"Environment":"app"}); |
|
|
|
|
_data.addAll(param ?? <String, dynamic>{}); |
|
|
|
|
final _result = await _dio.request<Map<String, dynamic>>( |
|
|
|
|
'/creditOrder/create', |
|
|
|
|
queryParameters: queryParameters, |
|
|
|
|
options: RequestOptions( |
|
|
|
|
method: 'POST', |
|
|
|
|
headers: _headers, |
|
|
|
|
headers: <String, dynamic>{}, |
|
|
|
|
extra: _extra, |
|
|
|
|
baseUrl: baseUrl), |
|
|
|
|
data: _data); |
|
|
|
@ -1037,8 +1013,7 @@ class _ApiService implements ApiService {
|
|
|
|
|
const _extra = <String, dynamic>{}; |
|
|
|
|
final queryParameters = <String, dynamic>{}; |
|
|
|
|
final _data = <String, dynamic>{}; |
|
|
|
|
final _result = await _dio.request<Map<String, dynamic>>( |
|
|
|
|
'/app-msg/stats', |
|
|
|
|
final _result = await _dio.request<Map<String, dynamic>>('/app-msg/stats', |
|
|
|
|
queryParameters: queryParameters, |
|
|
|
|
options: RequestOptions( |
|
|
|
|
method: 'GET', |
|
|
|
@ -1415,7 +1390,8 @@ class _ApiService implements ApiService {
|
|
|
|
|
final value = BaseData<List<CategorySelectList>>.fromJson( |
|
|
|
|
_result.data, |
|
|
|
|
(json) => (json as List<dynamic>) |
|
|
|
|
.map<CategorySelectList>((i) => CategorySelectList.fromJson(i as Map<String, dynamic>)) |
|
|
|
|
.map<CategorySelectList>( |
|
|
|
|
(i) => CategorySelectList.fromJson(i as Map<String, dynamic>)) |
|
|
|
|
.toList()); |
|
|
|
|
return value; |
|
|
|
|
} |
|
|
|
@ -1450,8 +1426,7 @@ class _ApiService implements ApiService {
|
|
|
|
|
final queryParameters = <String, dynamic>{}; |
|
|
|
|
final _data = <String, dynamic>{}; |
|
|
|
|
_data.addAll(map ?? <String, dynamic>{}); |
|
|
|
|
final _result = await _dio.request<Map<String, dynamic>>( |
|
|
|
|
'/course/list', |
|
|
|
|
final _result = await _dio.request<Map<String, dynamic>>('/course/list', |
|
|
|
|
queryParameters: queryParameters, |
|
|
|
|
options: RequestOptions( |
|
|
|
|
method: 'POST', |
|
|
|
@ -1486,7 +1461,8 @@ class _ApiService implements ApiService {
|
|
|
|
|
final value = BaseData<List<CollectClassList>>.fromJson( |
|
|
|
|
_result.data, |
|
|
|
|
(json) => (json as List<dynamic>) |
|
|
|
|
.map<CollectClassList>((i) => CollectClassList.fromJson(i as Map<String, dynamic>)) |
|
|
|
|
.map<CollectClassList>( |
|
|
|
|
(i) => CollectClassList.fromJson(i as Map<String, dynamic>)) |
|
|
|
|
.toList()); |
|
|
|
|
return value; |
|
|
|
|
} |
|
|
|
@ -1509,7 +1485,8 @@ class _ApiService implements ApiService {
|
|
|
|
|
final value = BaseData<List<CourseList>>.fromJson( |
|
|
|
|
_result.data, |
|
|
|
|
(json) => (json as List<dynamic>) |
|
|
|
|
.map<CourseList>((i) => CourseList.fromJson(i as Map<String, dynamic>)) |
|
|
|
|
.map<CourseList>( |
|
|
|
|
(i) => CourseList.fromJson(i as Map<String, dynamic>)) |
|
|
|
|
.toList()); |
|
|
|
|
return value; |
|
|
|
|
} |
|
|
|
@ -1520,8 +1497,7 @@ class _ApiService implements ApiService {
|
|
|
|
|
const _extra = <String, dynamic>{}; |
|
|
|
|
final queryParameters = <String, dynamic>{}; |
|
|
|
|
final _data = <String, dynamic>{}; |
|
|
|
|
final _result = await _dio.request<Map<String, dynamic>>( |
|
|
|
|
'/course/$id', |
|
|
|
|
final _result = await _dio.request<Map<String, dynamic>>('/course/$id', |
|
|
|
|
queryParameters: queryParameters, |
|
|
|
|
options: RequestOptions( |
|
|
|
|
method: 'GET', |
|
|
|
@ -1559,13 +1535,14 @@ class _ApiService implements ApiService {
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@override |
|
|
|
|
Future<BaseData<List<VipBadgesList>>> findBadges(param) async { |
|
|
|
|
ArgumentError.checkNotNull(param, 'param'); |
|
|
|
|
Future<BaseData<List<VipBadgesList>>> findBadges(map) async { |
|
|
|
|
ArgumentError.checkNotNull(map, 'map'); |
|
|
|
|
const _extra = <String, dynamic>{}; |
|
|
|
|
final queryParameters = <String, dynamic>{}; |
|
|
|
|
final _data = <String, dynamic>{}; |
|
|
|
|
_data.addAll(param ?? <String, dynamic>{}); |
|
|
|
|
final _result = await _dio.request<Map<String, dynamic>>('/app-memberAchievement/findBadges', |
|
|
|
|
_data.addAll(map ?? <String, dynamic>{}); |
|
|
|
|
final _result = await _dio.request<Map<String, dynamic>>( |
|
|
|
|
'/app-memberAchievement/findBadges', |
|
|
|
|
queryParameters: queryParameters, |
|
|
|
|
options: RequestOptions( |
|
|
|
|
method: 'POST', |
|
|
|
@ -1576,13 +1553,15 @@ class _ApiService implements ApiService {
|
|
|
|
|
final value = BaseData<List<VipBadgesList>>.fromJson( |
|
|
|
|
_result.data, |
|
|
|
|
(json) => (json as List<dynamic>) |
|
|
|
|
.map<VipBadgesList>((i) => VipBadgesList.fromJson(i as Map<String, dynamic>)) |
|
|
|
|
.map<VipBadgesList>( |
|
|
|
|
(i) => VipBadgesList.fromJson(i as Map<String, dynamic>)) |
|
|
|
|
.toList()); |
|
|
|
|
return value; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@override |
|
|
|
|
Future<BaseData<List<AchievementDetailList>>> getAchievementDetail(achievementCategoryId) async { |
|
|
|
|
Future<BaseData<List<AchievementDetailList>>> getAchievementDetail( |
|
|
|
|
achievementCategoryId) async { |
|
|
|
|
ArgumentError.checkNotNull(achievementCategoryId, 'achievementCategoryId'); |
|
|
|
|
const _extra = <String, dynamic>{}; |
|
|
|
|
final queryParameters = <String, dynamic>{}; |
|
|
|
@ -1599,7 +1578,8 @@ class _ApiService implements ApiService {
|
|
|
|
|
final value = BaseData<List<AchievementDetailList>>.fromJson( |
|
|
|
|
_result.data, |
|
|
|
|
(json) => (json as List<dynamic>) |
|
|
|
|
.map<AchievementDetailList>((i) => AchievementDetailList.fromJson(i as Map<String, dynamic>)) |
|
|
|
|
.map<AchievementDetailList>((i) => |
|
|
|
|
AchievementDetailList.fromJson(i as Map<String, dynamic>)) |
|
|
|
|
.toList()); |
|
|
|
|
return value; |
|
|
|
|
} |
|
|
|
@ -1621,7 +1601,8 @@ class _ApiService implements ApiService {
|
|
|
|
|
final value = BaseData<List<VipBenefitList>>.fromJson( |
|
|
|
|
_result.data, |
|
|
|
|
(json) => (json as List<dynamic>) |
|
|
|
|
.map<VipBenefitList>((i) => VipBenefitList.fromJson(i as Map<String, dynamic>)) |
|
|
|
|
.map<VipBenefitList>( |
|
|
|
|
(i) => VipBenefitList.fromJson(i as Map<String, dynamic>)) |
|
|
|
|
.toList()); |
|
|
|
|
return value; |
|
|
|
|
} |
|
|
|
@ -1631,8 +1612,7 @@ class _ApiService implements ApiService {
|
|
|
|
|
const _extra = <String, dynamic>{}; |
|
|
|
|
final queryParameters = <String, dynamic>{}; |
|
|
|
|
final _data = <String, dynamic>{}; |
|
|
|
|
final _result = await _dio.request<Map<String, dynamic>>( |
|
|
|
|
'/home/vipBenefit', |
|
|
|
|
final _result = await _dio.request<Map<String, dynamic>>('/home/vipBenefit', |
|
|
|
|
queryParameters: queryParameters, |
|
|
|
|
options: RequestOptions( |
|
|
|
|
method: 'GET', |
|
|
|
@ -1664,7 +1644,8 @@ class _ApiService implements ApiService {
|
|
|
|
|
final value = BaseData<List<SecondCardList>>.fromJson( |
|
|
|
|
_result.data, |
|
|
|
|
(json) => (json as List<dynamic>) |
|
|
|
|
.map<SecondCardList>((i) => SecondCardList.fromJson(i as Map<String, dynamic>)) |
|
|
|
|
.map<SecondCardList>( |
|
|
|
|
(i) => SecondCardList.fromJson(i as Map<String, dynamic>)) |
|
|
|
|
.toList()); |
|
|
|
|
return value; |
|
|
|
|
} |
|
|
|
@ -1774,7 +1755,8 @@ class _ApiService implements ApiService {
|
|
|
|
|
final value = BaseData<List<HeadlinesList>>.fromJson( |
|
|
|
|
_result.data, |
|
|
|
|
(json) => (json as List<dynamic>) |
|
|
|
|
.map<HeadlinesList>((i) => HeadlinesList.fromJson(i as Map<String, dynamic>)) |
|
|
|
|
.map<HeadlinesList>( |
|
|
|
|
(i) => HeadlinesList.fromJson(i as Map<String, dynamic>)) |
|
|
|
|
.toList()); |
|
|
|
|
return value; |
|
|
|
|
} |
|
|
|
@ -1855,8 +1837,7 @@ class _ApiService implements ApiService {
|
|
|
|
|
const _extra = <String, dynamic>{}; |
|
|
|
|
final queryParameters = <String, dynamic>{}; |
|
|
|
|
final _data = <String, dynamic>{}; |
|
|
|
|
final _result = await _dio.request<Map<String, dynamic>>( |
|
|
|
|
'coupon/detail/$memberCouponId', |
|
|
|
|
final _result = await _dio.request<Map<String, dynamic>>('coupon/detail/', |
|
|
|
|
queryParameters: queryParameters, |
|
|
|
|
options: RequestOptions( |
|
|
|
|
method: 'GET', |
|
|
|
@ -1870,5 +1851,4 @@ class _ApiService implements ApiService {
|
|
|
|
|
); |
|
|
|
|
return value; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|