From 4539f3980ea9142dffc4f001896727ff68d6df38 Mon Sep 17 00:00:00 2001 From: datang Date: Fri, 1 Apr 2022 14:08:30 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=A4=BE=E5=8C=BA/?= =?UTF-8?q?=E8=AF=84=E8=AE=BA=E2=80=94=E2=80=94=E5=86=85=E5=AE=B9=E5=BA=94?= =?UTF-8?q?=E8=AF=A5=E4=B8=8E=E5=90=8D=E7=A7=B0=E3=80=81=E6=97=B6=E9=97=B4?= =?UTF-8?q?=E5=AF=B9=E9=BD=90=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../widgets/chat_card_detail.dart | 21 ++++++++++++------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/lib/ui/community/community_views/widgets/chat_card_detail.dart b/lib/ui/community/community_views/widgets/chat_card_detail.dart index 5ada5531..fb3045e2 100644 --- a/lib/ui/community/community_views/widgets/chat_card_detail.dart +++ b/lib/ui/community/community_views/widgets/chat_card_detail.dart @@ -201,14 +201,19 @@ class _ChatCardDetailState extends State { Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - 32.hb, - if (!widget.model.content!.isEmptyOrNull) - widget.model.content!.text - .size(28.sp) - .color(ktextSubColor) - .make(), - 32.hb, - _renderImage(), + Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + 32.hb, + if (!widget.model.content!.isEmptyOrNull) + widget.model.content!.text + .size(28.sp) + .color(ktextSubColor) + .make(), + 32.hb, + _renderImage(), + ], + ).paddingOnly(left: 115.w), 20.hb, TopicWidgets( topicTags: widget.model.topicTags, From 9e49bf03a63fbf30304c8a7a845da0ac20b52947 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=AB=A0=E6=96=87=E8=BD=A9?= <12812285557@qq.com> Date: Fri, 1 Apr 2022 17:00:54 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E7=BC=B4=E8=B4=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/constants/saas_api.dart | 13 ++++++--- lib/pages/life_pay/life_pay_page_new.dart | 33 ++++++++++++----------- 2 files changed, 28 insertions(+), 18 deletions(-) diff --git a/lib/constants/saas_api.dart b/lib/constants/saas_api.dart index f113a454..9b599f46 100644 --- a/lib/constants/saas_api.dart +++ b/lib/constants/saas_api.dart @@ -263,11 +263,19 @@ class _Pay { ///app商品 向支付宝发起订单查询请求 String get jcookOrderCheckAlipay => '/app/user/alipay/jcookOrderCheckAlipay'; - ///创建缴费订单 + ///创建预缴费订单 String get createPrepaymentOrder => '/app/user/alipay/createPrepaymentOrder'; - ///app商品 向支付宝发起订单查询请求 + ///创建预缴费订单 向支付宝发起订单查询请求 String get prepaymentOrderCheckAlipay => '/app/user/alipay/prepaymentOrderCheckAlipay'; + + ///创建缴费订单 + String get createLivingExpensesOrder => '/app/user/alipay/createLivingExpensesOrder'; + + ///创建缴费订单 向支付宝发起订单查询请求 + String get livingExpensesOrderCheckAlipay => '/app/user/alipay/livingExpensesOrderCheckAlipay'; + + } @@ -282,5 +290,4 @@ class _LifePay{ String get findEstateBalance => '/app/user/livingExpenses/findEstateBalance'; - } diff --git a/lib/pages/life_pay/life_pay_page_new.dart b/lib/pages/life_pay/life_pay_page_new.dart index 0748fe30..a122b896 100644 --- a/lib/pages/life_pay/life_pay_page_new.dart +++ b/lib/pages/life_pay/life_pay_page_new.dart @@ -308,21 +308,24 @@ class _LifePayPageNewState extends State { color: kPrimaryColor, padding: EdgeInsets.symmetric(horizontal: 50.w, vertical: 15.w), onPressed: () async { - // Function cancel = BotToast.showLoading(); - // BaseModel baseModel = - // await NetUtil().post('/user/alipay/dailyPaymentAlipay', params: { - // "ids": total.ids, - // "payType": 1, //暂时写死 等待后续补充 - // "payPrice": total.payTotal.toDoubleStringAsFixed() - // }); - // if (baseModel.success) { - // bool result = await PayUtil() - // .callAliPay(baseModel.msg, API.pay.dailPayMentCheck); - // if (result) { - // Get.off(() => PayFinishPage()); - // } - // } - // cancel(); + Function cancel = BotToast.showLoading(); + BaseModel baseModel = + await NetUtil().post(SAASAPI.pay.createLivingExpensesOrder, params: { + "chargesBillId": total.ids, + "paymentAmount": total.payTotal + }); + if (baseModel.success) { + bool result = await PayUtil().callAliPay( + (baseModel.data as String), + SAASAPI.pay.livingExpensesOrderCheckAlipay); + if (result) { + Get.off(() => PayFinishPage()); + } else { + ///跳到待付款页面 + BotToast.showText(text: '缴费失败'); + } + } + cancel(); }, child: '去缴费'.text.black.size(32.sp).bold.make(), );