From d9d3eaf202395b2667eef3a2c453b95ab7512a12 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E8=90=8C?= <494089941@qq.com> Date: Wed, 20 Apr 2022 19:53:55 +0800 Subject: [PATCH] =?UTF-8?q?=E7=A7=AF=E5=88=86=E5=85=85=E5=80=BC=E6=A8=A1?= =?UTF-8?q?=E5=9D=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- assets/newIcon/alipay.png | Bin 0 -> 13927 bytes assets/newIcon/wallet_balance.png | Bin 0 -> 1524 bytes lib/constants/api.dart | 1 - lib/constants/saas_api.dart | 27 + lib/gen/assets.gen.dart | 12 +- lib/main.dart | 4 +- lib/models/user/user_info_model.dart | 4 + lib/models/user/user_info_model.g.dart | 2 + .../wallet/trade_record_list_model.dart | 37 ++ .../wallet/trade_record_list_model.g.dart | 18 + lib/pages/home/home_page.dart | 1 - lib/pages/personal/personal_page.dart | 453 ++++++++++------ .../personal/wallet/balance_record_view.dart | 210 ++++++++ .../wallet/input_pay_password_dialog.dart | 91 ++++ lib/pages/personal/wallet/pay_way_dialog.dart | 240 +++++++++ .../personal/wallet/point_record_view.dart | 210 ++++++++ .../wallet/set_pay_password_dialog.dart | 76 +++ .../set_pay_password_verify_dialog.dart | 118 +++++ .../personal/wallet/wallet_recharge_page.dart | 496 ++++++++++++++++++ .../wallet/wallet_trade_record_page.dart | 44 ++ lib/pages/sign/login/code_message_page.dart | 9 +- lib/pages/sign/login/forgot_psd_page.dart | 5 +- lib/pages/sign/login/forgot_set_psd_page.dart | 7 +- lib/pages/sign/login/other_login_page.dart | 11 +- lib/provider/app_provider.dart | 23 - lib/provider/clock_timer_provider.dart | 30 ++ lib/widget/buttons/bee_check_radio.dart | 14 +- lib/widget/buttons/bee_long_button.dart | 6 +- lib/widget/picker/bee_date_picker.dart | 10 +- lib/widget/picker/bee_month_pick_body.dart | 111 ++++ pubspec.lock | 414 +++++++-------- tool/config.dart | 8 +- 32 files changed, 2270 insertions(+), 422 deletions(-) create mode 100644 assets/newIcon/alipay.png create mode 100644 assets/newIcon/wallet_balance.png create mode 100644 lib/models/wallet/trade_record_list_model.dart create mode 100644 lib/models/wallet/trade_record_list_model.g.dart create mode 100644 lib/pages/personal/wallet/balance_record_view.dart create mode 100644 lib/pages/personal/wallet/input_pay_password_dialog.dart create mode 100644 lib/pages/personal/wallet/pay_way_dialog.dart create mode 100644 lib/pages/personal/wallet/point_record_view.dart create mode 100644 lib/pages/personal/wallet/set_pay_password_dialog.dart create mode 100644 lib/pages/personal/wallet/set_pay_password_verify_dialog.dart create mode 100644 lib/pages/personal/wallet/wallet_recharge_page.dart create mode 100644 lib/pages/personal/wallet/wallet_trade_record_page.dart create mode 100644 lib/provider/clock_timer_provider.dart create mode 100644 lib/widget/picker/bee_month_pick_body.dart diff --git a/assets/newIcon/alipay.png b/assets/newIcon/alipay.png new file mode 100644 index 0000000000000000000000000000000000000000..2f0a94585e07fb80e89d2e4018d78bc13ab4f02e GIT binary patch literal 13927 zcmdse^;=Zk*Y}~jL>fUw5CKUErEdg8L_nBf=s~)>Yb2Fakd_bxWEf!R?(UFIX(S!G zc@OvZd7kTi|AP0ro*%fFvtzBjVy|=d+Mo4F?X4miF(WYm0Axz9UcLhWY}oA|AwJmB zV3s%w{v&dDrR@v=BzJEAutw(mE&<>^p!8B!)8pID9Ld)ouAYyt%_(X0gJi44a489f z#N=M$FlIl%en2SpXkR+qVrl0k157l4qbfu8gA6vaN(p>?1L6HBnX~yOfM4%Xmppw8 zg#UfWC+w&&G0qJBF7>*$se?C1%7!`KH8mFnmGiyp&TrEhC~NcQk%i~u2i|^z_RS$= zOaarASA&HgC+zAWHucBf#h%%Z4&Dg)`OcktcwJvDb{eO+ZW)tM(8-)^*V$fLT@)-A zZ(LoOt9rlok-TZ}2(7xtJYK>yp4L}MJZ#v>Q>VZlr<`@NXZF~d_JD-^Ouv+%z4`mN zcutfxtbo-!(>VbfamTh4(#9g*wp=S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<#7dQ?f#odzG7t&u_4{CA@DK8zJz#(`stoas4`cdDhrZ zNNRb+=57}JXJFRoOMTbYh7`gSbrocnM=ePo}zUXYz)o}>KdD}AihXNa4xAVNZd5it_QkQd5 zD+KaN!GD24e3M#3#_~V z@z6|r{*U4dbXmP;PhQ#h->}&>_5!2byfgCK75Wl&pilMdSA@rb0b7cOYT@{{bVwNY zwxD6YM#P{Ttb;myEFIl0eW_$~(jWTXdig$(7_GNCV;t&n`Ft=!(QTSzeETn|>Il*9 zc<{ly<0-FAIWEd;>VHb9QWv@Hr~cnUDkjBqz(s>aw)AQo13SFFF3pu>Z%FeutdrBb pIi<#&8eSUc6>>qSsW3M{TgCKgpin&>SUCnL$-jMB_zyhb{{TsMtFHh6 literal 0 HcmV?d00001 diff --git a/assets/newIcon/wallet_balance.png b/assets/newIcon/wallet_balance.png new file mode 100644 index 0000000000000000000000000000000000000000..934c4b6f3aff627b17ae11e074194b1088451fef GIT binary patch literal 1524 zcmV~#PV$5!UanyFNznS3`dg5 z*&+mgTsS}!Wd*GQOBC7Nndj>cyV=d|&hG5YY-STaRg;;__Ds!py8HEeuX_k7!MEK( z-+>!wysQ{|7$h482^gs>2P_g{5uk^GAKXxYr^{HNo!&#F1R+6;(DHyf3T9W-xQGM6 zWALRM;W7<-i%5_}M3?TkE*v@;TWBlf1;FRY+z!t}0>l!Xy4V%S!`_zNgx)@T88PTe z^y7j%qM5$vmDrUK=)9wX$!?pyLPUzcyGM0E*H=rhLHhb3KcJa%!99pB=(wh>k=mf7 zDf2O838JaowwdFRF6pF@6`ZG8IoyM6a$PHaztiU4RteqMHi&n(Q@Y`d>5gILT8b{+9iKvW`*0Y0#o(R@E6}ug z7k_mR5y?2*zpzhyd|;b*y4jBnqWi5Mhwwlw`e-x5*3i5ipH8g-!G^76rq7%GP*>CC zU)%%i&_%T2v#*}mZ8iDuy*!Q`8E99G5%BoRK&7sx1Ba&C-DUm*XDPQU zMiLM;7`3Ws6EXGG@Fe3?;XZdz5Uz~|YtYrBr4TVP!$XAO7b3?kUGeA<8nM2a^^ooMrzwQEEP}9RuTC)fVB-3wW>ykRtZN~t%{%~%zQ=EKbN z>?WN1W(&ee?Ab^YcAEnQ;z6tuh5HVAiJ4_FdnKOD2-XQ=Cu{}lthk;spM|rh{>0d> zV)Y!;Ca`{~`hVBXN#%Y|wf4q;%oxu^XBkd#fYEk-I0OCKh?@Iu0EItv%^;PNp}JHR zJpZGQIEcS(U1P2TkBD_1*@)EaIlX2a~Y zoF-nl7vS3W@tlTE zxp^yc`gaM_v}@+Hmh;{|PePH4h+LT|*)7AccqNmyC#t@;o$sOLg!o#)xSpb|&SupI z9De;9X~wIsC_J~hcOFG6j8ikZtL<3JqG_Vx+Lb4yZ_h~4eF&j&KZrG6#>G7JUJ*R{ zx(+MG1U|2~dxx7{Ux!@{7|^^NZbcsxw%Vv6p57>hnE7M$H{#UssaDIYnkEtQFM6kC zGCTWYcXLc&aYhe&U$!dH(jq-wB{(C8d(mIa=eEy|g%xO-F0ykzMIPs+<;H!1>Bm~} z2kpv*=E#h2U-gG@5qzuDWs+?ZgT}BK;c|E#*~EC|^G=b+5?c^kOX-d~C9dkxsMn>4 zHCnkHvlCG+ij)EtcWy$4v%?u_?hoWyCZY;9bp1JlWL!=X(LwaS)=dE6X$Ob9{hT4z z1DnNmfkU4@&6}q!-inpKlPd#=s3iA^6442{o15f)QAr&nB(_4LwPTw-V?PD7zsnb} zoF7>dIw#4zGf97qms*pw9-YP>ySzhTx5PYy684NV{p=9@P|hy|gauW`&tfm;(){dj aUGhK5vMRYpM-oN=0000 '/user/articleBorrow/findBorrowByUserId'; - ///生活缴费:查询当前用户的房屋是否缴费 String get findEstatelsPament => '/user/dailyPayment/findEstateIsPayment'; diff --git a/lib/constants/saas_api.dart b/lib/constants/saas_api.dart index 03cf5a29..bbdd5708 100644 --- a/lib/constants/saas_api.dart +++ b/lib/constants/saas_api.dart @@ -1,6 +1,7 @@ import 'package:aku_new_community/widget/others/user_tool.dart'; part 'market_api.dart'; + part 'profile_api.dart'; class SAASAPI { @@ -35,6 +36,7 @@ class SAASAPI { static _WorkOrder workOrder = _WorkOrder(); static _Pay pay = _Pay(); static _LifePay lifePay = _LifePay(); + static _Balance balance = _Balance(); ///二级分类 static _ProfileApi profile = _ProfileApi(); @@ -281,6 +283,20 @@ class _WorkOrder { } class _Pay { + ///app积分充值 + String get createPointsOrder => '/app/user/alipay/createPointsOrder'; + + ///app积分充值 向支付宝发起订单查询请求 + String get pointsOrderCheckAlipay => + '/app/user/alipay/pointsOrderCheckAlipay'; + + ///app余额充值 创建订单 + String get createBalanceOrder => '/app/user/alipay/createBalanceOrder'; + + ///app余额充值 向支付宝发起订单查询请求 + String get balanceOrderCheckAlipay => + '/app/user/alipay/balanceOrderCheckAlipay'; + ///创建商品订单 String get createGoodsOrder => '/app/user/alipay/createGoodsOrder'; @@ -313,3 +329,14 @@ class _LifePay { ///查询预交余额 String get findEstateBalance => '/app/user/livingExpenses/findEstateBalance'; } + +class _Balance { + ///设置余额支付密码 + String get setBalancePayPsd => '/app/user/balance/settingBalancePayPwd'; + + ///购买积分 + String get buyPointsByBalance => '/app/user/balance/buyPoints'; + + ///app用户交易记录 + String get tradeRecordList => '/app/user/tradeRecord/tradeRecordList'; +} diff --git a/lib/gen/assets.gen.dart b/lib/gen/assets.gen.dart index 6db5805b..70ed76dd 100644 --- a/lib/gen/assets.gen.dart +++ b/lib/gen/assets.gen.dart @@ -1297,13 +1297,12 @@ class $AssetsImagesGen { AssetGenImage get wxpay => const AssetGenImage('assets/images/wxpay.png'); } -class $AssetsJsonGen { - const $AssetsJsonGen(); -} - class $AssetsNewIconGen { const $AssetsNewIconGen(); + /// File path: assets/newIcon/alipay.png + AssetGenImage get alipay => const AssetGenImage('assets/newIcon/alipay.png'); + /// File path: assets/newIcon/all_classes.png AssetGenImage get allClasses => const AssetGenImage('assets/newIcon/all_classes.png'); @@ -1457,6 +1456,10 @@ class $AssetsNewIconGen { /// File path: assets/newIcon/srzf.png AssetGenImage get srzf => const AssetGenImage('assets/newIcon/srzf.png'); + /// File path: assets/newIcon/wallet_balance.png + AssetGenImage get walletBalance => + const AssetGenImage('assets/newIcon/wallet_balance.png'); + /// File path: assets/newIcon/xcyhm.png AssetGenImage get xcyhm => const AssetGenImage('assets/newIcon/xcyhm.png'); @@ -1563,7 +1566,6 @@ class Assets { static const $AssetsHomeGen home = $AssetsHomeGen(); static const $AssetsIconsGen icons = $AssetsIconsGen(); static const $AssetsImagesGen images = $AssetsImagesGen(); - static const $AssetsJsonGen json = $AssetsJsonGen(); static const $AssetsNewIconGen newIcon = $AssetsNewIconGen(); static const $AssetsStaticGen static = $AssetsStaticGen(); static const $AssetsTabGen tab = $AssetsTabGen(); diff --git a/lib/main.dart b/lib/main.dart index ed62b44c..b4e4d7a9 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -1,3 +1,4 @@ +import 'package:aku_new_community/provider/clock_timer_provider.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; @@ -42,6 +43,7 @@ class _MyAppState extends State { ChangeNotifierProvider(create: (context) => AppProvider()), ChangeNotifierProvider(create: (context) => SignUpProvider()), ChangeNotifierProvider(create: (context) => DataProvider()), + ChangeNotifierProvider(create: (context) => ClockTimerProvider()), ], child: GestureDetector( onTap: () { @@ -59,7 +61,7 @@ class _MyAppState extends State { designSize: Size(750, 1334), // minTextAdapt: true, // splitScreenMode: true, - builder: () => GetMaterialApp( + builder: (context) => GetMaterialApp( onGenerateTitle: (context) => S.of(context)!.appName, debugShowCheckedModeBanner: false, theme: AppTheme.theme, diff --git a/lib/models/user/user_info_model.dart b/lib/models/user/user_info_model.dart index 3889df5a..eff46d84 100644 --- a/lib/models/user/user_info_model.dart +++ b/lib/models/user/user_info_model.dart @@ -20,6 +20,8 @@ class UserInfoModel { final bool isPointsSignSetting; final bool isSign; final int? points; + final double? balance; + final bool isBalancePayPwd; final List imgList; String get sexValue { @@ -55,6 +57,8 @@ class UserInfoModel { required this.isPointsSignSetting, required this.isSign, this.points, + this.balance, + required this.isBalancePayPwd, required this.imgList, }); } diff --git a/lib/models/user/user_info_model.g.dart b/lib/models/user/user_info_model.g.dart index 5140e033..c30c159e 100644 --- a/lib/models/user/user_info_model.g.dart +++ b/lib/models/user/user_info_model.g.dart @@ -21,6 +21,8 @@ UserInfoModel _$UserInfoModelFromJson(Map json) => isPointsSignSetting: json['isPointsSignSetting'] as bool, isSign: json['isSign'] as bool, points: json['points'] as int?, + balance: (json['balance'] as num?)?.toDouble(), + isBalancePayPwd: json['isBalancePayPwd'] as bool, imgList: (json['imgList'] as List) .map((e) => ImgModel.fromJson(e as Map)) .toList(), diff --git a/lib/models/wallet/trade_record_list_model.dart b/lib/models/wallet/trade_record_list_model.dart new file mode 100644 index 00000000..4a763857 --- /dev/null +++ b/lib/models/wallet/trade_record_list_model.dart @@ -0,0 +1,37 @@ +import 'package:json_annotation/json_annotation.dart'; +import 'package:equatable/equatable.dart'; + +part 'trade_record_list_model.g.dart'; + +@JsonSerializable() +class TradeRecordListModel extends Equatable { + final int id; + final int type; + final String content; + final double payAmount; + final String createName; + final String createDate; + + factory TradeRecordListModel.fromJson(Map json) => + _$TradeRecordListModelFromJson(json); + + + const TradeRecordListModel({ + required this.id, + required this.type, + required this.content, + required this.payAmount, + required this.createName, + required this.createDate, + }); + + @override + List get props => [ + id, + type, + content, + payAmount, + createName, + createDate, + ]; +} diff --git a/lib/models/wallet/trade_record_list_model.g.dart b/lib/models/wallet/trade_record_list_model.g.dart new file mode 100644 index 00000000..9c740f3b --- /dev/null +++ b/lib/models/wallet/trade_record_list_model.g.dart @@ -0,0 +1,18 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'trade_record_list_model.dart'; + +// ************************************************************************** +// JsonSerializableGenerator +// ************************************************************************** + +TradeRecordListModel _$TradeRecordListModelFromJson( + Map json) => + TradeRecordListModel( + id: json['id'] as int, + type: json['type'] as int, + content: json['content'] as String, + payAmount: (json['payAmount'] as num).toDouble(), + createName: json['createName'] as String, + createDate: json['createDate'] as String, + ); diff --git a/lib/pages/home/home_page.dart b/lib/pages/home/home_page.dart index 323a4a53..f38bfaef 100644 --- a/lib/pages/home/home_page.dart +++ b/lib/pages/home/home_page.dart @@ -385,7 +385,6 @@ class _HomePageState extends State suffixTitle: '查看全部', onTap: () => Get.to(() => ActivityListPage()), ), - 24.hb, _activityItemModels == [] ? SizedBox() : Container( diff --git a/lib/pages/personal/personal_page.dart b/lib/pages/personal/personal_page.dart index c75d5d2a..9f2decc7 100644 --- a/lib/pages/personal/personal_page.dart +++ b/lib/pages/personal/personal_page.dart @@ -1,6 +1,8 @@ import 'package:aku_new_community/constants/saas_api.dart'; import 'package:aku_new_community/gen/assets.gen.dart'; import 'package:aku_new_community/pages/personal/user_profile_page.dart'; +import 'package:aku_new_community/pages/personal/wallet/wallet_recharge_page.dart'; +import 'package:aku_new_community/pages/personal/wallet/wallet_trade_record_page.dart'; import 'package:aku_new_community/pages/setting_page/settings_page.dart'; import 'package:aku_new_community/pages/sign/login/other_login_page.dart'; import 'package:aku_new_community/provider/user_provider.dart'; @@ -10,6 +12,7 @@ import 'package:aku_new_community/ui/profile/new_house/my_house_page.dart'; import 'package:aku_new_community/utils/headers.dart'; import 'package:aku_new_community/utils/network/net_util.dart'; import 'package:aku_new_community/widget/bee_avatar_widget.dart'; +import 'package:aku_new_community/widget/bee_divider.dart'; import 'package:aku_new_community/widget/others/user_tool.dart'; import 'package:bot_toast/bot_toast.dart'; import 'package:flutter/cupertino.dart'; @@ -290,172 +293,300 @@ class _PersonalIndexState extends State ], ), ), - Padding( - padding: EdgeInsets.only(top: 600.w), - child: Column( - children: [ - Container( - width: 686.w, - height: 282.w, - decoration: BoxDecoration( - color: Color(0xffffffff), - borderRadius: BorderRadius.all(Radius.circular(8)), - boxShadow: [ - BoxShadow( - color: Colors.grey.withOpacity(0.1), - offset: Offset(1, 1), - ), - ], - ), - margin: EdgeInsets.only(left: 32.w, right: 32.w), - padding: EdgeInsets.only( - top: 24.w, left: 32.w, right: 32.w), - child: Column( - //mainAxisAlignment: MainAxisAlignment.center, - children: [ - _homeTitle('我的订单', () { - Get.to(() => OrderPage(initIndex: 0)); - }, '查看全部'), - 50.hb, - Row( - mainAxisAlignment: MainAxisAlignment.center, - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - _orderButton( - name: '待付款', - path: Assets.newIcon.icDaifuk.path, - index: 1, - ), - _orderButton( - name: '待发货', - path: Assets.newIcon.imgDaifah.path, - index: 2, - ), - _orderButton( - name: '待收货', - path: Assets.newIcon.icDaishouh.path, - index: 3, - ), - _orderButton( - name: '已完成', - path: Assets.newIcon.imgDaipingj.path, - index: 4, - ), - ], - ), - ], - ), - ), - // Container( - // width: double.infinity, - // height: 100.w, - // clipBehavior: Clip.antiAlias, - // decoration: BoxDecoration( - // // color: Colors.white, - // borderRadius: BorderRadius.circular(16.w)), - // margin: EdgeInsets.symmetric(horizontal: 32.w), - // child: Material( - // color: Colors.white, - // child: InkWell( - // onTap: () { - // Get.to(() => ClockInPage()); - // }, - // borderRadius: BorderRadius.circular(16.w), - // child: Padding( - // padding: EdgeInsets.symmetric( - // horizontal: 32.w, vertical: 24.w), - // child: Row( - // children: [ - // '我的积分'.text.size(30.sp).black.bold.make(), - // Spacer(), - // // Assets.icons.intergral - // // .image(width: 32.w, height: 32.w), - // // 16.w.widthBox, - // // '123'.text.size(28.sp).black.make(), - // // 16.w.widthBox, - // Icon( - // CupertinoIcons.right_chevron, - // size: 24.w, - // ), - // ], - // ), - // ), - // ), - // ), - // ), - Container( - decoration: BoxDecoration( - color: Color(0xffffffff), - borderRadius: BorderRadius.all(Radius.circular(8)), - boxShadow: [ - BoxShadow( - color: Colors.grey.withOpacity(0.1), - offset: Offset(1, 1), - ), - ], - ), - margin: EdgeInsets.all(32.w), - padding: EdgeInsets.all(32.w), - child: Column( - children: [ - Row( - children: [ - 22.wb, - '其他功能' - .text - .size(32.sp) - .color(Color(0xFF2B2B2B)) - .bold - .make(), - Spacer(), - ], - ), - 24.hb, - _function('我的积分', Assets.newIcon.icJifen.path, - () => Get.to(() => ClockInPage()), ''), - _function( - '我的房屋', - Assets.newIcon.icWdfw.path, - () { - Get.to(() => MyHousePage()); - }, - // () => HouseOwnersPage( - // identify: 4, - // ), - '${UserTool.userProvider.defaultHouseString}', - ), - _function('我的家庭', Assets.newIcon.icWdjt.path, () { - Get.to(() => MyFamilyPage()); - }, ''), - // _function('我的车位', R.ASSETS_ICONS_ICON_MY_CARSEAT_PNG, - // () => CarParkingPage(), ''), - // 36.hb, - // _function('我的车', R.ASSETS_ICONS_ICON_MY_CAR_PNG, - // () => CarManagePage(), ''), - // 36.hb, - _function('我的访客', Assets.newIcon.icWdfk.path, () { - BotToast.showText( - text: '本小区尚未配置门禁设备', - align: Alignment(0, 0.5)); - }, ''), - _function( - '收货地址', - Assets.newIcon.icShdz.path, - () => Get.to(() => AddressListPage( - canBack: false, - )), - ''), - ], - ), - ), - ], - ), - ), + _columBody(), ], )), )); } + Padding _columBody() { + var wallet = Container( + margin: EdgeInsets.symmetric(horizontal: 32.w), + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(8.w), + color: Colors.white, + ), + child: Column( + children: [ + Padding( + padding: EdgeInsets.symmetric(vertical: 24.w, horizontal: 32.w), + child: Row( + children: [ + '我的钱包'.text.size(32.sp).color(Colors.black).make(), + Spacer(), + GestureDetector( + onTap: () { + Get.to(() => WalletTradeRecordPage()); + }, + child: Row( + children: [ + '交易记录' + .text + .size(24.sp) + .color(Colors.black.withOpacity(0.45)) + .make(), + 8.wb, + Icon( + CupertinoIcons.chevron_right, + color: Colors.black.withOpacity(0.45), + size: 32.w, + ), + ], + ), + ), + ], + ), + ), + BeeDivider.horizontal(), + Padding( + padding: EdgeInsets.symmetric(vertical: 24.w), + child: Row( + children: [ + Expanded( + child: Column( + children: [ + '${UserTool.userProvider.userInfoModel!.points ?? 0}' + .text + .size(40.sp) + .color(Colors.black.withOpacity(0.85)) + .make(), + 12.hb, + '积分' + .text + .size(24.sp) + .color(Colors.black.withOpacity(0.65)) + .make(), + ], + ), + ), + Expanded( + child: Column( + children: [ + '${UserTool.userProvider.userInfoModel!.balance ?? 0}' + .text + .size(40.sp) + .color(Colors.black.withOpacity(0.85)) + .make(), + 12.hb, + '余额' + .text + .size(24.sp) + .color(Colors.black.withOpacity(0.65)) + .make(), + ], + ), + ) + ], + ), + ), + BeeDivider.horizontal(), + Row( + children: [ + Expanded( + child: GestureDetector( + onTap: () async { + await Get.to(WalletRechargePage( + initIndex: 0, + )); + _refreshController.callRefresh(); + }, + child: Material( + color: Colors.transparent, + child: Center( + child: '充值' + .text + .size(26.sp) + .color(Colors.black.withOpacity(0.65)) + .make(), + ), + ))), + Container( + height: 84.w, + width: 2.w, + color: Colors.black.withOpacity(0.06), + ), + Expanded( + child: GestureDetector( + onTap: () async { + await Get.to(WalletRechargePage( + initIndex: 1, + )); + _refreshController.callRefresh(); + }, + child: Material( + color: Colors.transparent, + child: Center( + child: '购买积分' + .text + .size(26.sp) + .color(Colors.black.withOpacity(0.65)) + .make(), + ), + ))) + ], + ) + ], + ), + ); + var order = Container( + width: 686.w, + height: 282.w, + decoration: BoxDecoration( + color: Color(0xffffffff), + borderRadius: BorderRadius.all(Radius.circular(8)), + boxShadow: [ + BoxShadow( + color: Colors.grey.withOpacity(0.1), + offset: Offset(1, 1), + ), + ], + ), + margin: EdgeInsets.only(left: 32.w, right: 32.w), + padding: EdgeInsets.only(top: 24.w, left: 32.w, right: 32.w), + child: Column( + //mainAxisAlignment: MainAxisAlignment.center, + children: [ + _homeTitle('我的订单', () { + Get.to(() => OrderPage(initIndex: 0)); + }, '查看全部'), + 50.hb, + Row( + mainAxisAlignment: MainAxisAlignment.center, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + _orderButton( + name: '待付款', + path: Assets.newIcon.icDaifuk.path, + index: 1, + ), + _orderButton( + name: '待发货', + path: Assets.newIcon.imgDaifah.path, + index: 2, + ), + _orderButton( + name: '待收货', + path: Assets.newIcon.icDaishouh.path, + index: 3, + ), + _orderButton( + name: '已完成', + path: Assets.newIcon.imgDaipingj.path, + index: 4, + ), + ], + ), + ], + ), + ); + var extra = Container( + decoration: BoxDecoration( + color: Color(0xffffffff), + borderRadius: BorderRadius.all(Radius.circular(8)), + boxShadow: [ + BoxShadow( + color: Colors.grey.withOpacity(0.1), + offset: Offset(1, 1), + ), + ], + ), + margin: EdgeInsets.all(32.w), + padding: EdgeInsets.all(32.w), + child: Column( + children: [ + Row( + children: [ + 22.wb, + '其他功能'.text.size(32.sp).color(Color(0xFF2B2B2B)).bold.make(), + Spacer(), + ], + ), + 24.hb, + _function('我的积分', Assets.newIcon.icJifen.path, + () => Get.to(() => ClockInPage()), ''), + _function( + '我的房屋', + Assets.newIcon.icWdfw.path, + () { + Get.to(() => MyHousePage()); + }, + // () => HouseOwnersPage( + // identify: 4, + // ), + '${UserTool.userProvider.defaultHouseString}', + ), + _function('我的家庭', Assets.newIcon.icWdjt.path, () { + Get.to(() => MyFamilyPage()); + }, ''), + // _function('我的车位', R.ASSETS_ICONS_ICON_MY_CARSEAT_PNG, + // () => CarParkingPage(), ''), + // 36.hb, + // _function('我的车', R.ASSETS_ICONS_ICON_MY_CAR_PNG, + // () => CarManagePage(), ''), + // 36.hb, + _function('我的访客', Assets.newIcon.icWdfk.path, () { + BotToast.showText(text: '本小区尚未配置门禁设备', align: Alignment(0, 0.5)); + }, ''), + _function( + '收货地址', + Assets.newIcon.icShdz.path, + () => Get.to(() => AddressListPage( + canBack: false, + )), + ''), + ], + ), + ); + return Padding( + padding: EdgeInsets.only(top: 560.w), + child: Column( + children: [ + wallet, + 48.hb, + order, + // Container( + // width: double.infinity, + // height: 100.w, + // clipBehavior: Clip.antiAlias, + // decoration: BoxDecoration( + // // color: Colors.white, + // borderRadius: BorderRadius.circular(16.w)), + // margin: EdgeInsets.symmetric(horizontal: 32.w), + // child: Material( + // color: Colors.white, + // child: InkWell( + // onTap: () { + // Get.to(() => ClockInPage()); + // }, + // borderRadius: BorderRadius.circular(16.w), + // child: Padding( + // padding: EdgeInsets.symmetric( + // horizontal: 32.w, vertical: 24.w), + // child: Row( + // children: [ + // '我的积分'.text.size(30.sp).black.bold.make(), + // Spacer(), + // // Assets.icons.intergral + // // .image(width: 32.w, height: 32.w), + // // 16.w.widthBox, + // // '123'.text.size(28.sp).black.make(), + // // 16.w.widthBox, + // Icon( + // CupertinoIcons.right_chevron, + // size: 24.w, + // ), + // ], + // ), + // ), + // ), + // ), + // ), + extra, + ], + ), + ); + } + _homeTitle(String title, VoidCallback onTap, String suffixTitle) { return Row( children: [ diff --git a/lib/pages/personal/wallet/balance_record_view.dart b/lib/pages/personal/wallet/balance_record_view.dart new file mode 100644 index 00000000..019f7d05 --- /dev/null +++ b/lib/pages/personal/wallet/balance_record_view.dart @@ -0,0 +1,210 @@ +import 'package:aku_new_community/constants/saas_api.dart'; +import 'package:aku_new_community/extensions/num_ext.dart'; +import 'package:aku_new_community/models/wallet/trade_record_list_model.dart'; +import 'package:aku_new_community/utils/network/net_util.dart'; +import 'package:aku_new_community/widget/picker/bee_date_picker.dart'; +import 'package:aku_new_community/widget/picker/bee_picker_box.dart'; +import 'package:common_utils/common_utils.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_easyrefresh/easy_refresh.dart'; +import 'package:flutter_screenutil/src/size_extension.dart'; +import 'package:get/get.dart'; +import 'package:velocity_x/src/extensions/string_ext.dart'; + +class BalanceRecordView extends StatefulWidget { + const BalanceRecordView({Key? key}) : super(key: key); + + @override + _BalanceRecordViewState createState() => _BalanceRecordViewState(); +} + +class _BalanceRecordViewState extends State { + EasyRefreshController _refreshController = EasyRefreshController(); + + List _models = []; + int _pageNum = 1; + int _size = 10; + DateTime _pickTime = DateTime.now(); + int _pickType = 0; + + Map _types = { + 1: '支付', + 2: '退还', + 3: '充值', + 4: '收入', + 5: '提现', + 6: '抵扣', + }; + + @override + void dispose() { + _refreshController.dispose(); + super.dispose(); + } + + @override + Widget build(BuildContext context) { + return Column( + children: [ + Container( + padding: EdgeInsets.symmetric(horizontal: 32.w, vertical: 32.w), + child: Row( + children: [ + GestureDetector( + onTap: () async { + var date = await BeeDatePicker.monthPicker( + DateTime.now().subtract(Duration(days: 365))); + if (date != null) { + _pickTime = date; + } + setState(() {}); + }, + child: Row( + children: [ + '${_pickTime.year}年${_pickTime.month}月' + .text + .size(28.sp) + .color(Colors.black.withOpacity(0.85)) + .make(), + Icon( + CupertinoIcons.chevron_down, + size: 32.w, + color: Colors.black.withOpacity(0.45), + ) + ], + ), + ), + Spacer(), + MaterialButton( + color: Colors.black.withOpacity(0.06), + onPressed: () async { + await showModalBottomSheet( + context: context, + builder: (context) { + return BeePickerBox( + onPressed: () { + Get.back(); + setState(() {}); + }, + child: CupertinoPicker.builder( + itemExtent: 60.w, + childCount: _types.values.length, + onSelectedItemChanged: (index) { + _pickType = _types.keys.toList()[index]; + }, + itemBuilder: (context, index) { + var str = _types.values.toList()[index]; + return Center( + child: str.text.size(32.sp).isIntrinsic.make(), + ); + }, + ), + ); + }, + ); + }, + shape: StadiumBorder(), + elevation: 0, + child: Row( + children: [ + '${_pickType == 0 ? '全部类型' : _types[_pickType]}' + .text + .size(24.sp) + .color(Colors.black.withOpacity(0.45)) + .make(), + Icon( + CupertinoIcons.chevron_down, + size: 24.w, + color: Colors.black.withOpacity(0.25), + ) + ], + ), + ), + ], + ), + ), + Flexible( + child: Container( + color: Colors.white, + child: EasyRefresh( + header: MaterialHeader(), + footer: MaterialFooter(), + firstRefresh: true, + controller: _refreshController, + onRefresh: () async { + _pageNum = 1; + var baseList = await NetUtil() + .getList(SAASAPI.balance.tradeRecordList, params: { + 'pageNum': _pageNum, + 'size': _size, + 'modelType': 0, + 'type': _pickType, + 'createDate': _pickTime, + }); + + _models = baseList.rows + .map((e) => TradeRecordListModel.fromJson(e)) + .toList(); + }, + onLoad: () async { + _pageNum++; + var baseList = await NetUtil() + .getList(SAASAPI.balance.tradeRecordList, params: { + 'pageNum': _pageNum, + 'size': _size, + 'modelType': 0, + 'type': _pickType, + 'createDate': _pickTime, + }); + if (baseList.total > _models.length) { + _models.addAll(baseList.rows + .map((e) => TradeRecordListModel.fromJson(e)) + .toList()); + } else { + _refreshController.finishLoad(noMore: true); + } + }, + child: ListView( + padding: EdgeInsets.symmetric(horizontal: 32.w, vertical: 24.w), + children: _models.map((e) => _buildCard(e)).toList(), + ), + ), + ), + ), + ], + ); + } + + bool incom(type) => [2, 3, 4].contains(type); + + Widget _buildCard(TradeRecordListModel model) { + return Column( + children: [ + Row( + children: [ + '${_types[model.type]}-${model.content}' + .text + .size(28.sp) + .color(Colors.black.withOpacity(0.85)) + .make(), + Spacer(), + '${incom(model.type) ? '+' : '-'}¥${model.payAmount}' + .text + .size(28.sp) + .color(incom(model.type) + ? Colors.red + : Colors.black.withOpacity(0.85)) + .make(), + ], + ), + 8.hb, + '${DateUtil.formatDateStr(model.createDate, format: 'MM/dd HH:mm')}' + .text + .size(28.sp) + .color(Colors.black.withOpacity(0.85)) + .make(), + ], + ); + } +} diff --git a/lib/pages/personal/wallet/input_pay_password_dialog.dart b/lib/pages/personal/wallet/input_pay_password_dialog.dart new file mode 100644 index 00000000..faeef790 --- /dev/null +++ b/lib/pages/personal/wallet/input_pay_password_dialog.dart @@ -0,0 +1,91 @@ +import 'package:aku_new_community/constants/saas_api.dart'; +import 'package:aku_new_community/extensions/num_ext.dart'; +import 'package:aku_new_community/utils/network/net_util.dart'; +import 'package:bot_toast/bot_toast.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; +import 'package:flutter_screenutil/src/size_extension.dart'; +import 'package:get/get.dart'; +import 'package:sms_autofill/sms_autofill.dart'; +import 'package:velocity_x/src/extensions/string_ext.dart'; + +class InputPayPasswordDialog extends StatefulWidget { + final int balance; + + const InputPayPasswordDialog({ + Key? key, + required this.balance, + }) : super(key: key); + + @override + _InputPayPasswordDialogState createState() => _InputPayPasswordDialogState(); +} + +class _InputPayPasswordDialogState extends State { + String? _currentCode; + + @override + Widget build(BuildContext context) { + return Center( + child: Padding( + padding: EdgeInsets.only(bottom: 300.w), + child: Material( + borderRadius: BorderRadius.circular(24.w), + child: Container( + width: 630.w, + height: 480.w, + padding: EdgeInsets.symmetric(horizontal: 32.w), + decoration: BoxDecoration(borderRadius: BorderRadius.circular(24.w)), + child: Column( + children: [ + 96.hb, + '请输入您的支付密码' + .text + .size(32.sp) + .color(Colors.black.withOpacity(0.85)) + .bold + .make(), + 40.hb, + '支付密码仅用于对钱包余额支付时确认' + .text + .size(28.sp) + .color(Colors.black.withOpacity(0.45)) + .make(), + PinFieldAutoFill( + autoFocus: true, + currentCode: _currentCode, + inputFormatters: [FilteringTextInputFormatter.digitsOnly], + codeLength: 6, + onCodeChanged: (code) async { + if ((code?.length ?? 0) >= 6) { + Get.back(); + var base = await NetUtil() + .post(SAASAPI.balance.buyPointsByBalance, params: { + 'balance': widget.balance, + 'balancePayPwd': code + }); + Get.back(); + if (!base.success) { + BotToast.showText(text: base.msg); + } + } + _currentCode = code; + }, + decoration: UnderlineDecoration( + colorBuilder: FixedColorListBuilder([ + Colors.black.withOpacity(0.3), + Colors.black.withOpacity(0.3), + Colors.black.withOpacity(0.3), + Colors.black.withOpacity(0.3), + Colors.black.withOpacity(0.3), + Colors.black.withOpacity(0.3), + ])), + ) + ], + ), + ), + ), + ), + ); + } +} diff --git a/lib/pages/personal/wallet/pay_way_dialog.dart b/lib/pages/personal/wallet/pay_way_dialog.dart new file mode 100644 index 00000000..9ce8487e --- /dev/null +++ b/lib/pages/personal/wallet/pay_way_dialog.dart @@ -0,0 +1,240 @@ +import 'dart:ui'; + +import 'package:aku_new_community/constants/saas_api.dart'; +import 'package:aku_new_community/extensions/num_ext.dart'; +import 'package:aku_new_community/gen/assets.gen.dart'; +import 'package:aku_new_community/pages/life_pay/pay_util.dart'; +import 'package:aku_new_community/pages/personal/wallet/input_pay_password_dialog.dart'; +import 'package:aku_new_community/pages/personal/wallet/set_pay_password_dialog.dart'; +import 'package:aku_new_community/utils/network/net_util.dart'; +import 'package:aku_new_community/widget/buttons/bee_check_radio.dart'; +import 'package:aku_new_community/widget/buttons/bee_long_button.dart'; +import 'package:aku_new_community/widget/others/user_tool.dart'; +import 'package:bot_toast/bot_toast.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_screenutil/src/size_extension.dart'; +import 'package:get/get.dart'; +import 'package:velocity_x/src/extensions/string_ext.dart'; + +class PayWayDialog extends StatefulWidget { + final bool isBalance; + final int amount; + final bool insufficientBalance; + + const PayWayDialog( + {Key? key, + required this.isBalance, + required this.amount, + required this.insufficientBalance}) + : super(key: key); + + @override + _PayWayDialogState createState() => _PayWayDialogState(); +} + +class _PayWayDialogState extends State { + List _payType = []; + + @override + void initState() { + if (widget.isBalance) { + _payType.add(1); + } else { + if (widget.insufficientBalance) { + _payType.add(1); + } else { + _payType.add(0); + } + } + super.initState(); + } + + @override + Widget build(BuildContext context) { + var wallet = GestureDetector( + onTap: () { + if (widget.insufficientBalance) { + return; + } + _payType.clear(); + _payType.add(0); + setState(() {}); + }, + child: ClipRect( + child: Stack( + children: [ + Material( + color: Colors.transparent, + child: Row( + children: [ + Assets.newIcon.walletBalance.image(width: 48.w, height: 48.w), + 8.wb, + '钱包余额' + .text + .size(28.sp) + .color(Colors.black.withOpacity(0.85)) + .make(), + 16.wb, + Visibility( + visible: widget.insufficientBalance, + child: + '钱包余额不足'.text.size(24.sp).color(Colors.red).make()), + Spacer(), + BeeCheckRadio( + groupValue: _payType, + value: 0, + size: 36.w, + indent: Icon( + CupertinoIcons.checkmark_alt, + color: Colors.black, + size: 28.w, + ), + ), + ], + ), + ), + BackdropFilter( + filter: ImageFilter.blur( + sigmaX: widget.insufficientBalance ? 1 : 0, + sigmaY: widget.insufficientBalance ? 1 : 0), + child: Container(), + ), + ], + ), + ), + ); + var alipay = GestureDetector( + onTap: () { + _payType.clear(); + _payType.add(1); + setState(() {}); + }, + child: Material( + color: Colors.transparent, + child: Row( + children: [ + Assets.newIcon.alipay.image(width: 48.w, height: 48.w), + 8.wb, + '支付宝'.text.size(28.sp).color(Colors.black.withOpacity(0.85)).make(), + Spacer(), + BeeCheckRadio( + groupValue: _payType, + value: 1, + size: 36.w, + indent: Icon( + CupertinoIcons.checkmark_alt, + color: Colors.black, + size: 28.w, + ), + ), + ], + ), + ), + ); + return Material( + color: Colors.transparent, + child: Container( + padding: EdgeInsets.symmetric(vertical: 24.w, horizontal: 32.w), + width: double.infinity, + color: Colors.white, + child: Column( + mainAxisSize: MainAxisSize.min, + children: [ + '支付' + .text + .size(32.sp) + .bold + .isIntrinsic + .color(Colors.black.withOpacity(0.85)) + .make(), + 48.hb, + Column( + children: [ + '¥' + .richText + .color(Colors.black.withOpacity(0.85)) + .size(26.sp) + .withTextSpanChildren([ + widget.amount + .toString() + .textSpan + .size(40.sp) + .color(Colors.black.withOpacity(0.85)) + .make(), + ]).make(), + Offstage( + offstage: widget.isBalance, + child: '总共购买${widget.amount * 10}积分' + .text + .size(32.sp) + .color(Colors.black.withOpacity(0.45)) + .make(), + ), + 60.hb, + Offstage( + offstage: widget.isBalance, + child: Column( + children: [ + wallet, + 40.hb, + ], + ), + ), + alipay, + 80.hb, + BeeLongButton( + width: double.infinity, + onPressed: () async { + if (_payType.contains(0)) { + if (!UserTool + .userProvider.userInfoModel!.isBalancePayPwd) { + Get.dialog(SetPayPasswordDialog()); + } else { + Get.back(); + Get.dialog( + InputPayPasswordDialog(balance: widget.amount)); + } + return; + } + if (_payType.contains(1)) { + var cancel = BotToast.showLoading(); + await _alipayFuc(); + cancel(); + Get.back(); + return; + } + }, + text: '确认支付${widget.amount}元'), + ], + ), + ], + ), + ), + ); + } + + Future _alipayFuc() async { + if (widget.isBalance) { + var base = await NetUtil().post(SAASAPI.pay.createBalanceOrder, params: { + 'balance': widget.amount, + }); + if (base.success) { + var re = await PayUtil() + .callAliPay(base.data, SAASAPI.pay.balanceOrderCheckAlipay); + } else { + BotToast.showText(text: base.msg); + } + } else { + var base = await NetUtil().post(SAASAPI.pay.createPointsOrder, params: { + 'payAmount': widget.amount, + }); + if (base.success) { + var re = await PayUtil() + .callAliPay(base.data, SAASAPI.pay.pointsOrderCheckAlipay); + } else { + BotToast.showText(text: base.msg); + } + } + } +} diff --git a/lib/pages/personal/wallet/point_record_view.dart b/lib/pages/personal/wallet/point_record_view.dart new file mode 100644 index 00000000..a5a38329 --- /dev/null +++ b/lib/pages/personal/wallet/point_record_view.dart @@ -0,0 +1,210 @@ +import 'package:aku_new_community/constants/saas_api.dart'; +import 'package:aku_new_community/extensions/num_ext.dart'; +import 'package:aku_new_community/models/wallet/trade_record_list_model.dart'; +import 'package:aku_new_community/utils/network/net_util.dart'; +import 'package:aku_new_community/widget/picker/bee_date_picker.dart'; +import 'package:aku_new_community/widget/picker/bee_picker_box.dart'; +import 'package:common_utils/common_utils.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_easyrefresh/easy_refresh.dart'; +import 'package:flutter_screenutil/src/size_extension.dart'; +import 'package:get/get.dart'; +import 'package:velocity_x/src/extensions/string_ext.dart'; + +class PointRecordView extends StatefulWidget { + const PointRecordView({Key? key}) : super(key: key); + + @override + _PointRecordViewState createState() => _PointRecordViewState(); +} + +class _PointRecordViewState extends State { + EasyRefreshController _refreshController = EasyRefreshController(); + + List _models = []; + int _pageNum = 1; + int _size = 10; + DateTime _pickTime = DateTime.now(); + int _pickType = 0; + + Map _types = { + 1: '支付', + 2: '退还', + 3: '充值', + 4: '收入', + 5: '提现', + 6: '抵扣', + }; + + @override + void dispose() { + _refreshController.dispose(); + super.dispose(); + } + + @override + Widget build(BuildContext context) { + return Column( + children: [ + Container( + padding: EdgeInsets.symmetric(horizontal: 32.w, vertical: 32.w), + child: Row( + children: [ + GestureDetector( + onTap: () async { + var date = await BeeDatePicker.monthPicker( + DateTime.now().subtract(Duration(days: 365))); + if (date != null) { + _pickTime = date; + } + setState(() {}); + }, + child: Row( + children: [ + '${_pickTime.year}年${_pickTime.month}月' + .text + .size(28.sp) + .color(Colors.black.withOpacity(0.85)) + .make(), + Icon( + CupertinoIcons.chevron_down, + size: 32.w, + color: Colors.black.withOpacity(0.45), + ) + ], + ), + ), + Spacer(), + MaterialButton( + color: Colors.black.withOpacity(0.06), + onPressed: () async { + await showModalBottomSheet( + context: context, + builder: (context) { + return BeePickerBox( + onPressed: () { + Get.back(); + setState(() {}); + }, + child: CupertinoPicker.builder( + itemExtent: 60.w, + childCount: _types.values.length, + onSelectedItemChanged: (index) { + _pickType = _types.keys.toList()[index]; + }, + itemBuilder: (context, index) { + var str = _types.values.toList()[index]; + return Center( + child: str.text.size(32.sp).isIntrinsic.make(), + ); + }, + ), + ); + }, + ); + }, + shape: StadiumBorder(), + elevation: 0, + child: Row( + children: [ + '${_pickType == 0 ? '全部类型' : _types[_pickType]}' + .text + .size(24.sp) + .color(Colors.black.withOpacity(0.45)) + .make(), + Icon( + CupertinoIcons.chevron_down, + size: 24.w, + color: Colors.black.withOpacity(0.25), + ) + ], + ), + ), + ], + ), + ), + Flexible( + child: Container( + color: Colors.white, + child: EasyRefresh( + header: MaterialHeader(), + footer: MaterialFooter(), + firstRefresh: true, + controller: _refreshController, + onRefresh: () async { + _pageNum = 1; + var baseList = await NetUtil() + .getList(SAASAPI.balance.tradeRecordList, params: { + 'pageNum': _pageNum, + 'size': _size, + 'modelType': 1, + 'type': _pickType, + 'createDate': _pickTime, + }); + + _models = baseList.rows + .map((e) => TradeRecordListModel.fromJson(e)) + .toList(); + }, + onLoad: () async { + _pageNum++; + var baseList = await NetUtil() + .getList(SAASAPI.balance.tradeRecordList, params: { + 'pageNum': _pageNum, + 'size': _size, + 'modelType': 0, + 'type': _pickType, + 'createDate': _pickTime, + }); + if (baseList.total > _models.length) { + _models.addAll(baseList.rows + .map((e) => TradeRecordListModel.fromJson(e)) + .toList()); + } else { + _refreshController.finishLoad(noMore: true); + } + }, + child: ListView( + padding: EdgeInsets.symmetric(horizontal: 32.w, vertical: 24.w), + children: _models.map((e) => _buildCard(e)).toList(), + ), + ), + ), + ), + ], + ); + } + + bool incom(type) => [2, 3, 4].contains(type); + + Widget _buildCard(TradeRecordListModel model) { + return Column( + children: [ + Row( + children: [ + '${_types[model.type]}-${model.content}' + .text + .size(28.sp) + .color(Colors.black.withOpacity(0.85)) + .make(), + Spacer(), + '${incom(model.type) ? '+' : '-'}¥${model.payAmount}' + .text + .size(28.sp) + .color(incom(model.type) + ? Colors.red + : Colors.black.withOpacity(0.85)) + .make(), + ], + ), + 8.hb, + '${DateUtil.formatDateStr(model.createDate, format: 'MM/dd HH:mm')}' + .text + .size(28.sp) + .color(Colors.black.withOpacity(0.85)) + .make(), + ], + ); + } +} diff --git a/lib/pages/personal/wallet/set_pay_password_dialog.dart b/lib/pages/personal/wallet/set_pay_password_dialog.dart new file mode 100644 index 00000000..dcc458b3 --- /dev/null +++ b/lib/pages/personal/wallet/set_pay_password_dialog.dart @@ -0,0 +1,76 @@ +import 'package:aku_new_community/extensions/num_ext.dart'; +import 'package:aku_new_community/pages/personal/wallet/set_pay_password_verify_dialog.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; +import 'package:flutter_screenutil/src/size_extension.dart'; +import 'package:get/get.dart'; +import 'package:sms_autofill/sms_autofill.dart'; +import 'package:velocity_x/src/extensions/string_ext.dart'; + +class SetPayPasswordDialog extends StatefulWidget { + const SetPayPasswordDialog({Key? key, }) : super(key: key); + + @override + _SetPayPasswordDialogState createState() => _SetPayPasswordDialogState(); +} + +class _SetPayPasswordDialogState extends State { + String? _currentCode; + + @override + Widget build(BuildContext context) { + return Center( + child: Padding( + padding:EdgeInsets.only(bottom: 300.w), + child: Material( + borderRadius: BorderRadius.circular(24.w), + child: Container( + width: 630.w, + height: 480.w, + padding: EdgeInsets.symmetric(horizontal: 32.w), + decoration: BoxDecoration(borderRadius: BorderRadius.circular(24.w)), + child: Column( + children: [ + 96.hb, + '请先设置支付密码' + .text + .size(32.sp) + .color(Colors.black.withOpacity(0.85)) + .bold + .make(), + 40.hb, + '支付密码仅用于对钱包余额支付时确认' + .text + .size(28.sp) + .color(Colors.black.withOpacity(0.45)) + .make(), + PinFieldAutoFill( + autoFocus: true, + currentCode: _currentCode, + inputFormatters: [FilteringTextInputFormatter.digitsOnly], + codeLength: 6, + onCodeChanged: (code) async { + if ((code?.length ?? 0) >= 6) { + Get.back(); + Get.dialog(SetPayVerifyPasswordDialog(firstCode:code!,)); + } + _currentCode = code; + }, + decoration: UnderlineDecoration( + colorBuilder: FixedColorListBuilder([ + Colors.black.withOpacity(0.3), + Colors.black.withOpacity(0.3), + Colors.black.withOpacity(0.3), + Colors.black.withOpacity(0.3), + Colors.black.withOpacity(0.3), + Colors.black.withOpacity(0.3), + ])), + ) + ], + ), + ), + ), + ), + ); + } +} diff --git a/lib/pages/personal/wallet/set_pay_password_verify_dialog.dart b/lib/pages/personal/wallet/set_pay_password_verify_dialog.dart new file mode 100644 index 00000000..262b9bb4 --- /dev/null +++ b/lib/pages/personal/wallet/set_pay_password_verify_dialog.dart @@ -0,0 +1,118 @@ +import 'package:aku_new_community/constants/saas_api.dart'; +import 'package:aku_new_community/extensions/num_ext.dart'; +import 'package:aku_new_community/pages/personal/wallet/input_pay_password_dialog.dart'; +import 'package:aku_new_community/pages/sign/login/psd_verify.dart'; +import 'package:aku_new_community/utils/network/net_util.dart'; +import 'package:aku_new_community/widget/others/user_tool.dart'; +import 'package:bot_toast/bot_toast.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; +import 'package:flutter_screenutil/src/size_extension.dart'; +import 'package:get/get.dart'; +import 'package:sms_autofill/sms_autofill.dart'; +import 'package:velocity_x/src/extensions/string_ext.dart'; + +class SetPayVerifyPasswordDialog extends StatefulWidget { + final String firstCode; + + const SetPayVerifyPasswordDialog({Key? key, required this.firstCode}) + : super(key: key); + + @override + _SetPayVerifyPasswordDialogState createState() => + _SetPayVerifyPasswordDialogState(); +} + +class _SetPayVerifyPasswordDialogState + extends State { + String _currentCode = ''; + + bool get checkVerify => widget.firstCode == _currentCode; + + @override + Widget build(BuildContext context) { + return Center( + child: Padding( + padding: EdgeInsets.only(bottom: 300.w), + child: Material( + borderRadius: BorderRadius.circular(24.w), + child: Container( + width: 630.w, + height: 480.w, + padding: EdgeInsets.symmetric(horizontal: 32.w), + decoration: + BoxDecoration(borderRadius: BorderRadius.circular(24.w)), + child: Column( + children: [ + 96.hb, + '请再次输入支付密码' + .text + .size(32.sp) + .color(Colors.black.withOpacity(0.85)) + .bold + .make(), + 40.hb, + '支付密码仅用于对钱包余额支付时确认' + .text + .size(28.sp) + .color(Colors.black.withOpacity(0.45)) + .make(), + PinFieldAutoFill( + autoFocus: true, + currentCode: _currentCode, + inputFormatters: [FilteringTextInputFormatter.digitsOnly], + codeLength: 6, + onCodeChanged: (code) async { + _currentCode = code ?? ''; + if ((code?.length ?? 0) >= 6) { + print(checkVerify); + if (!checkVerify) { + return; + } + var base = await NetUtil() + .post(SAASAPI.balance.setBalancePayPsd, params: { + 'pwd': widget.firstCode, + 'rePwd': _currentCode, + }); + if (base.success) { + Get.back(); + UserTool.userProvider.updateUserInfo(); + } else { + BotToast.showText(text: base.msg); + Get.back(); + } + } + setState(() {}); + }, + decoration: UnderlineDecoration( + colorBuilder: FixedColorListBuilder([ + Colors.black.withOpacity(0.3), + Colors.black.withOpacity(0.3), + Colors.black.withOpacity(0.3), + Colors.black.withOpacity(0.3), + Colors.black.withOpacity(0.3), + Colors.black.withOpacity(0.3), + ])), + ), + 24.hb, + Offstage( + offstage: (_currentCode.isEmptyOrNull) || (checkVerify), + child: Row( + children: [ + '密码输入不一致' + .text + .size(24.sp) + .isIntrinsic + .color(Colors.red) + .make(), + ], + ), + ) + ], + ), + ), + ), + ), + ); + } +} diff --git a/lib/pages/personal/wallet/wallet_recharge_page.dart b/lib/pages/personal/wallet/wallet_recharge_page.dart new file mode 100644 index 00000000..a0ceadec --- /dev/null +++ b/lib/pages/personal/wallet/wallet_recharge_page.dart @@ -0,0 +1,496 @@ +import 'package:aku_new_community/extensions/num_ext.dart'; +import 'package:aku_new_community/extensions/widget_list_ext.dart'; +import 'package:aku_new_community/gen/assets.gen.dart'; +import 'package:aku_new_community/pages/personal/wallet/pay_way_dialog.dart'; +import 'package:aku_new_community/widget/bee_scaffold.dart'; +import 'package:aku_new_community/widget/buttons/bee_long_button.dart'; +import 'package:aku_new_community/widget/others/user_tool.dart'; +import 'package:bot_toast/bot_toast.dart'; +import 'package:collection/src/iterable_extensions.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; +import 'package:flutter_screenutil/src/size_extension.dart'; +import 'package:get/get.dart'; +import 'package:velocity_x/src/extensions/num_ext.dart'; +import 'package:velocity_x/src/extensions/string_ext.dart'; + +class WalletRechargePage extends StatefulWidget { + final initIndex; + + const WalletRechargePage({Key? key, this.initIndex = 0}) : super(key: key); + + @override + _WalletRechargePageState createState() => _WalletRechargePageState(); +} + +class _WalletRechargePageState extends State + with SingleTickerProviderStateMixin { + int _currentIndex = 0; + int _currentSelect = 0; + late TabController _tabController; + List _tabs = ['余额充值', '积分充值']; + + List _balanceValue = [10, 20, 30, 50, 00, 200, 300, 500]; + List _pointValue = [10, 200, 300, 500, 1000, 2000, 5000, 10000]; + + int _rechargeValue = 0; + + @override + void initState() { + _tabController = + TabController(length: 2, vsync: this, initialIndex: widget.initIndex); + _currentIndex = widget.initIndex; + _rechargeValue = widget.initIndex == 0 ? _balanceValue[0] : _pointValue[0]; + super.initState(); + } + + @override + Widget build(BuildContext context) { + return BeeScaffold( + title: '钱包充值', + actions: [ + TextButton( + onPressed: () {}, + child: '账单' + .text + .size(28.sp) + .color(Colors.black.withOpacity(0.85)) + .make(), + ), + ], + body: Column( + children: [ + Padding( + padding: EdgeInsets.symmetric(vertical: 24.w, horizontal: 32.w), + child: Row( + children: [ + '余额:${UserTool.userProvider.userInfoModel!.balance ?? 0}' + .text + .size(32.sp) + .color(Colors.black.withOpacity(0.85)) + .make(), + 64.wb, + '积分:' + .text + .size(32.sp) + .color(Colors.black.withOpacity(0.85)) + .make(), + '${UserTool.userProvider.userInfoModel!.points ?? 0}' + .text + .size(32.sp) + .color(Colors.black.withOpacity(0.85)) + .make(), + ], + ), + ), + Expanded( + child: Container( + padding: EdgeInsets.symmetric(horizontal: 32.w, vertical: 32.w), + decoration: BoxDecoration(color: Colors.white), + child: Column( + children: [ + Row( + children: _tabs + .mapIndexed((index, element) => GestureDetector( + onTap: () { + _currentIndex = index; + _tabController.animateTo(_currentIndex); + setState(() {}); + }, + child: Column( + mainAxisSize: MainAxisSize.min, + children: [ + element.text + .size(28.sp) + .fontWeight(_currentIndex == index + ? FontWeight.bold + : FontWeight.normal) + .color(Colors.black.withOpacity( + _currentIndex == index ? 0.85 : 0.65)) + .make(), + 8.hb, + AnimatedOpacity( + duration: Duration(microseconds: 500), + opacity: _currentIndex == index ? 1 : 0, + child: Container( + width: 40.w, + height: 8.w, + decoration: BoxDecoration( + color: Colors.black, + borderRadius: + BorderRadius.circular(4.w), + ), + ), + ) + ], + ), + )) + .toList() + .sepWidget(separate: 48.wb), + ), + 48.hb, + Expanded( + child: TabBarView(controller: _tabController, children: [ + _balanceView(), + _pointView(), + ]), + ), + ], + ), + ), + ), + ], + ), + bottomNavi: Padding( + padding: EdgeInsets.only( + left: 32.w, + right: 32.w, + bottom: 32.w + MediaQuery.of(context).padding.bottom), + child: BeeLongButton( + onPressed: () async { + if (_currentSelect == 9) { + _rechargeValue = 0; + Get.bottomSheet(_customValueDialog(_currentIndex == 0)); + } else { + Get.bottomSheet(PayWayDialog( + isBalance: _currentIndex == 0, + amount: _rechargeValue, + insufficientBalance: _rechargeValue > + (UserTool.userProvider.userInfoModel!.balance ?? 0))); + } + }, + text: '下一步'), + ), + ); + } + + Widget _balanceView() { + return GridView.count( + crossAxisCount: 3, + mainAxisSpacing: 20.w, + crossAxisSpacing: 20.w, + children: [ + ..._balanceValue + .mapIndexed((index, e) => _card(index, e, true)) + .toList(), + _customValueCard(9, true) + ], + ); + } + + Widget _pointView() { + return GridView.count( + mainAxisSpacing: 20.w, + crossAxisSpacing: 20.w, + crossAxisCount: 3, + children: [ + ..._pointValue + .mapIndexed((index, element) => _card(index, element, false)) + .toList(), + _customValueCard(9, false) + ], + ); + } + + Widget _card(int index, int value, bool isBalance) { + return GestureDetector( + onTap: () { + _currentSelect = index; + _rechargeValue = isBalance ? _balanceValue[index] : (_pointValue[index]~/10); + setState(() {}); + }, + child: Material( + color: Colors.transparent, + borderRadius: BorderRadius.circular(16.w), + child: Stack( + clipBehavior: Clip.antiAliasWithSaveLayer, + fit: StackFit.passthrough, + children: [ + Container( + width: 214.w, + height: 202.w, + alignment: Alignment.center, + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(16.w), + color: + _currentSelect != index ? Color(0xFFF9F9F9) : Colors.black, + ), + child: Column( + mainAxisSize: MainAxisSize.min, + children: [ + Offstage( + offstage: isBalance, + child: Assets.icons.intergral + .image(width: 48.w, height: 48.w)), + 8.hb, + '$value ' + .richText + .withTextSpanChildren([ + '${isBalance ? '元' : '积分'} ' + .textSpan + .size(26.sp) + .color(_currentSelect == index + ? Color(0xFFFBE541) + : Colors.black.withOpacity(0.85)) + .make(), + ]) + .color(_currentSelect == index + ? Color(0xFFFBE541) + : Colors.black.withOpacity(0.85)) + .size(40.w) + .make(), + 16.hb, + Offstage( + offstage: isBalance, + child: '${value ~/ 10}元' + .text + .size(26.sp) + .color(_currentSelect == index + ? Color(0xFFFBE541) + : Colors.black.withOpacity(0.85)) + .make(), + ), + ], + ), + ), + AnimatedPositioned( + bottom: 0, + right: 0, + child: Offstage( + offstage: _currentSelect != index, + child: ClipPath( + clipper: _TriangleClipPath(), + child: Container( + width: 40.w, + height: 48.w, + color: Color(0xFFFBE541), + child: Transform.translate( + offset: Offset(10.w, 12.w), + child: Icon( + CupertinoIcons.checkmark_alt, + size: 24.w, + ), + ), + ), + ), + ), + duration: Duration(microseconds: 500)) + ], + ), + ), + ); + } + + Widget _customValueCard(int index, bool isBalance) { + return GestureDetector( + onTap: () { + _currentSelect = index; + setState(() {}); + }, + child: Material( + color: Colors.transparent, + borderRadius: BorderRadius.circular(16.w), + child: Stack( + clipBehavior: Clip.antiAliasWithSaveLayer, + fit: StackFit.passthrough, + children: [ + Container( + width: 214.w, + height: 202.w, + alignment: Alignment.center, + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(16.w), + color: + _currentSelect != index ? Color(0xFFF9F9F9) : Colors.black, + ), + child: Column( + mainAxisSize: MainAxisSize.min, + children: [ + Offstage( + offstage: isBalance, + child: Assets.icons.intergral + .image(width: 48.w, height: 48.w)), + 8.hb, + '' + .richText + .withTextSpanChildren([ + '${isBalance ? '其他金额' : '其他积分'} ' + .textSpan + .size(26.sp) + .color(_currentSelect == index + ? Color(0xFFFBE541) + : Colors.black.withOpacity(0.85)) + .make(), + ]) + .color(_currentSelect == index + ? Color(0xFFFBE541) + : Colors.black.withOpacity(0.85)) + .size(40.w) + .make(), + 16.hb, + Offstage( + offstage: isBalance, + child: '自定义' + .text + .size(26.sp) + .color(_currentSelect == index + ? Color(0xFFFBE541) + : Colors.black.withOpacity(0.85)) + .make(), + ), + ], + ), + ), + AnimatedPositioned( + bottom: 0, + right: 0, + child: Offstage( + offstage: _currentSelect != index, + child: ClipPath( + clipper: _TriangleClipPath(), + child: Container( + width: 40.w, + height: 48.w, + color: Color(0xFFFBE541), + child: Transform.translate( + offset: Offset(10.w, 12.w), + child: Icon( + CupertinoIcons.checkmark_alt, + size: 24.w, + ), + ), + ), + ), + ), + duration: Duration(microseconds: 500)) + ], + ), + ), + ); + } + + Widget _customValueDialog(bool isBalance) { + return StatefulBuilder( + builder: (context, reSet) { + return Material( + color: Colors.transparent, + child: Container( + padding: EdgeInsets.symmetric(vertical: 24.w, horizontal: 32.w), + width: double.infinity, + color: Colors.white, + child: Column( + mainAxisSize: MainAxisSize.min, + children: [ + '${isBalance ? '充值金额' : '充值积分'}' + .text + .size(32.sp) + .bold + .isIntrinsic + .color(Colors.black.withOpacity(0.85)) + .make(), + 48.hb, + Container( + height: 88.w, + decoration: BoxDecoration( + color: Color(0xFFF5F5F5), + borderRadius: BorderRadius.circular(16.w)), + clipBehavior: Clip.antiAliasWithSaveLayer, + child: Row( + children: [ + 24.wb, + '¥' + .text + .size(24.sp) + .color(Colors.black.withOpacity(0.45)) + .make(), + 12.wb, + Expanded( + child: TextField( + autofocus: true, + onChanged: (text) { + if (text.trim().isNotEmpty) { + _rechargeValue = int.parse(text); + reSet(() {}); + } + }, + inputFormatters: [ + FilteringTextInputFormatter.digitsOnly + ], + keyboardType: TextInputType.number, + decoration: InputDecoration(border: InputBorder.none), + )), + Offstage( + offstage: isBalance, + child: Row( + children: [ + Assets.icons.intergral + .image(width: 32.w, height: 32.w), + 16.wb, + (_rechargeValue * 10) + .text + .size(32.sp) + .color(Colors.black.withOpacity(0.855)) + .make(), + 12.wb, + ], + ), + ), + GestureDetector( + onTap: () { + if (_rechargeValue == 0) { + BotToast.showText(text: '金额不能为0'); + return; + } + Get.back(); + Get.bottomSheet(PayWayDialog( + insufficientBalance: (UserTool.userProvider + .userInfoModel!.balance ?? + 0) < + _rechargeValue, + isBalance: isBalance, + amount: _rechargeValue)); + }, + child: Material( + child: Container( + width: 132.w, + color: Color(0xFFFBE541), + child: Center( + child: '去支付' + .text + .size(28.sp) + .color(Colors.black.withOpacity(0.85)) + .make(), + ), + ), + ), + ), + ], + ), + ) + ], + ), + ), + ); + }, + ); + } +} + +class _TriangleClipPath extends CustomClipper { + @override + Path getClip(Size size) { + Path path = Path(); + path.moveTo(0, size.height); + path.lineTo(size.width, size.height); + path.lineTo(size.width, 0 + 5.w); + path.lineTo(0, size.height); + path.close(); + return path; + } + + @override + bool shouldReclip(covariant CustomClipper oldClipper) { + return false; + } +} diff --git a/lib/pages/personal/wallet/wallet_trade_record_page.dart b/lib/pages/personal/wallet/wallet_trade_record_page.dart new file mode 100644 index 00000000..7018c1c0 --- /dev/null +++ b/lib/pages/personal/wallet/wallet_trade_record_page.dart @@ -0,0 +1,44 @@ +import 'package:aku_new_community/pages/personal/wallet/point_record_view.dart'; +import 'package:aku_new_community/widget/bee_scaffold.dart'; +import 'package:aku_new_community/widget/tab_bar/bee_tab_bar.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; + +import 'balance_record_view.dart'; + +class WalletTradeRecordPage extends StatefulWidget { + const WalletTradeRecordPage({Key? key}) : super(key: key); + + @override + _WalletTradeRecordPageState createState() => _WalletTradeRecordPageState(); +} + +class _WalletTradeRecordPageState extends State + with SingleTickerProviderStateMixin { + List _tabs = ['余额账单', '积分账单']; + late TabController _tabController; + + @override + void initState() { + _tabController = TabController(length: _tabs.length, vsync: this); + super.initState(); + } + + @override + Widget build(BuildContext context) { + return BeeScaffold( + title: BeeTabBar( + controller: _tabController, + tabs: _tabs, + scrollable: true, + ), + body: TabBarView( + controller: _tabController, + children: [ + BalanceRecordView(), + PointRecordView(), + ], + ), + ); + } +} diff --git a/lib/pages/sign/login/code_message_page.dart b/lib/pages/sign/login/code_message_page.dart index 80539cae..6e321201 100644 --- a/lib/pages/sign/login/code_message_page.dart +++ b/lib/pages/sign/login/code_message_page.dart @@ -1,10 +1,12 @@ import 'package:aku_new_community/pages/sign/sign_func.dart'; +import 'package:aku_new_community/provider/clock_timer_provider.dart'; import 'package:aku_new_community/widget/bee_scaffold.dart'; import 'package:aku_new_community/widget/others/user_tool.dart'; import 'package:bot_toast/bot_toast.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; +import 'package:provider/provider.dart'; import 'package:sms_autofill/sms_autofill.dart'; import 'package:velocity_x/velocity_x.dart'; @@ -38,6 +40,7 @@ class _CodeMessagePageState extends State { @override Widget build(BuildContext context) { + ClockTimerProvider clockTimer = Provider.of(context); return BeeScaffold( title: '', body: SafeArea( @@ -115,14 +118,14 @@ class _CodeMessagePageState extends State { .communityModel!.id); if (base.success) { _errorMessage = null; - UserTool.appProvider.startTimer(); + clockTimer.startTimer(); } else { BotToast.showText(text: base.msg); } }, - child: (UserTool.appProvider.second >= 60 + child: (clockTimer.second >= 60 ? '重新发送验证码' - : '${UserTool.appProvider.second}秒后可重新发送') + : '${clockTimer.second}秒后可重新发送') .text .size(28.sp) .color(Color(0xFF5096F1)) diff --git a/lib/pages/sign/login/forgot_psd_page.dart b/lib/pages/sign/login/forgot_psd_page.dart index 020726d8..22042ee5 100644 --- a/lib/pages/sign/login/forgot_psd_page.dart +++ b/lib/pages/sign/login/forgot_psd_page.dart @@ -1,6 +1,7 @@ import 'package:aku_new_community/pages/sign/login/forgot_set_psd_page.dart'; import 'package:aku_new_community/pages/sign/widget/login_button_widget.dart'; import 'package:aku_new_community/pages/sign/widget/tel_text_field.dart'; +import 'package:aku_new_community/provider/clock_timer_provider.dart'; import 'package:aku_new_community/widget/bee_scaffold.dart'; import 'package:aku_new_community/widget/others/user_tool.dart'; import 'package:bot_toast/bot_toast.dart'; @@ -8,6 +9,7 @@ import 'package:common_utils/common_utils.dart'; import 'package:flutter/material.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:get/get.dart'; +import 'package:provider/provider.dart'; import 'package:velocity_x/velocity_x.dart'; import '../sign_func.dart'; @@ -30,6 +32,7 @@ class _ForgotPsdPageState extends State { @override Widget build(BuildContext context) { + ClockTimerProvider clockTimer = Provider.of(context); return BeeScaffold( title: '', bodyColor: Colors.white, @@ -83,7 +86,7 @@ class _ForgotPsdPageState extends State { Get.to(() => ForgotSetPsdPage( tel: _telController.text, )); - UserTool.appProvider.startTimer(); + clockTimer.startTimer(); } else { BotToast.showText(text: base.msg); } diff --git a/lib/pages/sign/login/forgot_set_psd_page.dart b/lib/pages/sign/login/forgot_set_psd_page.dart index bc31c9cf..94677ed5 100644 --- a/lib/pages/sign/login/forgot_set_psd_page.dart +++ b/lib/pages/sign/login/forgot_set_psd_page.dart @@ -3,6 +3,7 @@ import 'package:aku_new_community/pages/sign/login/psd_verify.dart'; import 'package:aku_new_community/pages/sign/sign_func.dart'; import 'package:aku_new_community/pages/sign/widget/login_button_widget.dart'; import 'package:aku_new_community/pages/sign/widget/psd_text_field.dart'; +import 'package:aku_new_community/provider/clock_timer_provider.dart'; import 'package:aku_new_community/widget/bee_scaffold.dart'; import 'package:aku_new_community/widget/others/user_tool.dart'; import 'package:bot_toast/bot_toast.dart'; @@ -10,6 +11,7 @@ import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:get/get.dart'; +import 'package:provider/provider.dart'; import 'package:velocity_x/velocity_x.dart'; class ForgotSetPsdPage extends StatefulWidget { @@ -52,6 +54,7 @@ class _ForgotSetPsdPageState extends State { @override Widget build(BuildContext context) { + ClockTimerProvider clockTimer = Provider.of(context); return BeeScaffold( title: '', bodyColor: Colors.white, @@ -129,7 +132,7 @@ class _ForgotSetPsdPageState extends State { Get.to(() => ForgotSetPsdPage( tel: widget.tel, )); - UserTool.appProvider.startTimer(); + clockTimer.startTimer(); } else { BotToast.showText(text: base.msg); } @@ -137,7 +140,7 @@ class _ForgotSetPsdPageState extends State { child: Row( mainAxisSize: MainAxisSize.min, children: [ - '|${UserTool.appProvider.second < 60 ? '${UserTool.appProvider.second}秒后重新获取' : '获取验证码'}' + '|${clockTimer.second < 60 ? '${clockTimer.second}秒后重新获取' : '获取验证码'}' .text .size(28.sp) .color(Color(0xFF5096F1)) diff --git a/lib/pages/sign/login/other_login_page.dart b/lib/pages/sign/login/other_login_page.dart index 0071da3a..2739d0b8 100644 --- a/lib/pages/sign/login/other_login_page.dart +++ b/lib/pages/sign/login/other_login_page.dart @@ -6,6 +6,7 @@ import 'package:aku_new_community/pages/sign/widget/login_button_widget.dart'; import 'package:aku_new_community/pages/sign/widget/psd_text_field.dart'; import 'package:aku_new_community/pages/sign/widget/tel_text_field.dart'; import 'package:aku_new_community/provider/app_provider.dart'; +import 'package:aku_new_community/provider/clock_timer_provider.dart'; import 'package:aku_new_community/widget/bee_scaffold.dart'; import 'package:aku_new_community/widget/others/user_tool.dart'; import 'package:bot_toast/bot_toast.dart'; @@ -153,7 +154,7 @@ class _OtherLoginPageState extends State { } Widget _verificationView() { - AppProvider appProvider = Provider.of(context); + ClockTimerProvider clockTimer = Provider.of(context); return ListView( padding: EdgeInsets.symmetric(horizontal: 32.w), children: [ @@ -170,7 +171,7 @@ class _OtherLoginPageState extends State { ), 100.w.heightBox, LoginButtonWidget( - onTap: UserTool.appProvider.second < 60 + onTap: clockTimer.second < 60 ? () {} : () async { var check = checkInput(); @@ -183,13 +184,13 @@ class _OtherLoginPageState extends State { .communityModel!.id); if (base.success) { Get.to(() => CodeMessagePage(tel: _tel.text)); - appProvider.startTimer(); + clockTimer.startTimer(); } else { BotToast.showText(text: base.msg); } }, - text: appProvider.timerStart - ? '${appProvider.second}秒后重新获取' + text: clockTimer.timerStart + ? '${clockTimer.second}秒后重新获取' : '获取验证码'), 24.w.heightBox, Row( diff --git a/lib/provider/app_provider.dart b/lib/provider/app_provider.dart index 6be5cc64..68f34fec 100644 --- a/lib/provider/app_provider.dart +++ b/lib/provider/app_provider.dart @@ -355,30 +355,7 @@ class AppProvider extends ChangeNotifier { notifyListeners(); } - ///登录页验证码计时器 - int second = 60; - bool timerStart = false; - Timer? timer; - - void startTimer() { - timerStart = true; - timer = Timer.periodic(Duration(seconds: 1), (timer) { - if (second > 0) { - second--; - notifyListeners(); - } else { - stopTimer(); - } - }); - } - void stopTimer() { - second = 60; - timerStart = false; - timer?.cancel(); - timer = null; - notifyListeners(); - } notifyListeners(); } diff --git a/lib/provider/clock_timer_provider.dart b/lib/provider/clock_timer_provider.dart new file mode 100644 index 00000000..aa33dd8b --- /dev/null +++ b/lib/provider/clock_timer_provider.dart @@ -0,0 +1,30 @@ +import 'dart:async'; + +import 'package:flutter/material.dart'; + +class ClockTimerProvider extends ChangeNotifier{ + ///登录页验证码计时器 + int second = 60; + bool timerStart = false; + Timer? timer; + + void startTimer() { + timerStart = true; + timer = Timer.periodic(Duration(seconds: 1), (timer) { + if (second > 0) { + second--; + notifyListeners(); + } else { + stopTimer(); + } + }); + } + + void stopTimer() { + second = 60; + timerStart = false; + timer?.cancel(); + timer = null; + notifyListeners(); + } +} \ No newline at end of file diff --git a/lib/widget/buttons/bee_check_radio.dart b/lib/widget/buttons/bee_check_radio.dart index 410399ba..c5f4b285 100644 --- a/lib/widget/buttons/bee_check_radio.dart +++ b/lib/widget/buttons/bee_check_radio.dart @@ -9,9 +9,15 @@ class BeeCheckRadio extends StatefulWidget { final List? groupValue; final Widget? indent; final Color? backColor; + final double? size; BeeCheckRadio( - {Key? key, this.value, this.groupValue, this.indent, this.backColor}) + {Key? key, + this.value, + this.groupValue, + this.indent, + this.backColor, + this.size}) : super(key: key); @override @@ -30,8 +36,8 @@ class _BeeCheckRadioState extends State { @override Widget build(BuildContext context) { return AnimatedContainer( - height: 40.w, - width: 40.w, + height: widget.size ?? 40.w, + width: widget.size ?? 40.w, decoration: BoxDecoration( color: widget.backColor ?? kPrimaryColor.withOpacity(_selected ? 1 : 0), border: Border.all( @@ -40,7 +46,7 @@ class _BeeCheckRadioState extends State { : (_selected ? kPrimaryColor : Color(0xFF979797)), width: 3.w, ), - borderRadius: BorderRadius.circular(20.w), + borderRadius: BorderRadius.circular((widget.size??40.w)/2), ), duration: Duration(milliseconds: 300), curve: Curves.easeInOutCubic, diff --git a/lib/widget/buttons/bee_long_button.dart b/lib/widget/buttons/bee_long_button.dart index 094c761a..e7cb7c98 100644 --- a/lib/widget/buttons/bee_long_button.dart +++ b/lib/widget/buttons/bee_long_button.dart @@ -8,13 +8,14 @@ class BeeLongButton extends StatelessWidget { final String text; final Color backColor; final BorderSide border; + final double? width; - const BeeLongButton({Key? key, required this.onPressed, required this.text}) + const BeeLongButton({Key? key, required this.onPressed, required this.text, this.width}) : backColor = kPrimaryColor, border = BorderSide.none, super(key: key); - BeeLongButton.white({Key? key, required this.onPressed, required this.text}) + BeeLongButton.white({Key? key, required this.onPressed, required this.text, this.width}) : backColor = Colors.white, border = BorderSide(color: Colors.black.withOpacity(0.45)), super(key: key); @@ -24,6 +25,7 @@ class BeeLongButton extends StatelessWidget { return MaterialButton( elevation: 0, height: 93.w, + minWidth: width, disabledColor: Colors.black.withOpacity(0.06), disabledTextColor: Colors.black.withOpacity(0.25), textColor: Colors.black.withOpacity(0.85), diff --git a/lib/widget/picker/bee_date_picker.dart b/lib/widget/picker/bee_date_picker.dart index 15b0be1b..93ab0871 100644 --- a/lib/widget/picker/bee_date_picker.dart +++ b/lib/widget/picker/bee_date_picker.dart @@ -1,3 +1,4 @@ +import 'package:aku_new_community/widget/picker/bee_month_pick_body.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; @@ -7,8 +8,7 @@ import 'package:velocity_x/velocity_x.dart'; import 'package:aku_new_community/widget/picker/bee_custom_picker.dart'; class BeeDatePicker { - static Future pick( - DateTime initDate, { + static Future pick(DateTime initDate, { CupertinoDatePickerMode mode = CupertinoDatePickerMode.date, DateTime? min, DateTime? max, @@ -29,6 +29,12 @@ class BeeDatePicker { mode: CupertinoDatePickerMode.dateAndTime, )); } + + static Future monthPicker(DateTime initDate) async { + return await Get.bottomSheet( + BeeMonthPickBody(initTime: initDate) + ); + } } class _BeeDatePicker extends StatefulWidget { diff --git a/lib/widget/picker/bee_month_pick_body.dart b/lib/widget/picker/bee_month_pick_body.dart new file mode 100644 index 00000000..9dd5e5a9 --- /dev/null +++ b/lib/widget/picker/bee_month_pick_body.dart @@ -0,0 +1,111 @@ +import 'package:aku_new_community/saas_model/login/china_region_model.dart'; +import 'package:aku_new_community/saas_model/login/picked_city_model.dart'; +import 'package:aku_new_community/utils/hive_store.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_screenutil/flutter_screenutil.dart'; + +import 'bee_picker_box.dart'; + +class BeeMonthPickBody extends StatefulWidget { + final DateTime initTime; + + BeeMonthPickBody({Key? key, required this.initTime}) : super(key: key); + + @override + _BeeMonthPickBodyState createState() => _BeeMonthPickBodyState(); +} + +class _BeeMonthPickBodyState extends State { + final FixedExtentScrollController _yearController = + FixedExtentScrollController(); + final FixedExtentScrollController _monthController = + FixedExtentScrollController(); + DateTime get _pickedTime => DateTime(_pickYear,_pickMonth) ; + + List get _years => List.generate( + DateTime.now().year - widget.initTime.year+1, + (index) => widget.initTime.year + index); + late int _pickYear; + late int _pickMonth; + + List get _months => List.generate( + _pickYear == DateTime.now().year ? DateTime.now().month : 12, + (index) => index + 1); + + @override + void initState() { + _pickYear = widget.initTime.year; + _pickMonth = 1; + super.initState(); + } + + @override + void dispose() { + _yearController.dispose(); + _monthController.dispose(); + super.dispose(); + } + + @override + Widget build(BuildContext context) { + return BeePickerBox( + onPressed: () { + Navigator.pop(context, _pickedTime); + }, + child: Row( + children: [ + Expanded( + child: CupertinoPicker( + itemExtent: 80.w, + magnification: 1.0, + looping: false, + scrollController: _yearController, + onSelectedItemChanged: (index) { + _pickYear = _years[index]; + _pickMonth = 1; + setState(() {}); + }, + children: _years + .map((e) => Center( + child: Padding( + padding: EdgeInsets.symmetric(horizontal: 20.w), + child: + Text(e.toString()+'年', textAlign: TextAlign.center), + ), + )) + .toList()), + ), + Expanded( + child: CupertinoPicker( + itemExtent: 80.w, + magnification: 1.0, + // offAxisFraction: 0.6, + looping: true, + scrollController: _monthController, + onSelectedItemChanged: (index) { + _pickMonth = _months[index]; + setState(() {}); + }, + children: _months.isEmpty + ? [Container()] + : _months + .map((e) => Center( + child: Padding( + padding: EdgeInsets.only( + left: 20.w, + right: 20.w, + top: 10.w, + bottom: 10.w), + child: Text(e.toString()+'月', + textAlign: TextAlign.center), + ), + )) + .toList(), + ), + ), + ], + ), + ); + } +} diff --git a/pubspec.lock b/pubspec.lock index 1a6974c6..d4e08ca8 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -5,252 +5,252 @@ packages: dependency: transitive description: name: _fe_analyzer_shared - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "38.0.0" advance_pdf_viewer: dependency: "direct main" description: name: advance_pdf_viewer - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.0.1" amap_flutter_base: dependency: "direct main" description: name: amap_flutter_base - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "3.0.0" amap_flutter_location: dependency: "direct main" description: name: amap_flutter_location - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "3.0.0" amap_flutter_map: dependency: "direct main" description: name: amap_flutter_map - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "3.0.0" analyzer: dependency: transitive description: name: analyzer - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "3.4.1" animated_text_kit: dependency: "direct main" description: name: animated_text_kit - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "4.2.1" archive: dependency: transitive description: name: archive - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "3.3.0" args: dependency: transitive description: name: args - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.3.0" async: dependency: transitive description: name: async - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.8.2" audio_session: dependency: transitive description: name: audio_session - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "0.1.6+1" auto_size_text_pk: dependency: transitive description: name: auto_size_text_pk - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "3.0.0" badges: dependency: "direct main" description: name: badges - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.0.2" boolean_selector: dependency: transitive description: name: boolean_selector - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.1.0" bot_toast: dependency: "direct main" description: name: bot_toast - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "4.0.1" build: dependency: transitive description: name: build - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted - version: "2.2.1" + version: "2.3.0" build_config: dependency: transitive description: name: build_config - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.0.0" build_daemon: dependency: transitive description: name: build_daemon - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted - version: "3.0.1" + version: "3.1.0" build_resolvers: dependency: transitive description: name: build_resolvers - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted - version: "2.0.6" + version: "2.0.8" build_runner: dependency: "direct dev" description: name: build_runner - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted - version: "2.1.8" + version: "2.1.10" build_runner_core: dependency: transitive description: name: build_runner_core - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "7.2.3" built_collection: dependency: transitive description: name: built_collection - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "5.1.1" built_value: dependency: transitive description: name: built_value - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted - version: "8.1.4" + version: "8.2.0" cached_network_image: dependency: "direct main" description: name: cached_network_image - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "3.2.0" cached_network_image_platform_interface: dependency: transitive description: name: cached_network_image_platform_interface - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.0.0" cached_network_image_web: dependency: transitive description: name: cached_network_image_web - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.0.1" card_swiper: dependency: "direct main" description: name: card_swiper - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.0.3" carousel_slider: dependency: "direct main" description: name: carousel_slider - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "4.0.0" characters: dependency: transitive description: name: characters - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.2.0" charcode: dependency: transitive description: name: charcode - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.3.1" checked_yaml: dependency: transitive description: name: checked_yaml - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.0.1" cli_util: dependency: transitive description: name: cli_util - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "0.3.5" clock: dependency: transitive description: name: clock - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.1.0" code_builder: dependency: transitive description: name: code_builder - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "4.1.0" collection: dependency: "direct main" description: name: collection - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.15.0" color: dependency: transitive description: name: color - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "3.0.0" common_utils: @@ -266,154 +266,154 @@ packages: dependency: transitive description: name: convert - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "3.0.1" cross_file: dependency: transitive description: name: cross_file - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "0.3.2" crypto: dependency: transitive description: name: crypto - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "3.0.1" cupertino_icons: dependency: "direct main" description: name: cupertino_icons - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.0.4" dart_style: dependency: transitive description: name: dart_style - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted - version: "2.2.2" + version: "2.2.3" dartx: dependency: transitive description: name: dartx - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted - version: "1.0.0" + version: "1.1.0" decimal: dependency: transitive description: name: decimal - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.1.0" device_info_plus: dependency: transitive description: name: device_info_plus - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.2.0" device_info_plus_linux: dependency: transitive description: name: device_info_plus_linux - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.1.1" device_info_plus_macos: dependency: transitive description: name: device_info_plus_macos - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted - version: "2.2.2" + version: "2.2.3" device_info_plus_platform_interface: dependency: transitive description: name: device_info_plus_platform_interface - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.3.0+1" device_info_plus_web: dependency: transitive description: name: device_info_plus_web - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.1.0" device_info_plus_windows: dependency: transitive description: name: device_info_plus_windows - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.1.1" dio: dependency: "direct main" description: name: dio - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "4.0.6" dotted_border: dependency: "direct main" description: name: dotted_border - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.0.0+2" equatable: dependency: "direct main" description: name: equatable - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.0.3" expandable: dependency: "direct main" description: name: expandable - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "5.0.1" extended_list_library: dependency: transitive description: name: extended_list_library - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "3.0.0" fake_async: dependency: transitive description: name: fake_async - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.2.0" ffi: dependency: transitive description: name: ffi - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.1.2" file: dependency: transitive description: name: file - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "6.1.2" fixnum: dependency: transitive description: name: fixnum - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.0.0" flutter: @@ -425,42 +425,42 @@ packages: dependency: transitive description: name: flutter_blurhash - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted - version: "0.6.4" + version: "0.6.6" flutter_cache_manager: dependency: transitive description: name: flutter_cache_manager - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "3.3.0" flutter_easyrefresh: dependency: "direct main" description: name: flutter_easyrefresh - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.2.1" flutter_gen_core: dependency: transitive description: name: flutter_gen_core - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "4.1.6" flutter_gen_runner: dependency: "direct dev" description: name: flutter_gen_runner - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "4.1.6" flutter_highlight: dependency: transitive description: name: flutter_highlight - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "0.7.0" flutter_icons: @@ -481,51 +481,51 @@ packages: dependency: transitive description: name: flutter_plugin_android_lifecycle - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.0.5" flutter_rating_bar: dependency: "direct main" description: name: flutter_rating_bar - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "4.0.0" flutter_screenutil: dependency: "direct main" description: name: flutter_screenutil - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted - version: "5.3.1" + version: "5.4.0" flutter_slidable: dependency: "direct main" description: name: flutter_slidable - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "0.6.0" flutter_sound: dependency: "direct main" description: name: flutter_sound - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted - version: "9.1.9" + version: "9.2.2" flutter_sound_platform_interface: dependency: transitive description: name: flutter_sound_platform_interface - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted - version: "9.1.9" + version: "9.2.2" flutter_sound_web: dependency: transitive description: name: flutter_sound_web - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted - version: "9.1.9" + version: "9.2.2" flutter_test: dependency: "direct dev" description: flutter @@ -540,504 +540,504 @@ packages: dependency: "direct main" description: name: fluwx - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted - version: "3.8.2+1" + version: "3.8.4" frontend_server_client: dependency: transitive description: name: frontend_server_client - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.1.2" get: dependency: "direct main" description: name: get - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "4.6.1" glob: dependency: transitive description: name: glob - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.0.2" graphs: dependency: transitive description: name: graphs - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.1.0" grinder: dependency: "direct dev" description: name: grinder - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "0.9.1" highlight: dependency: transitive description: name: highlight - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "0.7.0" hive: dependency: "direct main" description: name: hive - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.1.0" hive_flutter: dependency: "direct main" description: name: hive_flutter - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.1.0" hive_generator: dependency: "direct dev" description: name: hive_generator - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.1.2" http: dependency: transitive description: name: http - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "0.13.4" http_multi_server: dependency: transitive description: name: http_multi_server - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "3.2.0" http_parser: dependency: transitive description: name: http_parser - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "4.0.0" image: dependency: transitive description: name: image - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "3.1.3" image_picker: dependency: "direct main" description: name: image_picker - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "0.7.5+4" image_picker_for_web: dependency: transitive description: name: image_picker_for_web - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.1.6" image_picker_platform_interface: dependency: transitive description: name: image_picker_platform_interface - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.4.4" import_sorter: dependency: "direct dev" description: name: import_sorter - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "4.6.0" infinite_listview: dependency: transitive description: name: infinite_listview - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.1.0" intl: dependency: "direct main" description: name: intl - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "0.17.0" io: dependency: transitive description: name: io - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.0.3" jpush_flutter: dependency: "direct main" description: name: jpush_flutter - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted - version: "2.2.4" + version: "2.2.5" js: dependency: transitive description: name: js - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "0.6.3" json_annotation: dependency: "direct main" description: name: json_annotation - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "4.4.0" json_serializable: dependency: "direct dev" description: name: json_serializable - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted - version: "6.1.5" + version: "6.1.6" just_audio: dependency: "direct main" description: name: just_audio - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "0.9.20" just_audio_platform_interface: dependency: transitive description: name: just_audio_platform_interface - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "4.1.0" just_audio_web: dependency: transitive description: name: just_audio_web - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "0.4.7" like_button: dependency: "direct main" description: name: like_button - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.0.4" logger: dependency: transitive description: name: logger - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.1.0" logging: dependency: transitive description: name: logging - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.0.2" matcher: dependency: transitive description: name: matcher - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "0.12.11" meta: dependency: transitive description: name: meta - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.7.0" mime: dependency: transitive description: name: mime - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.0.1" nested: dependency: transitive description: name: nested - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.0.0" numberpicker: dependency: transitive description: name: numberpicker - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.1.1" octo_image: dependency: transitive description: name: octo_image - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.0.1" open_file: dependency: "direct main" description: name: open_file - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "3.2.1" package_config: dependency: transitive description: name: package_config - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.0.2" package_info: dependency: "direct main" description: name: package_info - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.0.2" package_info_plus: dependency: transitive description: name: package_info_plus - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.4.2" package_info_plus_linux: dependency: transitive description: name: package_info_plus_linux - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.0.5" package_info_plus_macos: dependency: transitive description: name: package_info_plus_macos - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.3.0" package_info_plus_platform_interface: dependency: transitive description: name: package_info_plus_platform_interface - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.0.2" package_info_plus_web: dependency: transitive description: name: package_info_plus_web - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.0.5" package_info_plus_windows: dependency: transitive description: name: package_info_plus_windows - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.0.5" path: dependency: transitive description: name: path - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.8.0" path_drawing: dependency: transitive description: name: path_drawing - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.0.0" path_parsing: dependency: transitive description: name: path_parsing - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.0.0" path_provider: dependency: "direct main" description: name: path_provider - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.0.9" path_provider_android: dependency: transitive description: name: path_provider_android - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.0.12" path_provider_ios: dependency: transitive description: name: path_provider_ios - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.0.8" path_provider_linux: dependency: transitive description: name: path_provider_linux - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.1.5" path_provider_macos: dependency: transitive description: name: path_provider_macos - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.0.5" path_provider_platform_interface: dependency: transitive description: name: path_provider_platform_interface - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.0.3" path_provider_windows: dependency: transitive description: name: path_provider_windows - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.0.5" pedantic: dependency: transitive description: name: pedantic - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.11.1" permission_handler: dependency: "direct main" description: name: permission_handler - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "7.2.0" permission_handler_platform_interface: dependency: transitive description: name: permission_handler_platform_interface - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "3.7.0" petitparser: dependency: transitive description: name: petitparser - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "4.4.0" pin_input_text_field: dependency: transitive description: name: pin_input_text_field - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "4.1.2" platform: dependency: transitive description: name: platform - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "3.1.0" plugin_platform_interface: dependency: transitive description: name: plugin_platform_interface - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.1.2" pool: dependency: transitive description: name: pool - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.5.0" power_logger: dependency: "direct main" description: name: power_logger - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.2.2" process: dependency: transitive description: name: process - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "4.2.4" provider: dependency: "direct main" description: name: provider - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "6.0.2" pub_semver: dependency: "direct dev" description: name: pub_semver - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.1.1" pubspec_parse: dependency: transitive description: name: pubspec_parse - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.2.0" qr: dependency: transitive description: name: qr - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.1.0" qr_code_scanner: dependency: "direct main" description: name: qr_code_scanner - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "0.4.0" qr_flutter: dependency: "direct main" description: name: qr_flutter - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "4.0.0" random_character: @@ -1053,63 +1053,63 @@ packages: dependency: transitive description: name: rational - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.2.0" recase: dependency: transitive description: name: recase - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "4.0.0" rxdart: dependency: transitive description: name: rxdart - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "0.27.3" scroll_to_index: dependency: "direct main" description: name: scroll_to_index - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.1.1" share: dependency: "direct main" description: name: share - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.0.4" shelf: dependency: transitive description: name: shelf - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.2.0" shelf_web_socket: dependency: transitive description: name: shelf_web_socket - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.0.1" shimmer: dependency: "direct main" description: name: shimmer - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.0.0" signature: dependency: "direct main" description: name: signature - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "4.1.1" sky_engine: @@ -1121,259 +1121,259 @@ packages: dependency: "direct main" description: name: sms_autofill - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.2.0" source_gen: dependency: transitive description: name: source_gen - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted - version: "1.2.1" + version: "1.2.2" source_helper: dependency: transitive description: name: source_helper - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted - version: "1.3.1" + version: "1.3.2" source_span: dependency: transitive description: name: source_span - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.8.1" sqflite: dependency: transitive description: name: sqflite - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.0.2" sqflite_common: dependency: transitive description: name: sqflite_common - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.2.0" stack_trace: dependency: transitive description: name: stack_trace - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.10.0" stream_channel: dependency: transitive description: name: stream_channel - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.1.0" stream_transform: dependency: transitive description: name: stream_transform - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.0.0" string_scanner: dependency: transitive description: name: string_scanner - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.1.0" synchronized: dependency: transitive description: name: synchronized - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "3.0.0+2" term_glyph: dependency: transitive description: name: term_glyph - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.2.0" test_api: dependency: transitive description: name: test_api - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "0.4.3" time: dependency: transitive description: name: time - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.1.0" timing: dependency: transitive description: name: timing - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.0.0" tint: dependency: transitive description: name: tint - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.0.0" tobias: dependency: "direct main" description: name: tobias - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.4.0+2" typed_data: dependency: transitive description: name: typed_data - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.3.0" url_launcher: dependency: "direct main" description: name: url_launcher - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "6.0.20" url_launcher_android: dependency: transitive description: name: url_launcher_android - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "6.0.15" url_launcher_ios: dependency: transitive description: name: url_launcher_ios - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "6.0.15" url_launcher_linux: dependency: transitive description: name: url_launcher_linux - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "3.0.0" url_launcher_macos: dependency: transitive description: name: url_launcher_macos - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "3.0.0" url_launcher_platform_interface: dependency: transitive description: name: url_launcher_platform_interface - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.0.5" url_launcher_web: dependency: transitive description: name: url_launcher_web - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.0.6" url_launcher_windows: dependency: transitive description: name: url_launcher_windows - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "3.0.0" uuid: dependency: transitive description: name: uuid - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "3.0.6" vector_math: dependency: transitive description: name: vector_math - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.1.1" velocity_x: dependency: "direct main" description: name: velocity_x - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "3.4.0" vxstate: dependency: transitive description: name: vxstate - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.1.0" watcher: dependency: transitive description: name: watcher - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.0.1" waterfall_flow: dependency: "direct main" description: name: waterfall_flow - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "3.0.2" web_socket_channel: dependency: "direct main" description: name: web_socket_channel - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.1.0" win32: dependency: transitive description: name: win32 - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.5.1" xdg_directories: dependency: transitive description: name: xdg_directories - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "0.2.0+1" xml: dependency: transitive description: name: xml - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "5.3.1" yaml: dependency: "direct dev" description: name: yaml - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "3.1.0" sdks: diff --git a/tool/config.dart b/tool/config.dart index 80e38aff..36daa606 100644 --- a/tool/config.dart +++ b/tool/config.dart @@ -1,19 +1,19 @@ class Config { ///用户根目录 - static const String homeDir = 'G:\\apk'; + static const String homeDir = '/users/zhangmeng'; ///包名 static const String packageName = 'aku_new_community'; ///打包目录 static String get buildPath => - '\\build\\app\\outputs\\flutter-apk\\app-release.apk'; + './build/app/outputs/flutter-apk/app-release.apk'; ///测试包文件夹 static String get apkDevDir => - '$homeDir\\aku_new_community\\dev'; + '$homeDir/team/bee/aku_new_community_manager/dev'; ///正式包文件夹 static String get apkDir => - '$homeDir\\aku_new_community\\release'; + '$homeDir/team/bee/aku_new_community_manager/release'; }