|
|
|
@ -9,10 +9,7 @@ part of 'retrofit_api.dart';
|
|
|
|
|
class _ApiService implements ApiService { |
|
|
|
|
_ApiService(this._dio, {this.baseUrl}) { |
|
|
|
|
ArgumentError.checkNotNull(_dio, '_dio'); |
|
|
|
|
// baseUrl ??= 'https://pos.platform.lotus-wallet.com/app/'; |
|
|
|
|
baseUrl ??= 'http://192.168.10.236:8766/app/'; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
baseUrl ??= 'https://pos.platform.lotus-wallet.com/app/'; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
final Dio _dio; |
|
|
|
@ -20,7 +17,7 @@ class _ApiService implements ApiService {
|
|
|
|
|
String baseUrl; |
|
|
|
|
|
|
|
|
|
@override |
|
|
|
|
Future<BaseData> upload(data, folderId) async { |
|
|
|
|
Future<BaseData<UploadResult>> upload(data, folderId) async { |
|
|
|
|
ArgumentError.checkNotNull(data, 'data'); |
|
|
|
|
ArgumentError.checkNotNull(folderId, 'folderId'); |
|
|
|
|
const _extra = <String, dynamic>{}; |
|
|
|
@ -41,7 +38,10 @@ class _ApiService implements ApiService {
|
|
|
|
|
extra: _extra, |
|
|
|
|
baseUrl: baseUrl), |
|
|
|
|
data: _data); |
|
|
|
|
final value = BaseData.fromJson(_result.data); |
|
|
|
|
final value = BaseData<UploadResult>.fromJson( |
|
|
|
|
_result.data, |
|
|
|
|
(json) => UploadResult.fromJson(json), |
|
|
|
|
); |
|
|
|
|
return value; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -69,7 +69,7 @@ class _ApiService implements ApiService {
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@override |
|
|
|
|
Future<BaseData> memberLogin(param) async { |
|
|
|
|
Future<BaseData<dynamic>> memberLogin(param) async { |
|
|
|
|
ArgumentError.checkNotNull(param, 'param'); |
|
|
|
|
const _extra = <String, dynamic>{}; |
|
|
|
|
final queryParameters = <String, dynamic>{}; |
|
|
|
@ -84,12 +84,15 @@ class _ApiService implements ApiService {
|
|
|
|
|
extra: _extra, |
|
|
|
|
baseUrl: baseUrl), |
|
|
|
|
data: _data); |
|
|
|
|
final value = BaseData.fromJson(_result.data); |
|
|
|
|
final value = BaseData<dynamic>.fromJson( |
|
|
|
|
_result.data, |
|
|
|
|
(json) => json as dynamic, |
|
|
|
|
); |
|
|
|
|
return value; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@override |
|
|
|
|
Future<BaseData> sendVerify(mobile) async { |
|
|
|
|
Future<BaseData<dynamic>> sendVerify(mobile) async { |
|
|
|
|
ArgumentError.checkNotNull(mobile, 'mobile'); |
|
|
|
|
const _extra = <String, dynamic>{}; |
|
|
|
|
final queryParameters = <String, dynamic>{}; |
|
|
|
@ -103,12 +106,15 @@ class _ApiService implements ApiService {
|
|
|
|
|
extra: _extra, |
|
|
|
|
baseUrl: baseUrl), |
|
|
|
|
data: _data); |
|
|
|
|
final value = BaseData.fromJson(_result.data); |
|
|
|
|
final value = BaseData<dynamic>.fromJson( |
|
|
|
|
_result.data, |
|
|
|
|
(json) => json as dynamic, |
|
|
|
|
); |
|
|
|
|
return value; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@override |
|
|
|
|
Future<BaseData> creditGoods(param) async { |
|
|
|
|
Future<BaseData<PageInfo<Goods>>> creditGoods(param) async { |
|
|
|
|
ArgumentError.checkNotNull(param, 'param'); |
|
|
|
|
const _extra = <String, dynamic>{}; |
|
|
|
|
final queryParameters = <String, dynamic>{}; |
|
|
|
@ -123,12 +129,18 @@ class _ApiService implements ApiService {
|
|
|
|
|
extra: _extra, |
|
|
|
|
baseUrl: baseUrl), |
|
|
|
|
data: _data); |
|
|
|
|
final value = BaseData.fromJson(_result.data); |
|
|
|
|
final value = BaseData<PageInfo<Goods>>.fromJson( |
|
|
|
|
_result.data, |
|
|
|
|
(json) => PageInfo<Goods>.fromJson( |
|
|
|
|
json, |
|
|
|
|
(json) => Goods.fromJson(json), |
|
|
|
|
), |
|
|
|
|
); |
|
|
|
|
return value; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@override |
|
|
|
|
Future<BaseData> goodsCategory(param) async { |
|
|
|
|
Future<BaseData<PageInfo<GoodsCategory>>> goodsCategory(param) async { |
|
|
|
|
ArgumentError.checkNotNull(param, 'param'); |
|
|
|
|
const _extra = <String, dynamic>{}; |
|
|
|
|
final queryParameters = <String, dynamic>{}; |
|
|
|
@ -143,12 +155,18 @@ class _ApiService implements ApiService {
|
|
|
|
|
extra: _extra, |
|
|
|
|
baseUrl: baseUrl), |
|
|
|
|
data: _data); |
|
|
|
|
final value = BaseData.fromJson(_result.data); |
|
|
|
|
final value = BaseData<PageInfo<GoodsCategory>>.fromJson( |
|
|
|
|
_result.data, |
|
|
|
|
(json) => PageInfo<GoodsCategory>.fromJson( |
|
|
|
|
json, |
|
|
|
|
(json) => GoodsCategory.fromJson(json), |
|
|
|
|
), |
|
|
|
|
); |
|
|
|
|
return value; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@override |
|
|
|
|
Future<BaseData> creditGoodsById(id) async { |
|
|
|
|
Future<BaseData<Goods>> creditGoodsById(id) async { |
|
|
|
|
ArgumentError.checkNotNull(id, 'id'); |
|
|
|
|
const _extra = <String, dynamic>{}; |
|
|
|
|
final queryParameters = <String, dynamic>{}; |
|
|
|
@ -161,12 +179,15 @@ class _ApiService implements ApiService {
|
|
|
|
|
extra: _extra, |
|
|
|
|
baseUrl: baseUrl), |
|
|
|
|
data: _data); |
|
|
|
|
final value = BaseData.fromJson(_result.data); |
|
|
|
|
final value = BaseData<Goods>.fromJson( |
|
|
|
|
_result.data, |
|
|
|
|
(json) => Goods.fromJson(json), |
|
|
|
|
); |
|
|
|
|
return value; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@override |
|
|
|
|
Future<BaseData> queryInfo() async { |
|
|
|
|
Future<BaseData<UserInfo>> queryInfo() async { |
|
|
|
|
const _extra = <String, dynamic>{}; |
|
|
|
|
final queryParameters = <String, dynamic>{}; |
|
|
|
|
final _data = <String, dynamic>{}; |
|
|
|
@ -178,12 +199,15 @@ class _ApiService implements ApiService {
|
|
|
|
|
extra: _extra, |
|
|
|
|
baseUrl: baseUrl), |
|
|
|
|
data: _data); |
|
|
|
|
final value = BaseData.fromJson(_result.data); |
|
|
|
|
final value = BaseData<UserInfo>.fromJson( |
|
|
|
|
_result.data, |
|
|
|
|
(json) => UserInfo.fromJson(json), |
|
|
|
|
); |
|
|
|
|
return value; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@override |
|
|
|
|
Future<BaseData> editInfo(param) async { |
|
|
|
|
Future<BaseData<dynamic>> editInfo(param) async { |
|
|
|
|
ArgumentError.checkNotNull(param, 'param'); |
|
|
|
|
const _extra = <String, dynamic>{}; |
|
|
|
|
final queryParameters = <String, dynamic>{}; |
|
|
|
@ -198,12 +222,15 @@ class _ApiService implements ApiService {
|
|
|
|
|
extra: _extra, |
|
|
|
|
baseUrl: baseUrl), |
|
|
|
|
data: _data); |
|
|
|
|
final value = BaseData.fromJson(_result.data); |
|
|
|
|
final value = BaseData<dynamic>.fromJson( |
|
|
|
|
_result.data, |
|
|
|
|
(json) => json as dynamic, |
|
|
|
|
); |
|
|
|
|
return value; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@override |
|
|
|
|
Future<BaseData> signInInfo() async { |
|
|
|
|
Future<BaseData<SignInfo>> signInInfo() async { |
|
|
|
|
const _extra = <String, dynamic>{}; |
|
|
|
|
final queryParameters = <String, dynamic>{}; |
|
|
|
|
final _data = <String, dynamic>{}; |
|
|
|
@ -216,12 +243,15 @@ class _ApiService implements ApiService {
|
|
|
|
|
extra: _extra, |
|
|
|
|
baseUrl: baseUrl), |
|
|
|
|
data: _data); |
|
|
|
|
final value = BaseData.fromJson(_result.data); |
|
|
|
|
final value = BaseData<SignInfo>.fromJson( |
|
|
|
|
_result.data, |
|
|
|
|
(json) => SignInfo.fromJson(json), |
|
|
|
|
); |
|
|
|
|
return value; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@override |
|
|
|
|
Future<BaseData> signIn() async { |
|
|
|
|
Future<BaseData<dynamic>> signIn() async { |
|
|
|
|
const _extra = <String, dynamic>{}; |
|
|
|
|
final queryParameters = <String, dynamic>{}; |
|
|
|
|
final _data = <String, dynamic>{}; |
|
|
|
@ -233,12 +263,15 @@ class _ApiService implements ApiService {
|
|
|
|
|
extra: _extra, |
|
|
|
|
baseUrl: baseUrl), |
|
|
|
|
data: _data); |
|
|
|
|
final value = BaseData.fromJson(_result.data); |
|
|
|
|
final value = BaseData<dynamic>.fromJson( |
|
|
|
|
_result.data, |
|
|
|
|
(json) => json as dynamic, |
|
|
|
|
); |
|
|
|
|
return value; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@override |
|
|
|
|
Future<BaseData> recharge(param) async { |
|
|
|
|
Future<BaseData<WxPay>> recharge(param) async { |
|
|
|
|
ArgumentError.checkNotNull(param, 'param'); |
|
|
|
|
const _extra = <String, dynamic>{}; |
|
|
|
|
final queryParameters = <String, dynamic>{}; |
|
|
|
@ -252,12 +285,15 @@ class _ApiService implements ApiService {
|
|
|
|
|
extra: _extra, |
|
|
|
|
baseUrl: baseUrl), |
|
|
|
|
data: _data); |
|
|
|
|
final value = BaseData.fromJson(_result.data); |
|
|
|
|
final value = BaseData<WxPay>.fromJson( |
|
|
|
|
_result.data, |
|
|
|
|
(json) => WxPay.fromJson(json), |
|
|
|
|
); |
|
|
|
|
return value; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@override |
|
|
|
|
Future<BaseData> receiveCoupon(couponId) async { |
|
|
|
|
Future<BaseData<dynamic>> receiveCoupon(couponId) async { |
|
|
|
|
ArgumentError.checkNotNull(couponId, 'couponId'); |
|
|
|
|
const _extra = <String, dynamic>{}; |
|
|
|
|
final queryParameters = <String, dynamic>{}; |
|
|
|
@ -271,12 +307,15 @@ class _ApiService implements ApiService {
|
|
|
|
|
extra: _extra, |
|
|
|
|
baseUrl: baseUrl), |
|
|
|
|
data: _data); |
|
|
|
|
final value = BaseData.fromJson(_result.data); |
|
|
|
|
final value = BaseData<dynamic>.fromJson( |
|
|
|
|
_result.data, |
|
|
|
|
(json) => json as dynamic, |
|
|
|
|
); |
|
|
|
|
return value; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@override |
|
|
|
|
Future<BaseData> creditOrderList(param) async { |
|
|
|
|
Future<BaseData<PageInfo<ExchangeOrder>>> creditOrderList(param) async { |
|
|
|
|
ArgumentError.checkNotNull(param, 'param'); |
|
|
|
|
const _extra = <String, dynamic>{}; |
|
|
|
|
final queryParameters = <String, dynamic>{}; |
|
|
|
@ -291,12 +330,18 @@ class _ApiService implements ApiService {
|
|
|
|
|
extra: _extra, |
|
|
|
|
baseUrl: baseUrl), |
|
|
|
|
data: _data); |
|
|
|
|
final value = BaseData.fromJson(_result.data); |
|
|
|
|
final value = BaseData<PageInfo<ExchangeOrder>>.fromJson( |
|
|
|
|
_result.data, |
|
|
|
|
(json) => PageInfo<ExchangeOrder>.fromJson( |
|
|
|
|
json, |
|
|
|
|
(json) => ExchangeOrder.fromJson(json), |
|
|
|
|
), |
|
|
|
|
); |
|
|
|
|
return value; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@override |
|
|
|
|
Future<BaseData> creditOrder(param) async { |
|
|
|
|
Future<BaseData<dynamic>> creditOrder(param) async { |
|
|
|
|
ArgumentError.checkNotNull(param, 'param'); |
|
|
|
|
const _extra = <String, dynamic>{}; |
|
|
|
|
final queryParameters = <String, dynamic>{}; |
|
|
|
@ -311,12 +356,15 @@ class _ApiService implements ApiService {
|
|
|
|
|
extra: _extra, |
|
|
|
|
baseUrl: baseUrl), |
|
|
|
|
data: _data); |
|
|
|
|
final value = BaseData.fromJson(_result.data); |
|
|
|
|
final value = BaseData<dynamic>.fromJson( |
|
|
|
|
_result.data, |
|
|
|
|
(json) => json as dynamic, |
|
|
|
|
); |
|
|
|
|
return value; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@override |
|
|
|
|
Future<BaseData> addAddress(param) async { |
|
|
|
|
Future<BaseData<dynamic>> addAddress(param) async { |
|
|
|
|
ArgumentError.checkNotNull(param, 'param'); |
|
|
|
|
const _extra = <String, dynamic>{}; |
|
|
|
|
final queryParameters = <String, dynamic>{}; |
|
|
|
@ -330,12 +378,15 @@ class _ApiService implements ApiService {
|
|
|
|
|
extra: _extra, |
|
|
|
|
baseUrl: baseUrl), |
|
|
|
|
data: _data); |
|
|
|
|
final value = BaseData.fromJson(_result.data); |
|
|
|
|
final value = BaseData<dynamic>.fromJson( |
|
|
|
|
_result.data, |
|
|
|
|
(json) => json as dynamic, |
|
|
|
|
); |
|
|
|
|
return value; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@override |
|
|
|
|
Future<BaseData> deleteAddress(param) async { |
|
|
|
|
Future<BaseData<dynamic>> deleteAddress(param) async { |
|
|
|
|
ArgumentError.checkNotNull(param, 'param'); |
|
|
|
|
const _extra = <String, dynamic>{}; |
|
|
|
|
final queryParameters = <String, dynamic>{}; |
|
|
|
@ -349,12 +400,15 @@ class _ApiService implements ApiService {
|
|
|
|
|
extra: _extra, |
|
|
|
|
baseUrl: baseUrl), |
|
|
|
|
data: _data); |
|
|
|
|
final value = BaseData.fromJson(_result.data); |
|
|
|
|
final value = BaseData<dynamic>.fromJson( |
|
|
|
|
_result.data, |
|
|
|
|
(json) => json as dynamic, |
|
|
|
|
); |
|
|
|
|
return value; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@override |
|
|
|
|
Future<BaseData> queryAddress(id) async { |
|
|
|
|
Future<BaseData<dynamic>> queryAddress(id) async { |
|
|
|
|
ArgumentError.checkNotNull(id, 'id'); |
|
|
|
|
const _extra = <String, dynamic>{}; |
|
|
|
|
final queryParameters = <String, dynamic>{}; |
|
|
|
@ -368,12 +422,15 @@ class _ApiService implements ApiService {
|
|
|
|
|
extra: _extra, |
|
|
|
|
baseUrl: baseUrl), |
|
|
|
|
data: _data); |
|
|
|
|
final value = BaseData.fromJson(_result.data); |
|
|
|
|
final value = BaseData<dynamic>.fromJson( |
|
|
|
|
_result.data, |
|
|
|
|
(json) => json as dynamic, |
|
|
|
|
); |
|
|
|
|
return value; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@override |
|
|
|
|
Future<BaseData> queryMemberAddress() async { |
|
|
|
|
Future<BaseData<List<Address>>> queryMemberAddress() async { |
|
|
|
|
const _extra = <String, dynamic>{}; |
|
|
|
|
final queryParameters = <String, dynamic>{}; |
|
|
|
|
final _data = <String, dynamic>{}; |
|
|
|
@ -386,12 +443,16 @@ class _ApiService implements ApiService {
|
|
|
|
|
extra: _extra, |
|
|
|
|
baseUrl: baseUrl), |
|
|
|
|
data: _data); |
|
|
|
|
final value = BaseData.fromJson(_result.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> updateAddress(param) async { |
|
|
|
|
Future<BaseData<dynamic>> updateAddress(param) async { |
|
|
|
|
ArgumentError.checkNotNull(param, 'param'); |
|
|
|
|
const _extra = <String, dynamic>{}; |
|
|
|
|
final queryParameters = <String, dynamic>{}; |
|
|
|
@ -405,12 +466,15 @@ class _ApiService implements ApiService {
|
|
|
|
|
extra: _extra, |
|
|
|
|
baseUrl: baseUrl), |
|
|
|
|
data: _data); |
|
|
|
|
final value = BaseData.fromJson(_result.data); |
|
|
|
|
final value = BaseData<dynamic>.fromJson( |
|
|
|
|
_result.data, |
|
|
|
|
(json) => json as dynamic, |
|
|
|
|
); |
|
|
|
|
return value; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@override |
|
|
|
|
Future<BaseData> queryCoupon(param) async { |
|
|
|
|
Future<BaseData<PageInfo<Coupon>>> queryCoupon(param) async { |
|
|
|
|
ArgumentError.checkNotNull(param, 'param'); |
|
|
|
|
const _extra = <String, dynamic>{}; |
|
|
|
|
final queryParameters = <String, dynamic>{}; |
|
|
|
@ -425,12 +489,18 @@ class _ApiService implements ApiService {
|
|
|
|
|
extra: _extra, |
|
|
|
|
baseUrl: baseUrl), |
|
|
|
|
data: _data); |
|
|
|
|
final value = BaseData.fromJson(_result.data); |
|
|
|
|
final value = BaseData<PageInfo<Coupon>>.fromJson( |
|
|
|
|
_result.data, |
|
|
|
|
(json) => PageInfo<Coupon>.fromJson( |
|
|
|
|
json, |
|
|
|
|
(json) => Coupon.fromJson(json), |
|
|
|
|
), |
|
|
|
|
); |
|
|
|
|
return value; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@override |
|
|
|
|
Future<BaseData> queryCard(param) async { |
|
|
|
|
Future<BaseData<PageInfo<Coupon>>> queryCard(param) async { |
|
|
|
|
ArgumentError.checkNotNull(param, 'param'); |
|
|
|
|
const _extra = <String, dynamic>{}; |
|
|
|
|
final queryParameters = <String, dynamic>{}; |
|
|
|
@ -445,12 +515,18 @@ class _ApiService implements ApiService {
|
|
|
|
|
extra: _extra, |
|
|
|
|
baseUrl: baseUrl), |
|
|
|
|
data: _data); |
|
|
|
|
final value = BaseData.fromJson(_result.data); |
|
|
|
|
final value = BaseData<PageInfo<Coupon>>.fromJson( |
|
|
|
|
_result.data, |
|
|
|
|
(json) => PageInfo<Coupon>.fromJson( |
|
|
|
|
json, |
|
|
|
|
(json) => Coupon.fromJson(json), |
|
|
|
|
), |
|
|
|
|
); |
|
|
|
|
return value; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@override |
|
|
|
|
Future<BaseData> queryStore(param) async { |
|
|
|
|
Future<BaseData<List<Store>>> queryStore(param) async { |
|
|
|
|
ArgumentError.checkNotNull(param, 'param'); |
|
|
|
|
const _extra = <String, dynamic>{}; |
|
|
|
|
final queryParameters = <String, dynamic>{}; |
|
|
|
@ -464,12 +540,16 @@ class _ApiService implements ApiService {
|
|
|
|
|
extra: _extra, |
|
|
|
|
baseUrl: baseUrl), |
|
|
|
|
data: _data); |
|
|
|
|
final value = BaseData.fromJson(_result.data); |
|
|
|
|
final value = BaseData<List<Store>>.fromJson( |
|
|
|
|
_result.data, |
|
|
|
|
(json) => (json as List<dynamic>) |
|
|
|
|
.map<Store>((i) => Store.fromJson(i as Map<String, dynamic>)) |
|
|
|
|
.toList()); |
|
|
|
|
return value; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@override |
|
|
|
|
Future<BaseData> informationList(param) async { |
|
|
|
|
Future<BaseData<PageInfo<Activity>>> informationList(param) async { |
|
|
|
|
ArgumentError.checkNotNull(param, 'param'); |
|
|
|
|
const _extra = <String, dynamic>{}; |
|
|
|
|
final queryParameters = <String, dynamic>{}; |
|
|
|
@ -484,12 +564,39 @@ class _ApiService implements ApiService {
|
|
|
|
|
extra: _extra, |
|
|
|
|
baseUrl: baseUrl), |
|
|
|
|
data: _data); |
|
|
|
|
final value = BaseData.fromJson(_result.data); |
|
|
|
|
final value = BaseData<PageInfo<Activity>>.fromJson( |
|
|
|
|
_result.data, |
|
|
|
|
(json) => PageInfo<Activity>.fromJson( |
|
|
|
|
json, |
|
|
|
|
(json) => Activity.fromJson(json), |
|
|
|
|
), |
|
|
|
|
); |
|
|
|
|
return value; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@override |
|
|
|
|
Future<BaseData<Article>> informationInfo(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>>('/information/$id', |
|
|
|
|
queryParameters: queryParameters, |
|
|
|
|
options: RequestOptions( |
|
|
|
|
method: 'GET', |
|
|
|
|
headers: <String, dynamic>{}, |
|
|
|
|
extra: _extra, |
|
|
|
|
baseUrl: baseUrl), |
|
|
|
|
data: _data); |
|
|
|
|
final value = BaseData<Article>.fromJson( |
|
|
|
|
_result.data, |
|
|
|
|
(json) => Article.fromJson(json), |
|
|
|
|
); |
|
|
|
|
return value; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@override |
|
|
|
|
Future<BaseData> informationInfo(id) async { |
|
|
|
|
Future<BaseData<Activity>> activityInfo(id) async { |
|
|
|
|
ArgumentError.checkNotNull(id, 'id'); |
|
|
|
|
const _extra = <String, dynamic>{}; |
|
|
|
|
final queryParameters = <String, dynamic>{}; |
|
|
|
@ -502,12 +609,15 @@ class _ApiService implements ApiService {
|
|
|
|
|
extra: _extra, |
|
|
|
|
baseUrl: baseUrl), |
|
|
|
|
data: _data); |
|
|
|
|
final value = BaseData.fromJson(_result.data); |
|
|
|
|
final value = BaseData<Activity>.fromJson( |
|
|
|
|
_result.data, |
|
|
|
|
(json) => Activity.fromJson(json), |
|
|
|
|
); |
|
|
|
|
return value; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@override |
|
|
|
|
Future<BaseData> creditOrderReceive(id) async { |
|
|
|
|
Future<BaseData<dynamic>> creditOrderReceive(id) async { |
|
|
|
|
ArgumentError.checkNotNull(id, 'id'); |
|
|
|
|
const _extra = <String, dynamic>{}; |
|
|
|
|
final queryParameters = <String, dynamic>{}; |
|
|
|
@ -521,12 +631,15 @@ class _ApiService implements ApiService {
|
|
|
|
|
extra: _extra, |
|
|
|
|
baseUrl: baseUrl), |
|
|
|
|
data: _data); |
|
|
|
|
final value = BaseData.fromJson(_result.data); |
|
|
|
|
final value = BaseData<dynamic>.fromJson( |
|
|
|
|
_result.data, |
|
|
|
|
(json) => json as dynamic, |
|
|
|
|
); |
|
|
|
|
return value; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@override |
|
|
|
|
Future<BaseData> queryHome() async { |
|
|
|
|
Future<BaseData<BrandData>> queryHome() async { |
|
|
|
|
const _extra = <String, dynamic>{}; |
|
|
|
|
final queryParameters = <String, dynamic>{}; |
|
|
|
|
final _data = <String, dynamic>{}; |
|
|
|
@ -538,12 +651,15 @@ class _ApiService implements ApiService {
|
|
|
|
|
extra: _extra, |
|
|
|
|
baseUrl: baseUrl), |
|
|
|
|
data: _data); |
|
|
|
|
final value = BaseData.fromJson(_result.data); |
|
|
|
|
final value = BaseData<BrandData>.fromJson( |
|
|
|
|
_result.data, |
|
|
|
|
(json) => BrandData.fromJson(json), |
|
|
|
|
); |
|
|
|
|
return value; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@override |
|
|
|
|
Future<BaseData> queryStoreInfo(id) async { |
|
|
|
|
Future<BaseData<dynamic>> queryStoreInfo(id) async { |
|
|
|
|
ArgumentError.checkNotNull(id, 'id'); |
|
|
|
|
const _extra = <String, dynamic>{}; |
|
|
|
|
final queryParameters = <String, dynamic>{}; |
|
|
|
@ -556,12 +672,15 @@ class _ApiService implements ApiService {
|
|
|
|
|
extra: _extra, |
|
|
|
|
baseUrl: baseUrl), |
|
|
|
|
data: _data); |
|
|
|
|
final value = BaseData.fromJson(_result.data); |
|
|
|
|
final value = BaseData<dynamic>.fromJson( |
|
|
|
|
_result.data, |
|
|
|
|
(json) => json as dynamic, |
|
|
|
|
); |
|
|
|
|
return value; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@override |
|
|
|
|
Future<BaseData> queryArticle(param) async { |
|
|
|
|
Future<BaseData<PageInfo<Article>>> queryArticle(param) async { |
|
|
|
|
ArgumentError.checkNotNull(param, 'param'); |
|
|
|
|
const _extra = <String, dynamic>{}; |
|
|
|
|
final queryParameters = <String, dynamic>{}; |
|
|
|
@ -576,12 +695,18 @@ class _ApiService implements ApiService {
|
|
|
|
|
extra: _extra, |
|
|
|
|
baseUrl: baseUrl), |
|
|
|
|
data: _data); |
|
|
|
|
final value = BaseData.fromJson(_result.data); |
|
|
|
|
final value = BaseData<PageInfo<Article>>.fromJson( |
|
|
|
|
_result.data, |
|
|
|
|
(json) => PageInfo<Article>.fromJson( |
|
|
|
|
json, |
|
|
|
|
(json) => Article.fromJson(json), |
|
|
|
|
), |
|
|
|
|
); |
|
|
|
|
return value; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@override |
|
|
|
|
Future<BaseData> queryBanner(param) async { |
|
|
|
|
Future<BaseData<PageInfo<BannerData>>> queryBanner(param) async { |
|
|
|
|
ArgumentError.checkNotNull(param, 'param'); |
|
|
|
|
const _extra = <String, dynamic>{}; |
|
|
|
|
final queryParameters = <String, dynamic>{}; |
|
|
|
@ -595,12 +720,18 @@ class _ApiService implements ApiService {
|
|
|
|
|
extra: _extra, |
|
|
|
|
baseUrl: baseUrl), |
|
|
|
|
data: _data); |
|
|
|
|
final value = BaseData.fromJson(_result.data); |
|
|
|
|
final value = BaseData<PageInfo<BannerData>>.fromJson( |
|
|
|
|
_result.data, |
|
|
|
|
(json) => PageInfo<BannerData>.fromJson( |
|
|
|
|
json, |
|
|
|
|
(json) => BannerData.fromJson(json), |
|
|
|
|
), |
|
|
|
|
); |
|
|
|
|
return value; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@override |
|
|
|
|
Future<BaseData> queryHomeBrand() async { |
|
|
|
|
Future<BaseData<dynamic>> queryHomeBrand() async { |
|
|
|
|
const _extra = <String, dynamic>{}; |
|
|
|
|
final queryParameters = <String, dynamic>{}; |
|
|
|
|
final _data = <String, dynamic>{}; |
|
|
|
@ -612,12 +743,15 @@ class _ApiService implements ApiService {
|
|
|
|
|
extra: _extra, |
|
|
|
|
baseUrl: baseUrl), |
|
|
|
|
data: _data); |
|
|
|
|
final value = BaseData.fromJson(_result.data); |
|
|
|
|
final value = BaseData<dynamic>.fromJson( |
|
|
|
|
_result.data, |
|
|
|
|
(json) => json as dynamic, |
|
|
|
|
); |
|
|
|
|
return value; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@override |
|
|
|
|
Future<BaseData> minLogin(storeId) async { |
|
|
|
|
Future<BaseData<dynamic>> minLogin(storeId) async { |
|
|
|
|
ArgumentError.checkNotNull(storeId, 'storeId'); |
|
|
|
|
const _extra = <String, dynamic>{}; |
|
|
|
|
final queryParameters = <String, dynamic>{}; |
|
|
|
@ -631,12 +765,15 @@ class _ApiService implements ApiService {
|
|
|
|
|
extra: _extra, |
|
|
|
|
baseUrl: baseUrl), |
|
|
|
|
data: _data); |
|
|
|
|
final value = BaseData.fromJson(_result.data); |
|
|
|
|
final value = BaseData<dynamic>.fromJson( |
|
|
|
|
_result.data, |
|
|
|
|
(json) => json as dynamic, |
|
|
|
|
); |
|
|
|
|
return value; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@override |
|
|
|
|
Future<BaseData> queryBillInfo(param) async { |
|
|
|
|
Future<BaseData<PageInfo<UserBill>>> queryBillInfo(param) async { |
|
|
|
|
ArgumentError.checkNotNull(param, 'param'); |
|
|
|
|
const _extra = <String, dynamic>{}; |
|
|
|
|
final queryParameters = <String, dynamic>{}; |
|
|
|
@ -650,12 +787,18 @@ class _ApiService implements ApiService {
|
|
|
|
|
extra: _extra, |
|
|
|
|
baseUrl: baseUrl), |
|
|
|
|
data: _data); |
|
|
|
|
final value = BaseData.fromJson(_result.data); |
|
|
|
|
final value = BaseData<PageInfo<UserBill>>.fromJson( |
|
|
|
|
_result.data, |
|
|
|
|
(json) => PageInfo<UserBill>.fromJson( |
|
|
|
|
json, |
|
|
|
|
(json) => UserBill.fromJson(json), |
|
|
|
|
), |
|
|
|
|
); |
|
|
|
|
return value; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@override |
|
|
|
|
Future<BaseData> rankList() async { |
|
|
|
|
Future<BaseData<List<Rank>>> rankList() async { |
|
|
|
|
const _extra = <String, dynamic>{}; |
|
|
|
|
final queryParameters = <String, dynamic>{}; |
|
|
|
|
final _data = <String, dynamic>{}; |
|
|
|
@ -667,12 +810,16 @@ class _ApiService implements ApiService {
|
|
|
|
|
extra: _extra, |
|
|
|
|
baseUrl: baseUrl), |
|
|
|
|
data: _data); |
|
|
|
|
final value = BaseData.fromJson(_result.data); |
|
|
|
|
final value = BaseData<List<Rank>>.fromJson( |
|
|
|
|
_result.data, |
|
|
|
|
(json) => (json as List<dynamic>) |
|
|
|
|
.map<Rank>((i) => Rank.fromJson(i as Map<String, dynamic>)) |
|
|
|
|
.toList()); |
|
|
|
|
return value; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@override |
|
|
|
|
Future<BaseData> orderList(param) async { |
|
|
|
|
Future<BaseData<PageInfo<OrderInfo>>> orderList(param) async { |
|
|
|
|
ArgumentError.checkNotNull(param, 'param'); |
|
|
|
|
const _extra = <String, dynamic>{}; |
|
|
|
|
final queryParameters = <String, dynamic>{}; |
|
|
|
@ -686,12 +833,18 @@ class _ApiService implements ApiService {
|
|
|
|
|
extra: _extra, |
|
|
|
|
baseUrl: baseUrl), |
|
|
|
|
data: _data); |
|
|
|
|
final value = BaseData.fromJson(_result.data); |
|
|
|
|
final value = BaseData<PageInfo<OrderInfo>>.fromJson( |
|
|
|
|
_result.data, |
|
|
|
|
(json) => PageInfo<OrderInfo>.fromJson( |
|
|
|
|
json, |
|
|
|
|
(json) => OrderInfo.fromJson(json), |
|
|
|
|
), |
|
|
|
|
); |
|
|
|
|
return value; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@override |
|
|
|
|
Future<BaseData> orderDetail(id) async { |
|
|
|
|
Future<BaseData<OrderInfo>> orderDetail(id) async { |
|
|
|
|
ArgumentError.checkNotNull(id, 'id'); |
|
|
|
|
const _extra = <String, dynamic>{}; |
|
|
|
|
final queryParameters = <String, dynamic>{}; |
|
|
|
@ -705,12 +858,15 @@ class _ApiService implements ApiService {
|
|
|
|
|
extra: _extra, |
|
|
|
|
baseUrl: baseUrl), |
|
|
|
|
data: _data); |
|
|
|
|
final value = BaseData.fromJson(_result.data); |
|
|
|
|
final value = BaseData<OrderInfo>.fromJson( |
|
|
|
|
_result.data, |
|
|
|
|
(json) => OrderInfo.fromJson(json), |
|
|
|
|
); |
|
|
|
|
return value; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@override |
|
|
|
|
Future<BaseData> continuePay(param) async { |
|
|
|
|
Future<BaseData<dynamic>> continuePay(param) async { |
|
|
|
|
ArgumentError.checkNotNull(param, 'param'); |
|
|
|
|
const _extra = <String, dynamic>{}; |
|
|
|
|
final queryParameters = <String, dynamic>{}; |
|
|
|
@ -725,12 +881,15 @@ class _ApiService implements ApiService {
|
|
|
|
|
extra: _extra, |
|
|
|
|
baseUrl: baseUrl), |
|
|
|
|
data: _data); |
|
|
|
|
final value = BaseData.fromJson(_result.data); |
|
|
|
|
final value = BaseData<dynamic>.fromJson( |
|
|
|
|
_result.data, |
|
|
|
|
(json) => json as dynamic, |
|
|
|
|
); |
|
|
|
|
return value; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@override |
|
|
|
|
Future<BaseData> receiveToCard(id) async { |
|
|
|
|
Future<BaseData<dynamic>> receiveToCard(id) async { |
|
|
|
|
ArgumentError.checkNotNull(id, 'id'); |
|
|
|
|
const _extra = <String, dynamic>{}; |
|
|
|
|
final queryParameters = <String, dynamic>{}; |
|
|
|
@ -744,12 +903,15 @@ class _ApiService implements ApiService {
|
|
|
|
|
extra: _extra, |
|
|
|
|
baseUrl: baseUrl), |
|
|
|
|
data: _data); |
|
|
|
|
final value = BaseData.fromJson(_result.data); |
|
|
|
|
final value = BaseData<dynamic>.fromJson( |
|
|
|
|
_result.data, |
|
|
|
|
(json) => json as dynamic, |
|
|
|
|
); |
|
|
|
|
return value; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@override |
|
|
|
|
Future<BaseData> vipList(param) async { |
|
|
|
|
Future<BaseData<List<VipCard>>> vipList(param) async { |
|
|
|
|
ArgumentError.checkNotNull(param, 'param'); |
|
|
|
|
const _extra = <String, dynamic>{}; |
|
|
|
|
final queryParameters = <String, dynamic>{}; |
|
|
|
@ -763,12 +925,16 @@ class _ApiService implements ApiService {
|
|
|
|
|
extra: _extra, |
|
|
|
|
baseUrl: baseUrl), |
|
|
|
|
data: _data); |
|
|
|
|
final value = BaseData.fromJson(_result.data); |
|
|
|
|
final value = BaseData<List<VipCard>>.fromJson( |
|
|
|
|
_result.data, |
|
|
|
|
(json) => (json as List<dynamic>) |
|
|
|
|
.map<VipCard>((i) => VipCard.fromJson(i as Map<String, dynamic>)) |
|
|
|
|
.toList()); |
|
|
|
|
return value; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@override |
|
|
|
|
Future<BaseData> vipDetail(param) async { |
|
|
|
|
Future<BaseData<VipCard>> vipDetail(param) async { |
|
|
|
|
ArgumentError.checkNotNull(param, 'param'); |
|
|
|
|
const _extra = <String, dynamic>{}; |
|
|
|
|
final queryParameters = <String, dynamic>{}; |
|
|
|
@ -783,12 +949,15 @@ class _ApiService implements ApiService {
|
|
|
|
|
extra: _extra, |
|
|
|
|
baseUrl: baseUrl), |
|
|
|
|
data: _data); |
|
|
|
|
final value = BaseData.fromJson(_result.data); |
|
|
|
|
final value = BaseData<VipCard>.fromJson( |
|
|
|
|
_result.data, |
|
|
|
|
(json) => VipCard.fromJson(json), |
|
|
|
|
); |
|
|
|
|
return value; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@override |
|
|
|
|
Future<BaseData> msgList(param) async { |
|
|
|
|
Future<BaseData<PageInfo<Message>>> msgList(param) async { |
|
|
|
|
ArgumentError.checkNotNull(param, 'param'); |
|
|
|
|
const _extra = <String, dynamic>{}; |
|
|
|
|
final queryParameters = <String, dynamic>{}; |
|
|
|
@ -802,12 +971,18 @@ class _ApiService implements ApiService {
|
|
|
|
|
extra: _extra, |
|
|
|
|
baseUrl: baseUrl), |
|
|
|
|
data: _data); |
|
|
|
|
final value = BaseData.fromJson(_result.data); |
|
|
|
|
final value = BaseData<PageInfo<Message>>.fromJson( |
|
|
|
|
_result.data, |
|
|
|
|
(json) => PageInfo<Message>.fromJson( |
|
|
|
|
json, |
|
|
|
|
(json) => Message.fromJson(json), |
|
|
|
|
), |
|
|
|
|
); |
|
|
|
|
return value; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@override |
|
|
|
|
Future<BaseData> queryMsg(id) async { |
|
|
|
|
Future<BaseData<dynamic>> queryMsg(id) async { |
|
|
|
|
ArgumentError.checkNotNull(id, 'id'); |
|
|
|
|
const _extra = <String, dynamic>{}; |
|
|
|
|
final queryParameters = <String, dynamic>{}; |
|
|
|
@ -820,12 +995,15 @@ class _ApiService implements ApiService {
|
|
|
|
|
extra: _extra, |
|
|
|
|
baseUrl: baseUrl), |
|
|
|
|
data: _data); |
|
|
|
|
final value = BaseData.fromJson(_result.data); |
|
|
|
|
final value = BaseData<dynamic>.fromJson( |
|
|
|
|
_result.data, |
|
|
|
|
(json) => json as dynamic, |
|
|
|
|
); |
|
|
|
|
return value; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@override |
|
|
|
|
Future<BaseData> informationLikes(id) async { |
|
|
|
|
Future<BaseData<dynamic>> informationLikes(id) async { |
|
|
|
|
ArgumentError.checkNotNull(id, 'id'); |
|
|
|
|
const _extra = <String, dynamic>{}; |
|
|
|
|
final queryParameters = <String, dynamic>{}; |
|
|
|
@ -839,12 +1017,15 @@ class _ApiService implements ApiService {
|
|
|
|
|
extra: _extra, |
|
|
|
|
baseUrl: baseUrl), |
|
|
|
|
data: _data); |
|
|
|
|
final value = BaseData.fromJson(_result.data); |
|
|
|
|
final value = BaseData<dynamic>.fromJson( |
|
|
|
|
_result.data, |
|
|
|
|
(json) => json as dynamic, |
|
|
|
|
); |
|
|
|
|
return value; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@override |
|
|
|
|
Future<BaseData> memberComment(param) async { |
|
|
|
|
Future<BaseData<dynamic>> memberComment(param) async { |
|
|
|
|
ArgumentError.checkNotNull(param, 'param'); |
|
|
|
|
const _extra = <String, dynamic>{}; |
|
|
|
|
final queryParameters = <String, dynamic>{}; |
|
|
|
@ -858,12 +1039,15 @@ class _ApiService implements ApiService {
|
|
|
|
|
extra: _extra, |
|
|
|
|
baseUrl: baseUrl), |
|
|
|
|
data: _data); |
|
|
|
|
final value = BaseData.fromJson(_result.data); |
|
|
|
|
final value = BaseData<dynamic>.fromJson( |
|
|
|
|
_result.data, |
|
|
|
|
(json) => json as dynamic, |
|
|
|
|
); |
|
|
|
|
return value; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@override |
|
|
|
|
Future<BaseData> memberCommentList(param) async { |
|
|
|
|
Future<BaseData<PageInfo<MemberCommentList>>> memberCommentList(param) async { |
|
|
|
|
ArgumentError.checkNotNull(param, 'param'); |
|
|
|
|
const _extra = <String, dynamic>{}; |
|
|
|
|
final queryParameters = <String, dynamic>{}; |
|
|
|
@ -878,12 +1062,18 @@ class _ApiService implements ApiService {
|
|
|
|
|
extra: _extra, |
|
|
|
|
baseUrl: baseUrl), |
|
|
|
|
data: _data); |
|
|
|
|
final value = BaseData.fromJson(_result.data); |
|
|
|
|
final value = BaseData<PageInfo<MemberCommentList>>.fromJson( |
|
|
|
|
_result.data, |
|
|
|
|
(json) => PageInfo<MemberCommentList>.fromJson( |
|
|
|
|
json, |
|
|
|
|
(json) => MemberCommentList.fromJson(json), |
|
|
|
|
), |
|
|
|
|
); |
|
|
|
|
return value; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@override |
|
|
|
|
Future<BaseData> commentLike(id) async { |
|
|
|
|
Future<BaseData<dynamic>> commentLike(id) async { |
|
|
|
|
ArgumentError.checkNotNull(id, 'id'); |
|
|
|
|
const _extra = <String, dynamic>{}; |
|
|
|
|
final queryParameters = <String, dynamic>{}; |
|
|
|
@ -897,12 +1087,15 @@ class _ApiService implements ApiService {
|
|
|
|
|
extra: _extra, |
|
|
|
|
baseUrl: baseUrl), |
|
|
|
|
data: _data); |
|
|
|
|
final value = BaseData.fromJson(_result.data); |
|
|
|
|
final value = BaseData<dynamic>.fromJson( |
|
|
|
|
_result.data, |
|
|
|
|
(json) => json as dynamic, |
|
|
|
|
); |
|
|
|
|
return value; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@override |
|
|
|
|
Future<BaseData> delComment(id) async { |
|
|
|
|
Future<BaseData<dynamic>> delComment(id) async { |
|
|
|
|
ArgumentError.checkNotNull(id, 'id'); |
|
|
|
|
const _extra = <String, dynamic>{}; |
|
|
|
|
final queryParameters = <String, dynamic>{}; |
|
|
|
@ -916,12 +1109,15 @@ class _ApiService implements ApiService {
|
|
|
|
|
extra: _extra, |
|
|
|
|
baseUrl: baseUrl), |
|
|
|
|
data: _data); |
|
|
|
|
final value = BaseData.fromJson(_result.data); |
|
|
|
|
final value = BaseData<dynamic>.fromJson( |
|
|
|
|
_result.data, |
|
|
|
|
(json) => json as dynamic, |
|
|
|
|
); |
|
|
|
|
return value; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@override |
|
|
|
|
Future<BaseData> shippingTrace(shipperCode, logisticCode) async { |
|
|
|
|
Future<BaseData<Logistics>> shippingTrace(shipperCode, logisticCode) async { |
|
|
|
|
ArgumentError.checkNotNull(shipperCode, 'shipperCode'); |
|
|
|
|
ArgumentError.checkNotNull(logisticCode, 'logisticCode'); |
|
|
|
|
const _extra = <String, dynamic>{}; |
|
|
|
@ -936,7 +1132,10 @@ class _ApiService implements ApiService {
|
|
|
|
|
extra: _extra, |
|
|
|
|
baseUrl: baseUrl), |
|
|
|
|
data: _data); |
|
|
|
|
final value = BaseData.fromJson(_result.data); |
|
|
|
|
final value = BaseData<Logistics>.fromJson( |
|
|
|
|
_result.data, |
|
|
|
|
(json) => Logistics.fromJson(json), |
|
|
|
|
); |
|
|
|
|
return value; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|