From f9c2f9af6f86dca65f411e82c498d83d5aa67de8 Mon Sep 17 00:00:00 2001 From: wurong <953969641@qq.com> Date: Fri, 21 Apr 2023 18:31:59 +0800 Subject: [PATCH] =?UTF-8?q?=E5=85=85=E5=80=BC=E9=A1=B5=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E6=8E=A8=E8=8D=90=E9=97=A8=E5=BA=97=E9=80=89=E6=8B=A9=EF=BC=9B?= =?UTF-8?q?=EF=BC=88=E5=BA=9F=E5=BC=83=E5=8E=9F=E5=85=85=E5=80=BC=E5=88=97?= =?UTF-8?q?=E8=A1=A8=EF=BC=88rechargeAct=EF=BC=89=EF=BC=8C=E7=94=A8?= =?UTF-8?q?=E6=96=B0=E6=8E=A5=E5=8F=A3=EF=BC=88rechargeActList=EF=BC=89?= =?UTF-8?q?=EF=BC=8C=E5=A2=9E=E5=8A=A0=E9=97=A8=E5=BA=97=E5=88=97=E8=A1=A8?= =?UTF-8?q?=EF=BC=8C=E6=8E=A8=E8=8D=90=E6=9D=BF=E5=9D=97=E6=98=AF=E5=90=A6?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E5=BC=80=E5=85=B3=EF=BC=89=20=E6=9B=B4?= =?UTF-8?q?=E6=94=B9=E9=83=A8=E5=88=86=E5=AE=9E=E4=BD=93=E7=B1=BB=E7=B1=BB?= =?UTF-8?q?=E5=9E=8B=E8=A7=A3=E6=9E=90=E9=94=99=E8=AF=AF=EF=BC=88=E4=B8=BB?= =?UTF-8?q?=E8=A6=81=E6=9B=B4=E6=94=B9=E4=B8=AA=E4=BA=BA=E4=BF=A1=E6=81=AF?= =?UTF-8?q?=E9=82=A3=E5=9D=97=EF=BC=8C=E5=A6=82=EF=BC=9A=E7=B2=89=E4=B8=9D?= =?UTF-8?q?=EF=BC=8C=E5=85=B3=E6=B3=A8=E7=AD=89=E5=AD=97=E6=AE=B5=EF=BC=89?= =?UTF-8?q?=EF=BC=9B=20=E6=9B=B4=E6=94=B9=E4=B8=8B=E5=8D=95=E5=A4=87?= =?UTF-8?q?=E6=B3=A8=EF=BC=8C=E9=9D=9E=E9=A2=84=E7=BA=A6=E5=95=86=E5=93=81?= =?UTF-8?q?=EF=BC=8C=E4=B8=8D=E4=BC=A0=E2=80=9C=E9=A2=84=E7=BA=A6=E9=97=A8?= =?UTF-8?q?=E5=BA=97=E2=80=9D=E6=96=87=E6=9C=AC=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- assets/image/2x/recharge_z.webp | Bin 0 -> 894 bytes assets/image/3x/recharge_z.webp | Bin 0 -> 1194 bytes assets/image/recharge_z.webp | Bin 0 -> 658 bytes lib/mine/personal_page.dart | 2 + lib/mine/recharge_page.dart | 421 ++++++++++++++----- lib/retrofit/data/member_Infor.dart | 24 +- lib/retrofit/data/miNiDetail.dart | 4 +- lib/retrofit/data/rechargeActLists.dart | 155 +++++++ lib/retrofit/data/settleOrderInfo.dart | 6 +- lib/retrofit/data/social_info.dart | 18 +- lib/retrofit/data/user_info.dart | 8 +- lib/retrofit/retrofit_api.dart | 5 +- lib/retrofit/retrofit_api.g.dart | 14 +- lib/settlement/settlement.dart | 74 ++-- lib/view_widget/recharge_details_dialog.dart | 8 +- 15 files changed, 550 insertions(+), 189 deletions(-) create mode 100644 assets/image/2x/recharge_z.webp create mode 100644 assets/image/3x/recharge_z.webp create mode 100644 assets/image/recharge_z.webp create mode 100644 lib/retrofit/data/rechargeActLists.dart diff --git a/assets/image/2x/recharge_z.webp b/assets/image/2x/recharge_z.webp new file mode 100644 index 0000000000000000000000000000000000000000..36306282e86db7de58458f943038ea18f49e5e7d GIT binary patch literal 894 zcmWIYbaN|XW?%?+bqWXzu!!JdU|=u+VtEDzMFs{>XXk(uj6f~};|UPS0+h$ zTO=LA)&Q}SAZ!~DyS${J1gIte#4ZX6at5+ffNYI)Bz6)KJGr0;q`n8J#wItX6l50& zfPBZ3nim=jq&a|ChM|}th{2t~3FLnu9|-anF)&zsWnf^QfDlWX$-uC^m4QLx7D7yA z0Rsbn3j@Qp^9V6Sm=q)yC4!A(0g_Bm$qafxmJu*g4H?XUG3?XM$iSd4@4zA8|HxvJiux+KEn@a( zjz-xuOun3FkRg3?;&-XW_D_Ebzy2?j_S_WwHP}whPIE%NN5w4tX^FSZ`X*1Cd*}N< zMy4J=i*KgaH*UCZecAf+O|$azN4`tdt>4|Y{CC{RhI#5gzvf@f71_Tt@=JY`;oU#? zBQtlLn)Oq->8icJ+&OPn1znKjR7zc9A9l`xEki`b)#CI@t;vTt*ro)fZf{~)ZV@0R z9JrBjR)^LBH;G$aicTWR7Dt^pLKp>Obgjd9CO3bzo^zZt`U(I)$dv@ot=~-9I0xt)aTTHQ=up#gYYvAbv;VOH#HU93H i`X-%s$=x@r^XF7%&wnlYDWdw1-uFH6`Myu;c^LpGjs(a6 literal 0 HcmV?d00001 diff --git a/assets/image/3x/recharge_z.webp b/assets/image/3x/recharge_z.webp new file mode 100644 index 0000000000000000000000000000000000000000..4d1e9033bd87570397ad43a2e7ee84fabf99c006 GIT binary patch literal 1194 zcmWIYbaPw8!oU#j>J$(bU=hK^z`$St#QF>jh71gz&dvcR7=c^{#uFft1t^u9S5g$@ z?xYYA8KuDffPoPR!5}fYxB$Y!N&;1Vy9QBvSr@Ac{DPb*sl~}aB_DuTr3h#_&`lyh zwn#dJtpQ>uLD)7Rc6mub2~bS{h+PyCD76yiG=MiFvFeykZN(37Rj12~+v@`~WPs(~%mj>GeFq+a=}$B!<%ZAvX?Y{z z>t6*9+aHe1Yl`^Z-)N9Nxoyp|^U3VolXEgi8a{LaoFA7Dok@8{2YkUF^%fy>0FuAoKP%uHDBa zzrMO#?$53C>->q_+a4}GCo{i!KIetT%>#j`OZ&fnvWgdf2#Q1oh6Md}t;Y9NJl9Rz z)pf#BEpuIWO=pYWL@`r2l?9(}UrJupkb7y9)R)O_t#-94;_eiB+%lLr0S*M7CBKr{%ogT%?%n?h+hTI_;NVL2f$ zqMnmfKxnr5-|w3*@@|Y)c{-~-sy{4f%eO~mnlZZZm&7#R#@<=D!?5t_B}Q2FFxpIfvLhjxAb9PaA3lHo6|H2`)+J+75tzvY-Snp^3{g$`n!0BJ++NUCRT%1w7 Ne6m~8g2k@v3;>wJluQ5s literal 0 HcmV?d00001 diff --git a/assets/image/recharge_z.webp b/assets/image/recharge_z.webp new file mode 100644 index 0000000000000000000000000000000000000000..307da899f72b7bb6db46aaf6f632289e05f2ddd1 GIT binary patch literal 658 zcmWIYbaU%sVqge&bqWXzu!!JdU|=u+Vtxh&0R{$7XXk(uj6f~};|UPS0+h$ zTO=LA)&Q}SAZ!~DyS${J1gIte#4ZX6at5+ffNYI)Bz6)KJGr0;q`n8J#wItX6l50& zfPBZ3nim=jq&a|ChM|}th{2t~3FLnu9|-anF)&zsWnf^QfDlWX$-uC^m4QLx7D7yA z0We%!7#OylM~ET9q#&^<5o{a_kYq|rV_^8SoPmKil7T_^0s{kAG*}Ku;BcD)P)Y{q zu6!U&XUJhlWl&)7WXNMkX3zt&jDV49$Y2JHVV^lbh5GyqECS0HEXb8st5!Hxc4YYl z1%Z|mYX8?KF3X+0=Z_Hxa with WidgetsBindingObserver { BaseData baseData = await apiService.memberDetail(id).catchError((error) { refreshController.refreshFailed(); + debugPrint(error); }); if (baseData != null && baseData.isSuccess) { setState(() { @@ -126,6 +127,7 @@ class _PersonalPage extends State with WidgetsBindingObserver { "pageSize": 10, "searchKey": searchKey ?? "" }).catchError((error) { + debugPrint(error); if (searchKey == null) { refreshController.refreshFailed(); refreshController.loadFailed(); diff --git a/lib/mine/recharge_page.dart b/lib/mine/recharge_page.dart index 50219753..6ec69bfb 100644 --- a/lib/mine/recharge_page.dart +++ b/lib/mine/recharge_page.dart @@ -10,6 +10,7 @@ import 'package:flutter_smart_dialog/flutter_smart_dialog.dart'; import 'package:fluwx/fluwx.dart'; import 'package:huixiang/generated/l10n.dart'; import 'package:huixiang/retrofit/data/base_data.dart'; +import 'package:huixiang/retrofit/data/rechargeActLists.dart'; import 'package:huixiang/retrofit/data/recharge_list.dart'; import 'package:huixiang/retrofit/data/user_info.dart'; import 'package:huixiang/retrofit/data/vip_benefit_list.dart'; @@ -42,12 +43,14 @@ class _RechargePage extends State { List vipBenefitList = []; Color color = Colors.black; double discount = 100; - List rechargeA; + // List rechargeA; int selectIndex = 0; UserInfo userInfo; String mBalance = "0"; dynamic payListen; - + RechargeActLists rechargeActLists; + int selectStoreIndex = 0; + String recommendName; @override void initState() { @@ -58,7 +61,7 @@ class _RechargePage extends State { context: context, token: value.getString("token"), pay: true); queryBenefitList(); queryRuleDetails(); - queryRechargeList(); + queryRechargeActList(); queryUserBalance(); }); payListen = weChatResponseEventHandler.listen((event) async { @@ -67,8 +70,7 @@ class _RechargePage extends State { queryUserBalance(); Navigator.of(context).pop(); SmartDialog.showToast("充值成功", alignment: Alignment.center); - } - else{ + } else { SmartDialog.showToast("充值失败", alignment: Alignment.center); return; } @@ -78,8 +80,7 @@ class _RechargePage extends State { @override void dispose() { super.dispose(); - if(payListen!=null) - payListen.cancel(); + if (payListen != null) payListen.cancel(); } ///会员权益列表 @@ -125,7 +126,7 @@ class _RechargePage extends State { } ///充值列表 - queryRechargeList() async { + queryRechargeActList() async { if (apiService == null) { SharedPreferences value = await SharedPreferences.getInstance(); apiService = ApiService( @@ -134,11 +135,11 @@ class _RechargePage extends State { token: value.getString("token"), ); } - BaseData> baseData = - await apiService.rechargeAct().catchError((onError) {}); + BaseData baseData = + await apiService.rechargeActList().catchError((onError) {}); if (baseData != null && baseData.isSuccess) { setState(() { - rechargeA = baseData.data; + rechargeActLists = baseData.data; }); } EasyLoading.dismiss(); @@ -215,7 +216,8 @@ class _RechargePage extends State { fontSize: 15.sp, color: Color(0xFF181818), fontFamily: 'JDZhengHT', - fontWeight: MyFontWeight.semi_bold), + fontWeight: + MyFontWeight.semi_bold), )), Text.rich( TextSpan(children: [ @@ -269,11 +271,10 @@ class _RechargePage extends State { )), Container( width: double.infinity, - margin: EdgeInsets.only( - bottom: 22.h, left: 16, right: 16), + margin: EdgeInsets.only(left: 16, right: 16), padding: EdgeInsets.only( top: 20.h, - bottom: 20.h, + bottom: 24.h, ), // decoration: BoxDecoration( // color: Colors.white, @@ -327,7 +328,7 @@ class _RechargePage extends State { ], ), ), - SizedBox(height:10.h), + SizedBox(height: 10.h), GestureDetector( behavior: HitTestBehavior.opaque, onTap: () { @@ -337,9 +338,9 @@ class _RechargePage extends State { }, child: Row( mainAxisAlignment: - MainAxisAlignment.start, + MainAxisAlignment.start, crossAxisAlignment: - CrossAxisAlignment.start, + CrossAxisAlignment.start, children: [ Image.asset( "assets/image/icon_alipay.webp"), @@ -363,6 +364,48 @@ class _RechargePage extends State { ], ), ), + if((rechargeActLists?.isOpen ?? false) == true) + GestureDetector( + onTap: () { + showRecommendStore(); + }, + child: Container( + padding: EdgeInsets.only( + left: 14.w, + right: 16.w, + top: 14.h, + bottom: 14.h), + margin: EdgeInsets.only( + bottom: 22.h, left: 14.w, right: 14.w), + decoration: BoxDecoration( + color: Color(0xFFFAFAFA), + borderRadius: BorderRadius.circular(4), + ), + child: Row( + children: [ + Image.asset( + "assets/image/recharge_z.webp", + width: 16.w, + height: 17.h, + fit: BoxFit.fill, + ), + SizedBox(width: 8.w), + Expanded( + child: Text( + recommendName ??"为喜爱门店打call!(可选)", + style: TextStyle( + fontWeight: MyFontWeight.regular, + fontSize: 12.sp, + color: (recommendName != null) ?Color(0xFF32A060):Color(0xFF868686), + ), + )), + Icon( + Icons.arrow_forward_ios, + size: 16, + ), + ], + )), + ), Align( alignment: Alignment.bottomCenter, child: GestureDetector( @@ -508,7 +551,7 @@ class _RechargePage extends State { Widget rechargeList() { return ListView.builder( padding: EdgeInsets.zero, - itemCount: rechargeA == null ? 0 : rechargeA.length, + itemCount: (rechargeActLists != null && (rechargeActLists?.preferentialList?.length ?? 0) > 0) ? rechargeActLists.preferentialList.length : 0, scrollDirection: Axis.vertical, shrinkWrap: true, physics: BouncingScrollPhysics(), @@ -519,22 +562,24 @@ class _RechargePage extends State { selectIndex = position; }); }, - child: rechargeItem(rechargeA[position], position)); + child: rechargeItem(rechargeActLists.preferentialList[position], position)); }, ); } - Widget rechargeItem(RechargeList rechargeA, index) { + Widget rechargeItem(PreferentialList preferentialList, index) { return Container( width: double.infinity, height: 69.h, decoration: BoxDecoration( borderRadius: BorderRadius.circular(4), border: Border.all( - color: selectIndex == index ? Color(0xFF32A060) :Color(0xFFFAFAFA), - width: selectIndex == index ? 1 :0, + color: + selectIndex == index ? Color(0xFF32A060) : Color(0xFFFAFAFA), + width: selectIndex == index ? 1 : 0, ), - color: selectIndex == index ? Color(0XFFF0FAF4) :Color(0xFFFAFAFA)), + color: + selectIndex == index ? Color(0XFFF0FAF4) : Color(0xFFFAFAFA)), margin: EdgeInsets.only(bottom: 14.w), padding: EdgeInsets.only(left: 16), child: Flex( @@ -549,16 +594,20 @@ class _RechargePage extends State { text: "储值 ", style: TextStyle( fontSize: 12.sp, - color:selectIndex == index ? Color(0xFF4D4D4D):Color(0xFF868686), + color: selectIndex == index + ? Color(0xFF4D4D4D) + : Color(0xFF868686), fontWeight: MyFontWeight.regular), ), TextSpan( text: - "${AppUtils.calculateDouble(double.tryParse(rechargeA.rechargeMoney) ?? 0)}元", + "${AppUtils.calculateDouble(double.tryParse(preferentialList.rechargeMoney) ?? 0)}元", style: TextStyle( fontSize: 18.sp, fontFamily: 'JDZhengHT', - color: selectIndex == index ? Color(0xFF353535) : Color(0xFF868686), + color: selectIndex == index + ? Color(0xFF353535) + : Color(0xFF868686), fontWeight: MyFontWeight.semi_bold), ), ]), @@ -567,74 +616,81 @@ class _RechargePage extends State { Container( width: 1.w, height: 37.h, - color: selectIndex == index ? Color(0xFF32A060):Color(0xFF979797), + color: + selectIndex == index ? Color(0xFF32A060) : Color(0xFF979797), margin: EdgeInsets.only(right: 16.w, left: 12), ), - Expanded( - flex: 2, - child:Column( - mainAxisAlignment: MainAxisAlignment.center, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Text.rich( - TextSpan(children: [ - TextSpan( - text: "实际到账 ", - style: TextStyle( - fontSize: 12.sp, - color: selectIndex == index ? Color(0xFF353535) : Color(0xFF868686), - fontWeight: MyFontWeight.regular), + Expanded( + flex: 2, + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text.rich( + TextSpan(children: [ + TextSpan( + text: "实际到账 ", + style: TextStyle( + fontSize: 12.sp, + color: selectIndex == index + ? Color(0xFF353535) + : Color(0xFF868686), + fontWeight: MyFontWeight.regular), + ), + TextSpan( + text: + "${AppUtils.calculateDouble((double.tryParse(preferentialList.rechargeMoney) ?? 0) + (double.tryParse(preferentialList.giftdMoney) ?? 0) + ((double.tryParse(preferentialList.rechargeMoney) ?? 0) - ((double.tryParse(preferentialList.rechargeMoney) ?? 0) * (discount / 100))))}元", + style: TextStyle( + fontSize: 18.sp, + fontFamily: 'JDZhengHT', + color: selectIndex == index + ? Color(0xFF353535) + : Color(0xFF868686), + fontWeight: MyFontWeight.semi_bold), + ), + ]), ), - TextSpan( - text: - "${AppUtils.calculateDouble((double.tryParse(rechargeA.rechargeMoney) ?? 0) + (double.tryParse(rechargeA.giftdMoney) ?? 0) + ((double.tryParse(rechargeA.rechargeMoney) ?? 0) - ((double.tryParse(rechargeA.rechargeMoney) ?? 0) * (discount / 100))))}元", - style: TextStyle( - fontSize: 18.sp, - fontFamily: 'JDZhengHT', - color: selectIndex == index ? Color(0xFF353535) : Color(0xFF868686), - fontWeight: MyFontWeight.semi_bold), + SizedBox( + height: 4.h, ), - ]), - ), - SizedBox( - height: 4.h, - ), - GestureDetector( - onTap: (){ - setState(() { - if(selectIndex == index) - showRecharge(index); - }); - }, - child: Row( - mainAxisAlignment: MainAxisAlignment.start, - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - Text( - "充值说明", - style: TextStyle( - color: selectIndex == index ?Color(0xFF4D4D4D) : Color(0xFF868686), - fontSize: 12.sp, - fontWeight: MyFontWeight.regular, - ), - ), - Icon( - Icons.chevron_right, - size: 20, - color: selectIndex == index ? Color(0xFF353535) : Color(0xFF868686), - ), - ], - ) - ), - ], - )) + GestureDetector( + onTap: () { + setState(() { + if (selectIndex == index) showRecharge(index); + }); + }, + child: Row( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Text( + "充值说明", + style: TextStyle( + color: selectIndex == index + ? Color(0xFF4D4D4D) + : Color(0xFF868686), + fontSize: 12.sp, + fontWeight: MyFontWeight.regular, + ), + ), + Icon( + Icons.chevron_right, + size: 20, + color: selectIndex == index + ? Color(0xFF353535) + : Color(0xFF868686), + ), + ], + )), + ], + )) ], )); } Widget checkView(var index) { return Container( - padding: EdgeInsets.only(right: 16.w,left: 46.w), + padding: EdgeInsets.only(right: 16.w, left: 46.w), alignment: Alignment.center, child: Image.asset( checkIndex != index @@ -648,15 +704,153 @@ class _RechargePage extends State { ///充值说明底部弹窗 showRecharge(index) { - showModalBottomSheet( - context: context, - backgroundColor: Colors.transparent, - builder: (context) { - return RechargeWidget(rechargeA[index]); - }); - } + showModalBottomSheet( + context: context, + backgroundColor: Colors.transparent, + builder: (context) { + return RechargeWidget(rechargeActLists.preferentialList[index]); + }); + } + + ///选择推荐门店 + showRecommendStore() { + showModalBottomSheet( + context: context, + backgroundColor: Colors.transparent, + builder: (BuildContext context) { + return StatefulBuilder(builder: ( + context, + state, + ) { + return Container( + height: 321.h, + decoration: BoxDecoration( + color: Color(0xFFFAFAFA), + borderRadius: BorderRadius.only( + topLeft: Radius.circular(6), + topRight: Radius.circular(6), + ), + ), + child: Column( + children: [ + Row( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Expanded( + child: Container( + alignment: Alignment.center, + margin: EdgeInsets.symmetric(vertical: 12), + child: Text( + "选择推荐门店", + style: TextStyle( + fontWeight: MyFontWeight.bold, + fontSize: 15.sp, + color: Color(0xFF353535), + ), + ), + )), + GestureDetector( + onTap: () { + setState(() { + Navigator.of(context).pop(); + }); + }, + child: Icon( + Icons.clear, + color: Colors.black, + size: 18, + ), + ), + SizedBox(width: 14), + ], + ), + Container( + height: 1, + color: Color(0xFFF2F2F2), + margin: EdgeInsets.only(bottom: 13.h), + ), + Expanded( + child: ListView.builder( + physics: BouncingScrollPhysics(), + itemBuilder: (context, position) { + return GestureDetector( + onTap: () { + state(() { + selectStoreIndex = position; + }); + }, + child: recommendStoreItem(position), + ); + }, + itemCount: rechargeActLists.channels.length ?? 0, + )), + GestureDetector( + onTap: () { + setState(() { + recommendName = + rechargeActLists.channels[selectStoreIndex]; + Navigator.of(context).pop(); + }); + }, + child: Container( + width: double.infinity, + height: 40.h, + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(100), + color: Color(0xFF32A060), + ), + alignment: Alignment.center, + margin: EdgeInsets.only( + top: 14.h, bottom: 30.h, left: 16.w, right: 16.w), + child: Text( + S.of(context).queding, + style: TextStyle( + fontWeight: MyFontWeight.bold, + fontSize: 16.sp, + color: Color(0xFFFFFFFF), + ), + ), + ), + ), + ], + ), + ); + }); + },); + } + Widget recommendStoreItem(index) { + return Container( + height: 52, + margin: EdgeInsets.only(bottom: 12, left: 14, right: 14), + width: double.infinity, + decoration: BoxDecoration( + borderRadius: new BorderRadius.circular(6), + border: Border.all( + color: + selectStoreIndex == index ? Color(0xFF32A060) : Color(0xFFF7F7F7), + width: selectStoreIndex == index ? 1 : 0, + ), + color: + selectStoreIndex == index ? Color(0xFFF0FAF4) : Color(0xFFF7F7F7), + ), + alignment: Alignment.centerLeft, + padding: EdgeInsets.only( + left: 12, + ), + child: Text( + rechargeActLists?.channels[index] ?? "", + style: TextStyle( + fontWeight: MyFontWeight.bold, + fontSize: 14.sp, + color: selectStoreIndex == index ? Color(0xFF32A060) : Colors.black, + ), + ), + ); + } + ///充值 recharge() async { // String money = controller.text; // if (money == null || money == "") { @@ -673,11 +867,12 @@ class _RechargePage extends State { // } BaseData baseData = await apiService.recharge({ "amount": 0, - "rechargeActId": rechargeA[selectIndex].id, - "rechargeType": checkIndex + "rechargeActId": rechargeActLists.preferentialList[selectIndex].id, + "rechargeType": checkIndex, + "channel": recommendName, }).catchError((error) {}); if (baseData != null && baseData.isSuccess) { - if(checkIndex==2){ + if (checkIndex == 2) { if (Platform.isAndroid) { if (!(await Min.isInitialize())) { // 小程序的微信支付和app的充值支付使用同一个WXPayEntryActivity回调, @@ -701,22 +896,26 @@ class _RechargePage extends State { timeStamp: int.tryParse(wxPay.timeStamp), sign: wxPay.sign, ); - }else{ - tobias.isAliPayInstalled().then((value) => { // 判断是否安装了支付宝 - if (!value) { - SmartDialog.showToast("请安装支付宝", alignment: Alignment.center) - }else{ - tobias.aliPay(baseData.data["body"]).then((payRes) { - if (payRes['resultStatus'] == 9000 || - payRes['resultStatus'] == '9000') { - SmartDialog.showToast("充值成功", alignment: Alignment.center); - Navigator.of(context).pop(); - } else { - SmartDialog.showToast(payRes['memo'], alignment: Alignment.center); - } - }) - } - }); + } else { + tobias.isAliPayInstalled().then((value) => { + // 判断是否安装了支付宝 + if (!value) + {SmartDialog.showToast("请安装支付宝", alignment: Alignment.center)} + else + { + tobias.aliPay(baseData.data["body"]).then((payRes) { + if (payRes['resultStatus'] == 9000 || + payRes['resultStatus'] == '9000') { + SmartDialog.showToast("充值成功", + alignment: Alignment.center); + Navigator.of(context).pop(); + } else { + SmartDialog.showToast(payRes['memo'], + alignment: Alignment.center); + } + }) + } + }); } } else { SmartDialog.showToast(baseData.msg, alignment: Alignment.center); diff --git a/lib/retrofit/data/member_Infor.dart b/lib/retrofit/data/member_Infor.dart index c9daf168..130ea3f2 100644 --- a/lib/retrofit/data/member_Infor.dart +++ b/lib/retrofit/data/member_Infor.dart @@ -31,10 +31,10 @@ class MemberInfor { int age, String signature, String background, - int follow, - int fans, - int trendTotal, - int gainLikeTotal,}){ + String follow, + String fans, + String trendTotal, + String gainLikeTotal,}){ _id = id; _nickname = nickname; _headimg = headimg; @@ -86,10 +86,10 @@ class MemberInfor { int _age; String _signature; String _background; - int _follow; - int _fans; - int _trendTotal; - int _gainLikeTotal; + String _follow; + String _fans; + String _trendTotal; + String _gainLikeTotal; String get id => _id; String get nickname => _nickname; @@ -104,10 +104,10 @@ class MemberInfor { int get age => _age; String get signature => _signature; String get background => _background; - int get follow => _follow; - int get fans => _fans; - int get trendTotal => _trendTotal; - int get gainLikeTotal => _gainLikeTotal; + String get follow => _follow; + String get fans => _fans; + String get trendTotal => _trendTotal; + String get gainLikeTotal => _gainLikeTotal; Map toJson() { final map = {}; diff --git a/lib/retrofit/data/miNiDetail.dart b/lib/retrofit/data/miNiDetail.dart index 2f5af8e3..8b116c3e 100644 --- a/lib/retrofit/data/miNiDetail.dart +++ b/lib/retrofit/data/miNiDetail.dart @@ -946,8 +946,8 @@ class StoreDTOBean { String storeName; String nickName; String logo; - int productCount; - int soldNum; + dynamic productCount; + dynamic soldNum; static StoreDTOBean fromJson(Map map) { if (map == null) return null; diff --git a/lib/retrofit/data/rechargeActLists.dart b/lib/retrofit/data/rechargeActLists.dart new file mode 100644 index 00000000..4ad31b30 --- /dev/null +++ b/lib/retrofit/data/rechargeActLists.dart @@ -0,0 +1,155 @@ +/// preferentialList : [{"id":"1506553893994102784","rechargeMoney":"100.00","giftdMoney":"0.00","gitfdCouponId":null,"tenantCode":"admin","createTime":"2022-11-11 10:10:31","isDeleted":0,"rechargeType":0,"remark":"

充值说明:
平台充值根据用户在平台的会员等级享有不同的充值权益。
银卡用户享1.1倍充值会员权益,即充值100元账户110元。
金卡用户享1.2倍充值会员权益,即充值100元账户120元。
共创用户享1.3倍充值会员权益,即充值100元账户130元。
平台充值金可在平台上所有品牌和门店使用,包含:农场火锅、海峡姐妹、前进麦味、百年川椒、农场煮意、一心回乡生态农场等。
储值活动不与其他活动同享

","sortValue":1},{"id":"1506553858271215616","rechargeMoney":"300.00","giftdMoney":"0.00","gitfdCouponId":null,"tenantCode":"admin","createTime":"2022-11-21 19:56:39","isDeleted":0,"rechargeType":0,"remark":"

平台充值根据用户在平台的会员等级享有不同的充值权益。
银卡用户享1.1倍充值会员权益,即充值100元账户110元。
金卡用户享1.2倍充值会员权益,即充值100元账户120元。
共创用户享1.3倍充值会员权益,即充值100元账户130元。
平台充值金可在平台上所有品牌和门店使用,包含:农场火锅、海峡姐妹、前进麦味、百年川椒、农场煮意、一心回乡生态农场等。

","sortValue":2},{"id":"1506553832157478912","rechargeMoney":"500.00","giftdMoney":"0.00","gitfdCouponId":null,"tenantCode":"admin","createTime":"2022-11-21 19:56:48","isDeleted":0,"rechargeType":0,"remark":"

平台充值根据用户在平台的会员等级享有不同的充值权益。
银卡用户享1.1倍充值会员权益,即充值100元账户110元。
金卡用户享1.2倍充值会员权益,即充值100元账户120元。
共创用户享1.3倍充值会员权益,即充值100元账户130元。
平台充值金可在平台上所有品牌和门店使用,包含:农场火锅、海峡姐妹、前进麦味、百年川椒、农场煮意、一心回乡生态农场等。

","sortValue":3},{"id":"1506553759084314624","rechargeMoney":"800.00","giftdMoney":"0.00","gitfdCouponId":null,"tenantCode":"admin","createTime":"2022-06-10 11:14:39","isDeleted":0,"rechargeType":0,"remark":"

平台充值根据用户在平台的会员等级享有不同的充值权益。
银卡用户享1.1倍充值会员权益,即充值100元账户110元。
金卡用户享1.2倍充值会员权益,即充值100元账户120元。
共创用户享1.3倍充值会员权益,即充值100元账户130元。
平台充值金可在平台上所有品牌和门店使用,包含:农场火锅、海峡姐妹、前进麦味、百年川椒、农场煮意、一心回乡生态农场等。

","sortValue":4},{"id":"1506553705988620288","rechargeMoney":"1000.00","giftdMoney":"0.00","gitfdCouponId":null,"tenantCode":"admin","createTime":"2022-11-21 19:56:55","isDeleted":0,"rechargeType":0,"remark":"

充值说明:
平台充值根据用户在平台的会员等级享有不同的充值权益。
银卡用户享1.1倍充值会员权益,即充值100元账户110元。
金卡用户享1.2倍充值会员权益,即充值100元账户120元。
共创用户享1.3倍充值会员权益,即充值100元账户130元。
平台充值金可在平台上所有品牌和门店使用,包含:农场火锅、海峡姐妹、前进麦味、百年川椒、农场煮意、一心回乡生态农场等。

","sortValue":5},{"id":"1506553668529291264","rechargeMoney":"1500.00","giftdMoney":"0.00","gitfdCouponId":null,"tenantCode":"admin","createTime":"2022-06-10 11:14:52","isDeleted":0,"rechargeType":0,"remark":"

充值说明:
平台充值根据用户在平台的会员等级享有不同的充值权益。
银卡用户享1.1倍充值会员权益,即充值100元账户110元。
金卡用户享1.2倍充值会员权益,即充值100元账户120元。
共创用户享1.3倍充值会员权益,即充值100元账户130元。
平台充值金可在平台上所有品牌和门店使用,包含:农场火锅、海峡姐妹、前进麦味、百年川椒、农场煮意、一心回乡生态农场等。

","sortValue":6}] +/// channels : ["海峡","回乡","boom"] +/// isOpen : false + +class RechargeActLists { + RechargeActLists({ + List preferentialList, + List channels, + bool isOpen,}){ + _preferentialList = preferentialList; + _channels = channels; + _isOpen = isOpen; +} + + RechargeActLists.fromJson(dynamic json) { + if (json['preferentialList'] != null) { + _preferentialList = []; + json['preferentialList'].forEach((v) { + _preferentialList.add(PreferentialList.fromJson(v)); + }); + } + _channels = json['channels'] != null ? json['channels'].cast() : []; + _isOpen = json['isOpen']; + } + List _preferentialList; + List _channels; + bool _isOpen; +RechargeActLists copyWith({ List preferentialList, + List channels, + bool isOpen, +}) => RechargeActLists( preferentialList: preferentialList ?? _preferentialList, + channels: channels ?? _channels, + isOpen: isOpen ?? _isOpen, +); + List get preferentialList => _preferentialList; + List get channels => _channels; + bool get isOpen => _isOpen; + + Map toJson() { + final map = {}; + if (_preferentialList != null) { + map['preferentialList'] = _preferentialList.map((v) => v.toJson()).toList(); + } + map['channels'] = _channels; + map['isOpen'] = _isOpen; + return map; + } + +} + +/// id : "1506553893994102784" +/// rechargeMoney : "100.00" +/// giftdMoney : "0.00" +/// gitfdCouponId : null +/// tenantCode : "admin" +/// createTime : "2022-11-11 10:10:31" +/// isDeleted : 0 +/// rechargeType : 0 +/// remark : "

充值说明:
平台充值根据用户在平台的会员等级享有不同的充值权益。
银卡用户享1.1倍充值会员权益,即充值100元账户110元。
金卡用户享1.2倍充值会员权益,即充值100元账户120元。
共创用户享1.3倍充值会员权益,即充值100元账户130元。
平台充值金可在平台上所有品牌和门店使用,包含:农场火锅、海峡姐妹、前进麦味、百年川椒、农场煮意、一心回乡生态农场等。
储值活动不与其他活动同享

" +/// sortValue : 1 + +class PreferentialList { + PreferentialList({ + String id, + String rechargeMoney, + String giftdMoney, + dynamic gitfdCouponId, + String tenantCode, + String createTime, + num isDeleted, + num rechargeType, + String remark, + num sortValue,}){ + _id = id; + _rechargeMoney = rechargeMoney; + _giftdMoney = giftdMoney; + _gitfdCouponId = gitfdCouponId; + _tenantCode = tenantCode; + _createTime = createTime; + _isDeleted = isDeleted; + _rechargeType = rechargeType; + _remark = remark; + _sortValue = sortValue; +} + + PreferentialList.fromJson(dynamic json) { + _id = json['id']; + _rechargeMoney = json['rechargeMoney']; + _giftdMoney = json['giftdMoney']; + _gitfdCouponId = json['gitfdCouponId']; + _tenantCode = json['tenantCode']; + _createTime = json['createTime']; + _isDeleted = json['isDeleted']; + _rechargeType = json['rechargeType']; + _remark = json['remark']; + _sortValue = json['sortValue']; + } + String _id; + String _rechargeMoney; + String _giftdMoney; + dynamic _gitfdCouponId; + String _tenantCode; + String _createTime; + num _isDeleted; + num _rechargeType; + String _remark; + num _sortValue; +PreferentialList copyWith({ String id, + String rechargeMoney, + String giftdMoney, + dynamic gitfdCouponId, + String tenantCode, + String createTime, + num isDeleted, + num rechargeType, + String remark, + num sortValue, +}) => PreferentialList( id: id ?? _id, + rechargeMoney: rechargeMoney ?? _rechargeMoney, + giftdMoney: giftdMoney ?? _giftdMoney, + gitfdCouponId: gitfdCouponId ?? _gitfdCouponId, + tenantCode: tenantCode ?? _tenantCode, + createTime: createTime ?? _createTime, + isDeleted: isDeleted ?? _isDeleted, + rechargeType: rechargeType ?? _rechargeType, + remark: remark ?? _remark, + sortValue: sortValue ?? _sortValue, +); + String get id => _id; + String get rechargeMoney => _rechargeMoney; + String get giftdMoney => _giftdMoney; + dynamic get gitfdCouponId => _gitfdCouponId; + String get tenantCode => _tenantCode; + String get createTime => _createTime; + num get isDeleted => _isDeleted; + num get rechargeType => _rechargeType; + String get remark => _remark; + num get sortValue => _sortValue; + + Map toJson() { + final map = {}; + map['id'] = _id; + map['rechargeMoney'] = _rechargeMoney; + map['giftdMoney'] = _giftdMoney; + map['gitfdCouponId'] = _gitfdCouponId; + map['tenantCode'] = _tenantCode; + map['createTime'] = _createTime; + map['isDeleted'] = _isDeleted; + map['rechargeType'] = _rechargeType; + map['remark'] = _remark; + map['sortValue'] = _sortValue; + return map; + } + +} \ No newline at end of file diff --git a/lib/retrofit/data/settleOrderInfo.dart b/lib/retrofit/data/settleOrderInfo.dart index 678d794e..1176849f 100644 --- a/lib/retrofit/data/settleOrderInfo.dart +++ b/lib/retrofit/data/settleOrderInfo.dart @@ -22,6 +22,8 @@ class SettleOrderInfo { bool isRaise; int selectDiscount; bool useVipPriceSelect = false; + String vipDiscountAmount; + static SettleOrderInfo fromJson(Map map) { if (map == null) return null; @@ -51,6 +53,7 @@ class SettleOrderInfo { settleOrderInfoBean.usePlateMoney = map['usePlateMoney']; settleOrderInfoBean.isRaise = map['isRaise']; settleOrderInfoBean.selectDiscount = map['selectDiscount']; + settleOrderInfoBean.vipDiscountAmount = map['vipDiscountAmount']; return settleOrderInfoBean; } @@ -73,7 +76,8 @@ class SettleOrderInfo { "memberCouponId": memberCouponId, "usePlateMoney":usePlateMoney, "isRaise":isRaise, - "selectDiscount":selectDiscount + "selectDiscount":selectDiscount, + "vipDiscountAmount":vipDiscountAmount }; diff --git a/lib/retrofit/data/social_info.dart b/lib/retrofit/data/social_info.dart index 252dec8a..cffbc3d4 100644 --- a/lib/retrofit/data/social_info.dart +++ b/lib/retrofit/data/social_info.dart @@ -3,9 +3,9 @@ class SocialInfo { SocialInfo({ - int fans, - int follow, - int achievementNumber}){ + dynamic fans, + dynamic follow, + dynamic achievementNumber}){ _fans = fans; _follow = follow; _achievementNumber = achievementNumber; @@ -16,13 +16,13 @@ class SocialInfo { _follow = json['follow']; _achievementNumber = json['achievementNumber']; } - int _fans; - int _follow; - int _achievementNumber; + dynamic _fans; + dynamic _follow; + dynamic _achievementNumber; - int get fans => _fans; - int get follow => _follow; - int get achievementNumber => _achievementNumber; + dynamic get fans => _fans; + dynamic get follow => _follow; + dynamic get achievementNumber => _achievementNumber; set fans(int value) { diff --git a/lib/retrofit/data/user_info.dart b/lib/retrofit/data/user_info.dart index b3015f2b..1c1c03ad 100644 --- a/lib/retrofit/data/user_info.dart +++ b/lib/retrofit/data/user_info.dart @@ -41,8 +41,8 @@ class UserInfo { String raiseExpireTime; bool isBind; String masterId; - int inviteNumber; - int todayInviteNumber; + dynamic inviteNumber; + dynamic todayInviteNumber; String masterCardRankName; MemberRank memberRankVo; String inviteCode; @@ -76,8 +76,8 @@ class UserInfo { ..raiseExpireTime = json['raiseExpireTime'] as String ..isBind = json['isBind'] as bool ..masterId = json['masterId'] as String - ..inviteNumber = json['inviteNumber'] as int - ..todayInviteNumber = json['todayInviteNumber'] as int + ..inviteNumber = json['inviteNumber'] as dynamic + ..todayInviteNumber = json['todayInviteNumber'] as dynamic ..masterCardRankName = json['masterCardRankName'] as String ..inviteCode = json['inviteCode'] as String ..signature = json['signature'] as String diff --git a/lib/retrofit/retrofit_api.dart b/lib/retrofit/retrofit_api.dart index 7b1581b7..eaf2e48d 100644 --- a/lib/retrofit/retrofit_api.dart +++ b/lib/retrofit/retrofit_api.dart @@ -47,6 +47,7 @@ import 'data/message.dart'; import 'data/msg_stats.dart'; import 'data/page.dart'; import 'data/rank.dart'; +import 'data/rechargeActLists.dart'; import 'data/recharge_list.dart'; import 'data/second_card_list.dart'; import 'data/sign_info.dart'; @@ -215,8 +216,8 @@ abstract class ApiService { Future> recharge(@Body() Map param); ///充值活动列表 - @GET("/wallet/rechargeAct") - Future>> rechargeAct(); + @GET("/wallet/rechargeActList") + Future> rechargeActList(); ///领取优惠券 @GET("/coupon/receive?couponId={couponId}") diff --git a/lib/retrofit/retrofit_api.g.dart b/lib/retrofit/retrofit_api.g.dart index 49509dc2..c9699f94 100644 --- a/lib/retrofit/retrofit_api.g.dart +++ b/lib/retrofit/retrofit_api.g.dart @@ -301,12 +301,12 @@ class _ApiService implements ApiService { } @override - Future>> rechargeAct() async { + Future> rechargeActList() async { const _extra = {}; final queryParameters = {}; final _data = {}; final _result = await _dio.request>( - '/wallet/rechargeAct', + '/wallet/rechargeActList', queryParameters: queryParameters, options: RequestOptions( method: 'GET', @@ -314,12 +314,10 @@ class _ApiService implements ApiService { extra: _extra, baseUrl: baseUrl), data: _data); - final value = BaseData>.fromJson( - _result.data, - (json) => (json as List) - .map( - (i) => RechargeList.fromJson(i as Map)) - .toList()); + final value = BaseData.fromJson( + _result.data, + (json) => RechargeActLists.fromJson(json), + ); return value; } diff --git a/lib/settlement/settlement.dart b/lib/settlement/settlement.dart index cdf58a04..abf12147 100644 --- a/lib/settlement/settlement.dart +++ b/lib/settlement/settlement.dart @@ -136,13 +136,13 @@ class _Settlement extends State { queryOrderInfo( address != null ? address.id : null, selectedBtn, - null, 0, - widget.arguments["pid"] ?? (productId ?? ""), + 0, + widget.arguments["pid"] ?? (productId ?? 0), productSkuId ?? "", actProductId ?? "", actProductSkuId ?? "", - useVipPriceSelect, + // useVipPriceSelect, count1, payChannel, tableId); @@ -152,11 +152,11 @@ class _Settlement extends State { selectedBtn, widget.arguments["cid"], 0, - productId ?? null, + productId ?? 0, productSkuId ?? "", actProductId ?? "", actProductSkuId ?? "", - useVipPriceSelect, + // useVipPriceSelect, count1, payChannel, tableId); @@ -164,13 +164,13 @@ class _Settlement extends State { queryOrderInfo( null, selectedBtn, - null, 0, - productId ?? null, + 0, + productId ?? 0, productSkuId ?? "", actProductId ?? "", actProductSkuId ?? "", - useVipPriceSelect, + // useVipPriceSelect, count1, payChannel, tableId); @@ -192,7 +192,7 @@ class _Settlement extends State { productSkuId, actProductId, actProductSkuId, - useVipPriceSelect, + // useVipPriceSelect, buyNum, payChannel, tableId) async { @@ -208,10 +208,11 @@ class _Settlement extends State { "productSkuId": productSkuId, "actProductId": actProductId, "actProductSkuId": actProductSkuId, - "useVipPrice": useVipPriceSelect, + // "useVipPrice": useVipPriceSelect, "buyNum": buyNum, "payChannel": payChannel, - "tableId": tableId + "tableId": tableId, + "discountType":"AUTO" }).catchError((error) {}); this.promotion = null; promotions = ""; @@ -252,7 +253,7 @@ class _Settlement extends State { productSkuId ?? "", actProductId ?? "", actProductSkuId ?? "", - useVipPriceSelect, + // useVipPriceSelect, count1, settleOrderInfo.isRaise ? 7 : payChannel, tableId); @@ -329,13 +330,13 @@ class _Settlement extends State { queryOrderInfo( address.id, selectedBtn, - null, 0, - productId ?? null, + 0, + productId ?? 0, productSkuId ?? "", actProductId ?? "", actProductSkuId ?? "", - useVipPriceSelect, + // useVipPriceSelect, count1, payChannel, tableId); @@ -381,13 +382,13 @@ class _Settlement extends State { await queryOrderInfo( address.id, selectedBtn, - null, 0, - productId ?? null, + 0, + productId ?? 0, productSkuId ?? "", actProductId ?? "", actProductSkuId ?? "", - useVipPriceSelect, + // useVipPriceSelect, count1, payChannel, tableId); @@ -409,13 +410,13 @@ class _Settlement extends State { queryOrderInfo( address.id, selectedBtn, - null, 0, - productId ?? null, + 0, + productId ?? 0, productSkuId ?? "", actProductId ?? "", actProductSkuId ?? "", - useVipPriceSelect, + // useVipPriceSelect, count1, payChannel, tableId); @@ -506,9 +507,9 @@ class _Settlement extends State { placeOrderFirst.isTakeOut = selectedBtn; placeOrderFirst.notes = remakers + (reservationTime ?? "") + - (subscribeParam == null - ? "" - : "预约门店:${((subscribeParam?.stores?.length ?? 0) == 1 ? (subscribeParam.stores[0]) : (subscribeStoresName ?? ""))}"); + ((subscribeParam?.isEnableSubscribe ?? false) == true + ? "预约门店:${((subscribeParam?.stores?.length ?? 0) == 1 ? (subscribeParam.stores[0]) : (subscribeStoresName ?? ""))}" + : ""); placeOrderFirst.numberOfPeople = "$numberOfPeople"; placeOrderFirst.orderSource = 2; placeOrderFirst.orderType = "0"; @@ -787,11 +788,11 @@ class _Settlement extends State { isTake, memberCouponId, orderId, - promotionId ?? (productId ?? ""), + promotionId ?? (productId ?? 0), productSkuId ?? "", actProductId ?? "", actProductSkuId ?? "", - useVipPriceSelect, + // useVipPriceSelect, count1, payChannel, tableId ?? 0); @@ -942,7 +943,7 @@ class _Settlement extends State { if (subscribeParam != null && ((subscribeParam.isEnableSubscribe ?? false) == true) && (reservationTime == null || - subscribeStoresName == null)) { + ((subscribeParam.stores.length ==1 ? subscribeParam.stores[0] : subscribeStoresName) == null))) { SmartDialog.showToast( (reservationTime == null) ? "请选择预约时间" @@ -988,7 +989,7 @@ class _Settlement extends State { productSkuId ?? "", actProductId ?? "", actProductSkuId ?? "", - useVipPriceSelect, + // useVipPriceSelect, count1, payChannel, tableId); @@ -1003,13 +1004,13 @@ class _Settlement extends State { queryOrderInfo( address?.id, selectedBtn, - null, 0, - productId ?? null, + 0, + productId ?? 0, productSkuId ?? "", actProductId ?? "", actProductSkuId ?? "", - useVipPriceSelect, + // useVipPriceSelect, count1, payChannel, tableId); @@ -1061,11 +1062,11 @@ class _Settlement extends State { selectedBtn, couponBean?.id, 0, - productId ?? null, + productId ?? 0, productSkuId ?? "", actProductId ?? "", actProductSkuId ?? "", - useVipPriceSelect, + // useVipPriceSelect, count1, payChannel, tableId); @@ -1092,13 +1093,13 @@ class _Settlement extends State { queryOrderInfo( address?.id, selectedBtn, - null, + 0, 0, (pro.id ?? "") ?? productId, productSkuId ?? "", actProductId ?? "", actProductSkuId ?? "", - useVipPriceSelect, + // useVipPriceSelect, count1, payChannel, tableId); @@ -1236,8 +1237,7 @@ class _Settlement extends State { GestureDetector( onTap: (){ setState(() { - subscribeStoresName = - subscribeParam.stores[storesIndex]; + subscribeStoresName = subscribeParam.stores[storesIndex]; }); Navigator.of(context).pop(); }, diff --git a/lib/view_widget/recharge_details_dialog.dart b/lib/view_widget/recharge_details_dialog.dart index 92b880b3..5d180df4 100644 --- a/lib/view_widget/recharge_details_dialog.dart +++ b/lib/view_widget/recharge_details_dialog.dart @@ -11,9 +11,11 @@ import 'package:huixiang/view_widget/border_text.dart'; import 'package:huixiang/view_widget/custom_image.dart'; import 'package:huixiang/view_widget/round_button.dart'; +import '../retrofit/data/rechargeActLists.dart'; + class RechargeWidget extends StatefulWidget { - final RechargeList rechargeA; - RechargeWidget(this.rechargeA); + final PreferentialList preferentialList; + RechargeWidget(this.preferentialList); @override State createState() { return _RechargeWidget(); @@ -87,7 +89,7 @@ class _RechargeWidget extends State { child: Container( color: Colors.white, child: Html( - data: widget.rechargeA.remark ?? "", + data: widget.preferentialList.remark ?? "", customImageRenders: { networkSourceMatcher(): networkImageRender( loadingWidget: () {