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.
 
 
 
 
 
 

2811 lines
85 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
class _ApiService implements ApiService {
_ApiService(
this._dio, {
this.baseUrl,
}) {
baseUrl ??= 'http://192.168.10.54:8766/app/';
}
final Dio _dio;
String? baseUrl;
@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 _result = await _dio.fetch<Map<String, dynamic>>(
_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 value = BaseData<UploadResult>.fromJson(_result.data!);
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 _result = await _dio.fetch(_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 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 _result = await _dio.fetch<Map<String, dynamic>?>(
_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 value = _result.data == null
? null
: BaseData<LoginInfo>.fromJson(_result.data!);
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 _result = await _dio
.fetch<Map<String, dynamic>>(_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 value = BaseData<Channels>.fromJson(_result.data!);
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 _result = await _dio
.fetch<Map<String, dynamic>>(_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 value = BaseData<dynamic>.fromJson(_result.data!);
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 _result = await _dio.fetch<Map<String, dynamic>>(
_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 value = BaseData<PageInfo<Goods>>.fromJson(_result.data!);
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 _result = await _dio.fetch<Map<String, dynamic>>(
_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 value = BaseData<PageInfo<GoodsCategory>>.fromJson(_result.data!);
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 _result = await _dio
.fetch<Map<String, dynamic>>(_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 value = BaseData<Goods>.fromJson(_result.data!);
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 _result = await _dio
.fetch<Map<String, dynamic>>(_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 value = BaseData<UserInfo>.fromJson(_result.data!);
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 _result = await _dio
.fetch<Map<String, dynamic>>(_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 value = BaseData<dynamic>.fromJson(_result.data!);
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 _result = await _dio
.fetch<Map<String, dynamic>>(_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 value = BaseData<SignInfo>.fromJson(_result.data!);
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 _result = await _dio
.fetch<Map<String, dynamic>>(_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 value = BaseData<dynamic>.fromJson(_result.data!);
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 _result = await _dio
.fetch<Map<String, dynamic>>(_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 value = BaseData<dynamic>.fromJson(_result.data!);
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 _result = await _dio.fetch<Map<String, dynamic>>(
_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 value = BaseData<RechargeAct>.fromJson(_result.data!);
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 _result = await _dio
.fetch<Map<String, dynamic>>(_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 value = BaseData<dynamic>.fromJson(_result.data!);
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 _result = await _dio.fetch<Map<String, dynamic>>(
_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 value = BaseData<PageInfo<ExchangeOrder>>.fromJson(_result.data!);
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 _result = await _dio
.fetch<Map<String, dynamic>>(_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 value = BaseData<dynamic>.fromJson(_result.data!);
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 _result = await _dio
.fetch<Map<String, dynamic>>(_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 value = BaseData<dynamic>.fromJson(_result.data!);
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 _result = await _dio
.fetch<Map<String, dynamic>>(_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 value = BaseData<dynamic>.fromJson(_result.data!);
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 _result = await _dio
.fetch<Map<String, dynamic>>(_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 value = BaseData<dynamic>.fromJson(_result.data!);
return value;
}
@override
Future<BaseData<List<Address>>> queryMemberAddress() async {
final _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
final _headers = <String, dynamic>{};
const Map<String, dynamic>? _data = null;
final _result = await _dio.fetch<Map<String, dynamic>>(
_setStreamType<BaseData<List<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 value = BaseData<List<Address>>.fromJson(_result.data!);
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 _result = await _dio
.fetch<Map<String, dynamic>>(_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 value = BaseData<dynamic>.fromJson(_result.data!);
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 _result = await _dio.fetch<Map<String, dynamic>>(
_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 value = BaseData<PageInfo<Coupon>>.fromJson(_result.data!);
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 _result = await _dio.fetch<Map<String, dynamic>>(
_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 value = BaseData<PageInfo<Coupon>>.fromJson(_result.data!);
return value;
}
@override
Future<BaseData<List<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 _result = await _dio.fetch<Map<String, dynamic>>(
_setStreamType<BaseData<List<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 value = BaseData<List<Store>>.fromJson(_result.data!);
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 _result = await _dio.fetch<Map<String, dynamic>>(
_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 value = BaseData<PageInfo<Activity>>.fromJson(_result.data!);
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 _result = await _dio
.fetch<Map<String, dynamic>>(_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 value = BaseData<Article>.fromJson(_result.data!);
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 _result = await _dio
.fetch<Map<String, dynamic>>(_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 value = BaseData<Activity>.fromJson(_result.data!);
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 _result = await _dio
.fetch<Map<String, dynamic>>(_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 value = BaseData<dynamic>.fromJson(_result.data!);
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 _result = await _dio.fetch<Map<String, dynamic>>(
_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 value = BaseData<BrandData>.fromJson(_result.data!);
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 _result = await _dio
.fetch<Map<String, dynamic>>(_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 value = BaseData<dynamic>.fromJson(_result.data!);
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 _result = await _dio.fetch<Map<String, dynamic>>(
_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 value = BaseData<PageInfo<Article>>.fromJson(_result.data!);
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 _result = await _dio.fetch<Map<String, dynamic>>(
_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 value = BaseData<PageInfo<BannerData>>.fromJson(_result.data!);
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 _result = await _dio
.fetch<Map<String, dynamic>>(_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 value = BaseData<dynamic>.fromJson(_result.data!);
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 _result = await _dio
.fetch<Map<String, dynamic>>(_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 value = BaseData<dynamic>.fromJson(_result.data!);
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 _result = await _dio.fetch<Map<String, dynamic>>(
_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 value = BaseData<PageInfo<UserBill>>.fromJson(_result.data!);
return value;
}
@override
Future<BaseData<List<Rank>>> rankList() async {
final _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
final _headers = <String, dynamic>{};
const Map<String, dynamic>? _data = null;
final _result = await _dio.fetch<Map<String, dynamic>>(
_setStreamType<BaseData<List<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 value = BaseData<List<Rank>>.fromJson(_result.data!);
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 _result = await _dio.fetch<Map<String, dynamic>>(
_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 value = BaseData<PageInfo<OrderInfo>>.fromJson(_result.data!);
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 _result = await _dio.fetch<Map<String, dynamic>>(
_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 value = BaseData<OrderInfo>.fromJson(_result.data!);
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 _result = await _dio
.fetch<Map<String, dynamic>>(_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 value = BaseData<dynamic>.fromJson(_result.data!);
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 _result = await _dio
.fetch<Map<String, dynamic>>(_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 value = BaseData<dynamic>.fromJson(_result.data!);
return value;
}
@override
Future<BaseData<List<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 _result = await _dio.fetch<Map<String, dynamic>>(
_setStreamType<BaseData<List<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 value = BaseData<List<VipCard>>.fromJson(_result.data!);
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 _result = await _dio
.fetch<Map<String, dynamic>>(_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 value = BaseData<VipCard>.fromJson(_result.data!);
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 _result = await _dio.fetch<Map<String, dynamic>>(
_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 value = BaseData<PageInfo<Message>>.fromJson(_result.data!);
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 _result = await _dio.fetch<Map<String, dynamic>>(
_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 value = ClickWordCaptchaModel.fromJson(_result.data!);
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 _result = await _dio.fetch<bool>(_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 value = _result.data!;
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 _result = await _dio
.fetch<Map<String, dynamic>>(_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 value = BaseData<dynamic>.fromJson(_result.data!);
return value;
}
@override
Future<BaseData<List<MsgStats>>> stats() async {
final _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
final _headers = <String, dynamic>{};
const Map<String, dynamic>? _data = null;
final _result = await _dio.fetch<Map<String, dynamic>>(
_setStreamType<BaseData<List<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 value = BaseData<List<MsgStats>>.fromJson(_result.data!);
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 _result = await _dio
.fetch<Map<String, dynamic>>(_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 value = BaseData<dynamic>.fromJson(_result.data!);
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 _result = await _dio
.fetch<Map<String, dynamic>>(_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 value = BaseData<dynamic>.fromJson(_result.data!);
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 _result = await _dio.fetch<Map<String, dynamic>>(
_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 value = BaseData<PageInfo<MemberComment>>.fromJson(_result.data!);
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 _result = await _dio
.fetch<Map<String, dynamic>>(_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 value = BaseData<dynamic>.fromJson(_result.data!);
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 _result = await _dio
.fetch<Map<String, dynamic>>(_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 value = BaseData<dynamic>.fromJson(_result.data!);
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 _result = await _dio.fetch<Map<String, dynamic>>(
_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 value = BaseData<Logistics>.fromJson(_result.data!);
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 _result = await _dio
.fetch<Map<String, dynamic>>(_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 value = BaseData<dynamic>.fromJson(_result.data!);
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 _result = await _dio
.fetch<Map<String, dynamic>>(_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 value = BaseData<String>.fromJson(_result.data!);
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 _result = await _dio
.fetch<Map<String, dynamic>>(_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 value = BaseData<bool>.fromJson(_result.data!);
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 _result = await _dio.fetch<Map<String, dynamic>>(
_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 value = BaseData<PageInfo<ComunityComment>>.fromJson(_result.data!);
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 _result = await _dio.fetch<Map<String, dynamic>>(
_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 value = BaseData<PageInfo<Follow>>.fromJson(_result.data!);
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 _result = await _dio
.fetch<Map<String, dynamic>>(_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 value = BaseData<dynamic>.fromJson(_result.data!);
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 _result = await _dio
.fetch<Map<String, dynamic>>(_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 value = BaseData<dynamic>.fromJson(_result.data!);
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 _result = await _dio.fetch<Map<String, dynamic>>(
_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 value = BaseData<SocialInfo>.fromJson(_result.data!);
return value;
}
@override
Future<BaseData<List<CategorySelect>>> categoryList() async {
final _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
final _headers = <String, dynamic>{};
const Map<String, dynamic>? _data = null;
final _result = await _dio.fetch<Map<String, dynamic>>(
_setStreamType<BaseData<List<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 value = BaseData<List<CategorySelect>>.fromJson(_result.data!);
return value;
}
@override
Future<BaseData<List<Chapter>>> catalogList(String courseId) async {
final _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
final _headers = <String, dynamic>{};
const Map<String, dynamic>? _data = null;
final _result = await _dio.fetch<Map<String, dynamic>>(
_setStreamType<BaseData<List<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 value = BaseData<List<Chapter>>.fromJson(_result.data!);
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 _result = await _dio.fetch<Map<String, dynamic>>(
_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 value = BaseData<PageInfo<Course>>.fromJson(_result.data!);
return value;
}
@override
Future<BaseData<List<CollectClass>>> collectList() async {
final _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
final _headers = <String, dynamic>{};
const Map<String, dynamic>? _data = null;
final _result = await _dio.fetch<Map<String, dynamic>>(
_setStreamType<BaseData<List<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 value = BaseData<List<CollectClass>>.fromJson(_result.data!);
return value;
}
@override
Future<BaseData<List<Course>>> collect(String collectId) async {
final _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
final _headers = <String, dynamic>{};
const Map<String, dynamic>? _data = null;
final _result = await _dio.fetch<Map<String, dynamic>>(
_setStreamType<BaseData<List<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 value = BaseData<List<Course>>.fromJson(_result.data!);
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 _result = await _dio.fetch<Map<String, dynamic>>(
_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 value = BaseData<CourseDetails>.fromJson(_result.data!);
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 _result = await _dio
.fetch<Map<String, dynamic>>(_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 value = BaseData<dynamic>.fromJson(_result.data!);
return value;
}
@override
Future<BaseData<List<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 _result = await _dio.fetch<Map<String, dynamic>>(
_setStreamType<BaseData<List<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 value = BaseData<List<VipBadges>>.fromJson(_result.data!);
return value;
}
@override
Future<BaseData<List<AchivementDetailList>>> getAchievementDetail(
String achievementCategoryId) async {
final _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
final _headers = <String, dynamic>{};
const Map<String, dynamic>? _data = null;
final _result = await _dio.fetch<Map<String, dynamic>>(
_setStreamType<BaseData<List<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 value = BaseData<List<AchivementDetailList>>.fromJson(_result.data!);
return value;
}
@override
Future<BaseData<List<VipBenefit>>> benefitList() async {
final _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
final _headers = <String, dynamic>{};
const Map<String, dynamic>? _data = null;
final _result = await _dio.fetch<Map<String, dynamic>>(
_setStreamType<BaseData<List<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 value = BaseData<List<VipBenefit>>.fromJson(_result.data!);
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 _result = await _dio.fetch<Map<String, dynamic>>(
_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 value = BaseData<VipRuleDetails>.fromJson(_result.data!);
return value;
}
@override
Future<BaseData<List<SecondCard>>> secondCardList() async {
final _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
final _headers = <String, dynamic>{};
const Map<String, dynamic>? _data = null;
final _result = await _dio.fetch<Map<String, dynamic>>(
_setStreamType<BaseData<List<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 value = BaseData<List<SecondCard>>.fromJson(_result.data!);
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 _result = await _dio
.fetch<Map<String, dynamic>>(_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 value = BaseData<dynamic>.fromJson(_result.data!);
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 _result = await _dio
.fetch<Map<String, dynamic>>(_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 value = BaseData<dynamic>.fromJson(_result.data!);
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 _result = await _dio.fetch<Map<String, dynamic>>(
_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 value = BaseData<Logistics>.fromJson(_result.data!);
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 _result = await _dio
.fetch<Map<String, dynamic>>(_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 value = BaseData<dynamic>.fromJson(_result.data!);
return value;
}
@override
Future<BaseData<List<Headlines>>> headlinesList() async {
final _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
final _headers = <String, dynamic>{};
const Map<String, dynamic>? _data = null;
final _result = await _dio.fetch<Map<String, dynamic>>(
_setStreamType<BaseData<List<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 value = BaseData<List<Headlines>>.fromJson(_result.data!);
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 _result = await _dio.fetch<Map<String, dynamic>>(
_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 value = BaseData<HeadlinesDetails>.fromJson(_result.data!);
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 _result = await _dio.fetch<Map<String, dynamic>>(
_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 value = BaseData<PageInfo<Invitation>>.fromJson(_result.data!);
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 _result = await _dio
.fetch<Map<String, dynamic>>(_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 value = BaseData<dynamic>.fromJson(_result.data!);
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 _result = await _dio.fetch<Map<String, dynamic>>(
_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 value = BaseData<CouponDetail>.fromJson(_result.data!);
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 _result = await _dio.fetch<Map<String, dynamic>>(
_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 value = BaseData<MemberInfor>.fromJson(_result.data!);
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 _result = await _dio.fetch<Map<String, dynamic>>(
_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 value = BaseData<ActivityPos>.fromJson(_result.data!);
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 _result = await _dio
.fetch<Map<String, dynamic>>(_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 value = BaseData<dynamic>.fromJson(_result.data!);
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 _result = await _dio
.fetch<Map<String, dynamic>>(_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 value = BaseData<dynamic>.fromJson(_result.data!);
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 _result = await _dio.fetch<Map<String, dynamic>>(
_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 value = BaseData<AppUpdate>.fromJson(_result.data!);
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 _result = await _dio
.fetch<Map<String, dynamic>>(_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 value = BaseData<HomeRank>.fromJson(_result.data!);
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 _result = await _dio
.fetch<Map<String, dynamic>>(_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 value = BaseData<dynamic>.fromJson(_result.data!);
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 _result = await _dio
.fetch<Map<String, dynamic>>(_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 value = BaseData<dynamic>.fromJson(_result.data!);
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 _result = await _dio
.fetch<Map<String, dynamic>>(_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 value = BaseData<dynamic>.fromJson(_result.data!);
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 _result = await _dio.fetch<Map<String, dynamic>>(
_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 value = BaseData<VipCardHome>.fromJson(_result.data!);
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 _result = await _dio
.fetch<Map<String, dynamic>>(_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 value = BaseData<dynamic>.fromJson(_result.data!);
return value;
}
@override
Future<BaseData<List<Farmers>>> getConfig() async {
final _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
final _headers = <String, dynamic>{};
const Map<String, dynamic>? _data = null;
final _result = await _dio.fetch<Map<String, dynamic>>(
_setStreamType<BaseData<List<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 value = BaseData<List<Farmers>>.fromJson(_result.data!);
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 _result = await _dio
.fetch<Map<String, dynamic>>(_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 value = BaseData<dynamic>.fromJson(_result.data!);
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 _result = await _dio
.fetch<Map<String, dynamic>>(_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 value = BaseData<dynamic>.fromJson(_result.data!);
return value;
}
@override
Future<BaseData<List<Store>>> storeListByCreditId(
String creditGoodsId) async {
final _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
final _headers = <String, dynamic>{};
const Map<String, dynamic>? _data = null;
final _result = await _dio.fetch<Map<String, dynamic>>(
_setStreamType<BaseData<List<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 value = BaseData<List<Store>>.fromJson(_result.data!);
return value;
}
@override
Future<IpData> getIpInfo() async {
final _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
final _headers = <String, dynamic>{};
const Map<String, dynamic>? _data = null;
final _result =
await _dio.fetch<Map<String, dynamic>>(_setStreamType<IpData>(Options(
method: 'GET',
headers: _headers,
extra: _extra,
)
.compose(
_dio.options,
'/ipJson.jsp',
queryParameters: queryParameters,
data: _data,
)
.copyWith(
baseUrl: _combineBaseUrls(
_dio.options.baseUrl,
baseUrl,
))));
String result = _result.data! as String;
print("result: ${result}");
final value = IpData.fromJson(jsonDecode(result.substring(result.indexOf("{\"ip\":\"")).replaceAll(");}", "")));
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();
}
}