From 4c8072cea7b68390d38f72be35eb6eeae8fd0e1f Mon Sep 17 00:00:00 2001 From: w-R <953969641@qq.com> Date: Wed, 9 Feb 2022 22:01:24 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E5=85=85=E5=80=BC=E6=8F=90=E7=A4=BA?= =?UTF-8?q?=E6=9B=B4=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/mine/recharge_page.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/mine/recharge_page.dart b/lib/mine/recharge_page.dart index 17af36a4..e44217cc 100644 --- a/lib/mine/recharge_page.dart +++ b/lib/mine/recharge_page.dart @@ -382,7 +382,7 @@ class _RechargePage extends State { int amount = int.tryParse(money); if (checkIndex == 1) { if (amount < 100) { - SmartDialog.showToast(S.of(context).chongzhizuixiaojine(0.001), + SmartDialog.showToast(S.of(context).chongzhizuixiaojine(100), alignment: Alignment.center); return; } From 07f751c8ee51cf025d926d50ef5f2c70297afcf5 Mon Sep 17 00:00:00 2001 From: w-R <953969641@qq.com> Date: Thu, 10 Feb 2022 16:55:45 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E9=82=80=E8=AF=B7=E8=AE=B0=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- assets/image/2x/yao_q.png | Bin 0 -> 2384 bytes assets/image/3x/yao_q.png | Bin 0 -> 4312 bytes assets/image/yao_q.png | Bin 0 -> 1125 bytes lib/mine/invitation_record.dart | 0 lib/mine/mine_view/mine_item.dart | 35 ++++++++++++++++++++---------- lib/retrofit/min_api.dart | 8 +++---- lib/retrofit/min_api.g.dart | 2 +- lib/retrofit/retrofit_api.dart | 8 +++---- lib/retrofit/retrofit_api.g.dart | 2 +- 9 files changed, 34 insertions(+), 21 deletions(-) create mode 100644 assets/image/2x/yao_q.png create mode 100644 assets/image/3x/yao_q.png create mode 100644 assets/image/yao_q.png create mode 100644 lib/mine/invitation_record.dart diff --git a/assets/image/2x/yao_q.png b/assets/image/2x/yao_q.png new file mode 100644 index 0000000000000000000000000000000000000000..0a43148ee2348478320e70327124cb618761a2cf GIT binary patch literal 2384 zcmV-W39t5vP)Px;3Q0skRCr$PT78gH)fNAp_ckmnvbe1XRP%sn3R5{_?i>+?=%ojsSmi*sJNh2o~l67@M0c0~P>NW7?(x zkG#+nIa(R6in;l;mCuaPGZUuCxOaxT#C`GSX02VtY-)q zQ;MC^C8B5+*3F4f>{zL`o%ZDzxoM-4XUqC4fT3mkB}g1UdQE&m{DV?`^eX{s+G|V_ z1>QUZuWLkGnRyC`JPhl3VwwczuYl+Rd!kIdsWlY4`TvT5KqRyozycd+^%lPuKQVk` zpr&IJh;LHk47_vN(mz{ek*-%|9%A6D1(Ll!9*#DbLPEdIfLXD*f-NnPw+tB{kgi?Z z5^Rq9qrqB@@m_90BptW5%#A*!5}X+c{epn++md}XE~C@1+IdmzHv$5Y&~E_TnVSG< z^sSa)oV4D~OOSYJJQVw7=d;z&0wS~vz~}OGm>S|ukrt=3;9L@*VsR%h z1_fflx54y@9H9H-A>%60>dsGEQ33$W+CDeHnwFO=0qa}B(G~qpfZy-GDx1yTKtyu^ zOlIbf5m5#}JB_J&UB9#L8r$2wHy(=J)BUV40XPE2@f^Fu4Ac`aJm=Yq@o@C&ej~sz zjA_h#KY;7b27*56fxhU%{F%#iV{237nO+HSkQD=mTf@=I9jJDyxVZ#K2(gBle@aAJ zZvbe52l_Yi34o?G#)Hi}yX~%S4%cOgk2p=FN00DsJQN-6)Xo(Gyk4(I)3iSTxY1GI zu~n$Ly)IAHVp^DJiaeeBFc1yx1|xr|6brz7Al?+aqL^CuxGMw*AynnQqe##*1yIep z8ba0bi}L0lY1r5jjOO|9{-trG=hTp88qpQZ{86k#?}AxoaOlDjvmHL+x5VLp9u1a^*!~irF(pM)!BD?~|F($r*Kn-AwEa;nfNjwyL z%t_q57gnl4x4zHkTTDdu0<=>~SumNi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4Gu}=$&uIYp=)VRrY{o9DyQFFK^91 zJ47OpSo&We0@&ou0ZH(Qm!lSRAyGvfaFPx(A4x<(R9HvtR&8h;RTMpUCLgB3piNROQiIZh7>FsIx0_9?5~;Sk8|{xqMDU}6 zidLwaivFnBf}o;EQ!Umn(1N1WiqIyzF`^ABW|Q}lwPYm7T z%<~oyjD;&K$h#n00Lj4PF$nJNiNurHM9fRT@>saEn(`HZ#uUL(0=AH+0SQ201NeKK z6RS;g*N-!an3sTt_V6g)OFqU$z<~9G)O~x z_Ythu4|MxS^1sNr1CHbD5RvU9 zJ(BhP{rx{o?{4gf)DZCR_~igbK-mr3O?tpm@vMghxWTU{y-kVc&b75#Z2-D{XxnVrI@(>^RO|5xLJF@5so=(xIWDe>1^?!C-~wc_#ssk$l}4vn3Z{ zp*zqbBA=w1p4VDGmkFSh+67>el;my3m@gJgfPaycQUjP;CX#%ITH!H ze*^HKG3Gp@$%mg)fKqA;$+olwlN=I}E|Px&xDvp65vfU$xBwo~TECZ%bb3Ck0HxGg zlAnu+Me;8In~gCa`@1j=z;YaC6M)yIEE(gj>)tdlFp!w7h-?CErPL7sD@dMoU3X0~ znLM1;2bA)ENWKJc3CRIt%&K__2m}JnBoC&xyVV$T-Yb?#khX3Aduj^);^vJRC*U~F zZV`D5z}V>MX!YRW;Msggb#--1N=r-qW%S?v7mP96^7Z)n83ib%d^1@Kphs(+{@=@s zr<585a6QRSjWI2G8*&Kn$KMR#L#_2avjOsJlv3%w546^k29+@UtS}cE%{vQE(-V$@Z7a9wbT6n00000NkvXXu0mjfm9Q24 literal 0 HcmV?d00001 diff --git a/lib/mine/invitation_record.dart b/lib/mine/invitation_record.dart new file mode 100644 index 00000000..e69de29b diff --git a/lib/mine/mine_view/mine_item.dart b/lib/mine/mine_view/mine_item.dart index 450338a0..bc28cc02 100644 --- a/lib/mine/mine_view/mine_item.dart +++ b/lib/mine/mine_view/mine_item.dart @@ -131,17 +131,30 @@ class _MineItem extends State { ),) ], ), - Padding(padding:EdgeInsets.only(left:24), - child: InkWell( - onTap: () { - Navigator.of(context).pushNamed('/router/qr_share', arguments: {}); - }, - child: mineItem( - S.of(context).tuiguangma, - "assets/image/icon_mine_promotion_code.png", - ), - ),) - + Row( + children: [ + Expanded(child:InkWell( + onTap: () { + Navigator.of(context).pushNamed('/router/qr_share', arguments: {}); + }, + child: mineItem( + S.of(context).tuiguangma, + "assets/image/icon_mine_promotion_code.png", + ), + ),), + Expanded(child:InkWell( + onTap: () { + Navigator.of(context).pushNamed('/router/qr_share', arguments: {}); + }, + child: mineItem( + "邀请记录", + "assets/image/yao_q.png", + ), + ),), + Expanded(child:Container()), + Expanded(child:Container()) + ], + ), // mineItem( // S.of(context).bangzhuyufankui, // "assets/image/icon_mine_feedback.png", diff --git a/lib/retrofit/min_api.dart b/lib/retrofit/min_api.dart index 823d1620..901bc3f1 100644 --- a/lib/retrofit/min_api.dart +++ b/lib/retrofit/min_api.dart @@ -21,8 +21,8 @@ import 'data/shoppingCart.dart'; part 'min_api.g.dart'; -const base_url = "https://pos.api.lotus-wallet.com/app/"; ///正式 -const baseUrl = "https://pos.api.lotus-wallet.com/app/"; ///正式 +// const base_url = "https://pos.api.lotus-wallet.com/app/"; ///正式 +// const baseUrl = "https://pos.api.lotus-wallet.com/app/"; ///正式 // const base_url = "http://user.prod.kunqi.lotus-wallet.com/app/"; ///222 @@ -32,8 +32,8 @@ const baseUrl = "https://pos.api.lotus-wallet.com/app/"; ///正式 // const baseUrl = "http://192.168.10.236:8765/app/";///费韬 -// const base_url = "http://192.168.10.88:8765/app/";///詹云久 -// const baseUrl = "http://192.168.10.88:8765/app/";///詹云久 +const base_url = "http://192.168.10.88:8765/app/";///詹云久 +const baseUrl = "http://192.168.10.88:8765/app/";///詹云久 // const base_url = "http://192.168.10.37:8766/app/"; diff --git a/lib/retrofit/min_api.g.dart b/lib/retrofit/min_api.g.dart index 02d9988a..856ae6e1 100644 --- a/lib/retrofit/min_api.g.dart +++ b/lib/retrofit/min_api.g.dart @@ -9,7 +9,7 @@ part of 'min_api.dart'; class _MinApiService implements MinApiService { _MinApiService(this._dio, {this.baseUrl}) { ArgumentError.checkNotNull(_dio, '_dio'); - baseUrl ??= 'https://pos.api.lotus-wallet.com/app/'; + baseUrl ??= 'http://192.168.10.88:8765/app/'; } final Dio _dio; diff --git a/lib/retrofit/retrofit_api.dart b/lib/retrofit/retrofit_api.dart index adc8711d..a2ce6b7a 100644 --- a/lib/retrofit/retrofit_api.dart +++ b/lib/retrofit/retrofit_api.dart @@ -54,8 +54,8 @@ import 'data/wx_pay.dart'; 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 = "https://pos.platform.lotus-wallet.com/app/"; ///正式 +// const baseUrl = "https://pos.platform.lotus-wallet.com/app/"; ///正式 // const base_url = "http://platform.prod.kunqi.lotus-wallet.com/app/"; ///222 // const baseUrl = "http://platform.prod.kunqi.lotus-wallet.com/app/"; ///222 @@ -70,8 +70,8 @@ const baseUrl = "https://pos.platform.lotus-wallet.com/app/"; ///正式 // const baseUrl = "http://192.168.10.37:8766/app/"; -// const base_url = "http://192.168.10.88:8766/app/";///詹云久 -// const baseUrl = "http://192.168.10.88:8766/app/";///詹云久 +const base_url = "http://192.168.10.88:8766/app/";///詹云久 +const baseUrl = "http://192.168.10.88:8766/app/";///詹云久 @RestApi(baseUrl: baseUrl) abstract class ApiService { diff --git a/lib/retrofit/retrofit_api.g.dart b/lib/retrofit/retrofit_api.g.dart index 5735110a..527cc52a 100644 --- a/lib/retrofit/retrofit_api.g.dart +++ b/lib/retrofit/retrofit_api.g.dart @@ -9,7 +9,7 @@ part of 'retrofit_api.dart'; class _ApiService implements ApiService { _ApiService(this._dio, {this.baseUrl}) { ArgumentError.checkNotNull(_dio, '_dio'); - baseUrl ??= 'https://pos.platform.lotus-wallet.com/app/'; + baseUrl ??= 'http://192.168.10.88:8766/app/'; } final Dio _dio; From 9b3019fb89dd5e22f53d0391af3628e6f1d0e791 Mon Sep 17 00:00:00 2001 From: w-R <953969641@qq.com> Date: Fri, 11 Feb 2022 11:16:22 +0800 Subject: [PATCH 3/4] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E9=82=80=E8=AF=B7?= =?UTF-8?q?=E8=AE=B0=E5=BD=95;=20=E6=8E=A5=E5=8F=A3=E8=AF=B7=E6=B1=82?= =?UTF-8?q?=E9=BB=98=E8=AE=A4=E4=B8=8D=E8=A6=81Loading?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/article/hot_article_item.dart | 1 + lib/home/home_page.dart | 2 - .../integral_store_details_page.dart | 1 - lib/main.dart | 129 ++++--- lib/mine/invitation_record.dart | 360 ++++++++++++++++++ lib/mine/mine_view/community_follow.dart | 2 +- lib/mine/mine_view/mine_item.dart | 2 +- lib/order/exchange_history_page.dart | 1 + lib/order/order_history_page.dart | 1 + lib/retrofit/data/invitation_list.dart | 57 +++ lib/retrofit/data/user_info.dart | 6 + lib/retrofit/min_api.dart | 10 +- lib/retrofit/min_api.g.dart | 2 +- lib/retrofit/retrofit_api.dart | 21 +- lib/retrofit/retrofit_api.g.dart | 29 +- 15 files changed, 539 insertions(+), 85 deletions(-) create mode 100644 lib/retrofit/data/invitation_list.dart diff --git a/lib/article/hot_article_item.dart b/lib/article/hot_article_item.dart index 921bb401..497052c2 100644 --- a/lib/article/hot_article_item.dart +++ b/lib/article/hot_article_item.dart @@ -91,6 +91,7 @@ class _TouTiao extends State { Dio(), context: context, token: value.getString("token"), + showLoading: true ); } BaseData> baseData = diff --git a/lib/home/home_page.dart b/lib/home/home_page.dart index 1e4e1d6e..e707abc9 100644 --- a/lib/home/home_page.dart +++ b/lib/home/home_page.dart @@ -267,8 +267,6 @@ class _HomePage extends State with AutomaticKeepAliveClientMixin { totalMsg += element.number; }); }); - // refreshController.loadComplete(); - // refreshController.refreshCompleted(); } EasyLoading.dismiss(); } diff --git a/lib/integral_store/integral_store_details_page.dart b/lib/integral_store/integral_store_details_page.dart index 812533ec..03755908 100644 --- a/lib/integral_store/integral_store_details_page.dart +++ b/lib/integral_store/integral_store_details_page.dart @@ -13,7 +13,6 @@ import 'package:huixiang/retrofit/data/user_info.dart'; import 'package:huixiang/retrofit/retrofit_api.dart'; import 'package:huixiang/utils/font_weight.dart'; import 'package:huixiang/view_widget/custom_image.dart'; -import 'package:huixiang/view_widget/my_appbar.dart'; import 'package:shared_preferences/shared_preferences.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; diff --git a/lib/main.dart b/lib/main.dart index c05021fb..bda98505 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -77,6 +77,7 @@ import 'home/guide_page.dart'; import 'home/home_view/activity_list.dart'; import 'main_page.dart'; import 'message/system_details.dart'; +import 'mine/invitation_record.dart'; import 'mine/manage_address_page.dart'; import 'mine/mine_view/community_follow.dart'; import 'mine/mine_vip/binding_assistant_card.dart'; @@ -170,72 +171,72 @@ class MyApp extends StatelessWidget { Widget build(BuildContext context) { return MediaQuery( data: const MediaQueryData( - size: Size(375, 812), - ), - child:ScreenUtilInit( - designSize: Size(375, 812), - builder: () => MaterialApp( - debugShowCheckedModeBanner: false, - theme: ThemeData( - primarySwatch: Colors.blue, - textTheme: TextTheme( - button: TextStyle(fontSize: 24.sp), - bodyText1: TextStyle(fontSize: 12.sp), - bodyText2: TextStyle(fontSize: 16.sp), - ), + size: Size(375, 812), ), - localeResolutionCallback: (locale, supportedLocales) { - print("locale: $locale"); - print("supportedLocales: $supportedLocales"); - return appLocale ?? locale; - }, - localizationsDelegates: [ - GlobalMaterialLocalizations.delegate, - GlobalCupertinoLocalizations.delegate, - GlobalWidgetsLocalizations.delegate, - S.delegate - ], - localeListResolutionCallback: - (List locales, Iterable supportedLocales) { - print("locale: ${locales[0]}"); - return appLocale ?? locales[0]; - }, - supportedLocales: S.delegate.supportedLocales, - home: (isFirst ?? true) ? GuidePage() : LoginPage(), - builder: EasyLoading.init( - builder: (context, widget) { - ScreenUtil.setContext(context); - return MediaQuery( - data: MediaQuery.of(context).copyWith( - textScaleFactor: AppUtils.textScale(context), + child: ScreenUtilInit( + designSize: Size(375, 812), + builder: () => MaterialApp( + debugShowCheckedModeBanner: false, + theme: ThemeData( + primarySwatch: Colors.blue, + textTheme: TextTheme( + button: TextStyle(fontSize: 24.sp), + bodyText1: TextStyle(fontSize: 12.sp), + bodyText2: TextStyle(fontSize: 16.sp), ), - child: FlutterSmartDialog(child: widget), - ); - }, - ), - onGenerateRoute: (settings) { - final String name = settings.name; - final Function pageContentBuilder = routers[name]; - if (pageContentBuilder != null) { - final Route route = CupertinoPageRoute( - builder: (context) { - return pageContentBuilder(context, - arguments: settings.arguments); + ), + localeResolutionCallback: (locale, supportedLocales) { + print("locale: $locale"); + print("supportedLocales: $supportedLocales"); + return appLocale ?? locale; + }, + localizationsDelegates: [ + GlobalMaterialLocalizations.delegate, + GlobalCupertinoLocalizations.delegate, + GlobalWidgetsLocalizations.delegate, + S.delegate + ], + localeListResolutionCallback: + (List locales, Iterable supportedLocales) { + print("locale: ${locales[0]}"); + return appLocale ?? locales[0]; + }, + supportedLocales: S.delegate.supportedLocales, + home: (isFirst ?? true) ? GuidePage() : LoginPage(), + builder: EasyLoading.init( + builder: (context, widget) { + ScreenUtil.setContext(context); + return MediaQuery( + data: MediaQuery.of(context).copyWith( + textScaleFactor: AppUtils.textScale(context), + ), + child: FlutterSmartDialog(child: widget), + ); }, - settings: settings, - ); - return route; - } - return MaterialPageRoute( - //未找到页面配置进入登录页 - builder: (context) { - return LoginPage(); + ), + onGenerateRoute: (settings) { + final String name = settings.name; + final Function pageContentBuilder = routers[name]; + if (pageContentBuilder != null) { + final Route route = CupertinoPageRoute( + builder: (context) { + return pageContentBuilder(context, + arguments: settings.arguments); + }, + settings: settings, + ); + return route; + } + return MaterialPageRoute( + //未找到页面配置进入登录页 + builder: (context) { + return LoginPage(); + }, + settings: settings, + ); }, - settings: settings, - ); - }, - ), - )); + ), + )); } } @@ -340,5 +341,7 @@ Map routers = { '/router/photo_view_gallery_screen': (context, {arguments}) => PhotoViewGalleryScreen(), '/router/system_details': (context, {arguments}) => - SystemDetails(arguments:arguments), + SystemDetails(arguments: arguments), + '/router/invitation_record': (context, {arguments}) => + InvitationRecord(), }; diff --git a/lib/mine/invitation_record.dart b/lib/mine/invitation_record.dart index e69de29b..c77a0b23 100644 --- a/lib/mine/invitation_record.dart +++ b/lib/mine/invitation_record.dart @@ -0,0 +1,360 @@ +import 'dart:convert'; + +import 'package:dio/dio.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_easyloading/flutter_easyloading.dart'; +import 'package:huixiang/generated/l10n.dart'; +import 'package:huixiang/retrofit/data/base_data.dart'; +import 'package:huixiang/retrofit/data/invitation_list.dart'; +import 'package:huixiang/retrofit/data/page.dart'; +import 'package:huixiang/retrofit/data/user_info.dart'; +import 'package:huixiang/retrofit/retrofit_api.dart'; +import 'package:huixiang/utils/flutter_utils.dart'; +import 'package:huixiang/utils/font_weight.dart'; +import 'package:flutter_screenutil/flutter_screenutil.dart'; +import 'package:pull_to_refresh/pull_to_refresh.dart'; +import 'package:shared_preferences/shared_preferences.dart'; + +class InvitationRecord extends StatefulWidget { + @override + State createState() { + return _InvitationRecord(); + } +} + +class _InvitationRecord extends State + with AutomaticKeepAliveClientMixin { + ApiService apiService; + RefreshController _refreshController = RefreshController(); + List invitationList = []; + UserInfo userInfo; + int pageNum = 1; + + @override + void initState() { + super.initState(); + SharedPreferences.getInstance().then((value) { + apiService = ApiService(Dio(), + context: context, token: value.getString("token"), pay: true); + queryInviteMember(); + queryUserInfo(); + }); + } + + ///邀请记录 + queryInviteMember() async { + if (apiService == null) { + SharedPreferences value = await SharedPreferences.getInstance(); + apiService = ApiService( + Dio(), + context: context, + token: value.getString("token"), + ); + } + BaseData> baseData = + await apiService.inviteMemberList({ + "searchKey": "", + "pageNum": 1, + "pageSize": 100, + }).catchError((error) { + _refreshController.refreshFailed(); + }); + if (baseData != null && baseData.isSuccess) { + if (pageNum == 1) { + invitationList.clear(); + } + invitationList.addAll(baseData.data.list); + setState(() { + _refreshController.refreshCompleted(); + }); + } else { + _refreshController.refreshFailed(); + } + } + + queryUserInfo() async { + if (apiService == null) { + SharedPreferences value = await SharedPreferences.getInstance(); + apiService = ApiService( + Dio(), + context: context, + token: value.getString("token"), + ); + } + BaseData baseDate = + await apiService.queryInfo().catchError((onError) { + _refreshController.refreshFailed(); + }); + if (baseDate != null && baseDate.isSuccess) { + setState(() { + userInfo = baseDate.data; + }); + SharedPreferences.getInstance().then( + (value) => { + value.setString('user', jsonEncode(baseDate.data)), + }, + ); + _refreshController.refreshCompleted(); + } else { + _refreshController.refreshFailed(); + } + EasyLoading.dismiss(); + } + + @override + Widget build(BuildContext context) { + super.build(context); + return Stack( + children: [ + Container( + color: Color(0xFFF7F7F7), + ), + Stack( + children: [ + Container( + // padding: EdgeInsets.only(top: 40.h), + height: 230.h, + decoration: BoxDecoration( + gradient: new LinearGradient( + begin: Alignment.centerRight, + end: Alignment.centerLeft, + colors: [ + Color(0xFFE8F5E9), + Color(0xFFE5F7FF), + ]), + ), + ), + Container( + padding: EdgeInsets.only( + top: MediaQuery.of(context).padding.top, + left: 16.w, + right: 16.w), + child: Column( + children: [ + GestureDetector( + onTap: (){ + Navigator.of(context).pop(); + }, + child:Padding( + padding: EdgeInsets.only(top: 15.h, bottom: 30.h), + child: Row( + children: [ + Icon( + Icons.arrow_back_ios, + size: 24, + ), + SizedBox( + width: 1.w, + ), + Text( + "我的邀请记录", + style: TextStyle( + fontSize: 18.sp, + color: Color(0xFF000000), + fontWeight: MyFontWeight.semi_bold, + ), + ), + ], + )) + ), + Container( + margin: EdgeInsets.only(bottom: 16.h), + decoration: BoxDecoration( + color: Colors.white, + borderRadius: BorderRadius.circular(8), + boxShadow: [ + BoxShadow( + color: Colors.black.withAlpha(12), + offset: Offset(0, 3), + blurRadius: 14, + spreadRadius: 0, + ), + ], + ), + child: Row( + mainAxisAlignment: MainAxisAlignment.center, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Expanded( + child: Container( + color: Colors.transparent, + padding: EdgeInsets.all(16), + child: Column( + children: [ + Text( + (userInfo?.todayInviteNumber ?? 0).toString(), + style: TextStyle( + color: Color(0xFF000000), + fontSize: 30.sp, + fontWeight: MyFontWeight.medium, + ), + ), + SizedBox( + height: 4, + ), + Text( + "今日邀请", + style: TextStyle( + color: Color(0xFF808080), + fontSize: 12.sp, + fontWeight: MyFontWeight.regular, + ), + ), + ], + ))), + Container( + width: 1.w, + height: 32.h, + margin: EdgeInsets.only(left: 20.w, right: 20.w), + color: Color(0xFFD2D2D2), + ), + Expanded( + child: Container( + color: Colors.transparent, + padding: EdgeInsets.all(16), + child: Column( + children: [ + Text( + (userInfo?.inviteNumber ?? 0).toString(), + style: TextStyle( + color: Color(0xFF000000), + fontSize: 30.sp, + fontWeight: MyFontWeight.medium, + ), + ), + SizedBox( + height: 4, + ), + Text( + "累计邀请", + style: TextStyle( + color: Color(0xFF808080), + fontSize: 12.sp, + fontWeight: MyFontWeight.regular, + ), + ), + ], + ))), + ], + ), + ), + Expanded( + child: Container( + width: double.infinity, + padding: EdgeInsets.only( + top: 20.h, left: 16.w, right: 16.w), + decoration: BoxDecoration( + color: Colors.white, + borderRadius: BorderRadius.circular(8), + boxShadow: [ + BoxShadow( + color: Colors.black.withAlpha(12), + offset: Offset(0, 3), + blurRadius: 14, + spreadRadius: 0, + ), + ], + ), + child: Column( + children: [ + Text( + "邀请记录", + style: TextStyle( + color: Color(0xFF353535), + fontSize: 16.sp, + fontWeight: MyFontWeight.semi_bold, + ), + ), + SizedBox( + height: 8.h, + ), + Container( + width: 34.w, + height: 2.h, + margin: EdgeInsets.only(bottom: 20.h), + color: Color(0xFF32A060), + ), + Row( + children: [ + Expanded( + child: Text( + S.of(context).shoujihao, + style: TextStyle( + color: Color(0xFF353535), + fontSize: 12.sp, + fontWeight: MyFontWeight.regular, + ), + ), + ), + Text( + "注册时间", + style: TextStyle( + color: Color(0xFF353535), + fontSize: 12.sp, + fontWeight: MyFontWeight.regular, + ), + ), + ], + ), + Expanded(child: + ListView.builder( + itemCount:invitationList.length, + shrinkWrap: true, + physics: BouncingScrollPhysics(), + scrollDirection: Axis.vertical, + padding: EdgeInsets.symmetric(vertical: 8.h), + itemBuilder: (context, position) { + return Container( + child: invitationItem(invitationList[position]), + ); + }, + ),) + ], + ))), + ], + )), + ], + ), + ], + ); + } + + Widget invitationItem(InvitationList invitationList) { + return Container( + child: Column(children: [ + Padding(padding: EdgeInsets.symmetric(vertical: 12.h), + child: + Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Expanded(child:Text( + AppUtils.phoneEncode(invitationList?.phone ?? ""), + style: TextStyle( + color: Color(0xFF000000), + fontSize: 14.sp, + fontWeight: MyFontWeight.medium, + ), + ),), + Text( + invitationList?.createTime ?? "", + style: TextStyle( + color: Color(0xFF000000), + fontSize: 14.sp, + fontWeight: MyFontWeight.medium, + ), + ) + ], + ),), + Container( + width:double.infinity, + height:1.h, + color: Color(0xFFF7F7F7), + ), + ])); + } + + @override + bool get wantKeepAlive => true; +} diff --git a/lib/mine/mine_view/community_follow.dart b/lib/mine/mine_view/community_follow.dart index 76381d92..5b56f089 100644 --- a/lib/mine/mine_view/community_follow.dart +++ b/lib/mine/mine_view/community_follow.dart @@ -38,7 +38,7 @@ class _CommunityFollow extends State Dio(), context: context, token: value.getString("token"), - showLoading: false, + showLoading: true ); BaseData baseData = diff --git a/lib/mine/mine_view/mine_item.dart b/lib/mine/mine_view/mine_item.dart index bc28cc02..c3d37113 100644 --- a/lib/mine/mine_view/mine_item.dart +++ b/lib/mine/mine_view/mine_item.dart @@ -144,7 +144,7 @@ class _MineItem extends State { ),), Expanded(child:InkWell( onTap: () { - Navigator.of(context).pushNamed('/router/qr_share', arguments: {}); + Navigator.of(context).pushNamed('/router/invitation_record', arguments: {}); }, child: mineItem( "邀请记录", diff --git a/lib/order/exchange_history_page.dart b/lib/order/exchange_history_page.dart index 805d9822..36f293c0 100644 --- a/lib/order/exchange_history_page.dart +++ b/lib/order/exchange_history_page.dart @@ -128,6 +128,7 @@ class _ExchangeHistoryList extends State { super.initState(); SharedPreferences.getInstance().then((value) => { apiService = ApiService(Dio(), + showLoading: true, context: context, token: value.getString('token')), queryHistory(), }); diff --git a/lib/order/order_history_page.dart b/lib/order/order_history_page.dart index 3d003bae..0e2dc417 100644 --- a/lib/order/order_history_page.dart +++ b/lib/order/order_history_page.dart @@ -213,6 +213,7 @@ class _OrderHistoryList extends State SharedPreferences.getInstance().then((value) => { apiService = ApiService(Dio(), + showLoading: true, context: context, token: value.getString("token")), queryOrder(), }); diff --git a/lib/retrofit/data/invitation_list.dart b/lib/retrofit/data/invitation_list.dart new file mode 100644 index 00000000..3cc572a5 --- /dev/null +++ b/lib/retrofit/data/invitation_list.dart @@ -0,0 +1,57 @@ +/// mid : "1484477944838488064" +/// nickname : "回乡_888888" +/// avatar : "" +/// phone : "15447898756" +/// isFollow : null +/// createTime : "2022-01-21 18:48:17" + +class InvitationList { + InvitationList({ + String mid, + String nickname, + String avatar, + String phone, + dynamic isFollow, + String createTime,}){ + _mid = mid; + _nickname = nickname; + _avatar = avatar; + _phone = phone; + _isFollow = isFollow; + _createTime = createTime; +} + + InvitationList.fromJson(dynamic json) { + _mid = json['mid']; + _nickname = json['nickname']; + _avatar = json['avatar']; + _phone = json['phone']; + _isFollow = json['isFollow']; + _createTime = json['createTime']; + } + String _mid; + String _nickname; + String _avatar; + String _phone; + dynamic _isFollow; + String _createTime; + + String get mid => _mid; + String get nickname => _nickname; + String get avatar => _avatar; + String get phone => _phone; + dynamic get isFollow => _isFollow; + String get createTime => _createTime; + + Map toJson() { + final map = {}; + map['mid'] = _mid; + map['nickname'] = _nickname; + map['avatar'] = _avatar; + map['phone'] = _phone; + map['isFollow'] = _isFollow; + map['createTime'] = _createTime; + return map; + } + +} \ No newline at end of file diff --git a/lib/retrofit/data/user_info.dart b/lib/retrofit/data/user_info.dart index 51a39e55..751f6b72 100644 --- a/lib/retrofit/data/user_info.dart +++ b/lib/retrofit/data/user_info.dart @@ -36,6 +36,8 @@ class UserInfo { String points; bool isBind; String masterId; + int inviteNumber; + int todayInviteNumber; String masterCardRankName; MemberRank memberRankVo; @@ -58,6 +60,8 @@ class UserInfo { ..points = json['points'] as String ..isBind = json['isBind'] as bool ..masterId = json['masterId'] as String + ..inviteNumber = json['inviteNumber'] as int + ..todayInviteNumber = json['todayInviteNumber'] as int ..masterCardRankName = json['masterCardRankName'] as String ..memberRankVo = json['memberRankVo'] == null ? null @@ -81,6 +85,8 @@ class UserInfo { 'points': this.points, 'isBind': this.isBind, 'masterId': this.masterId, + "inviteNumber": this.inviteNumber, + "todayInviteNumber": this.todayInviteNumber, 'masterCardRankName': this.masterCardRankName, 'memberRankVo': this.memberRankVo == null ? "" : this.memberRankVo.toJson(), }; diff --git a/lib/retrofit/min_api.dart b/lib/retrofit/min_api.dart index 901bc3f1..ec58b78d 100644 --- a/lib/retrofit/min_api.dart +++ b/lib/retrofit/min_api.dart @@ -28,12 +28,12 @@ part 'min_api.g.dart'; // const base_url = "http://user.prod.kunqi.lotus-wallet.com/app/"; ///222 // const baseUrl = "http://user.prod.kunqi.lotus-wallet.com/app/"; ///222 -// const base_url = "http://192.168.10.236:8765/app/";///费韬 -// const baseUrl = "http://192.168.10.236:8765/app/";///费韬 +const base_url = "http://192.168.10.236:8765/app/";///费韬 +const baseUrl = "http://192.168.10.236:8765/app/";///费韬 -const base_url = "http://192.168.10.88:8765/app/";///詹云久 -const baseUrl = "http://192.168.10.88:8765/app/";///詹云久 +// const base_url = "http://192.168.10.88:8765/app/";///詹云久 +// const baseUrl = "http://192.168.10.88:8765/app/";///詹云久 // const base_url = "http://192.168.10.37:8766/app/"; @@ -49,7 +49,7 @@ abstract class MinApiService { String token, String tenant, String storeId, - bool showLoading = true, + bool showLoading = false, }) { Map headers = (token == null || token == "") ? {} : {'token': "Bearer $token"}; diff --git a/lib/retrofit/min_api.g.dart b/lib/retrofit/min_api.g.dart index 856ae6e1..1c1cc751 100644 --- a/lib/retrofit/min_api.g.dart +++ b/lib/retrofit/min_api.g.dart @@ -9,7 +9,7 @@ part of 'min_api.dart'; class _MinApiService implements MinApiService { _MinApiService(this._dio, {this.baseUrl}) { ArgumentError.checkNotNull(_dio, '_dio'); - baseUrl ??= 'http://192.168.10.88:8765/app/'; + baseUrl ??= 'http://192.168.10.236:8765/app/'; } final Dio _dio; diff --git a/lib/retrofit/retrofit_api.dart b/lib/retrofit/retrofit_api.dart index a2ce6b7a..5c404dc9 100644 --- a/lib/retrofit/retrofit_api.dart +++ b/lib/retrofit/retrofit_api.dart @@ -33,6 +33,7 @@ import 'data/goods.dart'; import 'data/goods_category.dart'; import 'data/headlines_list.dart'; import 'data/headlines_list_details.dart'; +import 'data/invitation_list.dart'; import 'data/logistics.dart'; import 'data/member_comment_list.dart'; import 'data/message.dart'; @@ -60,18 +61,15 @@ part 'retrofit_api.g.dart'; // const base_url = "http://platform.prod.kunqi.lotus-wallet.com/app/"; ///222 // const baseUrl = "http://platform.prod.kunqi.lotus-wallet.com/app/"; ///222 -// 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.159:8766/app/"; ///费韬 -// const baseUrl = "http://192.168.10.159: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.37:8766/app/"; // const baseUrl = "http://192.168.10.37:8766/app/"; -const base_url = "http://192.168.10.88:8766/app/";///詹云久 -const baseUrl = "http://192.168.10.88:8766/app/";///詹云久 +// const base_url = "http://192.168.10.88:8766/app/";///詹云久 +// const baseUrl = "http://192.168.10.88:8766/app/";///詹云久 @RestApi(baseUrl: baseUrl) abstract class ApiService { @@ -80,14 +78,14 @@ abstract class ApiService { String baseUrl, BuildContext context, String token, - bool showLoading = true, + bool showLoading = false, bool pay = false, }) { Map headers = (token == null || token == "") ? {} : {'token': "Bearer $token"}; - // if (pay) { + if (pay) { headers["Environment"] = "app"; - // } + } dio.options = BaseOptions( connectTimeout: 60000, receiveTimeout: 60000, @@ -488,5 +486,8 @@ abstract class ApiService { @GET("/information/category/{id}") Future> headlinesDetails(@Path("id") String id); + /// 我的邀请会员列表 + @POST("/member/inviteMemberList") + Future>> inviteMemberList(@Body() Map map); } diff --git a/lib/retrofit/retrofit_api.g.dart b/lib/retrofit/retrofit_api.g.dart index 527cc52a..fd2b2232 100644 --- a/lib/retrofit/retrofit_api.g.dart +++ b/lib/retrofit/retrofit_api.g.dart @@ -9,7 +9,7 @@ part of 'retrofit_api.dart'; class _ApiService implements ApiService { _ApiService(this._dio, {this.baseUrl}) { ArgumentError.checkNotNull(_dio, '_dio'); - baseUrl ??= 'http://192.168.10.88:8766/app/'; + baseUrl ??= 'http://192.168.10.236:8766/app/'; } final Dio _dio; @@ -1801,4 +1801,31 @@ class _ApiService implements ApiService { return value; } + @override + Future>> inviteMemberList(map) async { + ArgumentError.checkNotNull(map, 'map'); + const _extra = {}; + final queryParameters = {}; + final _data = {}; + _data.addAll(map ?? {}); + final _result = await _dio.request>( + '/member/inviteMemberList', + queryParameters: queryParameters, + options: RequestOptions( + method: 'POST', + headers: {}, + extra: _extra, + baseUrl: baseUrl), + data: _data); + final value = BaseData>.fromJson( + _result.data, + (json) => PageInfo.fromJson( + json, + (json) => InvitationList.fromJson(json), + ), + ); + return value; + } + + } From e3351fedc582920588f9212baa8a29456526026d Mon Sep 17 00:00:00 2001 From: w-R <953969641@qq.com> Date: Fri, 11 Feb 2022 18:16:19 +0800 Subject: [PATCH 4/4] =?UTF-8?q?=E6=9B=B4=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/order/order_detail_page.dart | 4 ++- lib/order/order_view/order_info.dart | 7 ++-- lib/order/order_view/order_status.dart | 49 +++++++++++++++++++++----- 3 files changed, 47 insertions(+), 13 deletions(-) diff --git a/lib/order/order_detail_page.dart b/lib/order/order_detail_page.dart index 149dc7be..807fcdfa 100644 --- a/lib/order/order_detail_page.dart +++ b/lib/order/order_detail_page.dart @@ -40,6 +40,7 @@ class _OrderDetailPage extends State { SharedPreferences.getInstance().then((value) { apiService = ApiService( Dio(), + showLoading: true, context: context, token: value.getString("token"), ); @@ -66,6 +67,7 @@ class _OrderDetailPage extends State { ); minService = MinApiService( Dio(), + showLoading:true, context: context, token: minToken, tenant: tenant, @@ -173,7 +175,7 @@ class _OrderDetailPage extends State { OrderCommodity(orderInfo), ///显示订单信息 - OrderInfoView(orderInfo), + OrderInfoView(orderInfo,isTakeOut), Container( height: 42.h, diff --git a/lib/order/order_view/order_info.dart b/lib/order/order_view/order_info.dart index 945ead9a..388ec949 100644 --- a/lib/order/order_view/order_info.dart +++ b/lib/order/order_view/order_info.dart @@ -7,10 +7,10 @@ import 'package:huixiang/retrofit/data/order_info.dart'; import 'package:huixiang/utils/font_weight.dart'; class OrderInfoView extends StatefulWidget { - final OrderInfo orderInfo; + final int isTakeOut; - OrderInfoView(this.orderInfo); + OrderInfoView(this.orderInfo,this.isTakeOut); @override State createState() { @@ -45,7 +45,8 @@ class _OrderInfoView extends State { S.of(context).dingdanhao, widget.orderInfo != null ? widget.orderInfo.id : ""), orderInfoItem(S.of(context).xiadanshijian, widget.orderInfo != null ? widget.orderInfo.createTime : ""), - orderInfoItem(S.of(context).peisongfangshi,(widget.orderInfo != null && widget.orderInfo.logisticsName != "") ? widget.orderInfo.logisticsName : "美团配送"), + orderInfoItem(S.of(context).peisongfangshi, widget.isTakeOut == 0 + ? S.of(context).ziqu :(widget.orderInfo != null && widget.orderInfo.logisticsName != "") ? widget.orderInfo.logisticsName : "美团配送"), // orderInfoItem(S.of(context).peisongfangshi,"美团配送"), orderInfoItem( S.of(context).beizhuxinxi, diff --git a/lib/order/order_view/order_status.dart b/lib/order/order_view/order_status.dart index 598ede2f..8cc5e8e7 100644 --- a/lib/order/order_view/order_status.dart +++ b/lib/order/order_view/order_status.dart @@ -33,7 +33,7 @@ class _OrderStatus extends State { @override Widget build(BuildContext context) { return Container( - height: widget.orderStatus >= 4 ? 118.h : 118.h, + height: widget.orderStatus >= 4 ? 120.h : 120.h, padding: EdgeInsets.fromLTRB(16.w, 0, 16.w, 10.h), child: Column( children: [ @@ -80,15 +80,46 @@ class _OrderStatus extends State { ), Row( mainAxisAlignment:MainAxisAlignment.spaceBetween, - crossAxisAlignment: CrossAxisAlignment.end, + crossAxisAlignment: CrossAxisAlignment.center, children: [ - Text( - widget.title, - style: TextStyle( - color: Colors.white, - fontWeight: MyFontWeight.regular, - fontSize: 15.sp, - ), + Column( + mainAxisAlignment:MainAxisAlignment.spaceBetween, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + widget.title, + style: TextStyle( + color: Colors.white, + fontWeight: MyFontWeight.regular, + fontSize: 15.sp, + ), + ), + if(widget.title == S.of(context).shangjiazhengzaipeican) + Container( + margin: EdgeInsets.only(top:5), + padding: EdgeInsets.only(top:2,left:4,right:4,bottom:2), + decoration: BoxDecoration( + color: Color(0xFF32A060), + boxShadow: [ + BoxShadow( + color: Colors.black.withAlpha(15), + offset: Offset(0, 3), + blurRadius: 14, + spreadRadius: 0, + ), + ], + borderRadius: BorderRadius.circular(15), + ), + child: Text( + S.of(context).qudanhao(":" + widget.orderInfo.dayFlowCode), + style: TextStyle( + color:Colors.white, + fontWeight: MyFontWeight.regular, + fontSize: 14.sp, + ), + ), + ), + ], ), if(widget.payStatus != 0) Image.asset(