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.
4213 lines
119 KiB
4213 lines
119 KiB
// GENERATED CODE - DO NOT MODIFY BY HAND |
|
|
|
part of 'retrofit_api.dart'; |
|
|
|
// ************************************************************************** |
|
// RetrofitGenerator |
|
// ************************************************************************** |
|
|
|
// ignore_for_file: unnecessary_brace_in_string_interps,no_leading_underscores_for_local_identifiers,unused_element |
|
|
|
class _ApiService implements ApiService { |
|
_ApiService( |
|
this._dio, { |
|
this.baseUrl, |
|
this.errorLogger, |
|
}) { |
|
baseUrl ??= 'http://192.168.10.54:8766/app/'; |
|
} |
|
|
|
final Dio _dio; |
|
|
|
String? baseUrl; |
|
|
|
final ParseErrorLogger? errorLogger; |
|
|
|
@override |
|
Future<BaseData<UploadResult>> upload( |
|
File data, |
|
int folderId, |
|
bool isVideo, |
|
) async { |
|
final _extra = <String, dynamic>{}; |
|
final queryParameters = <String, dynamic>{}; |
|
final _headers = <String, dynamic>{}; |
|
final _data = FormData(); |
|
_data.files.add(MapEntry( |
|
'file', |
|
MultipartFile.fromFileSync( |
|
data.path, |
|
filename: data.path.split(Platform.pathSeparator).last, |
|
), |
|
)); |
|
_data.fields.add(MapEntry( |
|
'folderId', |
|
folderId.toString(), |
|
)); |
|
final _options = _setStreamType<BaseData<UploadResult>>(Options( |
|
method: 'POST', |
|
headers: _headers, |
|
extra: _extra, |
|
contentType: 'multipart/form-data', |
|
) |
|
.compose( |
|
_dio.options, |
|
'/file/upload', |
|
queryParameters: queryParameters, |
|
data: _data, |
|
) |
|
.copyWith( |
|
baseUrl: _combineBaseUrls( |
|
_dio.options.baseUrl, |
|
baseUrl, |
|
))); |
|
final _result = await _dio.fetch<Map<String, dynamic>>(_options); |
|
late BaseData<UploadResult> _value; |
|
try { |
|
_value = BaseData<UploadResult>.fromJson( |
|
_result.data!, |
|
(json) => UploadResult.fromJson(json as Map<String, dynamic>), |
|
); |
|
} on Object catch (e, s) { |
|
errorLogger?.logError(e, s, _options); |
|
rethrow; |
|
} |
|
return _value; |
|
} |
|
|
|
@override |
|
Future<dynamic> searchPoi( |
|
String lat, |
|
String lng, |
|
String keywords, |
|
int size, |
|
int page, |
|
) async { |
|
final _extra = <String, dynamic>{}; |
|
final queryParameters = <String, dynamic>{}; |
|
final _headers = <String, dynamic>{}; |
|
const Map<String, dynamic>? _data = null; |
|
final _options = _setStreamType<dynamic>(Options( |
|
method: 'GET', |
|
headers: _headers, |
|
extra: _extra, |
|
) |
|
.compose( |
|
_dio.options, |
|
'https://restapi.amap.com/v3/place/around?key=542b46afa8e4b88fe1eb3c4d0ba0872f&location=${lat},${lng}&keywords=${keywords}&offset={size}&page={page}&extensions=all', |
|
queryParameters: queryParameters, |
|
data: _data, |
|
) |
|
.copyWith( |
|
baseUrl: _combineBaseUrls( |
|
_dio.options.baseUrl, |
|
baseUrl, |
|
))); |
|
final _result = await _dio.fetch(_options); |
|
final _value = _result.data; |
|
return _value; |
|
} |
|
|
|
@override |
|
Future<dynamic> geocodeRegeo( |
|
String lat, |
|
String lng, |
|
) async { |
|
final _extra = <String, dynamic>{}; |
|
final queryParameters = <String, dynamic>{}; |
|
final _headers = <String, dynamic>{}; |
|
const Map<String, dynamic>? _data = null; |
|
final _options = _setStreamType<dynamic>(Options( |
|
method: 'GET', |
|
headers: _headers, |
|
extra: _extra, |
|
) |
|
.compose( |
|
_dio.options, |
|
'https://restapi.amap.com/v3/geocode/regeo?key=542b46afa8e4b88fe1eb3c4d0ba0872f&location=${lat},${lng}&extensions=base', |
|
queryParameters: queryParameters, |
|
data: _data, |
|
) |
|
.copyWith( |
|
baseUrl: _combineBaseUrls( |
|
_dio.options.baseUrl, |
|
baseUrl, |
|
))); |
|
final _result = await _dio.fetch(_options); |
|
final _value = _result.data; |
|
return _value; |
|
} |
|
|
|
@override |
|
Future<BaseData<LoginInfo>?> memberLogin(Map<String, dynamic> param) async { |
|
final _extra = <String, dynamic>{}; |
|
final queryParameters = <String, dynamic>{}; |
|
final _headers = <String, dynamic>{}; |
|
final _data = <String, dynamic>{}; |
|
_data.addAll(param); |
|
final _options = _setStreamType<BaseData<LoginInfo>>(Options( |
|
method: 'POST', |
|
headers: _headers, |
|
extra: _extra, |
|
) |
|
.compose( |
|
_dio.options, |
|
'/auth/platform/memberLogin', |
|
queryParameters: queryParameters, |
|
data: _data, |
|
) |
|
.copyWith( |
|
baseUrl: _combineBaseUrls( |
|
_dio.options.baseUrl, |
|
baseUrl, |
|
))); |
|
final _result = await _dio.fetch<Map<String, dynamic>?>(_options); |
|
late BaseData<LoginInfo>? _value; |
|
try { |
|
_value = _result.data == null |
|
? null |
|
: BaseData<LoginInfo>.fromJson( |
|
_result.data!, |
|
(json) => LoginInfo.fromJson(json as Map<String, dynamic>), |
|
); |
|
} on Object catch (e, s) { |
|
errorLogger?.logError(e, s, _options); |
|
rethrow; |
|
} |
|
return _value; |
|
} |
|
|
|
@override |
|
Future<BaseData<Channels>> appChannels() async { |
|
final _extra = <String, dynamic>{}; |
|
final queryParameters = <String, dynamic>{}; |
|
final _headers = <String, dynamic>{}; |
|
const Map<String, dynamic>? _data = null; |
|
final _options = _setStreamType<BaseData<Channels>>(Options( |
|
method: 'GET', |
|
headers: _headers, |
|
extra: _extra, |
|
) |
|
.compose( |
|
_dio.options, |
|
'/auth/appChannels', |
|
queryParameters: queryParameters, |
|
data: _data, |
|
) |
|
.copyWith( |
|
baseUrl: _combineBaseUrls( |
|
_dio.options.baseUrl, |
|
baseUrl, |
|
))); |
|
final _result = await _dio.fetch<Map<String, dynamic>>(_options); |
|
late BaseData<Channels> _value; |
|
try { |
|
_value = BaseData<Channels>.fromJson( |
|
_result.data!, |
|
(json) => Channels.fromJson(json as Map<String, dynamic>), |
|
); |
|
} on Object catch (e, s) { |
|
errorLogger?.logError(e, s, _options); |
|
rethrow; |
|
} |
|
return _value; |
|
} |
|
|
|
@override |
|
Future<BaseData<dynamic>> sendVerify(Map<String, dynamic> param) async { |
|
final _extra = <String, dynamic>{}; |
|
final queryParameters = <String, dynamic>{}; |
|
final _headers = <String, dynamic>{}; |
|
final _data = <String, dynamic>{}; |
|
_data.addAll(param); |
|
final _options = _setStreamType<BaseData<dynamic>>(Options( |
|
method: 'POST', |
|
headers: _headers, |
|
extra: _extra, |
|
) |
|
.compose( |
|
_dio.options, |
|
'/auth/sendVerify', |
|
queryParameters: queryParameters, |
|
data: _data, |
|
) |
|
.copyWith( |
|
baseUrl: _combineBaseUrls( |
|
_dio.options.baseUrl, |
|
baseUrl, |
|
))); |
|
final _result = await _dio.fetch<Map<String, dynamic>>(_options); |
|
late BaseData<dynamic> _value; |
|
try { |
|
_value = BaseData<dynamic>.fromJson( |
|
_result.data!, |
|
(json) => json as dynamic, |
|
); |
|
} on Object catch (e, s) { |
|
errorLogger?.logError(e, s, _options); |
|
rethrow; |
|
} |
|
return _value; |
|
} |
|
|
|
@override |
|
Future<BaseData<PageInfo<Goods>>> creditGoods( |
|
Map<String, dynamic> param) async { |
|
final _extra = <String, dynamic>{}; |
|
final queryParameters = <String, dynamic>{}; |
|
final _headers = <String, dynamic>{}; |
|
final _data = <String, dynamic>{}; |
|
_data.addAll(param); |
|
final _options = _setStreamType<BaseData<PageInfo<Goods>>>(Options( |
|
method: 'POST', |
|
headers: _headers, |
|
extra: _extra, |
|
) |
|
.compose( |
|
_dio.options, |
|
'/creditGoods/list', |
|
queryParameters: queryParameters, |
|
data: _data, |
|
) |
|
.copyWith( |
|
baseUrl: _combineBaseUrls( |
|
_dio.options.baseUrl, |
|
baseUrl, |
|
))); |
|
final _result = await _dio.fetch<Map<String, dynamic>>(_options); |
|
late BaseData<PageInfo<Goods>> _value; |
|
try { |
|
_value = BaseData<PageInfo<Goods>>.fromJson( |
|
_result.data!, |
|
(json) => PageInfo<Goods>.fromJson( |
|
json as Map<String, dynamic>, |
|
(json) => Goods.fromJson(json as Map<String, dynamic>), |
|
), |
|
); |
|
} on Object catch (e, s) { |
|
errorLogger?.logError(e, s, _options); |
|
rethrow; |
|
} |
|
return _value; |
|
} |
|
|
|
@override |
|
Future<BaseData<PageInfo<GoodsCategory>>> goodsCategory( |
|
Map<String, dynamic> param) async { |
|
final _extra = <String, dynamic>{}; |
|
final queryParameters = <String, dynamic>{}; |
|
final _headers = <String, dynamic>{}; |
|
final _data = <String, dynamic>{}; |
|
_data.addAll(param); |
|
final _options = _setStreamType<BaseData<PageInfo<GoodsCategory>>>(Options( |
|
method: 'POST', |
|
headers: _headers, |
|
extra: _extra, |
|
) |
|
.compose( |
|
_dio.options, |
|
'/creditGoodsCategory/page', |
|
queryParameters: queryParameters, |
|
data: _data, |
|
) |
|
.copyWith( |
|
baseUrl: _combineBaseUrls( |
|
_dio.options.baseUrl, |
|
baseUrl, |
|
))); |
|
final _result = await _dio.fetch<Map<String, dynamic>>(_options); |
|
late BaseData<PageInfo<GoodsCategory>> _value; |
|
try { |
|
_value = BaseData<PageInfo<GoodsCategory>>.fromJson( |
|
_result.data!, |
|
(json) => PageInfo<GoodsCategory>.fromJson( |
|
json as Map<String, dynamic>, |
|
(json) => GoodsCategory.fromJson(json as Map<String, dynamic>), |
|
), |
|
); |
|
} on Object catch (e, s) { |
|
errorLogger?.logError(e, s, _options); |
|
rethrow; |
|
} |
|
return _value; |
|
} |
|
|
|
@override |
|
Future<BaseData<Goods>> creditGoodsById(String id) async { |
|
final _extra = <String, dynamic>{}; |
|
final queryParameters = <String, dynamic>{}; |
|
final _headers = <String, dynamic>{}; |
|
const Map<String, dynamic>? _data = null; |
|
final _options = _setStreamType<BaseData<Goods>>(Options( |
|
method: 'GET', |
|
headers: _headers, |
|
extra: _extra, |
|
) |
|
.compose( |
|
_dio.options, |
|
'/creditGoods/${id}', |
|
queryParameters: queryParameters, |
|
data: _data, |
|
) |
|
.copyWith( |
|
baseUrl: _combineBaseUrls( |
|
_dio.options.baseUrl, |
|
baseUrl, |
|
))); |
|
final _result = await _dio.fetch<Map<String, dynamic>>(_options); |
|
late BaseData<Goods> _value; |
|
try { |
|
_value = BaseData<Goods>.fromJson( |
|
_result.data!, |
|
(json) => Goods.fromJson(json as Map<String, dynamic>), |
|
); |
|
} on Object catch (e, s) { |
|
errorLogger?.logError(e, s, _options); |
|
rethrow; |
|
} |
|
return _value; |
|
} |
|
|
|
@override |
|
Future<BaseData<UserInfo>> queryInfo() async { |
|
final _extra = <String, dynamic>{}; |
|
final queryParameters = <String, dynamic>{}; |
|
final _headers = <String, dynamic>{}; |
|
const Map<String, dynamic>? _data = null; |
|
final _options = _setStreamType<BaseData<UserInfo>>(Options( |
|
method: 'GET', |
|
headers: _headers, |
|
extra: _extra, |
|
) |
|
.compose( |
|
_dio.options, |
|
'/member/info', |
|
queryParameters: queryParameters, |
|
data: _data, |
|
) |
|
.copyWith( |
|
baseUrl: _combineBaseUrls( |
|
_dio.options.baseUrl, |
|
baseUrl, |
|
))); |
|
final _result = await _dio.fetch<Map<String, dynamic>>(_options); |
|
late BaseData<UserInfo> _value; |
|
try { |
|
_value = BaseData<UserInfo>.fromJson( |
|
_result.data!, |
|
(json) => UserInfo.fromJson(json as Map<String, dynamic>), |
|
); |
|
} on Object catch (e, s) { |
|
errorLogger?.logError(e, s, _options); |
|
rethrow; |
|
} |
|
return _value; |
|
} |
|
|
|
@override |
|
Future<BaseData<dynamic>> editInfo(Map<String, dynamic> param) async { |
|
final _extra = <String, dynamic>{}; |
|
final queryParameters = <String, dynamic>{}; |
|
final _headers = <String, dynamic>{}; |
|
final _data = <String, dynamic>{}; |
|
_data.addAll(param); |
|
final _options = _setStreamType<BaseData<dynamic>>(Options( |
|
method: 'POST', |
|
headers: _headers, |
|
extra: _extra, |
|
) |
|
.compose( |
|
_dio.options, |
|
'/member/editMemberInfo', |
|
queryParameters: queryParameters, |
|
data: _data, |
|
) |
|
.copyWith( |
|
baseUrl: _combineBaseUrls( |
|
_dio.options.baseUrl, |
|
baseUrl, |
|
))); |
|
final _result = await _dio.fetch<Map<String, dynamic>>(_options); |
|
late BaseData<dynamic> _value; |
|
try { |
|
_value = BaseData<dynamic>.fromJson( |
|
_result.data!, |
|
(json) => json as dynamic, |
|
); |
|
} on Object catch (e, s) { |
|
errorLogger?.logError(e, s, _options); |
|
rethrow; |
|
} |
|
return _value; |
|
} |
|
|
|
@override |
|
Future<BaseData<SignInfo>> signInInfo() async { |
|
final _extra = <String, dynamic>{}; |
|
final queryParameters = <String, dynamic>{}; |
|
final _headers = <String, dynamic>{}; |
|
const Map<String, dynamic>? _data = null; |
|
final _options = _setStreamType<BaseData<SignInfo>>(Options( |
|
method: 'GET', |
|
headers: _headers, |
|
extra: _extra, |
|
) |
|
.compose( |
|
_dio.options, |
|
'/member/signInInfo', |
|
queryParameters: queryParameters, |
|
data: _data, |
|
) |
|
.copyWith( |
|
baseUrl: _combineBaseUrls( |
|
_dio.options.baseUrl, |
|
baseUrl, |
|
))); |
|
final _result = await _dio.fetch<Map<String, dynamic>>(_options); |
|
late BaseData<SignInfo> _value; |
|
try { |
|
_value = BaseData<SignInfo>.fromJson( |
|
_result.data!, |
|
(json) => SignInfo.fromJson(json as Map<String, dynamic>), |
|
); |
|
} on Object catch (e, s) { |
|
errorLogger?.logError(e, s, _options); |
|
rethrow; |
|
} |
|
return _value; |
|
} |
|
|
|
@override |
|
Future<BaseData<dynamic>> signIn() async { |
|
final _extra = <String, dynamic>{}; |
|
final queryParameters = <String, dynamic>{}; |
|
final _headers = <String, dynamic>{}; |
|
const Map<String, dynamic>? _data = null; |
|
final _options = _setStreamType<BaseData<dynamic>>(Options( |
|
method: 'GET', |
|
headers: _headers, |
|
extra: _extra, |
|
) |
|
.compose( |
|
_dio.options, |
|
'/member/signIn', |
|
queryParameters: queryParameters, |
|
data: _data, |
|
) |
|
.copyWith( |
|
baseUrl: _combineBaseUrls( |
|
_dio.options.baseUrl, |
|
baseUrl, |
|
))); |
|
final _result = await _dio.fetch<Map<String, dynamic>>(_options); |
|
late BaseData<dynamic> _value; |
|
try { |
|
_value = BaseData<dynamic>.fromJson( |
|
_result.data!, |
|
(json) => json as dynamic, |
|
); |
|
} on Object catch (e, s) { |
|
errorLogger?.logError(e, s, _options); |
|
rethrow; |
|
} |
|
return _value; |
|
} |
|
|
|
@override |
|
Future<BaseData<dynamic>> recharge(Map<String, dynamic> param) async { |
|
final _extra = <String, dynamic>{}; |
|
final queryParameters = <String, dynamic>{}; |
|
final _headers = <String, dynamic>{}; |
|
final _data = <String, dynamic>{}; |
|
_data.addAll(param); |
|
final _options = _setStreamType<BaseData<dynamic>>(Options( |
|
method: 'POST', |
|
headers: _headers, |
|
extra: _extra, |
|
) |
|
.compose( |
|
_dio.options, |
|
'/wallet/recharge', |
|
queryParameters: queryParameters, |
|
data: _data, |
|
) |
|
.copyWith( |
|
baseUrl: _combineBaseUrls( |
|
_dio.options.baseUrl, |
|
baseUrl, |
|
))); |
|
final _result = await _dio.fetch<Map<String, dynamic>>(_options); |
|
late BaseData<dynamic> _value; |
|
try { |
|
_value = BaseData<dynamic>.fromJson( |
|
_result.data!, |
|
(json) => json as dynamic, |
|
); |
|
} on Object catch (e, s) { |
|
errorLogger?.logError(e, s, _options); |
|
rethrow; |
|
} |
|
return _value; |
|
} |
|
|
|
@override |
|
Future<BaseData<RechargeAct>> rechargeActList(String tenantCode) async { |
|
final _extra = <String, dynamic>{}; |
|
final queryParameters = <String, dynamic>{}; |
|
final _headers = <String, dynamic>{}; |
|
const Map<String, dynamic>? _data = null; |
|
final _options = _setStreamType<BaseData<RechargeAct>>(Options( |
|
method: 'GET', |
|
headers: _headers, |
|
extra: _extra, |
|
) |
|
.compose( |
|
_dio.options, |
|
'/wallet/rechargeActList?tenantCode=${tenantCode}', |
|
queryParameters: queryParameters, |
|
data: _data, |
|
) |
|
.copyWith( |
|
baseUrl: _combineBaseUrls( |
|
_dio.options.baseUrl, |
|
baseUrl, |
|
))); |
|
final _result = await _dio.fetch<Map<String, dynamic>>(_options); |
|
late BaseData<RechargeAct> _value; |
|
try { |
|
_value = BaseData<RechargeAct>.fromJson( |
|
_result.data!, |
|
(json) => RechargeAct.fromJson(json as Map<String, dynamic>), |
|
); |
|
} on Object catch (e, s) { |
|
errorLogger?.logError(e, s, _options); |
|
rethrow; |
|
} |
|
return _value; |
|
} |
|
|
|
@override |
|
Future<BaseData<dynamic>> receiveCoupon(String couponId) async { |
|
final _extra = <String, dynamic>{}; |
|
final queryParameters = <String, dynamic>{}; |
|
final _headers = <String, dynamic>{}; |
|
const Map<String, dynamic>? _data = null; |
|
final _options = _setStreamType<BaseData<dynamic>>(Options( |
|
method: 'GET', |
|
headers: _headers, |
|
extra: _extra, |
|
) |
|
.compose( |
|
_dio.options, |
|
'/coupon/receive?couponId=${couponId}', |
|
queryParameters: queryParameters, |
|
data: _data, |
|
) |
|
.copyWith( |
|
baseUrl: _combineBaseUrls( |
|
_dio.options.baseUrl, |
|
baseUrl, |
|
))); |
|
final _result = await _dio.fetch<Map<String, dynamic>>(_options); |
|
late BaseData<dynamic> _value; |
|
try { |
|
_value = BaseData<dynamic>.fromJson( |
|
_result.data!, |
|
(json) => json as dynamic, |
|
); |
|
} on Object catch (e, s) { |
|
errorLogger?.logError(e, s, _options); |
|
rethrow; |
|
} |
|
return _value; |
|
} |
|
|
|
@override |
|
Future<BaseData<PageInfo<ExchangeOrder>>> creditOrderList( |
|
Map<String, dynamic> param) async { |
|
final _extra = <String, dynamic>{}; |
|
final queryParameters = <String, dynamic>{}; |
|
final _headers = <String, dynamic>{}; |
|
final _data = <String, dynamic>{}; |
|
_data.addAll(param); |
|
final _options = _setStreamType<BaseData<PageInfo<ExchangeOrder>>>(Options( |
|
method: 'POST', |
|
headers: _headers, |
|
extra: _extra, |
|
) |
|
.compose( |
|
_dio.options, |
|
'/creditOrder/list', |
|
queryParameters: queryParameters, |
|
data: _data, |
|
) |
|
.copyWith( |
|
baseUrl: _combineBaseUrls( |
|
_dio.options.baseUrl, |
|
baseUrl, |
|
))); |
|
final _result = await _dio.fetch<Map<String, dynamic>>(_options); |
|
late BaseData<PageInfo<ExchangeOrder>> _value; |
|
try { |
|
_value = BaseData<PageInfo<ExchangeOrder>>.fromJson( |
|
_result.data!, |
|
(json) => PageInfo<ExchangeOrder>.fromJson( |
|
json as Map<String, dynamic>, |
|
(json) => ExchangeOrder.fromJson(json as Map<String, dynamic>), |
|
), |
|
); |
|
} on Object catch (e, s) { |
|
errorLogger?.logError(e, s, _options); |
|
rethrow; |
|
} |
|
return _value; |
|
} |
|
|
|
@override |
|
Future<BaseData<dynamic>> creditOrder(Map<String, dynamic> param) async { |
|
final _extra = <String, dynamic>{}; |
|
final queryParameters = <String, dynamic>{}; |
|
final _headers = <String, dynamic>{}; |
|
final _data = <String, dynamic>{}; |
|
_data.addAll(param); |
|
final _options = _setStreamType<BaseData<dynamic>>(Options( |
|
method: 'POST', |
|
headers: _headers, |
|
extra: _extra, |
|
) |
|
.compose( |
|
_dio.options, |
|
'/creditOrder/create', |
|
queryParameters: queryParameters, |
|
data: _data, |
|
) |
|
.copyWith( |
|
baseUrl: _combineBaseUrls( |
|
_dio.options.baseUrl, |
|
baseUrl, |
|
))); |
|
final _result = await _dio.fetch<Map<String, dynamic>>(_options); |
|
late BaseData<dynamic> _value; |
|
try { |
|
_value = BaseData<dynamic>.fromJson( |
|
_result.data!, |
|
(json) => json as dynamic, |
|
); |
|
} on Object catch (e, s) { |
|
errorLogger?.logError(e, s, _options); |
|
rethrow; |
|
} |
|
return _value; |
|
} |
|
|
|
@override |
|
Future<BaseData<dynamic>> addAddress(Map<String, dynamic> param) async { |
|
final _extra = <String, dynamic>{}; |
|
final queryParameters = <String, dynamic>{}; |
|
final _headers = <String, dynamic>{}; |
|
final _data = <String, dynamic>{}; |
|
_data.addAll(param); |
|
final _options = _setStreamType<BaseData<dynamic>>(Options( |
|
method: 'POST', |
|
headers: _headers, |
|
extra: _extra, |
|
) |
|
.compose( |
|
_dio.options, |
|
'/address/add', |
|
queryParameters: queryParameters, |
|
data: _data, |
|
) |
|
.copyWith( |
|
baseUrl: _combineBaseUrls( |
|
_dio.options.baseUrl, |
|
baseUrl, |
|
))); |
|
final _result = await _dio.fetch<Map<String, dynamic>>(_options); |
|
late BaseData<dynamic> _value; |
|
try { |
|
_value = BaseData<dynamic>.fromJson( |
|
_result.data!, |
|
(json) => json as dynamic, |
|
); |
|
} on Object catch (e, s) { |
|
errorLogger?.logError(e, s, _options); |
|
rethrow; |
|
} |
|
return _value; |
|
} |
|
|
|
@override |
|
Future<BaseData<dynamic>> deleteAddress(Map<String, dynamic> param) async { |
|
final _extra = <String, dynamic>{}; |
|
final queryParameters = <String, dynamic>{}; |
|
final _headers = <String, dynamic>{}; |
|
final _data = <String, dynamic>{}; |
|
_data.addAll(param); |
|
final _options = _setStreamType<BaseData<dynamic>>(Options( |
|
method: 'POST', |
|
headers: _headers, |
|
extra: _extra, |
|
) |
|
.compose( |
|
_dio.options, |
|
'/address/delete', |
|
queryParameters: queryParameters, |
|
data: _data, |
|
) |
|
.copyWith( |
|
baseUrl: _combineBaseUrls( |
|
_dio.options.baseUrl, |
|
baseUrl, |
|
))); |
|
final _result = await _dio.fetch<Map<String, dynamic>>(_options); |
|
late BaseData<dynamic> _value; |
|
try { |
|
_value = BaseData<dynamic>.fromJson( |
|
_result.data!, |
|
(json) => json as dynamic, |
|
); |
|
} on Object catch (e, s) { |
|
errorLogger?.logError(e, s, _options); |
|
rethrow; |
|
} |
|
return _value; |
|
} |
|
|
|
@override |
|
Future<BaseData<dynamic>> queryAddress(String id) async { |
|
final _extra = <String, dynamic>{}; |
|
final queryParameters = <String, dynamic>{}; |
|
final _headers = <String, dynamic>{}; |
|
const Map<String, dynamic>? _data = null; |
|
final _options = _setStreamType<BaseData<dynamic>>(Options( |
|
method: 'GET', |
|
headers: _headers, |
|
extra: _extra, |
|
) |
|
.compose( |
|
_dio.options, |
|
'/address/detail/${id}', |
|
queryParameters: queryParameters, |
|
data: _data, |
|
) |
|
.copyWith( |
|
baseUrl: _combineBaseUrls( |
|
_dio.options.baseUrl, |
|
baseUrl, |
|
))); |
|
final _result = await _dio.fetch<Map<String, dynamic>>(_options); |
|
late BaseData<dynamic> _value; |
|
try { |
|
_value = BaseData<dynamic>.fromJson( |
|
_result.data!, |
|
(json) => json as dynamic, |
|
); |
|
} on Object catch (e, s) { |
|
errorLogger?.logError(e, s, _options); |
|
rethrow; |
|
} |
|
return _value; |
|
} |
|
|
|
@override |
|
Future<BaseListData<Address>> queryMemberAddress() async { |
|
final _extra = <String, dynamic>{}; |
|
final queryParameters = <String, dynamic>{}; |
|
final _headers = <String, dynamic>{}; |
|
const Map<String, dynamic>? _data = null; |
|
final _options = _setStreamType<BaseListData<Address>>(Options( |
|
method: 'GET', |
|
headers: _headers, |
|
extra: _extra, |
|
) |
|
.compose( |
|
_dio.options, |
|
'/address/queryMemberAddress', |
|
queryParameters: queryParameters, |
|
data: _data, |
|
) |
|
.copyWith( |
|
baseUrl: _combineBaseUrls( |
|
_dio.options.baseUrl, |
|
baseUrl, |
|
))); |
|
final _result = await _dio.fetch<Map<String, dynamic>>(_options); |
|
late BaseListData<Address> _value; |
|
try { |
|
_value = BaseListData<Address>.fromJson( |
|
_result.data!, |
|
(json) => Address.fromJson(json as Map<String, dynamic>), |
|
); |
|
} on Object catch (e, s) { |
|
errorLogger?.logError(e, s, _options); |
|
rethrow; |
|
} |
|
return _value; |
|
} |
|
|
|
@override |
|
Future<BaseData<dynamic>> updateAddress(Map<String, dynamic> param) async { |
|
final _extra = <String, dynamic>{}; |
|
final queryParameters = <String, dynamic>{}; |
|
final _headers = <String, dynamic>{}; |
|
final _data = <String, dynamic>{}; |
|
_data.addAll(param); |
|
final _options = _setStreamType<BaseData<dynamic>>(Options( |
|
method: 'POST', |
|
headers: _headers, |
|
extra: _extra, |
|
) |
|
.compose( |
|
_dio.options, |
|
'/address/update', |
|
queryParameters: queryParameters, |
|
data: _data, |
|
) |
|
.copyWith( |
|
baseUrl: _combineBaseUrls( |
|
_dio.options.baseUrl, |
|
baseUrl, |
|
))); |
|
final _result = await _dio.fetch<Map<String, dynamic>>(_options); |
|
late BaseData<dynamic> _value; |
|
try { |
|
_value = BaseData<dynamic>.fromJson( |
|
_result.data!, |
|
(json) => json as dynamic, |
|
); |
|
} on Object catch (e, s) { |
|
errorLogger?.logError(e, s, _options); |
|
rethrow; |
|
} |
|
return _value; |
|
} |
|
|
|
@override |
|
Future<BaseData<PageInfo<Coupon>>> queryCoupon( |
|
Map<String, dynamic> param) async { |
|
final _extra = <String, dynamic>{}; |
|
final queryParameters = <String, dynamic>{}; |
|
final _headers = <String, dynamic>{}; |
|
final _data = <String, dynamic>{}; |
|
_data.addAll(param); |
|
final _options = _setStreamType<BaseData<PageInfo<Coupon>>>(Options( |
|
method: 'POST', |
|
headers: _headers, |
|
extra: _extra, |
|
) |
|
.compose( |
|
_dio.options, |
|
'/coupon/centreList', |
|
queryParameters: queryParameters, |
|
data: _data, |
|
) |
|
.copyWith( |
|
baseUrl: _combineBaseUrls( |
|
_dio.options.baseUrl, |
|
baseUrl, |
|
))); |
|
final _result = await _dio.fetch<Map<String, dynamic>>(_options); |
|
late BaseData<PageInfo<Coupon>> _value; |
|
try { |
|
_value = BaseData<PageInfo<Coupon>>.fromJson( |
|
_result.data!, |
|
(json) => PageInfo<Coupon>.fromJson( |
|
json as Map<String, dynamic>, |
|
(json) => Coupon.fromJson(json as Map<String, dynamic>), |
|
), |
|
); |
|
} on Object catch (e, s) { |
|
errorLogger?.logError(e, s, _options); |
|
rethrow; |
|
} |
|
return _value; |
|
} |
|
|
|
@override |
|
Future<BaseData<PageInfo<Coupon>>> queryCard( |
|
Map<String, dynamic> param) async { |
|
final _extra = <String, dynamic>{}; |
|
final queryParameters = <String, dynamic>{}; |
|
final _headers = <String, dynamic>{}; |
|
final _data = <String, dynamic>{}; |
|
_data.addAll(param); |
|
final _options = _setStreamType<BaseData<PageInfo<Coupon>>>(Options( |
|
method: 'POST', |
|
headers: _headers, |
|
extra: _extra, |
|
) |
|
.compose( |
|
_dio.options, |
|
'/coupon/packageList', |
|
queryParameters: queryParameters, |
|
data: _data, |
|
) |
|
.copyWith( |
|
baseUrl: _combineBaseUrls( |
|
_dio.options.baseUrl, |
|
baseUrl, |
|
))); |
|
final _result = await _dio.fetch<Map<String, dynamic>>(_options); |
|
late BaseData<PageInfo<Coupon>> _value; |
|
try { |
|
_value = BaseData<PageInfo<Coupon>>.fromJson( |
|
_result.data!, |
|
(json) => PageInfo<Coupon>.fromJson( |
|
json as Map<String, dynamic>, |
|
(json) => Coupon.fromJson(json as Map<String, dynamic>), |
|
), |
|
); |
|
} on Object catch (e, s) { |
|
errorLogger?.logError(e, s, _options); |
|
rethrow; |
|
} |
|
return _value; |
|
} |
|
|
|
@override |
|
Future<BaseListData<Store>> queryStore(Map<String, dynamic> param) async { |
|
final _extra = <String, dynamic>{}; |
|
final queryParameters = <String, dynamic>{}; |
|
final _headers = <String, dynamic>{}; |
|
final _data = <String, dynamic>{}; |
|
_data.addAll(param); |
|
final _options = _setStreamType<BaseListData<Store>>(Options( |
|
method: 'POST', |
|
headers: _headers, |
|
extra: _extra, |
|
) |
|
.compose( |
|
_dio.options, |
|
'/store/list', |
|
queryParameters: queryParameters, |
|
data: _data, |
|
) |
|
.copyWith( |
|
baseUrl: _combineBaseUrls( |
|
_dio.options.baseUrl, |
|
baseUrl, |
|
))); |
|
final _result = await _dio.fetch<Map<String, dynamic>>(_options); |
|
late BaseListData<Store> _value; |
|
try { |
|
_value = BaseListData<Store>.fromJson( |
|
_result.data!, |
|
(json) => Store.fromJson(json as Map<String, dynamic>), |
|
); |
|
} on Object catch (e, s) { |
|
errorLogger?.logError(e, s, _options); |
|
rethrow; |
|
} |
|
return _value; |
|
} |
|
|
|
@override |
|
Future<BaseData<PageInfo<Activity>>> informationList( |
|
Map<String, dynamic> param) async { |
|
final _extra = <String, dynamic>{}; |
|
final queryParameters = <String, dynamic>{}; |
|
final _headers = <String, dynamic>{}; |
|
final _data = <String, dynamic>{}; |
|
_data.addAll(param); |
|
final _options = _setStreamType<BaseData<PageInfo<Activity>>>(Options( |
|
method: 'POST', |
|
headers: _headers, |
|
extra: _extra, |
|
) |
|
.compose( |
|
_dio.options, |
|
'/information/list', |
|
queryParameters: queryParameters, |
|
data: _data, |
|
) |
|
.copyWith( |
|
baseUrl: _combineBaseUrls( |
|
_dio.options.baseUrl, |
|
baseUrl, |
|
))); |
|
final _result = await _dio.fetch<Map<String, dynamic>>(_options); |
|
late BaseData<PageInfo<Activity>> _value; |
|
try { |
|
_value = BaseData<PageInfo<Activity>>.fromJson( |
|
_result.data!, |
|
(json) => PageInfo<Activity>.fromJson( |
|
json as Map<String, dynamic>, |
|
(json) => Activity.fromJson(json as Map<String, dynamic>), |
|
), |
|
); |
|
} on Object catch (e, s) { |
|
errorLogger?.logError(e, s, _options); |
|
rethrow; |
|
} |
|
return _value; |
|
} |
|
|
|
@override |
|
Future<BaseData<Article>> informationInfo(String id) async { |
|
final _extra = <String, dynamic>{}; |
|
final queryParameters = <String, dynamic>{}; |
|
final _headers = <String, dynamic>{}; |
|
const Map<String, dynamic>? _data = null; |
|
final _options = _setStreamType<BaseData<Article>>(Options( |
|
method: 'GET', |
|
headers: _headers, |
|
extra: _extra, |
|
) |
|
.compose( |
|
_dio.options, |
|
'/information/${id}', |
|
queryParameters: queryParameters, |
|
data: _data, |
|
) |
|
.copyWith( |
|
baseUrl: _combineBaseUrls( |
|
_dio.options.baseUrl, |
|
baseUrl, |
|
))); |
|
final _result = await _dio.fetch<Map<String, dynamic>>(_options); |
|
late BaseData<Article> _value; |
|
try { |
|
_value = BaseData<Article>.fromJson( |
|
_result.data!, |
|
(json) => Article.fromJson(json as Map<String, dynamic>), |
|
); |
|
} on Object catch (e, s) { |
|
errorLogger?.logError(e, s, _options); |
|
rethrow; |
|
} |
|
return _value; |
|
} |
|
|
|
@override |
|
Future<BaseData<Activity>> activityInfo(String id) async { |
|
final _extra = <String, dynamic>{}; |
|
final queryParameters = <String, dynamic>{}; |
|
final _headers = <String, dynamic>{}; |
|
const Map<String, dynamic>? _data = null; |
|
final _options = _setStreamType<BaseData<Activity>>(Options( |
|
method: 'GET', |
|
headers: _headers, |
|
extra: _extra, |
|
) |
|
.compose( |
|
_dio.options, |
|
'/information/${id}', |
|
queryParameters: queryParameters, |
|
data: _data, |
|
) |
|
.copyWith( |
|
baseUrl: _combineBaseUrls( |
|
_dio.options.baseUrl, |
|
baseUrl, |
|
))); |
|
final _result = await _dio.fetch<Map<String, dynamic>>(_options); |
|
late BaseData<Activity> _value; |
|
try { |
|
_value = BaseData<Activity>.fromJson( |
|
_result.data!, |
|
(json) => Activity.fromJson(json as Map<String, dynamic>), |
|
); |
|
} on Object catch (e, s) { |
|
errorLogger?.logError(e, s, _options); |
|
rethrow; |
|
} |
|
return _value; |
|
} |
|
|
|
@override |
|
Future<BaseData<dynamic>> creditOrderReceive(String id) async { |
|
final _extra = <String, dynamic>{}; |
|
final queryParameters = <String, dynamic>{}; |
|
final _headers = <String, dynamic>{}; |
|
const Map<String, dynamic>? _data = null; |
|
final _options = _setStreamType<BaseData<dynamic>>(Options( |
|
method: 'GET', |
|
headers: _headers, |
|
extra: _extra, |
|
) |
|
.compose( |
|
_dio.options, |
|
'/creditOrder/receive/${id}', |
|
queryParameters: queryParameters, |
|
data: _data, |
|
) |
|
.copyWith( |
|
baseUrl: _combineBaseUrls( |
|
_dio.options.baseUrl, |
|
baseUrl, |
|
))); |
|
final _result = await _dio.fetch<Map<String, dynamic>>(_options); |
|
late BaseData<dynamic> _value; |
|
try { |
|
_value = BaseData<dynamic>.fromJson( |
|
_result.data!, |
|
(json) => json as dynamic, |
|
); |
|
} on Object catch (e, s) { |
|
errorLogger?.logError(e, s, _options); |
|
rethrow; |
|
} |
|
return _value; |
|
} |
|
|
|
@override |
|
Future<BaseData<BrandData>> queryHome() async { |
|
final _extra = <String, dynamic>{}; |
|
final queryParameters = <String, dynamic>{}; |
|
final _headers = <String, dynamic>{}; |
|
const Map<String, dynamic>? _data = null; |
|
final _options = _setStreamType<BaseData<BrandData>>(Options( |
|
method: 'GET', |
|
headers: _headers, |
|
extra: _extra, |
|
) |
|
.compose( |
|
_dio.options, |
|
'/home/home', |
|
queryParameters: queryParameters, |
|
data: _data, |
|
) |
|
.copyWith( |
|
baseUrl: _combineBaseUrls( |
|
_dio.options.baseUrl, |
|
baseUrl, |
|
))); |
|
final _result = await _dio.fetch<Map<String, dynamic>>(_options); |
|
late BaseData<BrandData> _value; |
|
try { |
|
_value = BaseData<BrandData>.fromJson( |
|
_result.data!, |
|
(json) => BrandData.fromJson(json as Map<String, dynamic>), |
|
); |
|
} on Object catch (e, s) { |
|
errorLogger?.logError(e, s, _options); |
|
rethrow; |
|
} |
|
return _value; |
|
} |
|
|
|
@override |
|
Future<BaseData<dynamic>> queryStoreInfo(String id) async { |
|
final _extra = <String, dynamic>{}; |
|
final queryParameters = <String, dynamic>{}; |
|
final _headers = <String, dynamic>{}; |
|
const Map<String, dynamic>? _data = null; |
|
final _options = _setStreamType<BaseData<dynamic>>(Options( |
|
method: 'GET', |
|
headers: _headers, |
|
extra: _extra, |
|
) |
|
.compose( |
|
_dio.options, |
|
'/store/${id}', |
|
queryParameters: queryParameters, |
|
data: _data, |
|
) |
|
.copyWith( |
|
baseUrl: _combineBaseUrls( |
|
_dio.options.baseUrl, |
|
baseUrl, |
|
))); |
|
final _result = await _dio.fetch<Map<String, dynamic>>(_options); |
|
late BaseData<dynamic> _value; |
|
try { |
|
_value = BaseData<dynamic>.fromJson( |
|
_result.data!, |
|
(json) => json as dynamic, |
|
); |
|
} on Object catch (e, s) { |
|
errorLogger?.logError(e, s, _options); |
|
rethrow; |
|
} |
|
return _value; |
|
} |
|
|
|
@override |
|
Future<BaseData<PageInfo<Article>>> queryArticle( |
|
Map<String, dynamic> param) async { |
|
final _extra = <String, dynamic>{}; |
|
final queryParameters = <String, dynamic>{}; |
|
final _headers = <String, dynamic>{}; |
|
final _data = <String, dynamic>{}; |
|
_data.addAll(param); |
|
final _options = _setStreamType<BaseData<PageInfo<Article>>>(Options( |
|
method: 'POST', |
|
headers: _headers, |
|
extra: _extra, |
|
) |
|
.compose( |
|
_dio.options, |
|
'/information/list', |
|
queryParameters: queryParameters, |
|
data: _data, |
|
) |
|
.copyWith( |
|
baseUrl: _combineBaseUrls( |
|
_dio.options.baseUrl, |
|
baseUrl, |
|
))); |
|
final _result = await _dio.fetch<Map<String, dynamic>>(_options); |
|
late BaseData<PageInfo<Article>> _value; |
|
try { |
|
_value = BaseData<PageInfo<Article>>.fromJson( |
|
_result.data!, |
|
(json) => PageInfo<Article>.fromJson( |
|
json as Map<String, dynamic>, |
|
(json) => Article.fromJson(json as Map<String, dynamic>), |
|
), |
|
); |
|
} on Object catch (e, s) { |
|
errorLogger?.logError(e, s, _options); |
|
rethrow; |
|
} |
|
return _value; |
|
} |
|
|
|
@override |
|
Future<BaseData<PageInfo<BannerData>>> queryBanner( |
|
Map<String, dynamic> param) async { |
|
final _extra = <String, dynamic>{}; |
|
final queryParameters = <String, dynamic>{}; |
|
final _headers = <String, dynamic>{}; |
|
final _data = <String, dynamic>{}; |
|
_data.addAll(param); |
|
final _options = _setStreamType<BaseData<PageInfo<BannerData>>>(Options( |
|
method: 'POST', |
|
headers: _headers, |
|
extra: _extra, |
|
) |
|
.compose( |
|
_dio.options, |
|
'/banner/page', |
|
queryParameters: queryParameters, |
|
data: _data, |
|
) |
|
.copyWith( |
|
baseUrl: _combineBaseUrls( |
|
_dio.options.baseUrl, |
|
baseUrl, |
|
))); |
|
final _result = await _dio.fetch<Map<String, dynamic>>(_options); |
|
late BaseData<PageInfo<BannerData>> _value; |
|
try { |
|
_value = BaseData<PageInfo<BannerData>>.fromJson( |
|
_result.data!, |
|
(json) => PageInfo<BannerData>.fromJson( |
|
json as Map<String, dynamic>, |
|
(json) => BannerData.fromJson(json as Map<String, dynamic>), |
|
), |
|
); |
|
} on Object catch (e, s) { |
|
errorLogger?.logError(e, s, _options); |
|
rethrow; |
|
} |
|
return _value; |
|
} |
|
|
|
@override |
|
Future<BaseData<dynamic>> queryHomeBrand() async { |
|
final _extra = <String, dynamic>{}; |
|
final queryParameters = <String, dynamic>{}; |
|
final _headers = <String, dynamic>{}; |
|
const Map<String, dynamic>? _data = null; |
|
final _options = _setStreamType<BaseData<dynamic>>(Options( |
|
method: 'GET', |
|
headers: _headers, |
|
extra: _extra, |
|
) |
|
.compose( |
|
_dio.options, |
|
'/home/brand', |
|
queryParameters: queryParameters, |
|
data: _data, |
|
) |
|
.copyWith( |
|
baseUrl: _combineBaseUrls( |
|
_dio.options.baseUrl, |
|
baseUrl, |
|
))); |
|
final _result = await _dio.fetch<Map<String, dynamic>>(_options); |
|
late BaseData<dynamic> _value; |
|
try { |
|
_value = BaseData<dynamic>.fromJson( |
|
_result.data!, |
|
(json) => json as dynamic, |
|
); |
|
} on Object catch (e, s) { |
|
errorLogger?.logError(e, s, _options); |
|
rethrow; |
|
} |
|
return _value; |
|
} |
|
|
|
@override |
|
Future<BaseData<dynamic>> minLogin(String storeId) async { |
|
final _extra = <String, dynamic>{}; |
|
final queryParameters = <String, dynamic>{}; |
|
final _headers = <String, dynamic>{}; |
|
const Map<String, dynamic>? _data = null; |
|
final _options = _setStreamType<BaseData<dynamic>>(Options( |
|
method: 'GET', |
|
headers: _headers, |
|
extra: _extra, |
|
) |
|
.compose( |
|
_dio.options, |
|
'/auth/mini/login/${storeId}', |
|
queryParameters: queryParameters, |
|
data: _data, |
|
) |
|
.copyWith( |
|
baseUrl: _combineBaseUrls( |
|
_dio.options.baseUrl, |
|
baseUrl, |
|
))); |
|
final _result = await _dio.fetch<Map<String, dynamic>>(_options); |
|
late BaseData<dynamic> _value; |
|
try { |
|
_value = BaseData<dynamic>.fromJson( |
|
_result.data!, |
|
(json) => json as dynamic, |
|
); |
|
} on Object catch (e, s) { |
|
errorLogger?.logError(e, s, _options); |
|
rethrow; |
|
} |
|
return _value; |
|
} |
|
|
|
@override |
|
Future<BaseData<PageInfo<UserBill>>> queryBillInfo( |
|
Map<String, dynamic> param) async { |
|
final _extra = <String, dynamic>{}; |
|
final queryParameters = <String, dynamic>{}; |
|
final _headers = <String, dynamic>{}; |
|
final _data = <String, dynamic>{}; |
|
_data.addAll(param); |
|
final _options = _setStreamType<BaseData<PageInfo<UserBill>>>(Options( |
|
method: 'POST', |
|
headers: _headers, |
|
extra: _extra, |
|
) |
|
.compose( |
|
_dio.options, |
|
'/member/listBill', |
|
queryParameters: queryParameters, |
|
data: _data, |
|
) |
|
.copyWith( |
|
baseUrl: _combineBaseUrls( |
|
_dio.options.baseUrl, |
|
baseUrl, |
|
))); |
|
final _result = await _dio.fetch<Map<String, dynamic>>(_options); |
|
late BaseData<PageInfo<UserBill>> _value; |
|
try { |
|
_value = BaseData<PageInfo<UserBill>>.fromJson( |
|
_result.data!, |
|
(json) => PageInfo<UserBill>.fromJson( |
|
json as Map<String, dynamic>, |
|
(json) => UserBill.fromJson(json as Map<String, dynamic>), |
|
), |
|
); |
|
} on Object catch (e, s) { |
|
errorLogger?.logError(e, s, _options); |
|
rethrow; |
|
} |
|
return _value; |
|
} |
|
|
|
@override |
|
Future<BaseListData<Rank>> rankList() async { |
|
final _extra = <String, dynamic>{}; |
|
final queryParameters = <String, dynamic>{}; |
|
final _headers = <String, dynamic>{}; |
|
const Map<String, dynamic>? _data = null; |
|
final _options = _setStreamType<BaseListData<Rank>>(Options( |
|
method: 'GET', |
|
headers: _headers, |
|
extra: _extra, |
|
) |
|
.compose( |
|
_dio.options, |
|
'/member/rankList', |
|
queryParameters: queryParameters, |
|
data: _data, |
|
) |
|
.copyWith( |
|
baseUrl: _combineBaseUrls( |
|
_dio.options.baseUrl, |
|
baseUrl, |
|
))); |
|
final _result = await _dio.fetch<Map<String, dynamic>>(_options); |
|
late BaseListData<Rank> _value; |
|
try { |
|
_value = BaseListData<Rank>.fromJson( |
|
_result.data!, |
|
(json) => Rank.fromJson(json as Map<String, dynamic>), |
|
); |
|
} on Object catch (e, s) { |
|
errorLogger?.logError(e, s, _options); |
|
rethrow; |
|
} |
|
return _value; |
|
} |
|
|
|
@override |
|
Future<BaseData<PageInfo<OrderInfo>>> orderList( |
|
Map<String, dynamic> param) async { |
|
final _extra = <String, dynamic>{}; |
|
final queryParameters = <String, dynamic>{}; |
|
final _headers = <String, dynamic>{}; |
|
final _data = <String, dynamic>{}; |
|
_data.addAll(param); |
|
final _options = _setStreamType<BaseData<PageInfo<OrderInfo>>>(Options( |
|
method: 'POST', |
|
headers: _headers, |
|
extra: _extra, |
|
) |
|
.compose( |
|
_dio.options, |
|
'/order/list', |
|
queryParameters: queryParameters, |
|
data: _data, |
|
) |
|
.copyWith( |
|
baseUrl: _combineBaseUrls( |
|
_dio.options.baseUrl, |
|
baseUrl, |
|
))); |
|
final _result = await _dio.fetch<Map<String, dynamic>>(_options); |
|
late BaseData<PageInfo<OrderInfo>> _value; |
|
try { |
|
_value = BaseData<PageInfo<OrderInfo>>.fromJson( |
|
_result.data!, |
|
(json) => PageInfo<OrderInfo>.fromJson( |
|
json as Map<String, dynamic>, |
|
(json) => OrderInfo.fromJson(json as Map<String, dynamic>), |
|
), |
|
); |
|
} on Object catch (e, s) { |
|
errorLogger?.logError(e, s, _options); |
|
rethrow; |
|
} |
|
return _value; |
|
} |
|
|
|
@override |
|
Future<BaseData<OrderInfo>> orderDetail(String id) async { |
|
final _extra = <String, dynamic>{}; |
|
final queryParameters = <String, dynamic>{}; |
|
final _headers = <String, dynamic>{}; |
|
const Map<String, dynamic>? _data = null; |
|
final _options = _setStreamType<BaseData<OrderInfo>>(Options( |
|
method: 'GET', |
|
headers: _headers, |
|
extra: _extra, |
|
) |
|
.compose( |
|
_dio.options, |
|
'/order/orderDetail?id=${id}', |
|
queryParameters: queryParameters, |
|
data: _data, |
|
) |
|
.copyWith( |
|
baseUrl: _combineBaseUrls( |
|
_dio.options.baseUrl, |
|
baseUrl, |
|
))); |
|
final _result = await _dio.fetch<Map<String, dynamic>>(_options); |
|
late BaseData<OrderInfo> _value; |
|
try { |
|
_value = BaseData<OrderInfo>.fromJson( |
|
_result.data!, |
|
(json) => OrderInfo.fromJson(json as Map<String, dynamic>), |
|
); |
|
} on Object catch (e, s) { |
|
errorLogger?.logError(e, s, _options); |
|
rethrow; |
|
} |
|
return _value; |
|
} |
|
|
|
@override |
|
Future<BaseData<dynamic>> continuePay(Map<String, dynamic> param) async { |
|
final _extra = <String, dynamic>{}; |
|
final queryParameters = <String, dynamic>{}; |
|
final _headers = <String, dynamic>{}; |
|
final _data = <String, dynamic>{}; |
|
_data.addAll(param); |
|
final _options = _setStreamType<BaseData<dynamic>>(Options( |
|
method: 'POST', |
|
headers: _headers, |
|
extra: _extra, |
|
) |
|
.compose( |
|
_dio.options, |
|
'/order/continuePay', |
|
queryParameters: queryParameters, |
|
data: _data, |
|
) |
|
.copyWith( |
|
baseUrl: _combineBaseUrls( |
|
_dio.options.baseUrl, |
|
baseUrl, |
|
))); |
|
final _result = await _dio.fetch<Map<String, dynamic>>(_options); |
|
late BaseData<dynamic> _value; |
|
try { |
|
_value = BaseData<dynamic>.fromJson( |
|
_result.data!, |
|
(json) => json as dynamic, |
|
); |
|
} on Object catch (e, s) { |
|
errorLogger?.logError(e, s, _options); |
|
rethrow; |
|
} |
|
return _value; |
|
} |
|
|
|
@override |
|
Future<BaseData<dynamic>> receiveToCard(String id) async { |
|
final _extra = <String, dynamic>{}; |
|
final queryParameters = <String, dynamic>{}; |
|
final _headers = <String, dynamic>{}; |
|
const Map<String, dynamic>? _data = null; |
|
final _options = _setStreamType<BaseData<dynamic>>(Options( |
|
method: 'GET', |
|
headers: _headers, |
|
extra: _extra, |
|
) |
|
.compose( |
|
_dio.options, |
|
'/creditOrder/receive/${id}', |
|
queryParameters: queryParameters, |
|
data: _data, |
|
) |
|
.copyWith( |
|
baseUrl: _combineBaseUrls( |
|
_dio.options.baseUrl, |
|
baseUrl, |
|
))); |
|
final _result = await _dio.fetch<Map<String, dynamic>>(_options); |
|
late BaseData<dynamic> _value; |
|
try { |
|
_value = BaseData<dynamic>.fromJson( |
|
_result.data!, |
|
(json) => json as dynamic, |
|
); |
|
} on Object catch (e, s) { |
|
errorLogger?.logError(e, s, _options); |
|
rethrow; |
|
} |
|
return _value; |
|
} |
|
|
|
@override |
|
Future<BaseListData<VipCard>> vipList(Map<String, dynamic> param) async { |
|
final _extra = <String, dynamic>{}; |
|
final queryParameters = <String, dynamic>{}; |
|
final _headers = <String, dynamic>{}; |
|
final _data = <String, dynamic>{}; |
|
_data.addAll(param); |
|
final _options = _setStreamType<BaseListData<VipCard>>(Options( |
|
method: 'POST', |
|
headers: _headers, |
|
extra: _extra, |
|
) |
|
.compose( |
|
_dio.options, |
|
'/member/vipList', |
|
queryParameters: queryParameters, |
|
data: _data, |
|
) |
|
.copyWith( |
|
baseUrl: _combineBaseUrls( |
|
_dio.options.baseUrl, |
|
baseUrl, |
|
))); |
|
final _result = await _dio.fetch<Map<String, dynamic>>(_options); |
|
late BaseListData<VipCard> _value; |
|
try { |
|
_value = BaseListData<VipCard>.fromJson( |
|
_result.data!, |
|
(json) => VipCard.fromJson(json as Map<String, dynamic>), |
|
); |
|
} on Object catch (e, s) { |
|
errorLogger?.logError(e, s, _options); |
|
rethrow; |
|
} |
|
return _value; |
|
} |
|
|
|
@override |
|
Future<BaseData<VipCard>> vipDetail(Map<String, dynamic> param) async { |
|
final _extra = <String, dynamic>{}; |
|
final queryParameters = <String, dynamic>{}; |
|
final _headers = <String, dynamic>{}; |
|
final _data = <String, dynamic>{}; |
|
_data.addAll(param); |
|
final _options = _setStreamType<BaseData<VipCard>>(Options( |
|
method: 'POST', |
|
headers: _headers, |
|
extra: _extra, |
|
) |
|
.compose( |
|
_dio.options, |
|
'/member/vipDetail', |
|
queryParameters: queryParameters, |
|
data: _data, |
|
) |
|
.copyWith( |
|
baseUrl: _combineBaseUrls( |
|
_dio.options.baseUrl, |
|
baseUrl, |
|
))); |
|
final _result = await _dio.fetch<Map<String, dynamic>>(_options); |
|
late BaseData<VipCard> _value; |
|
try { |
|
_value = BaseData<VipCard>.fromJson( |
|
_result.data!, |
|
(json) => VipCard.fromJson(json as Map<String, dynamic>), |
|
); |
|
} on Object catch (e, s) { |
|
errorLogger?.logError(e, s, _options); |
|
rethrow; |
|
} |
|
return _value; |
|
} |
|
|
|
@override |
|
Future<BaseData<PageInfo<Message>>> msgList( |
|
Map<String, dynamic> param) async { |
|
final _extra = <String, dynamic>{}; |
|
final queryParameters = <String, dynamic>{}; |
|
final _headers = <String, dynamic>{}; |
|
final _data = <String, dynamic>{}; |
|
_data.addAll(param); |
|
final _options = _setStreamType<BaseData<PageInfo<Message>>>(Options( |
|
method: 'POST', |
|
headers: _headers, |
|
extra: _extra, |
|
) |
|
.compose( |
|
_dio.options, |
|
'/app-msg/list', |
|
queryParameters: queryParameters, |
|
data: _data, |
|
) |
|
.copyWith( |
|
baseUrl: _combineBaseUrls( |
|
_dio.options.baseUrl, |
|
baseUrl, |
|
))); |
|
final _result = await _dio.fetch<Map<String, dynamic>>(_options); |
|
late BaseData<PageInfo<Message>> _value; |
|
try { |
|
_value = BaseData<PageInfo<Message>>.fromJson( |
|
_result.data!, |
|
(json) => PageInfo<Message>.fromJson( |
|
json as Map<String, dynamic>, |
|
(json) => Message.fromJson(json as Map<String, dynamic>), |
|
), |
|
); |
|
} on Object catch (e, s) { |
|
errorLogger?.logError(e, s, _options); |
|
rethrow; |
|
} |
|
return _value; |
|
} |
|
|
|
@override |
|
Future<ClickWordCaptchaModel> captchaGet(Map<String, dynamic> param) async { |
|
final _extra = <String, dynamic>{}; |
|
final queryParameters = <String, dynamic>{}; |
|
final _headers = <String, dynamic>{}; |
|
final _data = <String, dynamic>{}; |
|
_data.addAll(param); |
|
final _options = _setStreamType<ClickWordCaptchaModel>(Options( |
|
method: 'POST', |
|
headers: _headers, |
|
extra: _extra, |
|
) |
|
.compose( |
|
_dio.options, |
|
'/captcha/get', |
|
queryParameters: queryParameters, |
|
data: _data, |
|
) |
|
.copyWith( |
|
baseUrl: _combineBaseUrls( |
|
_dio.options.baseUrl, |
|
baseUrl, |
|
))); |
|
final _result = await _dio.fetch<Map<String, dynamic>>(_options); |
|
late ClickWordCaptchaModel _value; |
|
try { |
|
_value = ClickWordCaptchaModel.fromJson(_result.data!); |
|
} on Object catch (e, s) { |
|
errorLogger?.logError(e, s, _options); |
|
rethrow; |
|
} |
|
return _value; |
|
} |
|
|
|
@override |
|
Future<bool> captchaCheck(Map<String, dynamic> param) async { |
|
final _extra = <String, dynamic>{}; |
|
final queryParameters = <String, dynamic>{}; |
|
final _headers = <String, dynamic>{}; |
|
final _data = <String, dynamic>{}; |
|
_data.addAll(param); |
|
final _options = _setStreamType<bool>(Options( |
|
method: 'POST', |
|
headers: _headers, |
|
extra: _extra, |
|
) |
|
.compose( |
|
_dio.options, |
|
'/captcha/check', |
|
queryParameters: queryParameters, |
|
data: _data, |
|
) |
|
.copyWith( |
|
baseUrl: _combineBaseUrls( |
|
_dio.options.baseUrl, |
|
baseUrl, |
|
))); |
|
final _result = await _dio.fetch<bool>(_options); |
|
late bool _value; |
|
try { |
|
_value = _result.data!; |
|
} on Object catch (e, s) { |
|
errorLogger?.logError(e, s, _options); |
|
rethrow; |
|
} |
|
return _value; |
|
} |
|
|
|
@override |
|
Future<BaseData<dynamic>> queryMsg(String id) async { |
|
final _extra = <String, dynamic>{}; |
|
final queryParameters = <String, dynamic>{}; |
|
final _headers = <String, dynamic>{}; |
|
const Map<String, dynamic>? _data = null; |
|
final _options = _setStreamType<BaseData<dynamic>>(Options( |
|
method: 'GET', |
|
headers: _headers, |
|
extra: _extra, |
|
) |
|
.compose( |
|
_dio.options, |
|
'/app-msg/${id}', |
|
queryParameters: queryParameters, |
|
data: _data, |
|
) |
|
.copyWith( |
|
baseUrl: _combineBaseUrls( |
|
_dio.options.baseUrl, |
|
baseUrl, |
|
))); |
|
final _result = await _dio.fetch<Map<String, dynamic>>(_options); |
|
late BaseData<dynamic> _value; |
|
try { |
|
_value = BaseData<dynamic>.fromJson( |
|
_result.data!, |
|
(json) => json as dynamic, |
|
); |
|
} on Object catch (e, s) { |
|
errorLogger?.logError(e, s, _options); |
|
rethrow; |
|
} |
|
return _value; |
|
} |
|
|
|
@override |
|
Future<BaseListData<MsgStats>> stats() async { |
|
final _extra = <String, dynamic>{}; |
|
final queryParameters = <String, dynamic>{}; |
|
final _headers = <String, dynamic>{}; |
|
const Map<String, dynamic>? _data = null; |
|
final _options = _setStreamType<BaseListData<MsgStats>>(Options( |
|
method: 'GET', |
|
headers: _headers, |
|
extra: _extra, |
|
) |
|
.compose( |
|
_dio.options, |
|
'/app-msg/stats', |
|
queryParameters: queryParameters, |
|
data: _data, |
|
) |
|
.copyWith( |
|
baseUrl: _combineBaseUrls( |
|
_dio.options.baseUrl, |
|
baseUrl, |
|
))); |
|
final _result = await _dio.fetch<Map<String, dynamic>>(_options); |
|
late BaseListData<MsgStats> _value; |
|
try { |
|
_value = BaseListData<MsgStats>.fromJson( |
|
_result.data!, |
|
(json) => MsgStats.fromJson(json as Map<String, dynamic>), |
|
); |
|
} on Object catch (e, s) { |
|
errorLogger?.logError(e, s, _options); |
|
rethrow; |
|
} |
|
return _value; |
|
} |
|
|
|
@override |
|
Future<BaseData<dynamic>> informationLikes(String id) async { |
|
final _extra = <String, dynamic>{}; |
|
final queryParameters = <String, dynamic>{}; |
|
final _headers = <String, dynamic>{}; |
|
const Map<String, dynamic>? _data = null; |
|
final _options = _setStreamType<BaseData<dynamic>>(Options( |
|
method: 'GET', |
|
headers: _headers, |
|
extra: _extra, |
|
) |
|
.compose( |
|
_dio.options, |
|
'/information/likes/${id}', |
|
queryParameters: queryParameters, |
|
data: _data, |
|
) |
|
.copyWith( |
|
baseUrl: _combineBaseUrls( |
|
_dio.options.baseUrl, |
|
baseUrl, |
|
))); |
|
final _result = await _dio.fetch<Map<String, dynamic>>(_options); |
|
late BaseData<dynamic> _value; |
|
try { |
|
_value = BaseData<dynamic>.fromJson( |
|
_result.data!, |
|
(json) => json as dynamic, |
|
); |
|
} on Object catch (e, s) { |
|
errorLogger?.logError(e, s, _options); |
|
rethrow; |
|
} |
|
return _value; |
|
} |
|
|
|
@override |
|
Future<BaseData<dynamic>> memberComment(Map<String, dynamic> param) async { |
|
final _extra = <String, dynamic>{}; |
|
final queryParameters = <String, dynamic>{}; |
|
final _headers = <String, dynamic>{}; |
|
final _data = <String, dynamic>{}; |
|
_data.addAll(param); |
|
final _options = _setStreamType<BaseData<dynamic>>(Options( |
|
method: 'POST', |
|
headers: _headers, |
|
extra: _extra, |
|
) |
|
.compose( |
|
_dio.options, |
|
'/memberComment', |
|
queryParameters: queryParameters, |
|
data: _data, |
|
) |
|
.copyWith( |
|
baseUrl: _combineBaseUrls( |
|
_dio.options.baseUrl, |
|
baseUrl, |
|
))); |
|
final _result = await _dio.fetch<Map<String, dynamic>>(_options); |
|
late BaseData<dynamic> _value; |
|
try { |
|
_value = BaseData<dynamic>.fromJson( |
|
_result.data!, |
|
(json) => json as dynamic, |
|
); |
|
} on Object catch (e, s) { |
|
errorLogger?.logError(e, s, _options); |
|
rethrow; |
|
} |
|
return _value; |
|
} |
|
|
|
@override |
|
Future<BaseData<PageInfo<MemberComment>>> memberCommentList( |
|
Map<String, dynamic> param) async { |
|
final _extra = <String, dynamic>{}; |
|
final queryParameters = <String, dynamic>{}; |
|
final _headers = <String, dynamic>{}; |
|
final _data = <String, dynamic>{}; |
|
_data.addAll(param); |
|
final _options = _setStreamType<BaseData<PageInfo<MemberComment>>>(Options( |
|
method: 'POST', |
|
headers: _headers, |
|
extra: _extra, |
|
) |
|
.compose( |
|
_dio.options, |
|
'/memberComment/list', |
|
queryParameters: queryParameters, |
|
data: _data, |
|
) |
|
.copyWith( |
|
baseUrl: _combineBaseUrls( |
|
_dio.options.baseUrl, |
|
baseUrl, |
|
))); |
|
final _result = await _dio.fetch<Map<String, dynamic>>(_options); |
|
late BaseData<PageInfo<MemberComment>> _value; |
|
try { |
|
_value = BaseData<PageInfo<MemberComment>>.fromJson( |
|
_result.data!, |
|
(json) => PageInfo<MemberComment>.fromJson( |
|
json as Map<String, dynamic>, |
|
(json) => MemberComment.fromJson(json as Map<String, dynamic>), |
|
), |
|
); |
|
} on Object catch (e, s) { |
|
errorLogger?.logError(e, s, _options); |
|
rethrow; |
|
} |
|
return _value; |
|
} |
|
|
|
@override |
|
Future<BaseData<dynamic>> commentLike(String id) async { |
|
final _extra = <String, dynamic>{}; |
|
final queryParameters = <String, dynamic>{}; |
|
final _headers = <String, dynamic>{}; |
|
const Map<String, dynamic>? _data = null; |
|
final _options = _setStreamType<BaseData<dynamic>>(Options( |
|
method: 'GET', |
|
headers: _headers, |
|
extra: _extra, |
|
) |
|
.compose( |
|
_dio.options, |
|
'/memberComment/likes/${id}', |
|
queryParameters: queryParameters, |
|
data: _data, |
|
) |
|
.copyWith( |
|
baseUrl: _combineBaseUrls( |
|
_dio.options.baseUrl, |
|
baseUrl, |
|
))); |
|
final _result = await _dio.fetch<Map<String, dynamic>>(_options); |
|
late BaseData<dynamic> _value; |
|
try { |
|
_value = BaseData<dynamic>.fromJson( |
|
_result.data!, |
|
(json) => json as dynamic, |
|
); |
|
} on Object catch (e, s) { |
|
errorLogger?.logError(e, s, _options); |
|
rethrow; |
|
} |
|
return _value; |
|
} |
|
|
|
@override |
|
Future<BaseData<dynamic>> delComment(String id) async { |
|
final _extra = <String, dynamic>{}; |
|
final queryParameters = <String, dynamic>{}; |
|
final _headers = <String, dynamic>{}; |
|
const Map<String, dynamic>? _data = null; |
|
final _options = _setStreamType<BaseData<dynamic>>(Options( |
|
method: 'DELETE', |
|
headers: _headers, |
|
extra: _extra, |
|
) |
|
.compose( |
|
_dio.options, |
|
'/memberComment/${id}', |
|
queryParameters: queryParameters, |
|
data: _data, |
|
) |
|
.copyWith( |
|
baseUrl: _combineBaseUrls( |
|
_dio.options.baseUrl, |
|
baseUrl, |
|
))); |
|
final _result = await _dio.fetch<Map<String, dynamic>>(_options); |
|
late BaseData<dynamic> _value; |
|
try { |
|
_value = BaseData<dynamic>.fromJson( |
|
_result.data!, |
|
(json) => json as dynamic, |
|
); |
|
} on Object catch (e, s) { |
|
errorLogger?.logError(e, s, _options); |
|
rethrow; |
|
} |
|
return _value; |
|
} |
|
|
|
@override |
|
Future<BaseData<Logistics>> shippingTrace( |
|
String shipperCode, |
|
String logisticCode, |
|
) async { |
|
final _extra = <String, dynamic>{}; |
|
final queryParameters = <String, dynamic>{}; |
|
final _headers = <String, dynamic>{}; |
|
const Map<String, dynamic>? _data = null; |
|
final _options = _setStreamType<BaseData<Logistics>>(Options( |
|
method: 'GET', |
|
headers: _headers, |
|
extra: _extra, |
|
) |
|
.compose( |
|
_dio.options, |
|
'/order/getShippingTrace/${shipperCode}/${logisticCode}', |
|
queryParameters: queryParameters, |
|
data: _data, |
|
) |
|
.copyWith( |
|
baseUrl: _combineBaseUrls( |
|
_dio.options.baseUrl, |
|
baseUrl, |
|
))); |
|
final _result = await _dio.fetch<Map<String, dynamic>>(_options); |
|
late BaseData<Logistics> _value; |
|
try { |
|
_value = BaseData<Logistics>.fromJson( |
|
_result.data!, |
|
(json) => Logistics.fromJson(json as Map<String, dynamic>), |
|
); |
|
} on Object catch (e, s) { |
|
errorLogger?.logError(e, s, _options); |
|
rethrow; |
|
} |
|
return _value; |
|
} |
|
|
|
@override |
|
Future<BaseData<dynamic>> orderCancel(String id) async { |
|
final _extra = <String, dynamic>{}; |
|
final queryParameters = <String, dynamic>{}; |
|
final _headers = <String, dynamic>{}; |
|
const Map<String, dynamic>? _data = null; |
|
final _options = _setStreamType<BaseData<dynamic>>(Options( |
|
method: 'GET', |
|
headers: _headers, |
|
extra: _extra, |
|
) |
|
.compose( |
|
_dio.options, |
|
'/order/cancel/${id}', |
|
queryParameters: queryParameters, |
|
data: _data, |
|
) |
|
.copyWith( |
|
baseUrl: _combineBaseUrls( |
|
_dio.options.baseUrl, |
|
baseUrl, |
|
))); |
|
final _result = await _dio.fetch<Map<String, dynamic>>(_options); |
|
late BaseData<dynamic> _value; |
|
try { |
|
_value = BaseData<dynamic>.fromJson( |
|
_result.data!, |
|
(json) => json as dynamic, |
|
); |
|
} on Object catch (e, s) { |
|
errorLogger?.logError(e, s, _options); |
|
rethrow; |
|
} |
|
return _value; |
|
} |
|
|
|
@override |
|
Future<BaseData<String>> settlement(Map<String, String> map) async { |
|
final _extra = <String, dynamic>{}; |
|
final queryParameters = <String, dynamic>{}; |
|
final _headers = <String, dynamic>{}; |
|
final _data = <String, dynamic>{}; |
|
_data.addAll(map); |
|
final _options = _setStreamType<BaseData<String>>(Options( |
|
method: 'POST', |
|
headers: _headers, |
|
extra: _extra, |
|
) |
|
.compose( |
|
_dio.options, |
|
'/order/settlement', |
|
queryParameters: queryParameters, |
|
data: _data, |
|
) |
|
.copyWith( |
|
baseUrl: _combineBaseUrls( |
|
_dio.options.baseUrl, |
|
baseUrl, |
|
))); |
|
final _result = await _dio.fetch<Map<String, dynamic>>(_options); |
|
late BaseData<String> _value; |
|
try { |
|
_value = BaseData<String>.fromJson( |
|
_result.data!, |
|
(json) => json as String, |
|
); |
|
} on Object catch (e, s) { |
|
errorLogger?.logError(e, s, _options); |
|
rethrow; |
|
} |
|
return _value; |
|
} |
|
|
|
@override |
|
Future<BaseData<bool>> trend(Map<String, dynamic> map) async { |
|
final _extra = <String, dynamic>{}; |
|
final queryParameters = <String, dynamic>{}; |
|
final _headers = <String, dynamic>{}; |
|
final _data = <String, dynamic>{}; |
|
_data.addAll(map); |
|
final _options = _setStreamType<BaseData<bool>>(Options( |
|
method: 'POST', |
|
headers: _headers, |
|
extra: _extra, |
|
) |
|
.compose( |
|
_dio.options, |
|
'/information/trend', |
|
queryParameters: queryParameters, |
|
data: _data, |
|
) |
|
.copyWith( |
|
baseUrl: _combineBaseUrls( |
|
_dio.options.baseUrl, |
|
baseUrl, |
|
))); |
|
final _result = await _dio.fetch<Map<String, dynamic>>(_options); |
|
late BaseData<bool> _value; |
|
try { |
|
_value = BaseData<bool>.fromJson( |
|
_result.data!, |
|
(json) => json as bool, |
|
); |
|
} on Object catch (e, s) { |
|
errorLogger?.logError(e, s, _options); |
|
rethrow; |
|
} |
|
return _value; |
|
} |
|
|
|
@override |
|
Future<BaseData<PageInfo<ComunityComment>>> trendList( |
|
Map<String, dynamic> map) async { |
|
final _extra = <String, dynamic>{}; |
|
final queryParameters = <String, dynamic>{}; |
|
final _headers = <String, dynamic>{}; |
|
final _data = <String, dynamic>{}; |
|
_data.addAll(map); |
|
final _options = |
|
_setStreamType<BaseData<PageInfo<ComunityComment>>>(Options( |
|
method: 'POST', |
|
headers: _headers, |
|
extra: _extra, |
|
) |
|
.compose( |
|
_dio.options, |
|
'/information/trend-list', |
|
queryParameters: queryParameters, |
|
data: _data, |
|
) |
|
.copyWith( |
|
baseUrl: _combineBaseUrls( |
|
_dio.options.baseUrl, |
|
baseUrl, |
|
))); |
|
final _result = await _dio.fetch<Map<String, dynamic>>(_options); |
|
late BaseData<PageInfo<ComunityComment>> _value; |
|
try { |
|
_value = BaseData<PageInfo<ComunityComment>>.fromJson( |
|
_result.data!, |
|
(json) => PageInfo<ComunityComment>.fromJson( |
|
json as Map<String, dynamic>, |
|
(json) => ComunityComment.fromJson(json as Map<String, dynamic>), |
|
), |
|
); |
|
} on Object catch (e, s) { |
|
errorLogger?.logError(e, s, _options); |
|
rethrow; |
|
} |
|
return _value; |
|
} |
|
|
|
@override |
|
Future<BaseData<PageInfo<Follow>>> followList( |
|
Map<String, dynamic> map) async { |
|
final _extra = <String, dynamic>{}; |
|
final queryParameters = <String, dynamic>{}; |
|
final _headers = <String, dynamic>{}; |
|
final _data = <String, dynamic>{}; |
|
_data.addAll(map); |
|
final _options = _setStreamType<BaseData<PageInfo<Follow>>>(Options( |
|
method: 'POST', |
|
headers: _headers, |
|
extra: _extra, |
|
) |
|
.compose( |
|
_dio.options, |
|
'/member/follow/list', |
|
queryParameters: queryParameters, |
|
data: _data, |
|
) |
|
.copyWith( |
|
baseUrl: _combineBaseUrls( |
|
_dio.options.baseUrl, |
|
baseUrl, |
|
))); |
|
final _result = await _dio.fetch<Map<String, dynamic>>(_options); |
|
late BaseData<PageInfo<Follow>> _value; |
|
try { |
|
_value = BaseData<PageInfo<Follow>>.fromJson( |
|
_result.data!, |
|
(json) => PageInfo<Follow>.fromJson( |
|
json as Map<String, dynamic>, |
|
(json) => Follow.fromJson(json as Map<String, dynamic>), |
|
), |
|
); |
|
} on Object catch (e, s) { |
|
errorLogger?.logError(e, s, _options); |
|
rethrow; |
|
} |
|
return _value; |
|
} |
|
|
|
@override |
|
Future<BaseData<PageInfo<Follow>>> mutualFollowList( |
|
Map<String, dynamic> map) async { |
|
final _extra = <String, dynamic>{}; |
|
final queryParameters = <String, dynamic>{}; |
|
final _headers = <String, dynamic>{}; |
|
final _data = <String, dynamic>{}; |
|
_data.addAll(map); |
|
final _options = _setStreamType<BaseData<PageInfo<Follow>>>(Options( |
|
method: 'POST', |
|
headers: _headers, |
|
extra: _extra, |
|
) |
|
.compose( |
|
_dio.options, |
|
'/member/mutualFollow/list', |
|
queryParameters: queryParameters, |
|
data: _data, |
|
) |
|
.copyWith( |
|
baseUrl: _combineBaseUrls( |
|
_dio.options.baseUrl, |
|
baseUrl, |
|
))); |
|
final _result = await _dio.fetch<Map<String, dynamic>>(_options); |
|
late BaseData<PageInfo<Follow>> _value; |
|
try { |
|
_value = BaseData<PageInfo<Follow>>.fromJson( |
|
_result.data!, |
|
(json) => PageInfo<Follow>.fromJson( |
|
json as Map<String, dynamic>, |
|
(json) => Follow.fromJson(json as Map<String, dynamic>), |
|
), |
|
); |
|
} on Object catch (e, s) { |
|
errorLogger?.logError(e, s, _options); |
|
rethrow; |
|
} |
|
return _value; |
|
} |
|
|
|
@override |
|
Future<BaseData<dynamic>> follow(String followId) async { |
|
final _extra = <String, dynamic>{}; |
|
final queryParameters = <String, dynamic>{}; |
|
final _headers = <String, dynamic>{}; |
|
const Map<String, dynamic>? _data = null; |
|
final _options = _setStreamType<BaseData<dynamic>>(Options( |
|
method: 'PUT', |
|
headers: _headers, |
|
extra: _extra, |
|
) |
|
.compose( |
|
_dio.options, |
|
'/member/follow/${followId}', |
|
queryParameters: queryParameters, |
|
data: _data, |
|
) |
|
.copyWith( |
|
baseUrl: _combineBaseUrls( |
|
_dio.options.baseUrl, |
|
baseUrl, |
|
))); |
|
final _result = await _dio.fetch<Map<String, dynamic>>(_options); |
|
late BaseData<dynamic> _value; |
|
try { |
|
_value = BaseData<dynamic>.fromJson( |
|
_result.data!, |
|
(json) => json as dynamic, |
|
); |
|
} on Object catch (e, s) { |
|
errorLogger?.logError(e, s, _options); |
|
rethrow; |
|
} |
|
return _value; |
|
} |
|
|
|
@override |
|
Future<BaseData<dynamic>> deleteTrend(String id) async { |
|
final _extra = <String, dynamic>{}; |
|
final queryParameters = <String, dynamic>{}; |
|
final _headers = <String, dynamic>{}; |
|
const Map<String, dynamic>? _data = null; |
|
final _options = _setStreamType<BaseData<dynamic>>(Options( |
|
method: 'DELETE', |
|
headers: _headers, |
|
extra: _extra, |
|
) |
|
.compose( |
|
_dio.options, |
|
'/information/trend/${id}', |
|
queryParameters: queryParameters, |
|
data: _data, |
|
) |
|
.copyWith( |
|
baseUrl: _combineBaseUrls( |
|
_dio.options.baseUrl, |
|
baseUrl, |
|
))); |
|
final _result = await _dio.fetch<Map<String, dynamic>>(_options); |
|
late BaseData<dynamic> _value; |
|
try { |
|
_value = BaseData<dynamic>.fromJson( |
|
_result.data!, |
|
(json) => json as dynamic, |
|
); |
|
} on Object catch (e, s) { |
|
errorLogger?.logError(e, s, _options); |
|
rethrow; |
|
} |
|
return _value; |
|
} |
|
|
|
@override |
|
Future<BaseData<SocialInfo>> socialInfo() async { |
|
final _extra = <String, dynamic>{}; |
|
final queryParameters = <String, dynamic>{}; |
|
final _headers = <String, dynamic>{}; |
|
const Map<String, dynamic>? _data = null; |
|
final _options = _setStreamType<BaseData<SocialInfo>>(Options( |
|
method: 'GET', |
|
headers: _headers, |
|
extra: _extra, |
|
) |
|
.compose( |
|
_dio.options, |
|
'/member/socialInfo', |
|
queryParameters: queryParameters, |
|
data: _data, |
|
) |
|
.copyWith( |
|
baseUrl: _combineBaseUrls( |
|
_dio.options.baseUrl, |
|
baseUrl, |
|
))); |
|
final _result = await _dio.fetch<Map<String, dynamic>>(_options); |
|
late BaseData<SocialInfo> _value; |
|
try { |
|
_value = BaseData<SocialInfo>.fromJson( |
|
_result.data!, |
|
(json) => SocialInfo.fromJson(json as Map<String, dynamic>), |
|
); |
|
} on Object catch (e, s) { |
|
errorLogger?.logError(e, s, _options); |
|
rethrow; |
|
} |
|
return _value; |
|
} |
|
|
|
@override |
|
Future<BaseListData<CategorySelect>> categoryList() async { |
|
final _extra = <String, dynamic>{}; |
|
final queryParameters = <String, dynamic>{}; |
|
final _headers = <String, dynamic>{}; |
|
const Map<String, dynamic>? _data = null; |
|
final _options = _setStreamType<BaseListData<CategorySelect>>(Options( |
|
method: 'GET', |
|
headers: _headers, |
|
extra: _extra, |
|
) |
|
.compose( |
|
_dio.options, |
|
'/course/categoryList', |
|
queryParameters: queryParameters, |
|
data: _data, |
|
) |
|
.copyWith( |
|
baseUrl: _combineBaseUrls( |
|
_dio.options.baseUrl, |
|
baseUrl, |
|
))); |
|
final _result = await _dio.fetch<Map<String, dynamic>>(_options); |
|
late BaseListData<CategorySelect> _value; |
|
try { |
|
_value = BaseListData<CategorySelect>.fromJson( |
|
_result.data!, |
|
(json) => CategorySelect.fromJson(json as Map<String, dynamic>), |
|
); |
|
} on Object catch (e, s) { |
|
errorLogger?.logError(e, s, _options); |
|
rethrow; |
|
} |
|
return _value; |
|
} |
|
|
|
@override |
|
Future<BaseListData<Chapter>> catalogList(String courseId) async { |
|
final _extra = <String, dynamic>{}; |
|
final queryParameters = <String, dynamic>{}; |
|
final _headers = <String, dynamic>{}; |
|
const Map<String, dynamic>? _data = null; |
|
final _options = _setStreamType<BaseListData<Chapter>>(Options( |
|
method: 'GET', |
|
headers: _headers, |
|
extra: _extra, |
|
) |
|
.compose( |
|
_dio.options, |
|
'/course/catalogList/${courseId}', |
|
queryParameters: queryParameters, |
|
data: _data, |
|
) |
|
.copyWith( |
|
baseUrl: _combineBaseUrls( |
|
_dio.options.baseUrl, |
|
baseUrl, |
|
))); |
|
final _result = await _dio.fetch<Map<String, dynamic>>(_options); |
|
late BaseListData<Chapter> _value; |
|
try { |
|
_value = BaseListData<Chapter>.fromJson( |
|
_result.data!, |
|
(json) => Chapter.fromJson(json as Map<String, dynamic>), |
|
); |
|
} on Object catch (e, s) { |
|
errorLogger?.logError(e, s, _options); |
|
rethrow; |
|
} |
|
return _value; |
|
} |
|
|
|
@override |
|
Future<BaseData<PageInfo<Course>>> courseList( |
|
Map<String, dynamic> map) async { |
|
final _extra = <String, dynamic>{}; |
|
final queryParameters = <String, dynamic>{}; |
|
final _headers = <String, dynamic>{}; |
|
final _data = <String, dynamic>{}; |
|
_data.addAll(map); |
|
final _options = _setStreamType<BaseData<PageInfo<Course>>>(Options( |
|
method: 'POST', |
|
headers: _headers, |
|
extra: _extra, |
|
) |
|
.compose( |
|
_dio.options, |
|
'/course/list', |
|
queryParameters: queryParameters, |
|
data: _data, |
|
) |
|
.copyWith( |
|
baseUrl: _combineBaseUrls( |
|
_dio.options.baseUrl, |
|
baseUrl, |
|
))); |
|
final _result = await _dio.fetch<Map<String, dynamic>>(_options); |
|
late BaseData<PageInfo<Course>> _value; |
|
try { |
|
_value = BaseData<PageInfo<Course>>.fromJson( |
|
_result.data!, |
|
(json) => PageInfo<Course>.fromJson( |
|
json as Map<String, dynamic>, |
|
(json) => Course.fromJson(json as Map<String, dynamic>), |
|
), |
|
); |
|
} on Object catch (e, s) { |
|
errorLogger?.logError(e, s, _options); |
|
rethrow; |
|
} |
|
return _value; |
|
} |
|
|
|
@override |
|
Future<BaseListData<CollectClass>> collectList() async { |
|
final _extra = <String, dynamic>{}; |
|
final queryParameters = <String, dynamic>{}; |
|
final _headers = <String, dynamic>{}; |
|
const Map<String, dynamic>? _data = null; |
|
final _options = _setStreamType<BaseListData<CollectClass>>(Options( |
|
method: 'GET', |
|
headers: _headers, |
|
extra: _extra, |
|
) |
|
.compose( |
|
_dio.options, |
|
'/course/collectList', |
|
queryParameters: queryParameters, |
|
data: _data, |
|
) |
|
.copyWith( |
|
baseUrl: _combineBaseUrls( |
|
_dio.options.baseUrl, |
|
baseUrl, |
|
))); |
|
final _result = await _dio.fetch<Map<String, dynamic>>(_options); |
|
late BaseListData<CollectClass> _value; |
|
try { |
|
_value = BaseListData<CollectClass>.fromJson( |
|
_result.data!, |
|
(json) => CollectClass.fromJson(json as Map<String, dynamic>), |
|
); |
|
} on Object catch (e, s) { |
|
errorLogger?.logError(e, s, _options); |
|
rethrow; |
|
} |
|
return _value; |
|
} |
|
|
|
@override |
|
Future<BaseListData<Course>> collect(String collectId) async { |
|
final _extra = <String, dynamic>{}; |
|
final queryParameters = <String, dynamic>{}; |
|
final _headers = <String, dynamic>{}; |
|
const Map<String, dynamic>? _data = null; |
|
final _options = _setStreamType<BaseListData<Course>>(Options( |
|
method: 'GET', |
|
headers: _headers, |
|
extra: _extra, |
|
) |
|
.compose( |
|
_dio.options, |
|
'/course/collect/${collectId}', |
|
queryParameters: queryParameters, |
|
data: _data, |
|
) |
|
.copyWith( |
|
baseUrl: _combineBaseUrls( |
|
_dio.options.baseUrl, |
|
baseUrl, |
|
))); |
|
final _result = await _dio.fetch<Map<String, dynamic>>(_options); |
|
late BaseListData<Course> _value; |
|
try { |
|
_value = BaseListData<Course>.fromJson( |
|
_result.data!, |
|
(json) => Course.fromJson(json as Map<String, dynamic>), |
|
); |
|
} on Object catch (e, s) { |
|
errorLogger?.logError(e, s, _options); |
|
rethrow; |
|
} |
|
return _value; |
|
} |
|
|
|
@override |
|
Future<BaseData<CourseDetails>> course(String id) async { |
|
final _extra = <String, dynamic>{}; |
|
final queryParameters = <String, dynamic>{}; |
|
final _headers = <String, dynamic>{}; |
|
const Map<String, dynamic>? _data = null; |
|
final _options = _setStreamType<BaseData<CourseDetails>>(Options( |
|
method: 'GET', |
|
headers: _headers, |
|
extra: _extra, |
|
) |
|
.compose( |
|
_dio.options, |
|
'/course/${id}', |
|
queryParameters: queryParameters, |
|
data: _data, |
|
) |
|
.copyWith( |
|
baseUrl: _combineBaseUrls( |
|
_dio.options.baseUrl, |
|
baseUrl, |
|
))); |
|
final _result = await _dio.fetch<Map<String, dynamic>>(_options); |
|
late BaseData<CourseDetails> _value; |
|
try { |
|
_value = BaseData<CourseDetails>.fromJson( |
|
_result.data!, |
|
(json) => CourseDetails.fromJson(json as Map<String, dynamic>), |
|
); |
|
} on Object catch (e, s) { |
|
errorLogger?.logError(e, s, _options); |
|
rethrow; |
|
} |
|
return _value; |
|
} |
|
|
|
@override |
|
Future<BaseData<dynamic>> courseLikes(String courseId) async { |
|
final _extra = <String, dynamic>{}; |
|
final queryParameters = <String, dynamic>{}; |
|
final _headers = <String, dynamic>{}; |
|
const Map<String, dynamic>? _data = null; |
|
final _options = _setStreamType<BaseData<dynamic>>(Options( |
|
method: 'GET', |
|
headers: _headers, |
|
extra: _extra, |
|
) |
|
.compose( |
|
_dio.options, |
|
'/course/likes/${courseId}', |
|
queryParameters: queryParameters, |
|
data: _data, |
|
) |
|
.copyWith( |
|
baseUrl: _combineBaseUrls( |
|
_dio.options.baseUrl, |
|
baseUrl, |
|
))); |
|
final _result = await _dio.fetch<Map<String, dynamic>>(_options); |
|
late BaseData<dynamic> _value; |
|
try { |
|
_value = BaseData<dynamic>.fromJson( |
|
_result.data!, |
|
(json) => json as dynamic, |
|
); |
|
} on Object catch (e, s) { |
|
errorLogger?.logError(e, s, _options); |
|
rethrow; |
|
} |
|
return _value; |
|
} |
|
|
|
@override |
|
Future<BaseListData<VipBadges>> findBadges(Map<String, dynamic> map) async { |
|
final _extra = <String, dynamic>{}; |
|
final queryParameters = <String, dynamic>{}; |
|
final _headers = <String, dynamic>{}; |
|
final _data = <String, dynamic>{}; |
|
_data.addAll(map); |
|
final _options = _setStreamType<BaseListData<VipBadges>>(Options( |
|
method: 'POST', |
|
headers: _headers, |
|
extra: _extra, |
|
) |
|
.compose( |
|
_dio.options, |
|
'/app-memberAchievement/findBadges', |
|
queryParameters: queryParameters, |
|
data: _data, |
|
) |
|
.copyWith( |
|
baseUrl: _combineBaseUrls( |
|
_dio.options.baseUrl, |
|
baseUrl, |
|
))); |
|
final _result = await _dio.fetch<Map<String, dynamic>>(_options); |
|
late BaseListData<VipBadges> _value; |
|
try { |
|
_value = BaseListData<VipBadges>.fromJson( |
|
_result.data!, |
|
(json) => VipBadges.fromJson(json as Map<String, dynamic>), |
|
); |
|
} on Object catch (e, s) { |
|
errorLogger?.logError(e, s, _options); |
|
rethrow; |
|
} |
|
return _value; |
|
} |
|
|
|
@override |
|
Future<BaseListData<AchivementDetailList>> getAchievementDetail( |
|
String achievementCategoryId) async { |
|
final _extra = <String, dynamic>{}; |
|
final queryParameters = <String, dynamic>{}; |
|
final _headers = <String, dynamic>{}; |
|
const Map<String, dynamic>? _data = null; |
|
final _options = _setStreamType<BaseListData<AchivementDetailList>>(Options( |
|
method: 'GET', |
|
headers: _headers, |
|
extra: _extra, |
|
) |
|
.compose( |
|
_dio.options, |
|
'/app-memberAchievement/getAchievementDetail?achievementCategoryId=${achievementCategoryId}', |
|
queryParameters: queryParameters, |
|
data: _data, |
|
) |
|
.copyWith( |
|
baseUrl: _combineBaseUrls( |
|
_dio.options.baseUrl, |
|
baseUrl, |
|
))); |
|
final _result = await _dio.fetch<Map<String, dynamic>>(_options); |
|
late BaseListData<AchivementDetailList> _value; |
|
try { |
|
_value = BaseListData<AchivementDetailList>.fromJson( |
|
_result.data!, |
|
(json) => AchivementDetailList.fromJson(json as Map<String, dynamic>), |
|
); |
|
} on Object catch (e, s) { |
|
errorLogger?.logError(e, s, _options); |
|
rethrow; |
|
} |
|
return _value; |
|
} |
|
|
|
@override |
|
Future<BaseListData<VipBenefit>> benefitList() async { |
|
final _extra = <String, dynamic>{}; |
|
final queryParameters = <String, dynamic>{}; |
|
final _headers = <String, dynamic>{}; |
|
const Map<String, dynamic>? _data = null; |
|
final _options = _setStreamType<BaseListData<VipBenefit>>(Options( |
|
method: 'GET', |
|
headers: _headers, |
|
extra: _extra, |
|
) |
|
.compose( |
|
_dio.options, |
|
'/member/benefitList', |
|
queryParameters: queryParameters, |
|
data: _data, |
|
) |
|
.copyWith( |
|
baseUrl: _combineBaseUrls( |
|
_dio.options.baseUrl, |
|
baseUrl, |
|
))); |
|
final _result = await _dio.fetch<Map<String, dynamic>>(_options); |
|
late BaseListData<VipBenefit> _value; |
|
try { |
|
_value = BaseListData<VipBenefit>.fromJson( |
|
_result.data!, |
|
(json) => VipBenefit.fromJson(json as Map<String, dynamic>), |
|
); |
|
} on Object catch (e, s) { |
|
errorLogger?.logError(e, s, _options); |
|
rethrow; |
|
} |
|
return _value; |
|
} |
|
|
|
@override |
|
Future<BaseData<VipRuleDetails>> vipBenefit() async { |
|
final _extra = <String, dynamic>{}; |
|
final queryParameters = <String, dynamic>{}; |
|
final _headers = <String, dynamic>{}; |
|
const Map<String, dynamic>? _data = null; |
|
final _options = _setStreamType<BaseData<VipRuleDetails>>(Options( |
|
method: 'GET', |
|
headers: _headers, |
|
extra: _extra, |
|
) |
|
.compose( |
|
_dio.options, |
|
'/home/vipBenefit', |
|
queryParameters: queryParameters, |
|
data: _data, |
|
) |
|
.copyWith( |
|
baseUrl: _combineBaseUrls( |
|
_dio.options.baseUrl, |
|
baseUrl, |
|
))); |
|
final _result = await _dio.fetch<Map<String, dynamic>>(_options); |
|
late BaseData<VipRuleDetails> _value; |
|
try { |
|
_value = BaseData<VipRuleDetails>.fromJson( |
|
_result.data!, |
|
(json) => VipRuleDetails.fromJson(json as Map<String, dynamic>), |
|
); |
|
} on Object catch (e, s) { |
|
errorLogger?.logError(e, s, _options); |
|
rethrow; |
|
} |
|
return _value; |
|
} |
|
|
|
@override |
|
Future<BaseListData<SecondCard>> secondCardList() async { |
|
final _extra = <String, dynamic>{}; |
|
final queryParameters = <String, dynamic>{}; |
|
final _headers = <String, dynamic>{}; |
|
const Map<String, dynamic>? _data = null; |
|
final _options = _setStreamType<BaseListData<SecondCard>>(Options( |
|
method: 'GET', |
|
headers: _headers, |
|
extra: _extra, |
|
) |
|
.compose( |
|
_dio.options, |
|
'/member/secondCardList', |
|
queryParameters: queryParameters, |
|
data: _data, |
|
) |
|
.copyWith( |
|
baseUrl: _combineBaseUrls( |
|
_dio.options.baseUrl, |
|
baseUrl, |
|
))); |
|
final _result = await _dio.fetch<Map<String, dynamic>>(_options); |
|
late BaseListData<SecondCard> _value; |
|
try { |
|
_value = BaseListData<SecondCard>.fromJson( |
|
_result.data!, |
|
(json) => SecondCard.fromJson(json as Map<String, dynamic>), |
|
); |
|
} on Object catch (e, s) { |
|
errorLogger?.logError(e, s, _options); |
|
rethrow; |
|
} |
|
return _value; |
|
} |
|
|
|
@override |
|
Future<BaseData<dynamic>> bindSecondCard(String phone) async { |
|
final _extra = <String, dynamic>{}; |
|
final queryParameters = <String, dynamic>{}; |
|
final _headers = <String, dynamic>{}; |
|
const Map<String, dynamic>? _data = null; |
|
final _options = _setStreamType<BaseData<dynamic>>(Options( |
|
method: 'GET', |
|
headers: _headers, |
|
extra: _extra, |
|
) |
|
.compose( |
|
_dio.options, |
|
'/member/bindSecondCard/${phone}', |
|
queryParameters: queryParameters, |
|
data: _data, |
|
) |
|
.copyWith( |
|
baseUrl: _combineBaseUrls( |
|
_dio.options.baseUrl, |
|
baseUrl, |
|
))); |
|
final _result = await _dio.fetch<Map<String, dynamic>>(_options); |
|
late BaseData<dynamic> _value; |
|
try { |
|
_value = BaseData<dynamic>.fromJson( |
|
_result.data!, |
|
(json) => json as dynamic, |
|
); |
|
} on Object catch (e, s) { |
|
errorLogger?.logError(e, s, _options); |
|
rethrow; |
|
} |
|
return _value; |
|
} |
|
|
|
@override |
|
Future<BaseData<dynamic>> unbindSecondCard(String phone) async { |
|
final _extra = <String, dynamic>{}; |
|
final queryParameters = <String, dynamic>{}; |
|
final _headers = <String, dynamic>{}; |
|
const Map<String, dynamic>? _data = null; |
|
final _options = _setStreamType<BaseData<dynamic>>(Options( |
|
method: 'GET', |
|
headers: _headers, |
|
extra: _extra, |
|
) |
|
.compose( |
|
_dio.options, |
|
'/member/unbindSecondCard/${phone}', |
|
queryParameters: queryParameters, |
|
data: _data, |
|
) |
|
.copyWith( |
|
baseUrl: _combineBaseUrls( |
|
_dio.options.baseUrl, |
|
baseUrl, |
|
))); |
|
final _result = await _dio.fetch<Map<String, dynamic>>(_options); |
|
late BaseData<dynamic> _value; |
|
try { |
|
_value = BaseData<dynamic>.fromJson( |
|
_result.data!, |
|
(json) => json as dynamic, |
|
); |
|
} on Object catch (e, s) { |
|
errorLogger?.logError(e, s, _options); |
|
rethrow; |
|
} |
|
return _value; |
|
} |
|
|
|
@override |
|
Future<BaseData<Logistics>> getAppShippingTrace(String orderId) async { |
|
final _extra = <String, dynamic>{}; |
|
final queryParameters = <String, dynamic>{}; |
|
final _headers = <String, dynamic>{}; |
|
const Map<String, dynamic>? _data = null; |
|
final _options = _setStreamType<BaseData<Logistics>>(Options( |
|
method: 'GET', |
|
headers: _headers, |
|
extra: _extra, |
|
) |
|
.compose( |
|
_dio.options, |
|
'/creditOrder/getAppShippingTrace?orderId=${orderId}', |
|
queryParameters: queryParameters, |
|
data: _data, |
|
) |
|
.copyWith( |
|
baseUrl: _combineBaseUrls( |
|
_dio.options.baseUrl, |
|
baseUrl, |
|
))); |
|
final _result = await _dio.fetch<Map<String, dynamic>>(_options); |
|
late BaseData<Logistics> _value; |
|
try { |
|
_value = BaseData<Logistics>.fromJson( |
|
_result.data!, |
|
(json) => Logistics.fromJson(json as Map<String, dynamic>), |
|
); |
|
} on Object catch (e, s) { |
|
errorLogger?.logError(e, s, _options); |
|
rethrow; |
|
} |
|
return _value; |
|
} |
|
|
|
@override |
|
Future<BaseData<dynamic>> rankBuy(Map<String, dynamic> param) async { |
|
final _extra = <String, dynamic>{}; |
|
final queryParameters = <String, dynamic>{}; |
|
final _headers = <String, dynamic>{}; |
|
final _data = <String, dynamic>{}; |
|
_data.addAll(param); |
|
final _options = _setStreamType<BaseData<dynamic>>(Options( |
|
method: 'POST', |
|
headers: _headers, |
|
extra: _extra, |
|
) |
|
.compose( |
|
_dio.options, |
|
'/member/rankBuy', |
|
queryParameters: queryParameters, |
|
data: _data, |
|
) |
|
.copyWith( |
|
baseUrl: _combineBaseUrls( |
|
_dio.options.baseUrl, |
|
baseUrl, |
|
))); |
|
final _result = await _dio.fetch<Map<String, dynamic>>(_options); |
|
late BaseData<dynamic> _value; |
|
try { |
|
_value = BaseData<dynamic>.fromJson( |
|
_result.data!, |
|
(json) => json as dynamic, |
|
); |
|
} on Object catch (e, s) { |
|
errorLogger?.logError(e, s, _options); |
|
rethrow; |
|
} |
|
return _value; |
|
} |
|
|
|
@override |
|
Future<BaseListData<Headlines>> headlinesList() async { |
|
final _extra = <String, dynamic>{}; |
|
final queryParameters = <String, dynamic>{}; |
|
final _headers = <String, dynamic>{}; |
|
const Map<String, dynamic>? _data = null; |
|
final _options = _setStreamType<BaseListData<Headlines>>(Options( |
|
method: 'GET', |
|
headers: _headers, |
|
extra: _extra, |
|
) |
|
.compose( |
|
_dio.options, |
|
'/information/categoryList', |
|
queryParameters: queryParameters, |
|
data: _data, |
|
) |
|
.copyWith( |
|
baseUrl: _combineBaseUrls( |
|
_dio.options.baseUrl, |
|
baseUrl, |
|
))); |
|
final _result = await _dio.fetch<Map<String, dynamic>>(_options); |
|
late BaseListData<Headlines> _value; |
|
try { |
|
_value = BaseListData<Headlines>.fromJson( |
|
_result.data!, |
|
(json) => Headlines.fromJson(json as Map<String, dynamic>), |
|
); |
|
} on Object catch (e, s) { |
|
errorLogger?.logError(e, s, _options); |
|
rethrow; |
|
} |
|
return _value; |
|
} |
|
|
|
@override |
|
Future<BaseData<HeadlinesDetails>> headlinesDetails(String id) async { |
|
final _extra = <String, dynamic>{}; |
|
final queryParameters = <String, dynamic>{}; |
|
final _headers = <String, dynamic>{}; |
|
const Map<String, dynamic>? _data = null; |
|
final _options = _setStreamType<BaseData<HeadlinesDetails>>(Options( |
|
method: 'GET', |
|
headers: _headers, |
|
extra: _extra, |
|
) |
|
.compose( |
|
_dio.options, |
|
'/information/category/${id}', |
|
queryParameters: queryParameters, |
|
data: _data, |
|
) |
|
.copyWith( |
|
baseUrl: _combineBaseUrls( |
|
_dio.options.baseUrl, |
|
baseUrl, |
|
))); |
|
final _result = await _dio.fetch<Map<String, dynamic>>(_options); |
|
late BaseData<HeadlinesDetails> _value; |
|
try { |
|
_value = BaseData<HeadlinesDetails>.fromJson( |
|
_result.data!, |
|
(json) => HeadlinesDetails.fromJson(json as Map<String, dynamic>), |
|
); |
|
} on Object catch (e, s) { |
|
errorLogger?.logError(e, s, _options); |
|
rethrow; |
|
} |
|
return _value; |
|
} |
|
|
|
@override |
|
Future<BaseData<PageInfo<Invitation>>> inviteMemberList( |
|
Map<String, dynamic> map) async { |
|
final _extra = <String, dynamic>{}; |
|
final queryParameters = <String, dynamic>{}; |
|
final _headers = <String, dynamic>{}; |
|
final _data = <String, dynamic>{}; |
|
_data.addAll(map); |
|
final _options = _setStreamType<BaseData<PageInfo<Invitation>>>(Options( |
|
method: 'POST', |
|
headers: _headers, |
|
extra: _extra, |
|
) |
|
.compose( |
|
_dio.options, |
|
'/member/inviteMemberList', |
|
queryParameters: queryParameters, |
|
data: _data, |
|
) |
|
.copyWith( |
|
baseUrl: _combineBaseUrls( |
|
_dio.options.baseUrl, |
|
baseUrl, |
|
))); |
|
final _result = await _dio.fetch<Map<String, dynamic>>(_options); |
|
late BaseData<PageInfo<Invitation>> _value; |
|
try { |
|
_value = BaseData<PageInfo<Invitation>>.fromJson( |
|
_result.data!, |
|
(json) => PageInfo<Invitation>.fromJson( |
|
json as Map<String, dynamic>, |
|
(json) => Invitation.fromJson(json as Map<String, dynamic>), |
|
), |
|
); |
|
} on Object catch (e, s) { |
|
errorLogger?.logError(e, s, _options); |
|
rethrow; |
|
} |
|
return _value; |
|
} |
|
|
|
@override |
|
Future<BaseData<dynamic>> wiped(String memberCouponId) async { |
|
final _extra = <String, dynamic>{}; |
|
final queryParameters = <String, dynamic>{}; |
|
final _headers = <String, dynamic>{}; |
|
const Map<String, dynamic>? _data = null; |
|
final _options = _setStreamType<BaseData<dynamic>>(Options( |
|
method: 'GET', |
|
headers: _headers, |
|
extra: _extra, |
|
) |
|
.compose( |
|
_dio.options, |
|
'/coupon/wiped/${memberCouponId}', |
|
queryParameters: queryParameters, |
|
data: _data, |
|
) |
|
.copyWith( |
|
baseUrl: _combineBaseUrls( |
|
_dio.options.baseUrl, |
|
baseUrl, |
|
))); |
|
final _result = await _dio.fetch<Map<String, dynamic>>(_options); |
|
late BaseData<dynamic> _value; |
|
try { |
|
_value = BaseData<dynamic>.fromJson( |
|
_result.data!, |
|
(json) => json as dynamic, |
|
); |
|
} on Object catch (e, s) { |
|
errorLogger?.logError(e, s, _options); |
|
rethrow; |
|
} |
|
return _value; |
|
} |
|
|
|
@override |
|
Future<BaseData<CouponDetail>> couponDetail(String memberCouponId) async { |
|
final _extra = <String, dynamic>{}; |
|
final queryParameters = <String, dynamic>{}; |
|
final _headers = <String, dynamic>{}; |
|
const Map<String, dynamic>? _data = null; |
|
final _options = _setStreamType<BaseData<CouponDetail>>(Options( |
|
method: 'GET', |
|
headers: _headers, |
|
extra: _extra, |
|
) |
|
.compose( |
|
_dio.options, |
|
'/coupon/detail/{memberCouponId}', |
|
queryParameters: queryParameters, |
|
data: _data, |
|
) |
|
.copyWith( |
|
baseUrl: _combineBaseUrls( |
|
_dio.options.baseUrl, |
|
baseUrl, |
|
))); |
|
final _result = await _dio.fetch<Map<String, dynamic>>(_options); |
|
late BaseData<CouponDetail> _value; |
|
try { |
|
_value = BaseData<CouponDetail>.fromJson( |
|
_result.data!, |
|
(json) => CouponDetail.fromJson(json as Map<String, dynamic>), |
|
); |
|
} on Object catch (e, s) { |
|
errorLogger?.logError(e, s, _options); |
|
rethrow; |
|
} |
|
return _value; |
|
} |
|
|
|
@override |
|
Future<BaseData<MemberInfor>> memberDetail(String id) async { |
|
final _extra = <String, dynamic>{}; |
|
final queryParameters = <String, dynamic>{}; |
|
final _headers = <String, dynamic>{}; |
|
const Map<String, dynamic>? _data = null; |
|
final _options = _setStreamType<BaseData<MemberInfor>>(Options( |
|
method: 'GET', |
|
headers: _headers, |
|
extra: _extra, |
|
) |
|
.compose( |
|
_dio.options, |
|
'/member/detail/${id}', |
|
queryParameters: queryParameters, |
|
data: _data, |
|
) |
|
.copyWith( |
|
baseUrl: _combineBaseUrls( |
|
_dio.options.baseUrl, |
|
baseUrl, |
|
))); |
|
final _result = await _dio.fetch<Map<String, dynamic>>(_options); |
|
late BaseData<MemberInfor> _value; |
|
try { |
|
_value = BaseData<MemberInfor>.fromJson( |
|
_result.data!, |
|
(json) => MemberInfor.fromJson(json as Map<String, dynamic>), |
|
); |
|
} on Object catch (e, s) { |
|
errorLogger?.logError(e, s, _options); |
|
rethrow; |
|
} |
|
return _value; |
|
} |
|
|
|
@override |
|
Future<BaseData<ActivityPos>> appPopup() async { |
|
final _extra = <String, dynamic>{}; |
|
final queryParameters = <String, dynamic>{}; |
|
final _headers = <String, dynamic>{}; |
|
const Map<String, dynamic>? _data = null; |
|
final _options = _setStreamType<BaseData<ActivityPos>>(Options( |
|
method: 'GET', |
|
headers: _headers, |
|
extra: _extra, |
|
) |
|
.compose( |
|
_dio.options, |
|
'/home/appPopup', |
|
queryParameters: queryParameters, |
|
data: _data, |
|
) |
|
.copyWith( |
|
baseUrl: _combineBaseUrls( |
|
_dio.options.baseUrl, |
|
baseUrl, |
|
))); |
|
final _result = await _dio.fetch<Map<String, dynamic>>(_options); |
|
late BaseData<ActivityPos> _value; |
|
try { |
|
_value = BaseData<ActivityPos>.fromJson( |
|
_result.data!, |
|
(json) => ActivityPos.fromJson(json as Map<String, dynamic>), |
|
); |
|
} on Object catch (e, s) { |
|
errorLogger?.logError(e, s, _options); |
|
rethrow; |
|
} |
|
return _value; |
|
} |
|
|
|
@override |
|
Future<BaseData<dynamic>> deleteMine() async { |
|
final _extra = <String, dynamic>{}; |
|
final queryParameters = <String, dynamic>{}; |
|
final _headers = <String, dynamic>{}; |
|
const Map<String, dynamic>? _data = null; |
|
final _options = _setStreamType<BaseData<dynamic>>(Options( |
|
method: 'GET', |
|
headers: _headers, |
|
extra: _extra, |
|
) |
|
.compose( |
|
_dio.options, |
|
'/member/deleteMine', |
|
queryParameters: queryParameters, |
|
data: _data, |
|
) |
|
.copyWith( |
|
baseUrl: _combineBaseUrls( |
|
_dio.options.baseUrl, |
|
baseUrl, |
|
))); |
|
final _result = await _dio.fetch<Map<String, dynamic>>(_options); |
|
late BaseData<dynamic> _value; |
|
try { |
|
_value = BaseData<dynamic>.fromJson( |
|
_result.data!, |
|
(json) => json as dynamic, |
|
); |
|
} on Object catch (e, s) { |
|
errorLogger?.logError(e, s, _options); |
|
rethrow; |
|
} |
|
return _value; |
|
} |
|
|
|
@override |
|
Future<BaseData<dynamic>> complaint(Map<String, dynamic> param) async { |
|
final _extra = <String, dynamic>{}; |
|
final queryParameters = <String, dynamic>{}; |
|
final _headers = <String, dynamic>{}; |
|
final _data = <String, dynamic>{}; |
|
_data.addAll(param); |
|
final _options = _setStreamType<BaseData<dynamic>>(Options( |
|
method: 'POST', |
|
headers: _headers, |
|
extra: _extra, |
|
) |
|
.compose( |
|
_dio.options, |
|
'/information/complaint', |
|
queryParameters: queryParameters, |
|
data: _data, |
|
) |
|
.copyWith( |
|
baseUrl: _combineBaseUrls( |
|
_dio.options.baseUrl, |
|
baseUrl, |
|
))); |
|
final _result = await _dio.fetch<Map<String, dynamic>>(_options); |
|
late BaseData<dynamic> _value; |
|
try { |
|
_value = BaseData<dynamic>.fromJson( |
|
_result.data!, |
|
(json) => json as dynamic, |
|
); |
|
} on Object catch (e, s) { |
|
errorLogger?.logError(e, s, _options); |
|
rethrow; |
|
} |
|
return _value; |
|
} |
|
|
|
@override |
|
Future<BaseData<AppUpdate>> appVersion() async { |
|
final _extra = <String, dynamic>{}; |
|
final queryParameters = <String, dynamic>{}; |
|
final _headers = <String, dynamic>{}; |
|
const Map<String, dynamic>? _data = null; |
|
final _options = _setStreamType<BaseData<AppUpdate>>(Options( |
|
method: 'GET', |
|
headers: _headers, |
|
extra: _extra, |
|
) |
|
.compose( |
|
_dio.options, |
|
'/home/version', |
|
queryParameters: queryParameters, |
|
data: _data, |
|
) |
|
.copyWith( |
|
baseUrl: _combineBaseUrls( |
|
_dio.options.baseUrl, |
|
baseUrl, |
|
))); |
|
final _result = await _dio.fetch<Map<String, dynamic>>(_options); |
|
late BaseData<AppUpdate> _value; |
|
try { |
|
_value = BaseData<AppUpdate>.fromJson( |
|
_result.data!, |
|
(json) => AppUpdate.fromJson(json as Map<String, dynamic>), |
|
); |
|
} on Object catch (e, s) { |
|
errorLogger?.logError(e, s, _options); |
|
rethrow; |
|
} |
|
return _value; |
|
} |
|
|
|
@override |
|
Future<BaseData<HomeRank>> recommendRank() async { |
|
final _extra = <String, dynamic>{}; |
|
final queryParameters = <String, dynamic>{}; |
|
final _headers = <String, dynamic>{}; |
|
const Map<String, dynamic>? _data = null; |
|
final _options = _setStreamType<BaseData<HomeRank>>(Options( |
|
method: 'GET', |
|
headers: _headers, |
|
extra: _extra, |
|
) |
|
.compose( |
|
_dio.options, |
|
'/home/recommendRank', |
|
queryParameters: queryParameters, |
|
data: _data, |
|
) |
|
.copyWith( |
|
baseUrl: _combineBaseUrls( |
|
_dio.options.baseUrl, |
|
baseUrl, |
|
))); |
|
final _result = await _dio.fetch<Map<String, dynamic>>(_options); |
|
late BaseData<HomeRank> _value; |
|
try { |
|
_value = BaseData<HomeRank>.fromJson( |
|
_result.data!, |
|
(json) => HomeRank.fromJson(json as Map<String, dynamic>), |
|
); |
|
} on Object catch (e, s) { |
|
errorLogger?.logError(e, s, _options); |
|
rethrow; |
|
} |
|
return _value; |
|
} |
|
|
|
@override |
|
Future<BaseData<dynamic>> sendVerifyByUpdatePayPwd() async { |
|
final _extra = <String, dynamic>{}; |
|
final queryParameters = <String, dynamic>{}; |
|
final _headers = <String, dynamic>{}; |
|
const Map<String, dynamic>? _data = null; |
|
final _options = _setStreamType<BaseData<dynamic>>(Options( |
|
method: 'GET', |
|
headers: _headers, |
|
extra: _extra, |
|
) |
|
.compose( |
|
_dio.options, |
|
'/member/sendVerifyByUpdatePayPwd', |
|
queryParameters: queryParameters, |
|
data: _data, |
|
) |
|
.copyWith( |
|
baseUrl: _combineBaseUrls( |
|
_dio.options.baseUrl, |
|
baseUrl, |
|
))); |
|
final _result = await _dio.fetch<Map<String, dynamic>>(_options); |
|
late BaseData<dynamic> _value; |
|
try { |
|
_value = BaseData<dynamic>.fromJson( |
|
_result.data!, |
|
(json) => json as dynamic, |
|
); |
|
} on Object catch (e, s) { |
|
errorLogger?.logError(e, s, _options); |
|
rethrow; |
|
} |
|
return _value; |
|
} |
|
|
|
@override |
|
Future<BaseData<dynamic>> updatePayPwd(Map<String, dynamic> param) async { |
|
final _extra = <String, dynamic>{}; |
|
final queryParameters = <String, dynamic>{}; |
|
final _headers = <String, dynamic>{}; |
|
final _data = <String, dynamic>{}; |
|
_data.addAll(param); |
|
final _options = _setStreamType<BaseData<dynamic>>(Options( |
|
method: 'POST', |
|
headers: _headers, |
|
extra: _extra, |
|
) |
|
.compose( |
|
_dio.options, |
|
'/member/updatePayPwd', |
|
queryParameters: queryParameters, |
|
data: _data, |
|
) |
|
.copyWith( |
|
baseUrl: _combineBaseUrls( |
|
_dio.options.baseUrl, |
|
baseUrl, |
|
))); |
|
final _result = await _dio.fetch<Map<String, dynamic>>(_options); |
|
late BaseData<dynamic> _value; |
|
try { |
|
_value = BaseData<dynamic>.fromJson( |
|
_result.data!, |
|
(json) => json as dynamic, |
|
); |
|
} on Object catch (e, s) { |
|
errorLogger?.logError(e, s, _options); |
|
rethrow; |
|
} |
|
return _value; |
|
} |
|
|
|
@override |
|
Future<BaseData<dynamic>> verifyByUpdatePayPwd( |
|
Map<String, dynamic> param) async { |
|
final _extra = <String, dynamic>{}; |
|
final queryParameters = <String, dynamic>{}; |
|
final _headers = <String, dynamic>{}; |
|
final _data = <String, dynamic>{}; |
|
_data.addAll(param); |
|
final _options = _setStreamType<BaseData<dynamic>>(Options( |
|
method: 'POST', |
|
headers: _headers, |
|
extra: _extra, |
|
) |
|
.compose( |
|
_dio.options, |
|
'/member/verifyByUpdatePayPwd', |
|
queryParameters: queryParameters, |
|
data: _data, |
|
) |
|
.copyWith( |
|
baseUrl: _combineBaseUrls( |
|
_dio.options.baseUrl, |
|
baseUrl, |
|
))); |
|
final _result = await _dio.fetch<Map<String, dynamic>>(_options); |
|
late BaseData<dynamic> _value; |
|
try { |
|
_value = BaseData<dynamic>.fromJson( |
|
_result.data!, |
|
(json) => json as dynamic, |
|
); |
|
} on Object catch (e, s) { |
|
errorLogger?.logError(e, s, _options); |
|
rethrow; |
|
} |
|
return _value; |
|
} |
|
|
|
@override |
|
Future<BaseData<VipCardHome>> vipCardIndex() async { |
|
final _extra = <String, dynamic>{}; |
|
final queryParameters = <String, dynamic>{}; |
|
final _headers = <String, dynamic>{}; |
|
const Map<String, dynamic>? _data = null; |
|
final _options = _setStreamType<BaseData<VipCardHome>>(Options( |
|
method: 'GET', |
|
headers: _headers, |
|
extra: _extra, |
|
) |
|
.compose( |
|
_dio.options, |
|
'/vipCard/index', |
|
queryParameters: queryParameters, |
|
data: _data, |
|
) |
|
.copyWith( |
|
baseUrl: _combineBaseUrls( |
|
_dio.options.baseUrl, |
|
baseUrl, |
|
))); |
|
final _result = await _dio.fetch<Map<String, dynamic>>(_options); |
|
late BaseData<VipCardHome> _value; |
|
try { |
|
_value = BaseData<VipCardHome>.fromJson( |
|
_result.data!, |
|
(json) => VipCardHome.fromJson(json as Map<String, dynamic>), |
|
); |
|
} on Object catch (e, s) { |
|
errorLogger?.logError(e, s, _options); |
|
rethrow; |
|
} |
|
return _value; |
|
} |
|
|
|
@override |
|
Future<BaseData<dynamic>> orderVip(Map<String, dynamic> param) async { |
|
final _extra = <String, dynamic>{}; |
|
final queryParameters = <String, dynamic>{}; |
|
final _headers = <String, dynamic>{}; |
|
final _data = <String, dynamic>{}; |
|
_data.addAll(param); |
|
final _options = _setStreamType<BaseData<dynamic>>(Options( |
|
method: 'POST', |
|
headers: _headers, |
|
extra: _extra, |
|
) |
|
.compose( |
|
_dio.options, |
|
'/vipCard/orderVip', |
|
queryParameters: queryParameters, |
|
data: _data, |
|
) |
|
.copyWith( |
|
baseUrl: _combineBaseUrls( |
|
_dio.options.baseUrl, |
|
baseUrl, |
|
))); |
|
final _result = await _dio.fetch<Map<String, dynamic>>(_options); |
|
late BaseData<dynamic> _value; |
|
try { |
|
_value = BaseData<dynamic>.fromJson( |
|
_result.data!, |
|
(json) => json as dynamic, |
|
); |
|
} on Object catch (e, s) { |
|
errorLogger?.logError(e, s, _options); |
|
rethrow; |
|
} |
|
return _value; |
|
} |
|
|
|
@override |
|
Future<BaseListData<Farmers>> getConfig() async { |
|
final _extra = <String, dynamic>{}; |
|
final queryParameters = <String, dynamic>{}; |
|
final _headers = <String, dynamic>{}; |
|
const Map<String, dynamic>? _data = null; |
|
final _options = _setStreamType<BaseListData<Farmers>>(Options( |
|
method: 'GET', |
|
headers: _headers, |
|
extra: _extra, |
|
) |
|
.compose( |
|
_dio.options, |
|
'/raise/products', |
|
queryParameters: queryParameters, |
|
data: _data, |
|
) |
|
.copyWith( |
|
baseUrl: _combineBaseUrls( |
|
_dio.options.baseUrl, |
|
baseUrl, |
|
))); |
|
final _result = await _dio.fetch<Map<String, dynamic>>(_options); |
|
late BaseListData<Farmers> _value; |
|
try { |
|
_value = BaseListData<Farmers>.fromJson( |
|
_result.data!, |
|
(json) => Farmers.fromJson(json as Map<String, dynamic>), |
|
); |
|
} on Object catch (e, s) { |
|
errorLogger?.logError(e, s, _options); |
|
rethrow; |
|
} |
|
return _value; |
|
} |
|
|
|
@override |
|
Future<BaseData<dynamic>> changePhone(Map<String, dynamic> param) async { |
|
final _extra = <String, dynamic>{}; |
|
final queryParameters = <String, dynamic>{}; |
|
final _headers = <String, dynamic>{}; |
|
final _data = <String, dynamic>{}; |
|
_data.addAll(param); |
|
final _options = _setStreamType<BaseData<dynamic>>(Options( |
|
method: 'POST', |
|
headers: _headers, |
|
extra: _extra, |
|
) |
|
.compose( |
|
_dio.options, |
|
'/auth/changePhone', |
|
queryParameters: queryParameters, |
|
data: _data, |
|
) |
|
.copyWith( |
|
baseUrl: _combineBaseUrls( |
|
_dio.options.baseUrl, |
|
baseUrl, |
|
))); |
|
final _result = await _dio.fetch<Map<String, dynamic>>(_options); |
|
late BaseData<dynamic> _value; |
|
try { |
|
_value = BaseData<dynamic>.fromJson( |
|
_result.data!, |
|
(json) => json as dynamic, |
|
); |
|
} on Object catch (e, s) { |
|
errorLogger?.logError(e, s, _options); |
|
rethrow; |
|
} |
|
return _value; |
|
} |
|
|
|
@override |
|
Future<BaseData<dynamic>> changeSendVerify(String mobile) async { |
|
final _extra = <String, dynamic>{}; |
|
final queryParameters = <String, dynamic>{}; |
|
final _headers = <String, dynamic>{}; |
|
const Map<String, dynamic>? _data = null; |
|
final _options = _setStreamType<BaseData<dynamic>>(Options( |
|
method: 'GET', |
|
headers: _headers, |
|
extra: _extra, |
|
) |
|
.compose( |
|
_dio.options, |
|
'/auth/sendVerify/${mobile}', |
|
queryParameters: queryParameters, |
|
data: _data, |
|
) |
|
.copyWith( |
|
baseUrl: _combineBaseUrls( |
|
_dio.options.baseUrl, |
|
baseUrl, |
|
))); |
|
final _result = await _dio.fetch<Map<String, dynamic>>(_options); |
|
late BaseData<dynamic> _value; |
|
try { |
|
_value = BaseData<dynamic>.fromJson( |
|
_result.data!, |
|
(json) => json as dynamic, |
|
); |
|
} on Object catch (e, s) { |
|
errorLogger?.logError(e, s, _options); |
|
rethrow; |
|
} |
|
return _value; |
|
} |
|
|
|
@override |
|
Future<BaseListData<Store>> storeListByCreditId(String creditGoodsId) async { |
|
final _extra = <String, dynamic>{}; |
|
final queryParameters = <String, dynamic>{}; |
|
final _headers = <String, dynamic>{}; |
|
const Map<String, dynamic>? _data = null; |
|
final _options = _setStreamType<BaseListData<Store>>(Options( |
|
method: 'GET', |
|
headers: _headers, |
|
extra: _extra, |
|
) |
|
.compose( |
|
_dio.options, |
|
'/store/storeListByCreditId/${creditGoodsId}', |
|
queryParameters: queryParameters, |
|
data: _data, |
|
) |
|
.copyWith( |
|
baseUrl: _combineBaseUrls( |
|
_dio.options.baseUrl, |
|
baseUrl, |
|
))); |
|
final _result = await _dio.fetch<Map<String, dynamic>>(_options); |
|
late BaseListData<Store> _value; |
|
try { |
|
_value = BaseListData<Store>.fromJson( |
|
_result.data!, |
|
(json) => Store.fromJson(json as Map<String, dynamic>), |
|
); |
|
} on Object catch (e, s) { |
|
errorLogger?.logError(e, s, _options); |
|
rethrow; |
|
} |
|
return _value; |
|
} |
|
|
|
@override |
|
Future<String?> getIpInfo() async { |
|
final _extra = <String, dynamic>{}; |
|
final queryParameters = <String, dynamic>{}; |
|
final _headers = <String, dynamic>{}; |
|
const Map<String, dynamic>? _data = null; |
|
final _options = _setStreamType<String?>(Options( |
|
method: 'GET', |
|
headers: _headers, |
|
extra: _extra, |
|
) |
|
.compose( |
|
_dio.options, |
|
'/ipJson.jsp', |
|
queryParameters: queryParameters, |
|
data: _data, |
|
) |
|
.copyWith( |
|
baseUrl: _combineBaseUrls( |
|
_dio.options.baseUrl, |
|
baseUrl, |
|
))); |
|
final _result = await _dio.fetch<String?>(_options); |
|
late String? _value; |
|
try { |
|
_value = _result.data; |
|
} on Object catch (e, s) { |
|
errorLogger?.logError(e, s, _options); |
|
rethrow; |
|
} |
|
return _value; |
|
} |
|
|
|
@override |
|
Future<BaseData<InvoiceList>> invoiceOrderList( |
|
Map<String, dynamic> param) async { |
|
final _extra = <String, dynamic>{}; |
|
final queryParameters = <String, dynamic>{}; |
|
final _headers = <String, dynamic>{}; |
|
final _data = <String, dynamic>{}; |
|
_data.addAll(param); |
|
final _options = _setStreamType<BaseData<InvoiceList>>(Options( |
|
method: 'POST', |
|
headers: _headers, |
|
extra: _extra, |
|
) |
|
.compose( |
|
_dio.options, |
|
'order/invoiceOrderList', |
|
queryParameters: queryParameters, |
|
data: _data, |
|
) |
|
.copyWith( |
|
baseUrl: _combineBaseUrls( |
|
_dio.options.baseUrl, |
|
baseUrl, |
|
))); |
|
final _result = await _dio.fetch<Map<String, dynamic>>(_options); |
|
late BaseData<InvoiceList> _value; |
|
try { |
|
_value = BaseData<InvoiceList>.fromJson( |
|
_result.data!, |
|
(json) => InvoiceList.fromJson(json as Map<String, dynamic>), |
|
); |
|
} on Object catch (e, s) { |
|
errorLogger?.logError(e, s, _options); |
|
rethrow; |
|
} |
|
return _value; |
|
} |
|
|
|
@override |
|
Future<BaseData<dynamic>> invoiceHeader(Map<String, dynamic> param) async { |
|
final _extra = <String, dynamic>{}; |
|
final queryParameters = <String, dynamic>{}; |
|
final _headers = <String, dynamic>{}; |
|
final _data = <String, dynamic>{}; |
|
_data.addAll(param); |
|
final _options = _setStreamType<BaseData<dynamic>>(Options( |
|
method: 'POST', |
|
headers: _headers, |
|
extra: _extra, |
|
) |
|
.compose( |
|
_dio.options, |
|
'invoiceHeader', |
|
queryParameters: queryParameters, |
|
data: _data, |
|
) |
|
.copyWith( |
|
baseUrl: _combineBaseUrls( |
|
_dio.options.baseUrl, |
|
baseUrl, |
|
))); |
|
final _result = await _dio.fetch<Map<String, dynamic>>(_options); |
|
late BaseData<dynamic> _value; |
|
try { |
|
_value = BaseData<dynamic>.fromJson( |
|
_result.data!, |
|
(json) => json as dynamic, |
|
); |
|
} on Object catch (e, s) { |
|
errorLogger?.logError(e, s, _options); |
|
rethrow; |
|
} |
|
return _value; |
|
} |
|
|
|
@override |
|
Future<BaseData<dynamic>> invoiceHeaders(Map<String, dynamic> param) async { |
|
final _extra = <String, dynamic>{}; |
|
final queryParameters = <String, dynamic>{}; |
|
final _headers = <String, dynamic>{}; |
|
final _data = <String, dynamic>{}; |
|
_data.addAll(param); |
|
final _options = _setStreamType<BaseData<dynamic>>(Options( |
|
method: 'PUT', |
|
headers: _headers, |
|
extra: _extra, |
|
) |
|
.compose( |
|
_dio.options, |
|
'invoiceHeader', |
|
queryParameters: queryParameters, |
|
data: _data, |
|
) |
|
.copyWith( |
|
baseUrl: _combineBaseUrls( |
|
_dio.options.baseUrl, |
|
baseUrl, |
|
))); |
|
final _result = await _dio.fetch<Map<String, dynamic>>(_options); |
|
late BaseData<dynamic> _value; |
|
try { |
|
_value = BaseData<dynamic>.fromJson( |
|
_result.data!, |
|
(json) => json as dynamic, |
|
); |
|
} on Object catch (e, s) { |
|
errorLogger?.logError(e, s, _options); |
|
rethrow; |
|
} |
|
return _value; |
|
} |
|
|
|
@override |
|
Future<BaseData<TitleInfoList>> invoiceHeaderList( |
|
Map<String, dynamic> param) async { |
|
final _extra = <String, dynamic>{}; |
|
final queryParameters = <String, dynamic>{}; |
|
final _headers = <String, dynamic>{}; |
|
final _data = <String, dynamic>{}; |
|
_data.addAll(param); |
|
final _options = _setStreamType<BaseData<TitleInfoList>>(Options( |
|
method: 'POST', |
|
headers: _headers, |
|
extra: _extra, |
|
) |
|
.compose( |
|
_dio.options, |
|
'invoiceHeader/page', |
|
queryParameters: queryParameters, |
|
data: _data, |
|
) |
|
.copyWith( |
|
baseUrl: _combineBaseUrls( |
|
_dio.options.baseUrl, |
|
baseUrl, |
|
))); |
|
final _result = await _dio.fetch<Map<String, dynamic>>(_options); |
|
late BaseData<TitleInfoList> _value; |
|
try { |
|
_value = BaseData<TitleInfoList>.fromJson( |
|
_result.data!, |
|
(json) => TitleInfoList.fromJson(json as Map<String, dynamic>), |
|
); |
|
} on Object catch (e, s) { |
|
errorLogger?.logError(e, s, _options); |
|
rethrow; |
|
} |
|
return _value; |
|
} |
|
|
|
@override |
|
Future<BaseData<dynamic>> delInvoiceHeader(String ids) async { |
|
final _extra = <String, dynamic>{}; |
|
final queryParameters = <String, dynamic>{}; |
|
final _headers = <String, dynamic>{}; |
|
const Map<String, dynamic>? _data = null; |
|
final _options = _setStreamType<BaseData<dynamic>>(Options( |
|
method: 'DELETE', |
|
headers: _headers, |
|
extra: _extra, |
|
) |
|
.compose( |
|
_dio.options, |
|
'invoiceHeader?ids[]=${ids}', |
|
queryParameters: queryParameters, |
|
data: _data, |
|
) |
|
.copyWith( |
|
baseUrl: _combineBaseUrls( |
|
_dio.options.baseUrl, |
|
baseUrl, |
|
))); |
|
final _result = await _dio.fetch<Map<String, dynamic>>(_options); |
|
late BaseData<dynamic> _value; |
|
try { |
|
_value = BaseData<dynamic>.fromJson( |
|
_result.data!, |
|
(json) => json as dynamic, |
|
); |
|
} on Object catch (e, s) { |
|
errorLogger?.logError(e, s, _options); |
|
rethrow; |
|
} |
|
return _value; |
|
} |
|
|
|
@override |
|
Future<BaseData<dynamic>> invoiceSubmit(Map<String, dynamic> param) async { |
|
final _extra = <String, dynamic>{}; |
|
final queryParameters = <String, dynamic>{}; |
|
final _headers = <String, dynamic>{}; |
|
final _data = <String, dynamic>{}; |
|
_data.addAll(param); |
|
final _options = _setStreamType<BaseData<dynamic>>(Options( |
|
method: 'POST', |
|
headers: _headers, |
|
extra: _extra, |
|
) |
|
.compose( |
|
_dio.options, |
|
'invoice', |
|
queryParameters: queryParameters, |
|
data: _data, |
|
) |
|
.copyWith( |
|
baseUrl: _combineBaseUrls( |
|
_dio.options.baseUrl, |
|
baseUrl, |
|
))); |
|
final _result = await _dio.fetch<Map<String, dynamic>>(_options); |
|
late BaseData<dynamic> _value; |
|
try { |
|
_value = BaseData<dynamic>.fromJson( |
|
_result.data!, |
|
(json) => json as dynamic, |
|
); |
|
} on Object catch (e, s) { |
|
errorLogger?.logError(e, s, _options); |
|
rethrow; |
|
} |
|
return _value; |
|
} |
|
|
|
@override |
|
Future<BaseData<InvoicesHistoryList>> invoicePage( |
|
Map<String, dynamic> param) async { |
|
final _extra = <String, dynamic>{}; |
|
final queryParameters = <String, dynamic>{}; |
|
final _headers = <String, dynamic>{}; |
|
final _data = <String, dynamic>{}; |
|
_data.addAll(param); |
|
final _options = _setStreamType<BaseData<InvoicesHistoryList>>(Options( |
|
method: 'POST', |
|
headers: _headers, |
|
extra: _extra, |
|
) |
|
.compose( |
|
_dio.options, |
|
'invoice/page', |
|
queryParameters: queryParameters, |
|
data: _data, |
|
) |
|
.copyWith( |
|
baseUrl: _combineBaseUrls( |
|
_dio.options.baseUrl, |
|
baseUrl, |
|
))); |
|
final _result = await _dio.fetch<Map<String, dynamic>>(_options); |
|
late BaseData<InvoicesHistoryList> _value; |
|
try { |
|
_value = BaseData<InvoicesHistoryList>.fromJson( |
|
_result.data!, |
|
(json) => InvoicesHistoryList.fromJson(json as Map<String, dynamic>), |
|
); |
|
} on Object catch (e, s) { |
|
errorLogger?.logError(e, s, _options); |
|
rethrow; |
|
} |
|
return _value; |
|
} |
|
|
|
@override |
|
Future<BaseData<InvoicesDetailInfo>> invoiceDetail(String id) async { |
|
final _extra = <String, dynamic>{}; |
|
final queryParameters = <String, dynamic>{}; |
|
final _headers = <String, dynamic>{}; |
|
const Map<String, dynamic>? _data = null; |
|
final _options = _setStreamType<BaseData<InvoicesDetailInfo>>(Options( |
|
method: 'GET', |
|
headers: _headers, |
|
extra: _extra, |
|
) |
|
.compose( |
|
_dio.options, |
|
'invoice/detail${id}', |
|
queryParameters: queryParameters, |
|
data: _data, |
|
) |
|
.copyWith( |
|
baseUrl: _combineBaseUrls( |
|
_dio.options.baseUrl, |
|
baseUrl, |
|
))); |
|
final _result = await _dio.fetch<Map<String, dynamic>>(_options); |
|
late BaseData<InvoicesDetailInfo> _value; |
|
try { |
|
_value = BaseData<InvoicesDetailInfo>.fromJson( |
|
_result.data!, |
|
(json) => InvoicesDetailInfo.fromJson(json as Map<String, dynamic>), |
|
); |
|
} on Object catch (e, s) { |
|
errorLogger?.logError(e, s, _options); |
|
rethrow; |
|
} |
|
return _value; |
|
} |
|
|
|
@override |
|
Future<BaseListData<ImUser>> memberInfoByIds( |
|
Map<String, dynamic> param) async { |
|
final _extra = <String, dynamic>{}; |
|
final queryParameters = <String, dynamic>{}; |
|
final _headers = <String, dynamic>{}; |
|
final _data = <String, dynamic>{}; |
|
_data.addAll(param); |
|
final _options = _setStreamType<BaseListData<ImUser>>(Options( |
|
method: 'POST', |
|
headers: _headers, |
|
extra: _extra, |
|
) |
|
.compose( |
|
_dio.options, |
|
'/member/memberInfoByIds', |
|
queryParameters: queryParameters, |
|
data: _data, |
|
) |
|
.copyWith( |
|
baseUrl: _combineBaseUrls( |
|
_dio.options.baseUrl, |
|
baseUrl, |
|
))); |
|
final _result = await _dio.fetch<Map<String, dynamic>>(_options); |
|
late BaseListData<ImUser> _value; |
|
try { |
|
_value = BaseListData<ImUser>.fromJson( |
|
_result.data!, |
|
(json) => ImUser.fromJson(json as Map<String, dynamic>), |
|
); |
|
} on Object catch (e, s) { |
|
errorLogger?.logError(e, s, _options); |
|
rethrow; |
|
} |
|
return _value; |
|
} |
|
|
|
@override |
|
Future<BaseListData<ImUser>> memberSearch(String keyword) async { |
|
final _extra = <String, dynamic>{}; |
|
final queryParameters = <String, dynamic>{}; |
|
final _headers = <String, dynamic>{}; |
|
const Map<String, dynamic>? _data = null; |
|
final _options = _setStreamType<BaseListData<ImUser>>(Options( |
|
method: 'GET', |
|
headers: _headers, |
|
extra: _extra, |
|
) |
|
.compose( |
|
_dio.options, |
|
'/member/memberSearch?keyword=${keyword}', |
|
queryParameters: queryParameters, |
|
data: _data, |
|
) |
|
.copyWith( |
|
baseUrl: _combineBaseUrls( |
|
_dio.options.baseUrl, |
|
baseUrl, |
|
))); |
|
final _result = await _dio.fetch<Map<String, dynamic>>(_options); |
|
late BaseListData<ImUser> _value; |
|
try { |
|
_value = BaseListData<ImUser>.fromJson( |
|
_result.data!, |
|
(json) => ImUser.fromJson(json as Map<String, dynamic>), |
|
); |
|
} on Object catch (e, s) { |
|
errorLogger?.logError(e, s, _options); |
|
rethrow; |
|
} |
|
return _value; |
|
} |
|
|
|
@override |
|
Future<BaseData<String>> getQiniuToken() async { |
|
final _extra = <String, dynamic>{}; |
|
final queryParameters = <String, dynamic>{}; |
|
final _headers = <String, dynamic>{}; |
|
const Map<String, dynamic>? _data = null; |
|
final _options = _setStreamType<BaseData<String>>(Options( |
|
method: 'GET', |
|
headers: _headers, |
|
extra: _extra, |
|
) |
|
.compose( |
|
_dio.options, |
|
'/config/qiniuToken', |
|
queryParameters: queryParameters, |
|
data: _data, |
|
) |
|
.copyWith( |
|
baseUrl: _combineBaseUrls( |
|
_dio.options.baseUrl, |
|
baseUrl, |
|
))); |
|
final _result = await _dio.fetch<Map<String, dynamic>>(_options); |
|
late BaseData<String> _value; |
|
try { |
|
_value = BaseData<String>.fromJson( |
|
_result.data!, |
|
(json) => json as String, |
|
); |
|
} on Object catch (e, s) { |
|
errorLogger?.logError(e, s, _options); |
|
rethrow; |
|
} |
|
return _value; |
|
} |
|
|
|
RequestOptions _setStreamType<T>(RequestOptions requestOptions) { |
|
if (T != dynamic && |
|
!(requestOptions.responseType == ResponseType.bytes || |
|
requestOptions.responseType == ResponseType.stream)) { |
|
if (T == String) { |
|
requestOptions.responseType = ResponseType.plain; |
|
} else { |
|
requestOptions.responseType = ResponseType.json; |
|
} |
|
} |
|
return requestOptions; |
|
} |
|
|
|
String _combineBaseUrls( |
|
String dioBaseUrl, |
|
String? baseUrl, |
|
) { |
|
if (baseUrl == null || baseUrl.trim().isEmpty) { |
|
return dioBaseUrl; |
|
} |
|
|
|
final url = Uri.parse(baseUrl); |
|
|
|
if (url.isAbsolute) { |
|
return url.toString(); |
|
} |
|
|
|
return Uri.parse(dioBaseUrl).resolveUri(url).toString(); |
|
} |
|
}
|
|
|