From 39400cf97147bfc797a68c8b2ce2d8b0b280fd4b Mon Sep 17 00:00:00 2001 From: fmk Date: Tue, 14 Sep 2021 18:30:32 +0800 Subject: [PATCH] safety --- lib/generated/intl/messages_en.dart | 4 +- lib/generated/intl/messages_zh_CN.dart | 4 +- lib/generated/intl/messages_zh_Hans_CN.dart | 4 +- lib/generated/intl/messages_zh_Hant_CN.dart | 4 +- lib/generated/intl/messages_zh_TW.dart | 4 +- lib/generated/l10n.dart | 8 +- lib/home/home_view/home_banner.dart | 17 +- lib/home/huixiang_brand_page.dart | 14 +- lib/home/huixiang_view/huixiang_banner.dart | 13 + .../points_mall_view/points_mall_banner.dart | 16 +- lib/l10n/intl_en.arb | 6 +- lib/l10n/intl_zh_CN.arb | 6 +- lib/l10n/intl_zh_Hans_CN.arb | 6 +- lib/l10n/intl_zh_Hant_CN.arb | 4 +- lib/l10n/intl_zh_TW.arb | 4 +- lib/retrofit/data/base_data.g.dart | 37 - lib/retrofit/data/page.g.dart | 41 - lib/retrofit/retrofit_api.dart | 10 +- lib/retrofit/retrofit_api.g.dart | 1185 ----------------- lib/union/union_details_page.dart | 4 +- 20 files changed, 82 insertions(+), 1309 deletions(-) delete mode 100644 lib/retrofit/data/base_data.g.dart delete mode 100644 lib/retrofit/data/page.g.dart delete mode 100644 lib/retrofit/retrofit_api.g.dart diff --git a/lib/generated/intl/messages_en.dart b/lib/generated/intl/messages_en.dart index 24956d48..1c1a5dd9 100644 --- a/lib/generated/intl/messages_en.dart +++ b/lib/generated/intl/messages_en.dart @@ -494,7 +494,7 @@ class MessageLookup extends MessageLookupByLibrary { "xiaofeijifen" : MessageLookupByLibrary.simpleMessage("消费积分"), "xiaoxi" : MessageLookupByLibrary.simpleMessage("消息"), "xiayidengji" : MessageLookupByLibrary.simpleMessage("下一等级"), - "xiazaiwancheng" : MessageLookupByLibrary.simpleMessage("下载完成"), + "xiazaiwancheng" : MessageLookupByLibrary.simpleMessage("加载完成"), "xieyitanchuang" : MessageLookupByLibrary.simpleMessage("一心回乡用户隐私政策"), "xihuan_" : m31, "xindianhuodong" : MessageLookupByLibrary.simpleMessage("星店活动"), @@ -569,7 +569,7 @@ class MessageLookup extends MessageLookupByLibrary { "zhengzaihujiaoqishou" : MessageLookupByLibrary.simpleMessage("正在呼叫骑手"), "zhengzaijiazai" : MessageLookupByLibrary.simpleMessage("正在加载"), "zhengzaipeisong" : MessageLookupByLibrary.simpleMessage("正在配送"), - "zhengzaixiazaizhong" : MessageLookupByLibrary.simpleMessage("正在下载中..."), + "zhengzaixiazaizhong" : MessageLookupByLibrary.simpleMessage("正在加载中..."), "zhidianmendian" : MessageLookupByLibrary.simpleMessage("致电门店"), "zhifubao" : MessageLookupByLibrary.simpleMessage("支付宝"), "zhifufangshi" : MessageLookupByLibrary.simpleMessage("支付方式"), diff --git a/lib/generated/intl/messages_zh_CN.dart b/lib/generated/intl/messages_zh_CN.dart index f1adef1f..4ba28786 100644 --- a/lib/generated/intl/messages_zh_CN.dart +++ b/lib/generated/intl/messages_zh_CN.dart @@ -493,7 +493,7 @@ class MessageLookup extends MessageLookupByLibrary { "xiaofeijifen" : MessageLookupByLibrary.simpleMessage("消费积分"), "xiaoxi" : MessageLookupByLibrary.simpleMessage("消息"), "xiayidengji" : MessageLookupByLibrary.simpleMessage("下一等级"), - "xiazaiwancheng" : MessageLookupByLibrary.simpleMessage("下载完成"), + "xiazaiwancheng" : MessageLookupByLibrary.simpleMessage("加载完成"), "xieyitanchuang" : MessageLookupByLibrary.simpleMessage("一心回乡用户隐私政策"), "xihuan_" : m31, "xindianhuodong" : MessageLookupByLibrary.simpleMessage("星店活动"), @@ -567,7 +567,7 @@ class MessageLookup extends MessageLookupByLibrary { "zhengzaihujiaoqishou" : MessageLookupByLibrary.simpleMessage("正在呼叫骑手"), "zhengzaijiazai" : MessageLookupByLibrary.simpleMessage("正在加载"), "zhengzaipeisong" : MessageLookupByLibrary.simpleMessage("正在配送"), - "zhengzaixiazaizhong" : MessageLookupByLibrary.simpleMessage("正在下载中..."), + "zhengzaixiazaizhong" : MessageLookupByLibrary.simpleMessage("正在加载中..."), "zhidianmendian" : MessageLookupByLibrary.simpleMessage("致电门店"), "zhifubao" : MessageLookupByLibrary.simpleMessage("支付宝"), "zhifufangshi" : MessageLookupByLibrary.simpleMessage("支付方式"), diff --git a/lib/generated/intl/messages_zh_Hans_CN.dart b/lib/generated/intl/messages_zh_Hans_CN.dart index d8803aba..27ee8dfe 100644 --- a/lib/generated/intl/messages_zh_Hans_CN.dart +++ b/lib/generated/intl/messages_zh_Hans_CN.dart @@ -493,7 +493,7 @@ class MessageLookup extends MessageLookupByLibrary { "xiaofeijifen" : MessageLookupByLibrary.simpleMessage("消费积分"), "xiaoxi" : MessageLookupByLibrary.simpleMessage("消息"), "xiayidengji" : MessageLookupByLibrary.simpleMessage("下一等级"), - "xiazaiwancheng" : MessageLookupByLibrary.simpleMessage("下载完成"), + "xiazaiwancheng" : MessageLookupByLibrary.simpleMessage("加载完成"), "xieyitanchuang" : MessageLookupByLibrary.simpleMessage("一心回乡用户隐私政策"), "xihuan_" : m31, "xindianhuodong" : MessageLookupByLibrary.simpleMessage("星店活动"), @@ -567,7 +567,7 @@ class MessageLookup extends MessageLookupByLibrary { "zhengzaihujiaoqishou" : MessageLookupByLibrary.simpleMessage("正在呼叫骑手"), "zhengzaijiazai" : MessageLookupByLibrary.simpleMessage("正在加载"), "zhengzaipeisong" : MessageLookupByLibrary.simpleMessage("正在配送"), - "zhengzaixiazaizhong" : MessageLookupByLibrary.simpleMessage("正在下载中..."), + "zhengzaixiazaizhong" : MessageLookupByLibrary.simpleMessage("正在加载中..."), "zhidianmendian" : MessageLookupByLibrary.simpleMessage("致电门店"), "zhifubao" : MessageLookupByLibrary.simpleMessage("支付宝"), "zhifufangshi" : MessageLookupByLibrary.simpleMessage("支付方式"), diff --git a/lib/generated/intl/messages_zh_Hant_CN.dart b/lib/generated/intl/messages_zh_Hant_CN.dart index 37121384..ea7ff3d4 100644 --- a/lib/generated/intl/messages_zh_Hant_CN.dart +++ b/lib/generated/intl/messages_zh_Hant_CN.dart @@ -493,7 +493,7 @@ class MessageLookup extends MessageLookupByLibrary { "xiaofeijifen" : MessageLookupByLibrary.simpleMessage("消费积分"), "xiaoxi" : MessageLookupByLibrary.simpleMessage("消息"), "xiayidengji" : MessageLookupByLibrary.simpleMessage("下一等級"), - "xiazaiwancheng" : MessageLookupByLibrary.simpleMessage("下載完成"), + "xiazaiwancheng" : MessageLookupByLibrary.simpleMessage("加載完成"), "xieyitanchuang" : MessageLookupByLibrary.simpleMessage("一心回鄉用戶隱私協議"), "xihuan_" : m31, "xindianhuodong" : MessageLookupByLibrary.simpleMessage("星店活動"), @@ -568,7 +568,7 @@ class MessageLookup extends MessageLookupByLibrary { "zhengzaihujiaoqishou" : MessageLookupByLibrary.simpleMessage("正在呼叫騎手"), "zhengzaijiazai" : MessageLookupByLibrary.simpleMessage("正在加載"), "zhengzaipeisong" : MessageLookupByLibrary.simpleMessage("正在配送"), - "zhengzaixiazaizhong" : MessageLookupByLibrary.simpleMessage("正在下載中..."), + "zhengzaixiazaizhong" : MessageLookupByLibrary.simpleMessage("正在加載中..."), "zhidianmendian" : MessageLookupByLibrary.simpleMessage("致電門店"), "zhifubao" : MessageLookupByLibrary.simpleMessage("支付寶"), "zhifufangshi" : MessageLookupByLibrary.simpleMessage("支付方式"), diff --git a/lib/generated/intl/messages_zh_TW.dart b/lib/generated/intl/messages_zh_TW.dart index 5a686ccb..81460646 100644 --- a/lib/generated/intl/messages_zh_TW.dart +++ b/lib/generated/intl/messages_zh_TW.dart @@ -493,7 +493,7 @@ class MessageLookup extends MessageLookupByLibrary { "xiaofeijifen" : MessageLookupByLibrary.simpleMessage("消费积分"), "xiaoxi" : MessageLookupByLibrary.simpleMessage("消息"), "xiayidengji" : MessageLookupByLibrary.simpleMessage("下一等級"), - "xiazaiwancheng" : MessageLookupByLibrary.simpleMessage("下載完成"), + "xiazaiwancheng" : MessageLookupByLibrary.simpleMessage("加載完成"), "xieyitanchuang" : MessageLookupByLibrary.simpleMessage("一心回鄉用戶隱私協議"), "xihuan_" : m31, "xindianhuodong" : MessageLookupByLibrary.simpleMessage("星店活動"), @@ -568,7 +568,7 @@ class MessageLookup extends MessageLookupByLibrary { "zhengzaihujiaoqishou" : MessageLookupByLibrary.simpleMessage("正在呼叫騎手"), "zhengzaijiazai" : MessageLookupByLibrary.simpleMessage("正在加載"), "zhengzaipeisong" : MessageLookupByLibrary.simpleMessage("正在配送"), - "zhengzaixiazaizhong" : MessageLookupByLibrary.simpleMessage("正在下載中..."), + "zhengzaixiazaizhong" : MessageLookupByLibrary.simpleMessage("正在加載中..."), "zhidianmendian" : MessageLookupByLibrary.simpleMessage("致電門店"), "zhifubao" : MessageLookupByLibrary.simpleMessage("支付寶"), "zhifufangshi" : MessageLookupByLibrary.simpleMessage("支付方式"), diff --git a/lib/generated/l10n.dart b/lib/generated/l10n.dart index 68bb147e..9c339aee 100644 --- a/lib/generated/l10n.dart +++ b/lib/generated/l10n.dart @@ -3605,10 +3605,10 @@ class S { ); } - /// `正在下载中...` + /// `正在加载中...` String get zhengzaixiazaizhong { return Intl.message( - '正在下载中...', + '正在加载中...', name: 'zhengzaixiazaizhong', desc: '', args: [], @@ -4735,10 +4735,10 @@ class S { ); } - /// `下载完成` + /// `加载完成` String get xiazaiwancheng { return Intl.message( - '下载完成', + '加载完成', name: 'xiazaiwancheng', desc: '', args: [], diff --git a/lib/home/home_view/home_banner.dart b/lib/home/home_view/home_banner.dart index 93ec325a..a72834a8 100644 --- a/lib/home/home_view/home_banner.dart +++ b/lib/home/home_view/home_banner.dart @@ -1,3 +1,5 @@ +import 'dart:convert'; + import 'package:flutter/material.dart'; import 'package:flutter_swiper/flutter_swiper.dart'; import 'package:huixiang/retrofit/data/banner.dart'; @@ -70,9 +72,6 @@ class _HomeBanner extends State { /// contentType 跳转类型(0:不跳转,1:积分商品,2:活动,3:文章) bannerClick(BannerData bannerData) async { switch (bannerData.contentType) { - // case 0: - // Navigator.of(context).pushNamed('/router/qr_share'); - // break; case 1: Navigator.of(context).pushNamed( '/router/integral_store_page', @@ -91,7 +90,17 @@ class _HomeBanner extends State { arguments: {"articleId": bannerData.content}, ); break; + case 4: + String router = bannerData.content; + if (router.contains("?")) { + String params = router.substring(router.indexOf("?")); + params = params.replaceAll("?", ""); + Map map = jsonDecode(params); + Navigator.of(context).pushNamed(router, arguments: map); + } else { + Navigator.of(context).pushNamed(router); + } + break; } } - } diff --git a/lib/home/huixiang_brand_page.dart b/lib/home/huixiang_brand_page.dart index f93693f6..4d2fc7a3 100644 --- a/lib/home/huixiang_brand_page.dart +++ b/lib/home/huixiang_brand_page.dart @@ -41,13 +41,16 @@ class _BrandPage extends State List globaKeys = []; List bannerData = []; - Future queryHome() async { EasyLoading.show(status: S.current.zhengzaijiazai); final SharedPreferences value = await SharedPreferences.getInstance(); - apiService = ApiService(Dio(), - context: context, token: value.getString('token'), showLoading: false); + apiService = ApiService( + Dio(), + context: context, + token: value.getString('token'), + showLoading: false, + ); BaseData baseData = await apiService.queryHome().catchError((error) { @@ -107,7 +110,7 @@ class _BrandPage extends State return Scaffold( appBar: AppBar( toolbarHeight: 40.h - MediaQuery.of(context).padding.top, - backgroundColor: Colors.white, + backgroundColor: Colors.transparent, elevation: 0, ), body: Container( @@ -168,8 +171,10 @@ class _BrandPage extends State var widgets = [ ///回乡banner HuiXiangBanner(bannerData), + ///公司信息 OriginInfo(brandData), + StoreTitleTab( brands, globaKeys, @@ -204,7 +209,6 @@ class _BrandPage extends State return widgets; } - @override bool get wantKeepAlive => true; } diff --git a/lib/home/huixiang_view/huixiang_banner.dart b/lib/home/huixiang_view/huixiang_banner.dart index 13c03321..f16bb3ce 100644 --- a/lib/home/huixiang_view/huixiang_banner.dart +++ b/lib/home/huixiang_view/huixiang_banner.dart @@ -1,4 +1,6 @@ +import 'dart:convert'; + import 'package:flutter/material.dart'; import 'package:flutter_swiper/flutter_swiper.dart'; import 'package:huixiang/retrofit/data/banner.dart'; @@ -82,6 +84,17 @@ class _HuiXiangBanner extends State { "articleId": bannerData.content, }); break; + case 4: + String router = bannerData.content; + if (router.contains("?")) { + String params = router.substring(router.indexOf("?")); + params = params.replaceAll("?", ""); + Map map = jsonDecode(params); + Navigator.of(context).pushNamed(router, arguments: map); + } else { + Navigator.of(context).pushNamed(router); + } + break; } } diff --git a/lib/home/points_mall_view/points_mall_banner.dart b/lib/home/points_mall_view/points_mall_banner.dart index c5d94824..a2f3d06a 100644 --- a/lib/home/points_mall_view/points_mall_banner.dart +++ b/lib/home/points_mall_view/points_mall_banner.dart @@ -1,4 +1,6 @@ +import 'dart:convert'; + import 'package:flutter/material.dart'; import 'package:flutter_swiper/flutter_swiper.dart'; import 'package:huixiang/retrofit/data/banner.dart'; @@ -70,9 +72,6 @@ class _PointMallBanner extends State { /// contentType 跳转类型(0:不跳转,1:积分商品,2:活动,3:文章) bannerClick(BannerData bannerData) async { switch (bannerData.contentType) { - // case 0: - // Navigator.of(context).pushNamed('/router/qr_share'); - // break; case 1: Navigator.of(context).pushNamed('/router/integral_store_page', arguments: {"goodsId": bannerData.content}); @@ -89,6 +88,17 @@ class _PointMallBanner extends State { "articleId": bannerData.content, }); break; + case 4: + String router = bannerData.content; + if (router.contains("?")) { + String params = router.substring(router.indexOf("?")); + params = params.replaceAll("?", ""); + Map map = jsonDecode(params); + Navigator.of(context).pushNamed(router, arguments: map); + } else { + Navigator.of(context).pushNamed(router); + } + break; } } diff --git a/lib/l10n/intl_en.arb b/lib/l10n/intl_en.arb index 606e08e9..72c76bd7 100644 --- a/lib/l10n/intl_en.arb +++ b/lib/l10n/intl_en.arb @@ -373,7 +373,7 @@ "chaungshirengushi": "创始人故事", "jituanchuangshiren": "集团创始人", "jianjie": "简介:{jianjie}", - "zhengzaixiazaizhong": "正在下载中...", + "zhengzaixiazaizhong": "正在加载中...", "qingxuanzeyigemendian": "请选择一个门店", "muqianzanwuxingdianhuodong": "目前暂无星店活动", "zanwuyouhuiquankelingqu": "暂无优惠券可领取", @@ -490,8 +490,8 @@ "qianshou": "已签收", "wentijian": "问题件", "zanwupinglun": "暂无评论,快来评论吧", - "xiazaiwancheng": "下载完成", - "zhengzaixiazaizhong": "正在下载中...", + "xiazaiwancheng": "加载完成", + "zhengzaixiazaizhong": "正在加载中...", "daopinglunliebiaodingbu": "到评论列表顶部", "dianzanxihuan_": "点赞喜欢{xihuan}", "wenzhang": "文章", diff --git a/lib/l10n/intl_zh_CN.arb b/lib/l10n/intl_zh_CN.arb index 413691af..00fc524e 100644 --- a/lib/l10n/intl_zh_CN.arb +++ b/lib/l10n/intl_zh_CN.arb @@ -374,7 +374,7 @@ "chaungshirengushi": "创始人故事", "jituanchuangshiren": "集团创始人", "jianjie": "简介:{jianjie}", - "zhengzaixiazaizhong": "正在下载中...", + "zhengzaixiazaizhong": "正在加载中...", "qingxuanzeyigemendian": "请选择一个门店", "muqianzanwuxingdianhuodong": "目前暂无星店活动", "zanwuyouhuiquankelingqu": "暂无优惠券可领取", @@ -492,8 +492,8 @@ "qianshou": "已签收", "wentijian": "问题件", "zanwupinglun": "暂无评论,快来评论吧", - "xiazaiwancheng": "下载完成", - "zhengzaixiazaizhong": "正在下载中...", + "xiazaiwancheng": "加载完成", + "zhengzaixiazaizhong": "正在加载中...", "daopinglunliebiaodingbu": "到评论列表顶部", "dianzanxihuan_": "点赞喜欢{xihuan}", "wenzhang": "文章", diff --git a/lib/l10n/intl_zh_Hans_CN.arb b/lib/l10n/intl_zh_Hans_CN.arb index 413691af..00fc524e 100644 --- a/lib/l10n/intl_zh_Hans_CN.arb +++ b/lib/l10n/intl_zh_Hans_CN.arb @@ -374,7 +374,7 @@ "chaungshirengushi": "创始人故事", "jituanchuangshiren": "集团创始人", "jianjie": "简介:{jianjie}", - "zhengzaixiazaizhong": "正在下载中...", + "zhengzaixiazaizhong": "正在加载中...", "qingxuanzeyigemendian": "请选择一个门店", "muqianzanwuxingdianhuodong": "目前暂无星店活动", "zanwuyouhuiquankelingqu": "暂无优惠券可领取", @@ -492,8 +492,8 @@ "qianshou": "已签收", "wentijian": "问题件", "zanwupinglun": "暂无评论,快来评论吧", - "xiazaiwancheng": "下载完成", - "zhengzaixiazaizhong": "正在下载中...", + "xiazaiwancheng": "加载完成", + "zhengzaixiazaizhong": "正在加载中...", "daopinglunliebiaodingbu": "到评论列表顶部", "dianzanxihuan_": "点赞喜欢{xihuan}", "wenzhang": "文章", diff --git a/lib/l10n/intl_zh_Hant_CN.arb b/lib/l10n/intl_zh_Hant_CN.arb index a0361144..22ef9890 100644 --- a/lib/l10n/intl_zh_Hant_CN.arb +++ b/lib/l10n/intl_zh_Hant_CN.arb @@ -486,8 +486,8 @@ "qianshou": "已簽收", "wentijian": "問題件", "zanwupinglun": "暫無評論,快去評論吧~", - "xiazaiwancheng": "下載完成", - "zhengzaixiazaizhong": "正在下載中...", + "xiazaiwancheng": "加載完成", + "zhengzaixiazaizhong": "正在加載中...", "daopinglunliebiaodingbu": "到評論列表頂部", "dianzanxihuan_": "點贊喜歡{xihuan}", "wenzhang": "文章", diff --git a/lib/l10n/intl_zh_TW.arb b/lib/l10n/intl_zh_TW.arb index ee4dee98..ecb4cd2d 100644 --- a/lib/l10n/intl_zh_TW.arb +++ b/lib/l10n/intl_zh_TW.arb @@ -484,8 +484,8 @@ "qianshou": "已簽收", "wentijian": "問題件", "zanwupinglun": "暫無評論,快去評論吧~", - "xiazaiwancheng": "下載完成", - "zhengzaixiazaizhong": "正在下載中...", + "xiazaiwancheng": "加載完成", + "zhengzaixiazaizhong": "正在加載中...", "daopinglunliebiaodingbu": "到評論列表頂部", "dianzanxihuan_": "點贊喜歡{xihuan}", "wenzhang": "文章", diff --git a/lib/retrofit/data/base_data.g.dart b/lib/retrofit/data/base_data.g.dart deleted file mode 100644 index 3a4ba372..00000000 --- a/lib/retrofit/data/base_data.g.dart +++ /dev/null @@ -1,37 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'base_data.dart'; - -// ************************************************************************** -// JsonSerializableGenerator -// ************************************************************************** - -BaseData _$BaseDataFromJson( - Map json, - T Function(Object json) fromJsonT, -) { - return BaseData() - ..code = json['code'] as int - ..data = fromJsonT(json['data']) - ..extra = json['extra'] - ..isError = json['isError'] as bool - ..isSuccess = json['isSuccess'] as bool - ..msg = json['msg'] as String - ..path = json['path'] as String - ..timestamp = json['timestamp'] as String; -} - -Map _$BaseDataToJson( - BaseData instance, - Object Function(T value) toJsonT, -) => - { - 'code': instance.code, - 'data': toJsonT(instance.data), - 'extra': instance.extra, - 'isError': instance.isError, - 'isSuccess': instance.isSuccess, - 'msg': instance.msg, - 'path': instance.path, - 'timestamp': instance.timestamp, - }; diff --git a/lib/retrofit/data/page.g.dart b/lib/retrofit/data/page.g.dart deleted file mode 100644 index e40a14ae..00000000 --- a/lib/retrofit/data/page.g.dart +++ /dev/null @@ -1,41 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'page.dart'; - -// ************************************************************************** -// JsonSerializableGenerator -// ************************************************************************** - -PageInfo _$PageInfoFromJson( - Map json, - D Function(Object json) fromJsonD, -) { - return PageInfo() - ..pageNum = json['pageNum'] as int - ..current = json['current'] - ..pageSize = json['pageSize'] as int - ..size = json['size'] - ..pages = json['pages'] - ..hasPreviousPage = json['hasPreviousPage'] as bool - ..hasNextPage = json['hasNextPage'] as bool - ..total = json['total'] as String - ..list = (json['list'] as List)?.map(fromJsonD)?.toList() - ..records = (json['records'] as List)?.map(fromJsonD)?.toList(); -} - -Map _$PageInfoToJson( - PageInfo instance, - Object Function(D value) toJsonD, -) => - { - 'pageNum': instance.pageNum, - 'current': instance.current, - 'pageSize': instance.pageSize, - 'size': instance.size, - 'pages': instance.pages, - 'hasPreviousPage': instance.hasPreviousPage, - 'hasNextPage': instance.hasNextPage, - 'total': instance.total, - 'list': instance.list?.map(toJsonD)?.toList(), - 'records': instance.records?.map(toJsonD)?.toList(), - }; diff --git a/lib/retrofit/retrofit_api.dart b/lib/retrofit/retrofit_api.dart index b2f1078d..70a5661a 100644 --- a/lib/retrofit/retrofit_api.dart +++ b/lib/retrofit/retrofit_api.dart @@ -43,8 +43,8 @@ part 'retrofit_api.g.dart'; const base_url = "https://pos.platform.lotus-wallet.com/app/"; ///正式 const baseUrl = "https://pos.platform.lotus-wallet.com/app/"; ///正式 -// const base_url = "http://192.168.10.236:8766/app/"; -// const baseUrl = "http://192.168.10.236:8766/app/"; +// const base_url = "http://192.168.10.236:8766/app/"; ///费韬 +// const baseUrl = "http://192.168.10.236:8766/app/"; ///费韬 // const base_url = "http://192.168.10.74:8766/app/"; // const baseUrl = "http://192.168.10.74:8766/app/"; @@ -70,7 +70,7 @@ abstract class ApiService { responseType: ResponseType.json); dio.interceptors.add( InterceptorsWrapper(onRequest: (RequestOptions options) { - debugPrint("\n====================== 请求数据 ======================="); + debugPrint("\n======================= 请求数据 ======================="); debugPrint("method = ${options.method.toString()}"); debugPrint("url = ${options.uri.toString()}"); debugPrint("headers = ${options.headers}"); @@ -88,7 +88,7 @@ abstract class ApiService { if (showLoading && EasyLoading.isShow) { EasyLoading.dismiss(); } - debugPrint("\n====================== 响应数据开始 ====================="); + debugPrint("\n======================= 响应数据开始 ======================="); debugPrint("code = ${response.statusCode}"); p(jsonEncode(response.data)); Map map = response.data; @@ -109,7 +109,7 @@ abstract class ApiService { if (EasyLoading.isShow) { EasyLoading.dismiss(); } - debugPrint("\n=======================错误响应数据 ========================"); + debugPrint("\n======================= 错误响应数据 ======================="); debugPrint("type = ${e.type}"); debugPrint("message = ${e.message}"); debugPrint("\n"); diff --git a/lib/retrofit/retrofit_api.g.dart b/lib/retrofit/retrofit_api.g.dart deleted file mode 100644 index 9b98370e..00000000 --- a/lib/retrofit/retrofit_api.g.dart +++ /dev/null @@ -1,1185 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'retrofit_api.dart'; - -// ************************************************************************** -// RetrofitGenerator -// ************************************************************************** - -class _ApiService implements ApiService { - _ApiService(this._dio, {this.baseUrl}) { - ArgumentError.checkNotNull(_dio, '_dio'); - baseUrl ??= 'https://pos.platform.lotus-wallet.com/app/'; - } - - final Dio _dio; - - String baseUrl; - - @override - Future> upload(data, folderId) async { - ArgumentError.checkNotNull(data, 'data'); - ArgumentError.checkNotNull(folderId, 'folderId'); - const _extra = {}; - final queryParameters = {}; - final _data = FormData(); - _data.files.add(MapEntry( - 'file', - MultipartFile.fromFileSync(data.path, - filename: data.path.split(Platform.pathSeparator).last))); - if (folderId != null) { - _data.fields.add(MapEntry('folderId', folderId.toString())); - } - final _result = await _dio.request>('/file/upload', - queryParameters: queryParameters, - options: RequestOptions( - method: 'POST', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson( - _result.data, - (json) => UploadResult.fromJson(json), - ); - return value; - } - - @override - Future searchPoi(lat, lng, keywords, size, page) async { - ArgumentError.checkNotNull(lat, 'lat'); - ArgumentError.checkNotNull(lng, 'lng'); - ArgumentError.checkNotNull(keywords, 'keywords'); - ArgumentError.checkNotNull(size, 'size'); - ArgumentError.checkNotNull(page, 'page'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - final _result = await _dio.request( - 'https://restapi.amap.com/v3/place/around?key=542b46afa8e4b88fe1eb3c4d0ba0872f&location=$lat,$lng&keywords=$keywords&offset={size}&page={page}&extensions=all', - queryParameters: queryParameters, - options: RequestOptions( - method: 'GET', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = _result.data; - return value; - } - - @override - Future> memberLogin(param) async { - ArgumentError.checkNotNull(param, 'param'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - _data.addAll(param ?? {}); - final _result = await _dio.request>( - '/auth/platform/memberLogin', - queryParameters: queryParameters, - options: RequestOptions( - method: 'POST', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson( - _result.data, - (json) => json as dynamic, - ); - return value; - } - - @override - Future> sendVerify(mobile) async { - ArgumentError.checkNotNull(mobile, 'mobile'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - final _result = await _dio.request>( - '/auth/sendVerify/$mobile', - queryParameters: queryParameters, - options: RequestOptions( - method: 'GET', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson( - _result.data, - (json) => json as dynamic, - ); - return value; - } - - @override - Future>> creditGoods(param) async { - ArgumentError.checkNotNull(param, 'param'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - _data.addAll(param ?? {}); - final _result = await _dio.request>( - '/creditGoods/list', - queryParameters: queryParameters, - options: RequestOptions( - method: 'POST', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData>.fromJson( - _result.data, - (json) => PageInfo.fromJson( - json, - (json) => Goods.fromJson(json), - ), - ); - return value; - } - - @override - Future>> goodsCategory(param) async { - ArgumentError.checkNotNull(param, 'param'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - _data.addAll(param ?? {}); - final _result = await _dio.request>( - '/creditGoodsCategory/page', - queryParameters: queryParameters, - options: RequestOptions( - method: 'POST', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData>.fromJson( - _result.data, - (json) => PageInfo.fromJson( - json, - (json) => GoodsCategory.fromJson(json), - ), - ); - return value; - } - - @override - Future> creditGoodsById(id) async { - ArgumentError.checkNotNull(id, 'id'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - final _result = await _dio.request>('/creditGoods/$id', - queryParameters: queryParameters, - options: RequestOptions( - method: 'GET', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson( - _result.data, - (json) => Goods.fromJson(json), - ); - return value; - } - - @override - Future> queryInfo() async { - const _extra = {}; - final queryParameters = {}; - final _data = {}; - final _result = await _dio.request>('/member/info', - queryParameters: queryParameters, - options: RequestOptions( - method: 'GET', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson( - _result.data, - (json) => UserInfo.fromJson(json), - ); - return value; - } - - @override - Future> editInfo(param) async { - ArgumentError.checkNotNull(param, 'param'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - _data.addAll(param ?? {}); - final _result = await _dio.request>( - '/member/editMemberInfo', - queryParameters: queryParameters, - options: RequestOptions( - method: 'POST', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson( - _result.data, - (json) => json as dynamic, - ); - return value; - } - - @override - Future> signInInfo() async { - const _extra = {}; - final queryParameters = {}; - final _data = {}; - final _result = await _dio.request>( - '/member/signInInfo', - queryParameters: queryParameters, - options: RequestOptions( - method: 'GET', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson( - _result.data, - (json) => SignInfo.fromJson(json), - ); - return value; - } - - @override - Future> signIn() async { - const _extra = {}; - final queryParameters = {}; - final _data = {}; - final _result = await _dio.request>('/member/signIn', - queryParameters: queryParameters, - options: RequestOptions( - method: 'GET', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson( - _result.data, - (json) => json as dynamic, - ); - return value; - } - - @override - Future> recharge(param) async { - ArgumentError.checkNotNull(param, 'param'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - _data.addAll(param ?? {}); - final _result = await _dio.request>('/wallet/recharge', - queryParameters: queryParameters, - options: RequestOptions( - method: 'POST', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson( - _result.data, - (json) => WxPay.fromJson(json), - ); - return value; - } - - @override - Future> receiveCoupon(couponId) async { - ArgumentError.checkNotNull(couponId, 'couponId'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - final _result = await _dio.request>( - '/coupon/receive?couponId=$couponId', - queryParameters: queryParameters, - options: RequestOptions( - method: 'GET', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson( - _result.data, - (json) => json as dynamic, - ); - return value; - } - - @override - Future>> creditOrderList(param) async { - ArgumentError.checkNotNull(param, 'param'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - _data.addAll(param ?? {}); - final _result = await _dio.request>( - '/creditOrder/list', - queryParameters: queryParameters, - options: RequestOptions( - method: 'POST', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData>.fromJson( - _result.data, - (json) => PageInfo.fromJson( - json, - (json) => ExchangeOrder.fromJson(json), - ), - ); - return value; - } - - @override - Future> creditOrder(param) async { - ArgumentError.checkNotNull(param, 'param'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - _data.addAll(param ?? {}); - final _result = await _dio.request>( - '/creditOrder/create', - queryParameters: queryParameters, - options: RequestOptions( - method: 'POST', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson( - _result.data, - (json) => json as dynamic, - ); - return value; - } - - @override - Future> addAddress(param) async { - ArgumentError.checkNotNull(param, 'param'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - _data.addAll(param ?? {}); - final _result = await _dio.request>('/address/add', - queryParameters: queryParameters, - options: RequestOptions( - method: 'POST', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson( - _result.data, - (json) => json as dynamic, - ); - return value; - } - - @override - Future> deleteAddress(param) async { - ArgumentError.checkNotNull(param, 'param'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - _data.addAll(param ?? {}); - final _result = await _dio.request>('/address/delete', - queryParameters: queryParameters, - options: RequestOptions( - method: 'POST', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson( - _result.data, - (json) => json as dynamic, - ); - return value; - } - - @override - Future> queryAddress(id) async { - ArgumentError.checkNotNull(id, 'id'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - final _result = await _dio.request>( - '/address/detail/$id', - queryParameters: queryParameters, - options: RequestOptions( - method: 'GET', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson( - _result.data, - (json) => json as dynamic, - ); - return value; - } - - @override - Future>> queryMemberAddress() async { - const _extra = {}; - final queryParameters = {}; - final _data = {}; - final _result = await _dio.request>( - '/address/queryMemberAddress', - queryParameters: queryParameters, - options: RequestOptions( - method: 'GET', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData>.fromJson( - _result.data, - (json) => (json as List) - .map
((i) => Address.fromJson(i as Map)) - .toList()); - return value; - } - - @override - Future> updateAddress(param) async { - ArgumentError.checkNotNull(param, 'param'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - _data.addAll(param ?? {}); - final _result = await _dio.request>('/address/update', - queryParameters: queryParameters, - options: RequestOptions( - method: 'POST', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson( - _result.data, - (json) => json as dynamic, - ); - return value; - } - - @override - Future>> queryCoupon(param) async { - ArgumentError.checkNotNull(param, 'param'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - _data.addAll(param ?? {}); - final _result = await _dio.request>( - '/coupon/centreList', - queryParameters: queryParameters, - options: RequestOptions( - method: 'POST', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData>.fromJson( - _result.data, - (json) => PageInfo.fromJson( - json, - (json) => Coupon.fromJson(json), - ), - ); - return value; - } - - @override - Future>> queryCard(param) async { - ArgumentError.checkNotNull(param, 'param'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - _data.addAll(param ?? {}); - final _result = await _dio.request>( - '/coupon/packageList', - queryParameters: queryParameters, - options: RequestOptions( - method: 'POST', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData>.fromJson( - _result.data, - (json) => PageInfo.fromJson( - json, - (json) => Coupon.fromJson(json), - ), - ); - return value; - } - - @override - Future>> queryStore(param) async { - ArgumentError.checkNotNull(param, 'param'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - _data.addAll(param ?? {}); - final _result = await _dio.request>('/store/list', - queryParameters: queryParameters, - options: RequestOptions( - method: 'POST', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData>.fromJson( - _result.data, - (json) => (json as List) - .map((i) => Store.fromJson(i as Map)) - .toList()); - return value; - } - - @override - Future>> informationList(param) async { - ArgumentError.checkNotNull(param, 'param'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - _data.addAll(param ?? {}); - final _result = await _dio.request>( - '/information/list', - queryParameters: queryParameters, - options: RequestOptions( - method: 'POST', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData>.fromJson( - _result.data, - (json) => PageInfo.fromJson( - json, - (json) => Activity.fromJson(json), - ), - ); - return value; - } - - @override - Future> informationInfo(id) async { - ArgumentError.checkNotNull(id, 'id'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - final _result = await _dio.request>('/information/$id', - queryParameters: queryParameters, - options: RequestOptions( - method: 'GET', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData
.fromJson( - _result.data, - (json) => Article.fromJson(json), - ); - return value; - } - - @override - Future> activityInfo(id) async { - ArgumentError.checkNotNull(id, 'id'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - final _result = await _dio.request>('/information/$id', - queryParameters: queryParameters, - options: RequestOptions( - method: 'GET', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson( - _result.data, - (json) => Activity.fromJson(json), - ); - return value; - } - - @override - Future> creditOrderReceive(id) async { - ArgumentError.checkNotNull(id, 'id'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - final _result = await _dio.request>( - '/creditOrder/receive/$id', - queryParameters: queryParameters, - options: RequestOptions( - method: 'GET', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson( - _result.data, - (json) => json as dynamic, - ); - return value; - } - - @override - Future> queryHome() async { - const _extra = {}; - final queryParameters = {}; - final _data = {}; - final _result = await _dio.request>('/home/home', - queryParameters: queryParameters, - options: RequestOptions( - method: 'GET', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson( - _result.data, - (json) => BrandData.fromJson(json), - ); - return value; - } - - @override - Future> queryStoreInfo(id) async { - ArgumentError.checkNotNull(id, 'id'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - final _result = await _dio.request>('/store/$id', - queryParameters: queryParameters, - options: RequestOptions( - method: 'GET', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson( - _result.data, - (json) => json as dynamic, - ); - return value; - } - - @override - Future>> queryArticle(param) async { - ArgumentError.checkNotNull(param, 'param'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - _data.addAll(param ?? {}); - final _result = await _dio.request>( - '/information/list', - queryParameters: queryParameters, - options: RequestOptions( - method: 'POST', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData>.fromJson( - _result.data, - (json) => PageInfo
.fromJson( - json, - (json) => Article.fromJson(json), - ), - ); - return value; - } - - @override - Future>> queryBanner(param) async { - ArgumentError.checkNotNull(param, 'param'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - _data.addAll(param ?? {}); - final _result = await _dio.request>('/banner/page', - queryParameters: queryParameters, - options: RequestOptions( - method: 'POST', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData>.fromJson( - _result.data, - (json) => PageInfo.fromJson( - json, - (json) => BannerData.fromJson(json), - ), - ); - return value; - } - - @override - Future> queryHomeBrand() async { - const _extra = {}; - final queryParameters = {}; - final _data = {}; - final _result = await _dio.request>('/home/brand', - queryParameters: queryParameters, - options: RequestOptions( - method: 'GET', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson( - _result.data, - (json) => json as dynamic, - ); - return value; - } - - @override - Future> minLogin(storeId) async { - ArgumentError.checkNotNull(storeId, 'storeId'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - final _result = await _dio.request>( - '/auth/mini/login/$storeId', - queryParameters: queryParameters, - options: RequestOptions( - method: 'GET', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson( - _result.data, - (json) => json as dynamic, - ); - return value; - } - - @override - Future>> queryBillInfo(param) async { - ArgumentError.checkNotNull(param, 'param'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - _data.addAll(param ?? {}); - final _result = await _dio.request>('/member/listBill', - queryParameters: queryParameters, - options: RequestOptions( - method: 'POST', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData>.fromJson( - _result.data, - (json) => PageInfo.fromJson( - json, - (json) => UserBill.fromJson(json), - ), - ); - return value; - } - - @override - Future>> rankList() async { - const _extra = {}; - final queryParameters = {}; - final _data = {}; - final _result = await _dio.request>('/member/rankList', - queryParameters: queryParameters, - options: RequestOptions( - method: 'GET', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData>.fromJson( - _result.data, - (json) => (json as List) - .map((i) => Rank.fromJson(i as Map)) - .toList()); - return value; - } - - @override - Future>> orderList(param) async { - ArgumentError.checkNotNull(param, 'param'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - _data.addAll(param ?? {}); - final _result = await _dio.request>('/order/list', - queryParameters: queryParameters, - options: RequestOptions( - method: 'POST', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData>.fromJson( - _result.data, - (json) => PageInfo.fromJson( - json, - (json) => OrderInfo.fromJson(json), - ), - ); - return value; - } - - @override - Future> orderDetail(id) async { - ArgumentError.checkNotNull(id, 'id'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - final _result = await _dio.request>( - '/order/orderDetail?id=$id', - queryParameters: queryParameters, - options: RequestOptions( - method: 'GET', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson( - _result.data, - (json) => OrderInfo.fromJson(json), - ); - return value; - } - - @override - Future> continuePay(param) async { - ArgumentError.checkNotNull(param, 'param'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - _data.addAll(param ?? {}); - final _result = await _dio.request>( - '/order/continuePay', - queryParameters: queryParameters, - options: RequestOptions( - method: 'POST', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson( - _result.data, - (json) => json as dynamic, - ); - return value; - } - - @override - Future> receiveToCard(id) async { - ArgumentError.checkNotNull(id, 'id'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - final _result = await _dio.request>( - '/creditOrder/receive/$id', - queryParameters: queryParameters, - options: RequestOptions( - method: 'GET', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson( - _result.data, - (json) => json as dynamic, - ); - return value; - } - - @override - Future>> vipList(param) async { - ArgumentError.checkNotNull(param, 'param'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - _data.addAll(param ?? {}); - final _result = await _dio.request>('/member/vipList', - queryParameters: queryParameters, - options: RequestOptions( - method: 'POST', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData>.fromJson( - _result.data, - (json) => (json as List) - .map((i) => VipCard.fromJson(i as Map)) - .toList()); - return value; - } - - @override - Future> vipDetail(param) async { - ArgumentError.checkNotNull(param, 'param'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - _data.addAll(param ?? {}); - final _result = await _dio.request>( - '/member/vipDetail', - queryParameters: queryParameters, - options: RequestOptions( - method: 'POST', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson( - _result.data, - (json) => VipCard.fromJson(json), - ); - return value; - } - - @override - Future>> msgList(param) async { - ArgumentError.checkNotNull(param, 'param'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - _data.addAll(param ?? {}); - final _result = await _dio.request>('/app-msg/list', - queryParameters: queryParameters, - options: RequestOptions( - method: 'POST', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData>.fromJson( - _result.data, - (json) => PageInfo.fromJson( - json, - (json) => Message.fromJson(json), - ), - ); - return value; - } - - @override - Future> queryMsg(id) async { - ArgumentError.checkNotNull(id, 'id'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - final _result = await _dio.request>('/app-msg/$id', - queryParameters: queryParameters, - options: RequestOptions( - method: 'GET', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson( - _result.data, - (json) => json as dynamic, - ); - return value; - } - - @override - Future> informationLikes(id) async { - ArgumentError.checkNotNull(id, 'id'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - final _result = await _dio.request>( - '/information/likes/$id', - queryParameters: queryParameters, - options: RequestOptions( - method: 'GET', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson( - _result.data, - (json) => json as dynamic, - ); - return value; - } - - @override - Future> memberComment(param) async { - ArgumentError.checkNotNull(param, 'param'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - _data.addAll(param ?? {}); - final _result = await _dio.request>('/memberComment', - queryParameters: queryParameters, - options: RequestOptions( - method: 'POST', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson( - _result.data, - (json) => json as dynamic, - ); - return value; - } - - @override - Future>> memberCommentList(param) async { - ArgumentError.checkNotNull(param, 'param'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - _data.addAll(param ?? {}); - final _result = await _dio.request>( - '/memberComment/list', - queryParameters: queryParameters, - options: RequestOptions( - method: 'POST', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData>.fromJson( - _result.data, - (json) => PageInfo.fromJson( - json, - (json) => MemberCommentList.fromJson(json), - ), - ); - return value; - } - - @override - Future> commentLike(id) async { - ArgumentError.checkNotNull(id, 'id'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - final _result = await _dio.request>( - '/memberComment/likes/$id', - queryParameters: queryParameters, - options: RequestOptions( - method: 'GET', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson( - _result.data, - (json) => json as dynamic, - ); - return value; - } - - @override - Future> delComment(id) async { - ArgumentError.checkNotNull(id, 'id'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - final _result = await _dio.request>( - '/memberComment/delete/$id', - queryParameters: queryParameters, - options: RequestOptions( - method: 'GET', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson( - _result.data, - (json) => json as dynamic, - ); - return value; - } - - @override - Future> shippingTrace(shipperCode, logisticCode) async { - ArgumentError.checkNotNull(shipperCode, 'shipperCode'); - ArgumentError.checkNotNull(logisticCode, 'logisticCode'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - final _result = await _dio.request>( - '/order/getShippingTrace/$shipperCode/$logisticCode', - queryParameters: queryParameters, - options: RequestOptions( - method: 'GET', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson( - _result.data, - (json) => Logistics.fromJson(json), - ); - return value; - } - - @override - Future> report(map) async { - ArgumentError.checkNotNull(map, 'map'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - _data.addAll(map ?? {}); - final _result = await _dio.request>('/other/report', - queryParameters: queryParameters, - options: RequestOptions( - method: 'POST', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson( - _result.data, - (json) => json as bool, - ); - return value; - } - - @override - Future> orderCancel(id) async { - ArgumentError.checkNotNull(id, 'id'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - final _result = await _dio.request>( - '/order/orderCancel?id=$id', - queryParameters: queryParameters, - options: RequestOptions( - method: 'GET', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson( - _result.data, - (json) => json as bool, - ); - return value; - } -} diff --git a/lib/union/union_details_page.dart b/lib/union/union_details_page.dart index 34fb568f..4f41becf 100644 --- a/lib/union/union_details_page.dart +++ b/lib/union/union_details_page.dart @@ -281,7 +281,7 @@ class _UnionDetailsPage extends State { double progressValue = 0; String downText = S.current.zhengzaixiazaizhong; - downloadWgt(appid, savePath) async { + downloadWgt(appId, savePath) async { downText = S.of(context).zhengzaixiazaizhong; Response response = await Dio() .download(storeInfo.mini.miniDownloadUrl, savePath, @@ -298,7 +298,7 @@ class _UnionDetailsPage extends State { (value.getStringList("miniAppid") != null ? value.getStringList("miniAppid") : []) - ..add(appid)); + ..add(appId)); }); } else { print("print 下载失败");