You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
699 lines
23 KiB
699 lines
23 KiB
// GENERATED CODE - DO NOT MODIFY BY HAND |
|
|
|
part of 'min_api.dart'; |
|
|
|
// ************************************************************************** |
|
// RetrofitGenerator |
|
// ************************************************************************** |
|
|
|
class _MinApiService implements MinApiService { |
|
_MinApiService(this._dio, {this.baseUrl}) { |
|
ArgumentError.checkNotNull(_dio, '_dio'); |
|
baseUrl ??= kReleaseMode?serviceBaseUrl:localBaseUrl; |
|
} |
|
|
|
final Dio _dio; |
|
|
|
String baseUrl; |
|
|
|
@override |
|
Future<BaseData<dynamic>> memberInfo() async { |
|
const _extra = <String, dynamic>{}; |
|
final queryParameters = <String, dynamic>{}; |
|
final _data = <String, dynamic>{}; |
|
final _result = await _dio.request<Map<String, dynamic>>('/member/info', |
|
queryParameters: queryParameters, |
|
options: RequestOptions( |
|
method: 'GET', |
|
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<List<FindMiNiGroupList>>> findMiNiGroupList(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>>( |
|
'product/findMiNiGroupList', |
|
queryParameters: queryParameters, |
|
options: RequestOptions( |
|
method: 'POST', |
|
headers: <String, dynamic>{}, |
|
extra: _extra, |
|
baseUrl: baseUrl), |
|
data: _data); |
|
final value = BaseData<List<FindMiNiGroupList>>.fromJson( |
|
_result.data, |
|
(json) => (json as List<dynamic>) |
|
.map<FindMiNiGroupList>( |
|
(i) => FindMiNiGroupList.fromJson(i as Map<String, dynamic>)) |
|
.toList()); |
|
return value; |
|
} |
|
|
|
@override |
|
Future<BaseData<MiNiDetail>> miNiDetail(id) async { |
|
ArgumentError.checkNotNull(id, 'id'); |
|
const _extra = <String, dynamic>{}; |
|
final queryParameters = <String, dynamic>{}; |
|
final _data = <String, dynamic>{}; |
|
final _result = await _dio.request<Map<String, dynamic>>( |
|
'/product/queryMiNiProductDetail?id=$id', |
|
queryParameters: queryParameters, |
|
options: RequestOptions( |
|
method: 'GET', |
|
headers: <String, dynamic>{}, |
|
extra: _extra, |
|
baseUrl: baseUrl), |
|
data: _data); |
|
final value = BaseData<MiNiDetail>.fromJson( |
|
_result.data, |
|
(json) => ((json??"") == "")? null :MiNiDetail.fromJson(json), |
|
); |
|
return value; |
|
} |
|
|
|
@override |
|
Future<BaseData<List<ShoppingCart>>> addShoppingCart(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>>('shoppingcart', |
|
queryParameters: queryParameters, |
|
options: RequestOptions( |
|
method: 'POST', |
|
headers: <String, dynamic>{}, |
|
extra: _extra, |
|
baseUrl: baseUrl), |
|
data: _data); |
|
final value = BaseData<List<ShoppingCart>>.fromJson( |
|
_result.data, |
|
(json) => ((json??"") == "")?null:(json as List<dynamic>) |
|
.map<ShoppingCart>( |
|
(i) => ShoppingCart.fromJson(i as Map<String, dynamic>)) |
|
.toList()); |
|
return value; |
|
} |
|
|
|
@override |
|
Future<BaseData<List<ShoppingCart>>> getShoppingCart(tableId) async { |
|
ArgumentError.checkNotNull(tableId, 'tableId'); |
|
const _extra = <String, dynamic>{}; |
|
final queryParameters = <String, dynamic>{'tableId': tableId}; |
|
final _data = <String, dynamic>{}; |
|
final _result = await _dio.request<Map<String, dynamic>>('shoppingcart', |
|
queryParameters: queryParameters, |
|
options: RequestOptions( |
|
method: 'GET', |
|
headers: <String, dynamic>{}, |
|
extra: _extra, |
|
baseUrl: baseUrl), |
|
data: _data); |
|
final value = BaseData<List<ShoppingCart>>.fromJson( |
|
_result.data, |
|
(json) => ((json??"") == "")?null:(json as List<dynamic>) |
|
.map<ShoppingCart>( |
|
(i) => ShoppingCart.fromJson(i as Map<String, dynamic>)) |
|
.toList()); |
|
return value; |
|
} |
|
|
|
@override |
|
Future<BaseData<bool>> clearShoppingCart(storeId) async { |
|
ArgumentError.checkNotNull(storeId, 'storeId'); |
|
const _extra = <String, dynamic>{}; |
|
final queryParameters = <String, dynamic>{}; |
|
final _data = <String, dynamic>{}; |
|
final _result = await _dio.request<Map<String, dynamic>>( |
|
'shoppingcart/delCart?storeId=$storeId', |
|
queryParameters: queryParameters, |
|
options: RequestOptions( |
|
method: 'GET', |
|
headers: <String, dynamic>{}, |
|
extra: _extra, |
|
baseUrl: baseUrl), |
|
data: _data); |
|
final value = BaseData<bool>.fromJson( |
|
_result.data, |
|
(json) => json as bool, |
|
); |
|
return value; |
|
} |
|
|
|
@override |
|
Future<BaseData<List<ShoppingCart>>> shoppingCart1(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>>('shoppingcart', |
|
queryParameters: queryParameters, |
|
options: RequestOptions( |
|
method: 'PUT', |
|
headers: <String, dynamic>{}, |
|
extra: _extra, |
|
baseUrl: baseUrl), |
|
data: _data); |
|
final value = BaseData<List<ShoppingCart>>.fromJson( |
|
_result.data, |
|
(json) => (json as List<dynamic>) |
|
.map<ShoppingCart>( |
|
(i) => ShoppingCart.fromJson(i as Map<String, dynamic>)) |
|
.toList()); |
|
return value; |
|
} |
|
|
|
@override |
|
Future<BaseData<List<ShoppingCart>>> shoppingCartSingle(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>>( |
|
'shoppingcart/single', |
|
queryParameters: queryParameters, |
|
options: RequestOptions( |
|
method: 'PUT', |
|
headers: <String, dynamic>{}, |
|
extra: _extra, |
|
baseUrl: baseUrl), |
|
data: _data); |
|
final value = BaseData<List<ShoppingCart>>.fromJson( |
|
_result.data, |
|
(json) => ((json??"") == "")?null:(json as List<dynamic>) |
|
.map<ShoppingCart>( |
|
(i) => ShoppingCart.fromJson(i as Map<String, dynamic>)) |
|
.toList()); |
|
return value; |
|
} |
|
|
|
@override |
|
Future<BaseData<SettleOrderInfo>> getOrderInfo(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>>( |
|
'order/getOrderInfo', |
|
queryParameters: queryParameters, |
|
options: RequestOptions( |
|
method: 'POST', |
|
headers: <String, dynamic>{}, |
|
extra: _extra, |
|
baseUrl: baseUrl), |
|
data: _data); |
|
final value = BaseData<SettleOrderInfo>.fromJson( |
|
_result.data, |
|
(json) => ((json??"") == "")? null :SettleOrderInfo.fromJson(json), |
|
); |
|
return value; |
|
} |
|
|
|
@override |
|
Future<BaseData<MinOrderInfo>> getOrderDetails(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>>( |
|
'order/getOrderDetail', |
|
queryParameters: queryParameters, |
|
options: RequestOptions( |
|
method: 'POST', |
|
headers: <String, dynamic>{}, |
|
extra: _extra, |
|
baseUrl: baseUrl), |
|
data: _data); |
|
final value = BaseData<MinOrderInfo>.fromJson( |
|
_result.data, |
|
(json) => ((json??"") == "")?null:MinOrderInfo.fromJson(json), |
|
); |
|
return value; |
|
} |
|
|
|
@override |
|
Future<BaseData<List<Address>>> queryAddress() async { |
|
const _extra = <String, dynamic>{}; |
|
final queryParameters = <String, dynamic>{}; |
|
final _data = <String, dynamic>{}; |
|
final _result = await _dio.request<Map<String, dynamic>>( |
|
'address/queryMemberAddress', |
|
queryParameters: queryParameters, |
|
options: RequestOptions( |
|
method: 'GET', |
|
headers: <String, dynamic>{}, |
|
extra: _extra, |
|
baseUrl: baseUrl), |
|
data: _data); |
|
final value = BaseData<List<Address>>.fromJson( |
|
_result.data, |
|
(json) => (json as List<dynamic>) |
|
.map<Address>((i) => Address.fromJson(i as Map<String, dynamic>)) |
|
.toList()); |
|
return value; |
|
} |
|
|
|
@override |
|
Future<BaseData<dynamic>> placeOrderFirst(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>>( |
|
'order/placeOrderFirst', |
|
queryParameters: queryParameters, |
|
options: RequestOptions( |
|
method: 'POST', |
|
headers: <String, dynamic>{}, |
|
extra: _extra, |
|
baseUrl: baseUrl), |
|
data: _data); |
|
final value = BaseData<dynamic>.fromJson( |
|
_result.data, |
|
(json) => json, |
|
); |
|
return value; |
|
} |
|
|
|
@override |
|
Future<BaseData<dynamic>> addOrder(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>>('order/addOrder', |
|
queryParameters: queryParameters, |
|
options: RequestOptions( |
|
method: 'POST', |
|
headers: <String, dynamic>{}, |
|
extra: _extra, |
|
baseUrl: baseUrl), |
|
data: _data); |
|
final value = BaseData<dynamic>.fromJson( |
|
_result.data, |
|
(json) => json, |
|
); |
|
return value; |
|
} |
|
|
|
@override |
|
Future<BaseData<WxPay>> settlementWx(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>>('order/settlement', |
|
queryParameters: queryParameters, |
|
options: RequestOptions( |
|
method: 'POST', |
|
headers: <String, dynamic>{}, |
|
extra: _extra, |
|
baseUrl: baseUrl), |
|
data: _data); |
|
final value = BaseData<WxPay>.fromJson( |
|
_result.data, |
|
(json) => ((json??"") == "")?null:(WxPay.fromJson(json)), |
|
); |
|
return value; |
|
} |
|
|
|
@override |
|
Future<BaseData<dynamic>> settlementApi(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>>('order/settlement', |
|
queryParameters: queryParameters, |
|
options: RequestOptions( |
|
method: 'POST', |
|
headers: <String, dynamic>{}, |
|
extra: _extra, |
|
baseUrl: baseUrl), |
|
data: _data); |
|
final value = BaseData<dynamic>.fromJson( |
|
_result.data, |
|
(json) => ((json??"") == "")?null:(json as dynamic), |
|
); |
|
return value; |
|
} |
|
|
|
@override |
|
Future<BaseData<dynamic>> queryStoreInfo1(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>>('store/getStore', |
|
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<dynamic>> getParentInfo(tableId) async { |
|
ArgumentError.checkNotNull(tableId, 'tableId'); |
|
const _extra = <String, dynamic>{}; |
|
final queryParameters = <String, dynamic>{}; |
|
final _data = <String, dynamic>{}; |
|
final _result = await _dio.request<Map<String, dynamic>>( |
|
'order/getParentInfo?tableId=$tableId', |
|
queryParameters: queryParameters, |
|
options: RequestOptions( |
|
method: 'GET', |
|
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<List<HomeRecommendList>>> recommendList() async { |
|
const _extra = <String, dynamic>{}; |
|
final queryParameters = <String, dynamic>{}; |
|
final _data = <String, dynamic>{}; |
|
final _result = await _dio.request<Map<String, dynamic>>( |
|
'product/recommendList', |
|
queryParameters: queryParameters, |
|
options: RequestOptions( |
|
method: 'GET', |
|
headers: <String, dynamic>{}, |
|
extra: _extra, |
|
baseUrl: baseUrl), |
|
data: _data); |
|
final value = BaseData<List<HomeRecommendList>>.fromJson( |
|
_result.data, |
|
(json) => (json as List<dynamic>) |
|
.map<HomeRecommendList>( |
|
(i) => HomeRecommendList.fromJson(i as Map<String, dynamic>)) |
|
.toList()); |
|
return value; |
|
} |
|
|
|
@override |
|
Future<BaseData<ShoppingHomeConfig>> homeConfig() async { |
|
const _extra = <String, dynamic>{}; |
|
final queryParameters = <String, dynamic>{}; |
|
final _data = <String, dynamic>{}; |
|
final _result = await _dio.request<Map<String, dynamic>>('store/homeConfig', |
|
queryParameters: queryParameters, |
|
options: RequestOptions( |
|
method: 'GET', |
|
headers: <String, dynamic>{}, |
|
extra: _extra, |
|
baseUrl: baseUrl), |
|
data: _data); |
|
final value = BaseData<ShoppingHomeConfig>.fromJson( |
|
_result.data, |
|
(json) => ShoppingHomeConfig.fromJson(json), |
|
); |
|
return value; |
|
} |
|
|
|
@override |
|
Future<BaseData<ActivityAreaList>> findActListByType(allDay, type) async { |
|
ArgumentError.checkNotNull(allDay, 'allDay'); |
|
ArgumentError.checkNotNull(type, 'type'); |
|
const _extra = <String, dynamic>{}; |
|
final queryParameters = <String, dynamic>{}; |
|
final _data = <String, dynamic>{}; |
|
final _result = await _dio.request<Map<String, dynamic>>( |
|
'actTemplate/findActListByType?allDay=$allDay&type=$type', |
|
queryParameters: queryParameters, |
|
options: RequestOptions( |
|
method: 'GET', |
|
headers: <String, dynamic>{}, |
|
extra: _extra, |
|
baseUrl: baseUrl), |
|
data: _data); |
|
final value = BaseData<ActivityAreaList>.fromJson( |
|
_result.data, |
|
(json) => ActivityAreaList.fromJson(json), |
|
); |
|
return value; |
|
} |
|
|
|
@override |
|
Future<BaseData<ActivityDetails>> viewProduct(actProductId, type) async { |
|
ArgumentError.checkNotNull(actProductId, 'actProductId'); |
|
ArgumentError.checkNotNull(type, 'type'); |
|
const _extra = <String, dynamic>{}; |
|
final queryParameters = <String, dynamic>{}; |
|
final _data = <String, dynamic>{}; |
|
final _result = await _dio.request<Map<String, dynamic>>( |
|
'actTemplate/viewProduct?actProductId=$actProductId&type=$type', |
|
queryParameters: queryParameters, |
|
options: RequestOptions( |
|
method: 'GET', |
|
headers: <String, dynamic>{}, |
|
extra: _extra, |
|
baseUrl: baseUrl), |
|
data: _data); |
|
final value = BaseData<ActivityDetails>.fromJson( |
|
_result.data, |
|
(json) => ActivityDetails.fromJson(json), |
|
); |
|
return value; |
|
} |
|
|
|
@override |
|
Future<BaseData<LaunchJoinAct>> launchAct(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>>( |
|
'actTemplate/launchAct', |
|
queryParameters: queryParameters, |
|
options: RequestOptions( |
|
method: 'POST', |
|
headers: <String, dynamic>{}, |
|
extra: _extra, |
|
baseUrl: baseUrl), |
|
data: _data); |
|
final value = BaseData<LaunchJoinAct>.fromJson( |
|
_result.data, |
|
(json) => LaunchJoinAct.fromJson(json), |
|
); |
|
return value; |
|
} |
|
|
|
@override |
|
Future<BaseData<LaunchJoinAct>> joinAct(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>>( |
|
'actTemplate/joinAct', |
|
queryParameters: queryParameters, |
|
options: RequestOptions( |
|
method: 'POST', |
|
headers: <String, dynamic>{}, |
|
extra: _extra, |
|
baseUrl: baseUrl), |
|
data: _data); |
|
final value = BaseData<LaunchJoinAct>.fromJson( |
|
_result.data, |
|
(json) => LaunchJoinAct.fromJson(json), |
|
); |
|
return value; |
|
} |
|
|
|
@override |
|
Future<BaseData<dynamic>> actPay(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>>( |
|
'actTemplate/actPay', |
|
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<List<ActivityOrderList>>> showMyActList(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>>( |
|
'actTemplate/showMyActList', |
|
queryParameters: queryParameters, |
|
options: RequestOptions( |
|
method: 'POST', |
|
headers: <String, dynamic>{}, |
|
extra: _extra, |
|
baseUrl: baseUrl), |
|
data: _data); |
|
final value = BaseData<List<ActivityOrderList>>.fromJson( |
|
_result.data, |
|
(json) => (json as List<dynamic>) |
|
.map<ActivityOrderList>( |
|
(i) => ActivityOrderList.fromJson(i as Map<String, dynamic>)) |
|
.toList()); |
|
return value; |
|
} |
|
|
|
@override |
|
Future<BaseData<ActivityActRecordDetails>> showOneAct(actRecordId) async { |
|
ArgumentError.checkNotNull(actRecordId, 'actRecordId'); |
|
const _extra = <String, dynamic>{}; |
|
final queryParameters = <String, dynamic>{}; |
|
final _data = <String, dynamic>{}; |
|
final _result = await _dio.request<Map<String, dynamic>>( |
|
'actTemplate/showOneAct?actRecordId=$actRecordId', |
|
queryParameters: queryParameters, |
|
options: RequestOptions( |
|
method: 'GET', |
|
headers: <String, dynamic>{}, |
|
extra: _extra, |
|
baseUrl: baseUrl), |
|
data: _data); |
|
final value = BaseData<ActivityActRecordDetails>.fromJson( |
|
_result.data, |
|
(json) => ActivityActRecordDetails.fromJson(json), |
|
); |
|
return value; |
|
} |
|
|
|
@override |
|
Future<BaseData<dynamic>> cancelMemberCoupon(orderId) async { |
|
ArgumentError.checkNotNull(orderId, 'orderId'); |
|
const _extra = <String, dynamic>{}; |
|
final queryParameters = <String, dynamic>{}; |
|
final _data = <String, dynamic>{}; |
|
final _result = await _dio.request<Map<String, dynamic>>( |
|
'promotion/cancelMemberCoupon?orderId=$orderId', |
|
queryParameters: queryParameters, |
|
options: RequestOptions( |
|
method: 'GET', |
|
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<dynamic>> useMemberCoupon(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>>( |
|
'promotion/useMemberCoupon', |
|
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<dynamic>> memberRecharge(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>>('//member/recharge', |
|
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<List<MemberRechargeList>>> memberRechargeList() async { |
|
const _extra = <String, dynamic>{}; |
|
final queryParameters = <String, dynamic>{}; |
|
final _data = <String, dynamic>{}; |
|
final _result = await _dio.request<Map<String, dynamic>>( |
|
'/store/getRechargePreferential', |
|
queryParameters: queryParameters, |
|
options: RequestOptions( |
|
method: 'GET', |
|
headers: <String, dynamic>{}, |
|
extra: _extra, |
|
baseUrl: baseUrl), |
|
data: _data); |
|
final value = BaseData<List<MemberRechargeList>>.fromJson( |
|
_result.data, |
|
(json) => (json as List<dynamic>) |
|
.map<MemberRechargeList>( |
|
(i) => MemberRechargeList.fromJson(i as Map<String, dynamic>)) |
|
.toList()); |
|
return value; |
|
} |
|
}
|
|
|