|
|
|
@ -17,18 +17,22 @@ class _MinApiService implements MinApiService {
|
|
|
|
|
String baseUrl; |
|
|
|
|
|
|
|
|
|
@override |
|
|
|
|
Future<BaseData<List<FindMiNiGroupList>>> findMiNiGroupList(param) async { |
|
|
|
|
Future<BaseData<List<FindMiNiGroupList>>> findMiNiGroupList( |
|
|
|
|
param, header) async { |
|
|
|
|
ArgumentError.checkNotNull(param, 'param'); |
|
|
|
|
ArgumentError.checkNotNull(header, 'header'); |
|
|
|
|
const _extra = <String, dynamic>{}; |
|
|
|
|
final queryParameters = <String, dynamic>{}; |
|
|
|
|
final _data = <String, dynamic>{}; |
|
|
|
|
_data.addAll(param ?? <String, dynamic>{}); |
|
|
|
|
final _header= <String, dynamic>{}; |
|
|
|
|
_header.addAll(header ?? <String,dynamic>{}); |
|
|
|
|
final _result = await _dio.request<Map<String, dynamic>>( |
|
|
|
|
'product/findMiNiGroupList', |
|
|
|
|
queryParameters: queryParameters, |
|
|
|
|
options: RequestOptions( |
|
|
|
|
method: 'POST', |
|
|
|
|
headers: <String, dynamic>{}, |
|
|
|
|
headers: _header, |
|
|
|
|
extra: _extra, |
|
|
|
|
baseUrl: baseUrl), |
|
|
|
|
data: _data); |
|
|
|
@ -58,30 +62,7 @@ class _MinApiService implements MinApiService {
|
|
|
|
|
data: _data); |
|
|
|
|
final value = BaseData<MiNiDetail>.fromJson( |
|
|
|
|
_result.data, |
|
|
|
|
(json) => MiNiDetail.fromJson(json), |
|
|
|
|
); |
|
|
|
|
return value; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@override |
|
|
|
|
Future<BaseData<FindMiNiGroupList>> shoppingCart(param, header) async { |
|
|
|
|
ArgumentError.checkNotNull(param, 'param'); |
|
|
|
|
ArgumentError.checkNotNull(header, 'header'); |
|
|
|
|
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>>('shoppingcart', |
|
|
|
|
queryParameters: queryParameters, |
|
|
|
|
options: RequestOptions( |
|
|
|
|
method: 'POST', |
|
|
|
|
headers: <String, dynamic>{}, |
|
|
|
|
extra: _extra, |
|
|
|
|
baseUrl: baseUrl), |
|
|
|
|
data: _data); |
|
|
|
|
final value = BaseData<FindMiNiGroupList>.fromJson( |
|
|
|
|
_result.data, |
|
|
|
|
(json) => FindMiNiGroupList.fromJson(json), |
|
|
|
|
(json) => MiNiDetail.fromMap(json), |
|
|
|
|
); |
|
|
|
|
return value; |
|
|
|
|
} |
|
|
|
|