From 7d2cbdc4b7c5249d67f94fd674bd05b6e2be16bc Mon Sep 17 00:00:00 2001 From: zhangmeng <494089941@qq.com> Date: Fri, 16 Jul 2021 09:39:04 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E6=88=90=E7=94=9F=E6=B4=BB=E7=BC=B4?= =?UTF-8?q?=E8=B4=B9=20=E9=A2=84=E7=BC=B4=E5=85=85=E5=80=BC=E5=8A=9F?= =?UTF-8?q?=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- assets/icons/alipay_round.png | Bin 0 -> 15231 bytes lib/const/resource.dart | 4 + lib/constants/api.dart | 11 ++ lib/pages/life_pay/life_pay_page.dart | 19 ++- lib/pages/life_pay/life_pre_pay_page.dart | 111 +++++++++++------- .../pay_mothod_bottom_sheet.dart | 2 +- 6 files changed, 104 insertions(+), 43 deletions(-) create mode 100644 assets/icons/alipay_round.png diff --git a/assets/icons/alipay_round.png b/assets/icons/alipay_round.png new file mode 100644 index 0000000000000000000000000000000000000000..7fbe0730d5b31f848ceb034bb61d02b0d1774f9d GIT binary patch literal 15231 zcmYj&c|27A_y0v?FUh_RQ5b6^WDjM@HZx}I%VghoA}ULvs4O88#xi3WW68c1MvBlN zYY5r0@7wQse;&Wb9U3FOS`_&1Xgsg>dzWuJ4XZ7(`Z|jlt ze?~C^*P4=&-^7GhT!ts@au!h{nJ8g+rdDCfFD72@{gD)X(G137HVLnRk1N(czfuV} zdyjg*9b`{!J$l^NFd4Ftb>T-;^^U)e?%PDXD#qV=e$ew|!Ti|k$UGEC zGu8F-I+&XIAo=}h;rmPfW{evdtst7L!Q8@72N$tm#FFYrVH$;{5NwKP!?yHNRVYST zjgHp}wUSw0N0Tw-F0I32ix10n#eqO!OWhTA5eS`jk@=(&EV@Wjd{4PTKF#Ur@PTNUm5-#|ohT?fK7Hw@dy(Sb zbjG1-QGcs5qn)SIR|vLhj-s#tJmIHV3>~~0$7n5TEd^+>qOn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mi4wPEYiB_*6NuS(N_U8*G_?lnGl;wT zMwHlj^_DjlAJG0@{6>s|8U3524%_eaa>~=SyzH3Ur}GKk9Y!>$gm$oq?CX%a;Z-Ve zMo$$}p2?McE-C|}Jq)b==*JQ;UUV^Yt^v=FIWEfIJg+3n_oAbk)qqzkF1(h$1wK28 zFcBQ?CxP{7R~k*j^;vcwQgT0}FYFeMVBqW3yF((6P!6wgl+^&Nb@mixO*~umcOrR-UwKL2~T_ ztnp8qmT`@=K=O`iZ^WY*r#91acEsv=H0pPvK) zj?iXnT3JuBQ3zUH$1zZp7e1GJF%4%FFe$_DuStA*Zu8m^Cq7^Na_r2Ojo_4GB+zUU(EXyPcW6*jmq|s>HE(|GseSHinaKd#FuRH4 zkI-PHN5WSXWw#)~3{%y=q~MgIa8Y)!zEHb>);h?Y#wL|>%fF7+#0*ws8x{q<(F#KT zRGDl4y*t4DvYMzhqAV5*C>kAqcg(^r4WXko+X-DQ4{chKs+k&?HCYmB{^TTTY6dIF zao1p#8rG+T!XeP_QFxQ5NS>Sl{UogB&oNPx);k)kc!F!j2@h!@{p3iNxp&~(+0?Mi zT(tO^Wo*Idj^EMy>5C;Gl8|65w_3gwHxaD1W} '/user/dailyPayment/findEstateIsPayment'; + ///生活缴费:根据房产id查询对应的预付款充值金额 + String get dailyPaymentPrePay => + '/user/dailyPayment/findAdvancePaymentPriceByEstateId'; + ///活动投票:app查询所有活动投票信息 String get enventVotingList => '/user/eventVoting/list'; @@ -501,6 +505,13 @@ class _Pay { ///我的房屋-合同终止:app 房屋租赁-剩余需结清租金支付(当剩余需结清租金 小于等于 0 时调用): String get leaseRentOrderNegative => '/user/myHouse/leaseRentOrderAlipay'; + + ///支付宝支付:app 生活缴费-预充值支付 完成订单支付宝支付(生成 APP 支付订单信息) + String get dailPaymentPrePay => '/user/alipay/advancePaymentOrderAlipay'; + + ///支付宝支付:生活缴费-预充值支付 向支付宝发起订单查询请求 + String get dailPaymentPrePayCheck => + '/user/alipay/advancePaymentOrderCheckAlipay'; } class _House { diff --git a/lib/pages/life_pay/life_pay_page.dart b/lib/pages/life_pay/life_pay_page.dart index 90372392..dc52832f 100644 --- a/lib/pages/life_pay/life_pay_page.dart +++ b/lib/pages/life_pay/life_pay_page.dart @@ -1,4 +1,5 @@ import 'package:aku_community/pages/life_pay/life_pre_pay_page.dart'; +import 'package:aku_community/widget/others/user_tool.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; @@ -47,6 +48,7 @@ class _LifePayPageState extends State { List _models = []; //原model,禁止修改 int _page = 0; int _size = 10; + double _prePrice = 0; List _selectModels = []; //选中的models @@ -232,7 +234,7 @@ class _LifePayPageState extends State { children: [ '¥'.text.size(28.sp).black.make(), 16.w.widthBox, - '2300'.text.size(40.sp).black.bold.make(), + _prePrice.text.size(40.sp).black.bold.make(), Spacer(), MaterialButton( elevation: 0, @@ -243,7 +245,7 @@ class _LifePayPageState extends State { side: BorderSide(color: Color(0xFF979797), width: 1.w)), color: Colors.white, onPressed: () { - Get.to(() => LifePrePayPage()); + Get.to(() => LifePrePayPage(prePay: _prePrice,)); }, child: '预缴充值'.text.size(28.sp).black.make(), ) @@ -254,6 +256,18 @@ class _LifePayPageState extends State { ); } + Future _dailyPaymentPrePay() async { + BaseModel baseModel = + await NetUtil().get(API.manager.dailyPaymentPrePay, params: { + "estateId": UserTool.appProveider.selectedHouse!.estateId, + }); + if (baseModel.status ?? false) { + return (baseModel.data as num).toDouble(); + } else { + return 0; + } + } + @override Widget build(BuildContext context) { final appProvider = Provider.of(context); @@ -295,6 +309,7 @@ class _LifePayPageState extends State { for (var i = 0; i < _selectModels.length; i++) { _selectYears.add(i); } + _prePrice = await _dailyPaymentPrePay(); if (mounted) setState(() {}); }, child: Column( diff --git a/lib/pages/life_pay/life_pre_pay_page.dart b/lib/pages/life_pay/life_pre_pay_page.dart index 8188b735..de2277b6 100644 --- a/lib/pages/life_pay/life_pre_pay_page.dart +++ b/lib/pages/life_pay/life_pre_pay_page.dart @@ -1,18 +1,26 @@ import 'package:aku_community/base/base_style.dart'; +import 'package:aku_community/constants/api.dart'; +import 'package:aku_community/pages/life_pay/pay_finish_page.dart'; +import 'package:aku_community/pages/life_pay/pay_util.dart'; +import 'package:aku_community/utils/network/base_model.dart'; +import 'package:aku_community/utils/network/net_util.dart'; import 'package:aku_community/widget/bee_divider.dart'; import 'package:aku_community/widget/bee_scaffold.dart'; import 'package:aku_community/widget/bottom_sheets/pay_mothod_bottom_sheet.dart'; import 'package:aku_community/widget/buttons/bottom_button.dart'; -import 'package:aku_community/widget/others/bee_input_row.dart'; import 'package:aku_community/widget/others/house_head_card.dart'; +import 'package:aku_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:aku_community/utils/headers.dart'; import 'package:flutter/services.dart'; import 'package:get/get.dart'; +import 'package:power_logger/power_logger.dart'; class LifePrePayPage extends StatefulWidget { - LifePrePayPage({Key? key}) : super(key: key); + final double prePay; + LifePrePayPage({Key? key, required this.prePay}) : super(key: key); @override _LifePrePayPageState createState() => _LifePrePayPageState(); @@ -72,7 +80,10 @@ class _LifePrePayPageState extends State { fontWeight: FontWeight.bold, color: Colors.black, ), - inputFormatters: [FilteringTextInputFormatter.digitsOnly], + inputFormatters: [ + FilteringTextInputFormatter.allow( + RegExp(r"^[0-9][\.\d]*(,\d+)?$")) + ], keyboardType: TextInputType.number, ).expand(), ], @@ -83,7 +94,8 @@ class _LifePrePayPageState extends State { '当前房屋下的预缴金额为 ' .richText .withTextSpanChildren([ - '2300' + widget.prePay + .toDoubleStringAsFixed() .textSpan .bold .size(28.sp) @@ -104,45 +116,64 @@ class _LifePrePayPageState extends State { ), ), 16.w.heightBox, - // Container( - // width: double.infinity, - // color: Colors.white, - // padding: EdgeInsets.symmetric(vertical: 32.w, horizontal: 32.w), - // child: Row( - // children: [ - // '缴费方式'.text.size(28.sp).black.make(), - // Spacer(), - // TextButton( - // onPressed: () async { - // Get.bottomSheet(PayMethodBottomSheet(onChoose: (value) { - // _paymethod = value; - // Get.back(); - // setState(() {}); - // })); - // }, - // child: _paymethod.text.size(28.sp).black.make()), - // 24.w.widthBox, - // Icon( - // CupertinoIcons.chevron_right, - // size: 40.w, - // ), - // ], - // ), - // ), - BeeInputRow.button( - title: '支付方式', - hintText: _payMethod, - onPressed: () { - Get.bottomSheet(PayMethodBottomSheet(onChoose: (value) { - _payMethod = value; - Get.back(); - setState(() {}); - })); - }), + Container( + width: double.infinity, + color: Colors.white, + padding: EdgeInsets.symmetric(vertical: 32.w, horizontal: 32.w), + child: Row( + children: [ + '缴费方式'.text.size(28.sp).black.make(), + Spacer(), + Image.asset( + R.ASSETS_ICONS_ALIPAY_ROUND_PNG, + width: 48.w, + height: 48.w, + ), + 16.w.widthBox, + TextButton( + onPressed: () async { + Get.bottomSheet(PayMethodBottomSheet(onChoose: (value) { + _payMethod = value; + Get.back(); + setState(() {}); + })); + }, + child: _payMethod.text.size(28.sp).black.make()), + 24.w.widthBox, + Icon( + CupertinoIcons.chevron_right, + size: 40.w, + ), + ], + ), + ), ], ), bottomNavi: BottomButton( - onPressed: () {}, child: '立即充值'.text.size(32.sp).bold.black.make()), + onPressed: () async { + Function cancel = BotToast.showLoading(); + try { + BaseModel baseModel = + await NetUtil().post(API.pay.dailPaymentPrePay, params: { + "estateId": UserTool.appProveider.selectedHouse!.estateId, + "payType": 1, + "payPrice": _editingController.text + }); + if (baseModel.status ?? false) { + bool result = await PayUtil().callAliPay( + baseModel.message!, API.pay.dailPaymentPrePayCheck); + if (result) { + Get.off(() => PayFinishPage()); + } + } else { + BotToast.showText(text: baseModel.message??""); + } + } catch (e) { + LoggerData.addData(e); + } + cancel(); + }, + child: '立即充值'.text.size(32.sp).bold.black.make()), ); } } diff --git a/lib/widget/bottom_sheets/pay_mothod_bottom_sheet.dart b/lib/widget/bottom_sheets/pay_mothod_bottom_sheet.dart index f4474c4f..127392b8 100644 --- a/lib/widget/bottom_sheets/pay_mothod_bottom_sheet.dart +++ b/lib/widget/bottom_sheets/pay_mothod_bottom_sheet.dart @@ -18,7 +18,7 @@ class PayMethodBottomSheet extends StatelessWidget { '支付方式'.text.size(32.sp).bold.color(ktextPrimary).isIntrinsic.make(), actions: [ CupertinoActionSheetAction( - onPressed: onChoose('支付宝'), + onPressed:()=> onChoose('支付宝'), child: '支付宝'.text.size(32.sp).color(ktextPrimary).isIntrinsic.make()) ],