From 679a5f8d52c8522b41eec28e4169ced18df3fc09 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=93=88=E5=93=88=E5=93=88?= Date: Fri, 30 Jul 2021 08:27:29 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ios/Runner.xcodeproj/project.pbxproj | 12 +- ios/Runner/Info.plist | 30 +- lib/generated/intl/messages_en.dart | 2 +- lib/generated/intl/messages_zh_CN.dart | 2 +- lib/generated/intl/messages_zh_Hans_CN.dart | 2 +- lib/generated/intl/messages_zh_Hant_CN.dart | 2 +- lib/generated/intl/messages_zh_TW.dart | 2 +- lib/generated/l10n.dart | 4 +- lib/home/home_page.dart | 96 ++- lib/l10n/intl_en.arb | 2 +- lib/l10n/intl_zh_CN.arb | 2 +- lib/l10n/intl_zh_Hans_CN.arb | 2 +- lib/l10n/intl_zh_Hant_CN.arb | 2 +- lib/l10n/intl_zh_TW.arb | 2 +- lib/login/login_page.dart | 4 +- lib/mine/mine_page.dart | 4 +- lib/retrofit/retrofit_api.dart | 9 +- lib/retrofit/retrofit_api.g.dart | 820 ++++++++++++++++++++ lib/setting/setting_page.dart | 7 +- lib/union/store_details_page.dart | 1 + pubspec.lock | 57 +- 21 files changed, 1000 insertions(+), 64 deletions(-) create mode 100644 lib/retrofit/retrofit_api.g.dart diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj index 4917505f..cfc6988f 100644 --- a/ios/Runner.xcodeproj/project.pbxproj +++ b/ios/Runner.xcodeproj/project.pbxproj @@ -846,7 +846,7 @@ buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; - CURRENT_PROJECT_VERSION = 22; + CURRENT_PROJECT_VERSION = 23; DEVELOPMENT_TEAM = YF3Q8DVP52; ENABLE_BITCODE = NO; FRAMEWORK_SEARCH_PATHS = ( @@ -880,7 +880,7 @@ "$(PROJECT_DIR)/UniMPSDK/Libs", "$(PROJECT_DIR)/wx/Libs", ); - MARKETING_VERSION = 1.0.22; + MARKETING_VERSION = 1.0.23; ONLY_ACTIVE_ARCH = NO; OTHER_LDFLAGS = ( "$(inherited)", @@ -1045,7 +1045,7 @@ buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; - CURRENT_PROJECT_VERSION = 22; + CURRENT_PROJECT_VERSION = 23; DEVELOPMENT_TEAM = YF3Q8DVP52; ENABLE_BITCODE = NO; FRAMEWORK_SEARCH_PATHS = ( @@ -1079,7 +1079,7 @@ "$(PROJECT_DIR)/UniMPSDK/Libs", "$(PROJECT_DIR)/wx/Libs", ); - MARKETING_VERSION = 1.0.22; + MARKETING_VERSION = 1.0.23; ONLY_ACTIVE_ARCH = YES; OTHER_LDFLAGS = ( "$(inherited)", @@ -1137,7 +1137,7 @@ buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; - CURRENT_PROJECT_VERSION = 22; + CURRENT_PROJECT_VERSION = 23; DEVELOPMENT_TEAM = YF3Q8DVP52; ENABLE_BITCODE = NO; FRAMEWORK_SEARCH_PATHS = ( @@ -1171,7 +1171,7 @@ "$(PROJECT_DIR)/UniMPSDK/Libs", "$(PROJECT_DIR)/wx/Libs", ); - MARKETING_VERSION = 1.0.22; + MARKETING_VERSION = 1.0.23; ONLY_ACTIVE_ARCH = NO; OTHER_LDFLAGS = ( "$(inherited)", diff --git a/ios/Runner/Info.plist b/ios/Runner/Info.plist index 453dfd06..b7b14b0a 100644 --- a/ios/Runner/Info.plist +++ b/ios/Runner/Info.plist @@ -42,6 +42,26 @@ wx3b269e795ed23e5f + + CFBundleTypeRole + Editor + CFBundleURLName + line + CFBundleURLSchemes + + line3rdp.$(PRODUCT_BUNDLE_IDENTIFIER) + + + + CFBundleTypeRole + Editor + CFBundleURLName + facebook + CFBundleURLSchemes + + fb523308712059457 + + CFBundleVersion $(CURRENT_PROJECT_VERSION) @@ -54,8 +74,14 @@ fb-messenger-api fbauth2 fbshareextension - twitter - twitterauth + fbauth + fbapi20130214 + fbapi20160328 + fbapi20150629 + lineauth2 + line + lineauth + line3rdp.$(PRODUCT_BUNDLE_IDENTIFIER) LSRequiresIPhoneOS diff --git a/lib/generated/intl/messages_en.dart b/lib/generated/intl/messages_en.dart index 0a965b55..be8a0b2c 100644 --- a/lib/generated/intl/messages_en.dart +++ b/lib/generated/intl/messages_en.dart @@ -106,7 +106,7 @@ class MessageLookup extends MessageLookupByLibrary { "chongzhixiaoxi" : MessageLookupByLibrary.simpleMessage("充值消息"), "chongzhizuixiaojine" : m1, "chuangjianshijian" : m2, - "chuangshirendegushi" : MessageLookupByLibrary.simpleMessage("创始人的故事"), + "chuangshirendegushi" : MessageLookupByLibrary.simpleMessage("创始人的故事-"), "code_error" : MessageLookupByLibrary.simpleMessage("验证码输入错误"), "cunchu" : MessageLookupByLibrary.simpleMessage("存储"), "cunchutishixinxi" : MessageLookupByLibrary.simpleMessage("为了获得照片使用、缓存等功能,推荐您在使用期间打开存储权限"), diff --git a/lib/generated/intl/messages_zh_CN.dart b/lib/generated/intl/messages_zh_CN.dart index 96ecd626..0d421060 100644 --- a/lib/generated/intl/messages_zh_CN.dart +++ b/lib/generated/intl/messages_zh_CN.dart @@ -106,7 +106,7 @@ class MessageLookup extends MessageLookupByLibrary { "chongzhixiaoxi" : MessageLookupByLibrary.simpleMessage("充值消息"), "chongzhizuixiaojine" : m1, "chuangjianshijian" : m2, - "chuangshirendegushi" : MessageLookupByLibrary.simpleMessage("创始人的故事"), + "chuangshirendegushi" : MessageLookupByLibrary.simpleMessage("创始人的故事-"), "code_error" : MessageLookupByLibrary.simpleMessage("验证码输入错误"), "cunchu" : MessageLookupByLibrary.simpleMessage("存储"), "cunchutishixinxi" : MessageLookupByLibrary.simpleMessage("为了获得照片使用、缓存等功能,推荐您在使用期间打开存储权限"), diff --git a/lib/generated/intl/messages_zh_Hans_CN.dart b/lib/generated/intl/messages_zh_Hans_CN.dart index a13fb449..45216312 100644 --- a/lib/generated/intl/messages_zh_Hans_CN.dart +++ b/lib/generated/intl/messages_zh_Hans_CN.dart @@ -106,7 +106,7 @@ class MessageLookup extends MessageLookupByLibrary { "chongzhixiaoxi" : MessageLookupByLibrary.simpleMessage("充值消息"), "chongzhizuixiaojine" : m1, "chuangjianshijian" : m2, - "chuangshirendegushi" : MessageLookupByLibrary.simpleMessage("创始人的故事"), + "chuangshirendegushi" : MessageLookupByLibrary.simpleMessage("创始人的故事-"), "code_error" : MessageLookupByLibrary.simpleMessage("验证码输入错误"), "cunchu" : MessageLookupByLibrary.simpleMessage("存储"), "cunchutishixinxi" : MessageLookupByLibrary.simpleMessage("为了获得照片使用、缓存等功能,推荐您在使用期间打开存储权限"), diff --git a/lib/generated/intl/messages_zh_Hant_CN.dart b/lib/generated/intl/messages_zh_Hant_CN.dart index 084bbef3..5fabab02 100644 --- a/lib/generated/intl/messages_zh_Hant_CN.dart +++ b/lib/generated/intl/messages_zh_Hant_CN.dart @@ -106,7 +106,7 @@ class MessageLookup extends MessageLookupByLibrary { "chongzhixiaoxi" : MessageLookupByLibrary.simpleMessage("充值消息"), "chongzhizuixiaojine" : m1, "chuangjianshijian" : m2, - "chuangshirendegushi" : MessageLookupByLibrary.simpleMessage("創始人的故事"), + "chuangshirendegushi" : MessageLookupByLibrary.simpleMessage("創始人的故事-"), "code_error" : MessageLookupByLibrary.simpleMessage("驗證碼輸入錯誤"), "cunchu" : MessageLookupByLibrary.simpleMessage("存儲"), "cunchutishixinxi" : MessageLookupByLibrary.simpleMessage("為了獲得照片使用、緩存等功能,推薦您使用期間打開存儲權限"), diff --git a/lib/generated/intl/messages_zh_TW.dart b/lib/generated/intl/messages_zh_TW.dart index 2b088491..406e3013 100644 --- a/lib/generated/intl/messages_zh_TW.dart +++ b/lib/generated/intl/messages_zh_TW.dart @@ -106,7 +106,7 @@ class MessageLookup extends MessageLookupByLibrary { "chongzhixiaoxi" : MessageLookupByLibrary.simpleMessage("充值消息"), "chongzhizuixiaojine" : m1, "chuangjianshijian" : m2, - "chuangshirendegushi" : MessageLookupByLibrary.simpleMessage("創始人的故事"), + "chuangshirendegushi" : MessageLookupByLibrary.simpleMessage("創始人的故事-"), "code_error" : MessageLookupByLibrary.simpleMessage("驗證碼輸入錯誤"), "cunchu" : MessageLookupByLibrary.simpleMessage("存儲"), "cunchutishixinxi" : MessageLookupByLibrary.simpleMessage("為了獲得照片使用、緩存等功能,推薦您使用期間打開存儲權限"), diff --git a/lib/generated/l10n.dart b/lib/generated/l10n.dart index 7740e4cf..6f65a788 100644 --- a/lib/generated/l10n.dart +++ b/lib/generated/l10n.dart @@ -2245,10 +2245,10 @@ class S { ); } - /// `创始人的故事` + /// `创始人的故事-` String get chuangshirendegushi { return Intl.message( - '创始人的故事', + '创始人的故事-', name: 'chuangshirendegushi', desc: '', args: [], diff --git a/lib/home/home_page.dart b/lib/home/home_page.dart index 6838ac5a..c21246e6 100644 --- a/lib/home/home_page.dart +++ b/lib/home/home_page.dart @@ -45,13 +45,14 @@ class _HomePage extends State with AutomaticKeepAliveClientMixin { void initState() { super.initState(); - SharedPreferences.getInstance().then((value) => { - apiService = ApiService(Dio(), - context: context, - token: value.getString('token'), - showLoading: false), - queryHome(), - }); + SharedPreferences.getInstance().then((value) => + { + apiService = ApiService(Dio(), + context: context, + token: value.getString('token'), + showLoading: false), + queryHome(), + }); eventBus.on().listen((event) { if (event.type < 3) { @@ -80,7 +81,9 @@ class _HomePage extends State with AutomaticKeepAliveClientMixin { Founder founder; queryHome() async { - SmartDialog.showLoading(msg: S.of(context).zhengzaijiazai); + SmartDialog.showLoading(msg: S + .of(context) + .zhengzaijiazai); BaseData baseData = await apiService.queryBanner({ "model": {"type": "HOME_PAGE"}, }).catchError((onError) { @@ -170,9 +173,13 @@ class _HomePage extends State with AutomaticKeepAliveClientMixin { children: [ banner(), ItemTitle( - text: S.of(context).jinrihuiyuanrenwu, + text: S + .of(context) + .jinrihuiyuanrenwu, imgPath: "assets/image/icon_today_task.png", - moreText: S.of(context).renwuzhongxin, + moreText: S + .of(context) + .renwuzhongxin, onTap: () { SharedPreferences.getInstance().then((value) { if (value.getString('token') == null) { @@ -196,9 +203,13 @@ class _HomePage extends State with AutomaticKeepAliveClientMixin { child: signIn(), ), ItemTitle( - text: S.of(context).huixiangtoutiao, + text: S + .of(context) + .huixiangtoutiao, imgPath: "assets/image/icon_today_video.png", - moreText: S.of(context).chakangengduo, + moreText: S + .of(context) + .chakangengduo, onTap: () { Navigator.of(context).pushNamed('/router/hot_article_page'); }, @@ -215,13 +226,15 @@ class _HomePage extends State with AutomaticKeepAliveClientMixin { child: founderStore(), ), ItemTitle( - text: S.of(context).pinpaijieshao, + text: S + .of(context) + .pinpaijieshao, imgPath: "assets/image/icon_brand_introduction.png", ), brands(), Container( margin: - EdgeInsets.only(left: 16.5.w, right: 16.5.w, bottom: 40.h), + EdgeInsets.only(left: 16.5.w, right: 16.5.w, bottom: 40.h), padding: EdgeInsets.only(bottom: 10.h), decoration: BoxDecoration( borderRadius: BorderRadius.all( @@ -246,7 +259,9 @@ class _HomePage extends State with AutomaticKeepAliveClientMixin { Expanded( flex: 1, child: ItemTitle( - text: S.of(context).jifenshangcheng, + text: S + .of(context) + .jifenshangcheng, imgPath: "assets/image/icon_points_mall.png", )), GestureDetector( @@ -434,7 +449,7 @@ class _HomePage extends State with AutomaticKeepAliveClientMixin { //垂直子Widget之间间距 mainAxisSpacing: 16, //子Widget宽高比例 - childAspectRatio: 0.88, + childAspectRatio: 0.86, ), itemBuilder: (contetx, index) { return GestureDetector( @@ -481,19 +496,21 @@ class _HomePage extends State with AutomaticKeepAliveClientMixin { Row( children: [ Expanded( - flex: 1, - child: Text( - goods.name, - overflow: TextOverflow.ellipsis, - style: TextStyle( - color: Color(0xff353535), - fontWeight: FontWeight.bold, - fontSize: 14.sp, - ), - )), + flex: 1, + child: Text( + goods.name, + overflow: TextOverflow.ellipsis, + style: TextStyle( + color: Color(0xff353535), + fontWeight: FontWeight.bold, + fontSize: 14.sp, + ), + ),), BorderText( padding: EdgeInsets.all(2.h), - text: S.of(context).haowu, + text: S + .of(context) + .haowu, fontSize: 12.sp, fontWeight: FontWeight.bold, textColor: Color(0xFF32A060), @@ -510,9 +527,10 @@ class _HomePage extends State with AutomaticKeepAliveClientMixin { overflow: TextOverflow.ellipsis, maxLines: 2, style: TextStyle( - color: Color(0xFF727272), - fontSize: 12.sp, - fontWeight: FontWeight.w500), + color: Color(0xFF727272), + fontSize: 12.sp, + fontWeight: FontWeight.w500, + ), ), ], ), @@ -522,6 +540,7 @@ class _HomePage extends State with AutomaticKeepAliveClientMixin { ); } + ///签到view Widget signIn() { return Container( padding: EdgeInsets.only(left: 12.w, top: 8.h, bottom: 8.h, right: 12.w), @@ -555,7 +574,9 @@ class _HomePage extends State with AutomaticKeepAliveClientMixin { width: 8, ), Text( - S.of(context).qiandaolingqujinfen, + S + .of(context) + .qiandaolingqujinfen, style: TextStyle( color: Colors.black, fontSize: 14, @@ -564,7 +585,9 @@ class _HomePage extends State with AutomaticKeepAliveClientMixin { ], ), Text( - S.of(context).quqiandao, + S + .of(context) + .quqiandao, style: TextStyle( color: Color(0xFF727272), fontSize: 12, @@ -612,7 +635,7 @@ class _HomePage extends State with AutomaticKeepAliveClientMixin { ); }, itemCount: - (brandData != null && brandData.length > 0) ? brandData.length : 0, + (brandData != null && brandData.length > 0) ? brandData.length : 0, ), // child: AspectRatio( // aspectRatio: 4.16, @@ -662,7 +685,7 @@ class _HomePage extends State with AutomaticKeepAliveClientMixin { aspectRatio: 2, child: Swiper( pagination: SwiperPagination( - margin: EdgeInsets.only(bottom: 20), + margin: EdgeInsets.only(bottom: 20.h), alignment: Alignment.bottomCenter, builder: DotSwiperPaginationBuilder( size: 8, @@ -672,6 +695,7 @@ class _HomePage extends State with AutomaticKeepAliveClientMixin { color: Colors.white.withAlpha(76), ), ), + loop: false, physics: BouncingScrollPhysics(), itemBuilder: (context, position) { return InkWell( @@ -681,12 +705,12 @@ class _HomePage extends State with AutomaticKeepAliveClientMixin { child: Container( margin: EdgeInsets.all(16), decoration: BoxDecoration( - borderRadius: BorderRadius.all(Radius.circular(8))), + borderRadius: BorderRadius.circular(8)), child: MImage( (bannerData != null && position < bannerData.length) ? bannerData[position].imgUrl ?? "" : "", - radius: BorderRadius.all(Radius.circular(8)), + radius: BorderRadius.circular(8), fit: BoxFit.cover, errorSrc: "assets/image/default_2_1.png", fadeSrc: "assets/image/default_2_1.png", diff --git a/lib/l10n/intl_en.arb b/lib/l10n/intl_en.arb index 03179852..22ea49f0 100644 --- a/lib/l10n/intl_en.arb +++ b/lib/l10n/intl_en.arb @@ -220,7 +220,7 @@ "chongzhizuixiaojine": "充值金额最小是{yuan}元", "remenwenzhangshipin": "热门文章视频", "remenwenzhangshipinliebiao": "热门文章视频列表", - "chuangshirendegushi": "创始人的故事", + "chuangshirendegushi": "创始人的故事-", "wodeshengri": "我的生日", "wodenianling": "我的年龄", "sui": "{sui}岁", diff --git a/lib/l10n/intl_zh_CN.arb b/lib/l10n/intl_zh_CN.arb index 4fd47281..0e7656ce 100644 --- a/lib/l10n/intl_zh_CN.arb +++ b/lib/l10n/intl_zh_CN.arb @@ -220,7 +220,7 @@ "chongzhizuixiaojine": "充值金额最小是{yuan}元", "remenwenzhangshipin": "热门文章视频", "remenwenzhangshipinliebiao": "热门文章视频列表", - "chuangshirendegushi": "创始人的故事", + "chuangshirendegushi": "创始人的故事-", "wodeshengri": "我的生日", "wodenianling": "我的年龄", "sui": "{sui}岁", diff --git a/lib/l10n/intl_zh_Hans_CN.arb b/lib/l10n/intl_zh_Hans_CN.arb index 71e188f3..dafab69a 100644 --- a/lib/l10n/intl_zh_Hans_CN.arb +++ b/lib/l10n/intl_zh_Hans_CN.arb @@ -220,7 +220,7 @@ "chongzhizuixiaojine": "充值金额最小是{yuan}元", "remenwenzhangshipin": "热门文章视频", "remenwenzhangshipinliebiao": "热门文章视频列表", - "chuangshirendegushi": "创始人的故事", + "chuangshirendegushi": "创始人的故事-", "wodeshengri": "我的生日", "wodenianling": "我的年龄", "sui": "{sui}岁", diff --git a/lib/l10n/intl_zh_Hant_CN.arb b/lib/l10n/intl_zh_Hant_CN.arb index a61408b8..0956dc04 100644 --- a/lib/l10n/intl_zh_Hant_CN.arb +++ b/lib/l10n/intl_zh_Hant_CN.arb @@ -220,7 +220,7 @@ "chongzhizuixiaojine": "充值金額最小是{yuan}元", "remenwenzhangshipin": "熱門文章視頻", "remenwenzhangshipinliebiao": "熱門文章視頻清單", - "chuangshirendegushi": "創始人的故事", + "chuangshirendegushi": "創始人的故事-", "wodeshengri": "我的生日", "wodenianling": "我的年齡", "sui": "{sui}嵗", diff --git a/lib/l10n/intl_zh_TW.arb b/lib/l10n/intl_zh_TW.arb index 179f88e1..1968ee83 100644 --- a/lib/l10n/intl_zh_TW.arb +++ b/lib/l10n/intl_zh_TW.arb @@ -220,7 +220,7 @@ "chongzhizuixiaojine": "充值金額最小是{yuan}元", "remenwenzhangshipin": "熱門文章視頻", "remenwenzhangshipinliebiao": "熱門文章視頻清單", - "chuangshirendegushi": "創始人的故事", + "chuangshirendegushi": "創始人的故事-", "wodeshengri": "我的生日", "wodenianling": "我的年齡", "sui": "{sui}嵗", diff --git a/lib/login/login_page.dart b/lib/login/login_page.dart index 7c1a490c..f8325ad1 100644 --- a/lib/login/login_page.dart +++ b/lib/login/login_page.dart @@ -55,7 +55,9 @@ class _MyLoginPageState extends State with TickerProviderStateMixin { isLogin() async { SharedPreferences sharedPreferences = await SharedPreferences.getInstance(); - if (sharedPreferences.containsKey('token')) { + if (sharedPreferences.containsKey('token') + && sharedPreferences.getString("token") != null + && sharedPreferences.getString("token") != "") { Navigator.of(context).popAndPushNamed('/router/main_page'); } else { client = ApiService(Dio()); diff --git a/lib/mine/mine_page.dart b/lib/mine/mine_page.dart index 952b7b36..f2f0307c 100644 --- a/lib/mine/mine_page.dart +++ b/lib/mine/mine_page.dart @@ -80,7 +80,7 @@ class _MinePage extends State with AutomaticKeepAliveClientMixin { value.getString('token') != null && value.getString('token') != ""), apiService = ApiService(Dio(), - context: context, token: value.getString('token')), + context: context, token: value.getString('token'), showLoading: false), if (value.containsKey('user')) { userinfo = UserInfo.fromJson(jsonDecode(value.getString('user'))), @@ -95,6 +95,7 @@ class _MinePage extends State with AutomaticKeepAliveClientMixin { List ranks = []; queryUserInfo() async { + SmartDialog.showLoading(msg: S.of(context).zhengzaijiazai); BaseData rankData = await apiService.rankList(); if (rankData != null && rankData.isSuccess) { ranks.clear(); @@ -123,6 +124,7 @@ class _MinePage extends State with AutomaticKeepAliveClientMixin { } else { _refreshController.refreshFailed(); } + SmartDialog.dismiss(); if (mounted) setState(() {}); } diff --git a/lib/retrofit/retrofit_api.dart b/lib/retrofit/retrofit_api.dart index aa3e4bb5..beb53666 100644 --- a/lib/retrofit/retrofit_api.dart +++ b/lib/retrofit/retrofit_api.dart @@ -71,7 +71,14 @@ abstract class ApiService { SmartDialog.show( widget: LoginTips( click: () { - SharedPreferences.getInstance().then((value) => value.clear()); + SharedPreferences.getInstance().then((value) { + value.setString("token", ""); + value.setString("user", ""); + value.setString("userJson", ""); + value.setString("userId", ""); + value.setString("mobile", ""); + value.setString("nick", ""); + }); Navigator.of(context).pushNamed('/router/login_page', arguments: {"login":"login"}); }, ), diff --git a/lib/retrofit/retrofit_api.g.dart b/lib/retrofit/retrofit_api.g.dart new file mode 100644 index 00000000..cadd9f98 --- /dev/null +++ b/lib/retrofit/retrofit_api.g.dart @@ -0,0 +1,820 @@ +// 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 ??= 'http://platform.test.api.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); + 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); + 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); + 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); + 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); + 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); + 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); + 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); + 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); + 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); + 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); + 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); + 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); + 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); + 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); + 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); + 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); + 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); + 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); + 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); + 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); + 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); + 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); + 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); + 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); + 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); + 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); + 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); + 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); + 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); + 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); + 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); + 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); + 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); + 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); + 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); + 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); + return value; + } + + @override + Future vipList() async { + const _extra = {}; + final queryParameters = {}; + final _data = {}; + final _result = await _dio.request>('/member/vipList', + queryParameters: queryParameters, + options: RequestOptions( + method: 'GET', + headers: {}, + extra: _extra, + baseUrl: baseUrl), + data: _data); + final value = BaseData.fromJson(_result.data); + return value; + } + + @override + Future vipDetail(id) async { + ArgumentError.checkNotNull(id, 'id'); + const _extra = {}; + final queryParameters = {}; + final _data = {}; + final _result = await _dio.request>( + '/member/vipDetail/$id', + queryParameters: queryParameters, + options: RequestOptions( + method: 'GET', + headers: {}, + extra: _extra, + baseUrl: baseUrl), + data: _data); + final value = BaseData.fromJson(_result.data); + 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); + 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); + return value; + } +} diff --git a/lib/setting/setting_page.dart b/lib/setting/setting_page.dart index 86864ebe..bf121f05 100644 --- a/lib/setting/setting_page.dart +++ b/lib/setting/setting_page.dart @@ -250,7 +250,12 @@ class _SettingPage extends State { logOut() async { SharedPreferences sharedPreferences = await SharedPreferences.getInstance(); - sharedPreferences.clear(); + sharedPreferences.setString("token", ""); + sharedPreferences.setString("user", ""); + sharedPreferences.setString("userJson", ""); + sharedPreferences.setString("userId", ""); + sharedPreferences.setString("mobile", ""); + sharedPreferences.setString("nick", ""); Navigator.pushAndRemoveUntil(context, new MaterialPageRoute( builder: (BuildContext context) { diff --git a/lib/union/store_details_page.dart b/lib/union/store_details_page.dart index 209a3829..7467dc69 100644 --- a/lib/union/store_details_page.dart +++ b/lib/union/store_details_page.dart @@ -94,6 +94,7 @@ class _StoreDetailsPage extends State { builder: (context) { return ShareDialog((platform){ if (platform == ShareSDKPlatforms.line) { + params.map["type"] = SSDKContentTypes.text.value; params.map["text"] = "${activity != null ? activity.viceTitle : article != null diff --git a/pubspec.lock b/pubspec.lock index 2bf3bc3c..a9c6eac5 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -56,7 +56,7 @@ packages: name: async url: "https://pub.flutter-io.cn" source: hosted - version: "2.6.1" + version: "2.5.0" barcode: dependency: transitive description: @@ -637,6 +637,13 @@ packages: url: "https://pub.flutter-io.cn" source: hosted version: "4.1.0" + photo_view: + dependency: "direct main" + description: + name: photo_view + url: "https://pub.flutter-io.cn" + source: hosted + version: "0.11.1" platform: dependency: transitive description: @@ -865,7 +872,7 @@ packages: name: test_api url: "https://pub.flutter-io.cn" source: hosted - version: "0.3.0" + version: "0.2.19" timing: dependency: transitive description: @@ -903,6 +910,48 @@ packages: url: "https://pub.flutter-io.cn" source: hosted version: "1.3.0" + url_launcher: + dependency: "direct main" + description: + name: url_launcher + url: "https://pub.flutter-io.cn" + source: hosted + version: "6.0.5" + url_launcher_linux: + dependency: transitive + description: + name: url_launcher_linux + url: "https://pub.flutter-io.cn" + source: hosted + version: "2.0.1" + url_launcher_macos: + dependency: transitive + description: + name: url_launcher_macos + url: "https://pub.flutter-io.cn" + source: hosted + version: "2.0.1" + url_launcher_platform_interface: + dependency: transitive + description: + name: url_launcher_platform_interface + url: "https://pub.flutter-io.cn" + source: hosted + version: "2.0.1" + url_launcher_web: + dependency: transitive + description: + name: url_launcher_web + url: "https://pub.flutter-io.cn" + source: hosted + version: "2.0.2" + url_launcher_windows: + dependency: transitive + description: + name: url_launcher_windows + url: "https://pub.flutter-io.cn" + source: hosted + version: "2.0.1" uuid: dependency: transitive description: @@ -986,7 +1035,7 @@ packages: name: win32 url: "https://pub.flutter-io.cn" source: hosted - version: "2.2.5" + version: "2.0.5" xdg_directories: dependency: transitive description: @@ -1009,5 +1058,5 @@ packages: source: hosted version: "3.1.0" sdks: - dart: ">=2.13.0 <3.0.0" + dart: ">=2.12.0 <3.0.0" flutter: ">=2.0.0"