From 3b355b542546d5c832eacc1e366fc035d7c763b9 Mon Sep 17 00:00:00 2001 From: wurong <953969641@qq.com> Date: Fri, 11 Aug 2023 10:16:27 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BA=97=E9=93=BA=E5=85=85=E5=80=BCui=E6=9B=B4?= =?UTF-8?q?=E6=94=B9=E5=8F=8A=E6=96=B0=E5=A2=9E=EF=BC=9B=EF=BC=88ui?= =?UTF-8?q?=E5=B7=B2=E7=94=BB=E5=AE=8C=EF=BC=8C=E7=BC=BA=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- assets/image/2x/icon_search.webp | Bin 0 -> 1008 bytes assets/image/3x/icon_search.webp | Bin 0 -> 1640 bytes assets/image/icon_search.webp | Bin 0 -> 760 bytes lib/main.dart | 3 + lib/mine/mine_shop_page.dart | 194 +++++--- lib/mine/mine_shop_recharge.dart | 664 +++++++++++++++++++++++++++ lib/mine/mine_view/mine_item.dart | 2 +- lib/mine/recharge_page.dart | 720 +++++++++++++++--------------- 8 files changed, 1166 insertions(+), 417 deletions(-) create mode 100644 assets/image/2x/icon_search.webp create mode 100644 assets/image/3x/icon_search.webp create mode 100644 assets/image/icon_search.webp create mode 100644 lib/mine/mine_shop_recharge.dart diff --git a/assets/image/2x/icon_search.webp b/assets/image/2x/icon_search.webp new file mode 100644 index 0000000000000000000000000000000000000000..83fe5c548ba3883caf5f1deaf674eb40d9e1af1f GIT binary patch literal 1008 zcmWIYbaQ*b%)k)t>J$(bU=hK^z`$St#PVR|>FgYEf)U7NU_1dLS%6Zxc_l?b?oJ93 zkx>fl4;UDM5DXHNiwhtutRzs?w`&l!mvynKz%R&|l3JV$RPq6cRf>R?1KlJ7WQ(Lj z*cu>q5`=97VwaZ`lmOKPfY?PLLC!#S3XrXlj>JwvVkZ|AfzZ zZ((5Ab{-*y2$O=uqC~K9EI^VeEscTU({cs|-be-p;R_55T+v`TAc4be3P33tpu6&c zFr6WXA(cUa!IL46A(=rB$T9*(sv(0JFou18F)}dd%O7AD$UkH?DMi)T;>mn|#*gnm znQ*vGRMA`&W%23#bC$dF7fQNLTCyVR;fek8g-hz&%I<9IRZw5tvb%b}cfz$&)*IV= z@9$n`>Z^J0``vxt_rBjlg5QeMY zYp=}b+VTH?Fe8Ij!!LeL2alk7h6fCap0*4E8x&V+raCckSUgzH#aZga#J~`wuCh{k z60c`ggOot_ZL_y?@^5de&#~@b{l98b`Ttt;l?sdgbKTyS+w<<>4$ogL9UUDWTQ=|A zUi18E$uwa>5ICEW#mI0VS9gz@-GQ6Dua0J=7xMqJk_u|KyB4Cnw1lnPGgtOts?Yk( zuRqCLe*0^UQsR4^=$Pyqb{5?&){9;mT20t+q-(ZCQQKNQSDCi7zHKvB*&X;7X{=TJ zPLw&iEU8UKLrm^vcVgv2VFSx6K80sh5bjT5E+*ReS(>gg%~-*ub;0!J{^xH34zrz4cqyU2{9;A-Wgcny z!x8GrKU?;P6up12l>b0_oVrRG+qFGwvR=$-vaWf)dBJ~6vk$f9MPFYq9=ANH<+|Hq v*Z1al$v^f-y>D*6FZ8I_CEH}~7m-;Pl4eQFtk+my^LOu^6ZgG-DX{_o+%`d~ literal 0 HcmV?d00001 diff --git a/assets/image/3x/icon_search.webp b/assets/image/3x/icon_search.webp new file mode 100644 index 0000000000000000000000000000000000000000..979a0908aeb173735656890668e1bd7046106e09 GIT binary patch literal 1640 zcmaJSXP^ob!9md*1haHn6Fwhd2NZCPvow z)_RUo000d{)z>$S$6G%~Aud2Y7g{kSMWzJNYzRhJM<-{j1P`E)wJx6Cfz%E3MT@W& zIyboOs$XRMe^Ang6zGjmW)X#G$l*v&yAZs~Zv!6^Vy_L16XK8{Y7oM)7Gj#64IaTh z2tMTZ8TR@NdsAsbeiFjLkpnIX&k~C8b}}Ri(H8k`MN|m{0vkX8M#B3eJ|Y+M0MO$D zAbM>x=9LZrCk6n8p3NAP3xI4i0PL2{*yfv1J!zin<-`yx;_C~*`+ERva{>VU3IHjW z^&DdUqc<#)QbPK=h%7%407w7}U_b%hKn+2f$WV_19c025G^D<|dad-1RB>H8*`YP_ z7yE;!mebIuVpx}F`a~zi2Tkb^pQ$)P zRVR~k$-S}TlY*21}-MZrLTQ+X%DBCS6xCIxy)pd;i5&#ObBlC zVb~L)>-kJOVw4(8G?9auM_{3!olh_3GWWxDNZ(Knrf6E8k;A?y<1*>Py>4>s1K0C~ z6|wR8bYNyf3{a1U03AqNgWy`&nMevF@*$KNT@3jV%<32DW=3sL0W(d@kPfLz!dFB^ z%tf$=c}QuPuC#*+cmNp6(ZvCTD&|6T=t7i)a7F+`C`WZekGlp&2F}R=sE19Sd>K#f z{eJv)0lAkg-185IhM$Gzr&uk1%EsmiwkyH@cjmT~Dk{7&_;p>DOnf?yaer!gx4Ja` zwr6d*By#`1GBR+#B+MNJ0LH3Cm2*={DV!r;tJV53^3o035$r^+Y3GNv5ylw)yKPw| zlPfOCJz-_uxn5&C$eAPU?M?V(-m*749JtQ!zo|7PL9NK>XcTwY+sWe`E|+3#U&%)2 z)f@2AWp&~l7Zm2udo3l2F3o$pu57V4JCMpdD-o5(=M)>Y5$|W6KVE-&=|ro0L{yXe z(xWs_Db0QjTmCoGGgp82RVt7j^nau;N{)#QKqnPgu1tEh=fqbOYuAFEf5;B>n^ncS zZGBiKBa?1*A@f);ap`)jqW{Q&x3jgH zmf^4>8Jy(o%#Oc)(+Qp#{lwr{HuKNCA=|P_W*b~R46kIJ?TPp^q&b`s!ZW$3cwBiZ zA$4^32-G2%?K8LU+9PXOCaS8IonA4Ui!&_Laj2?%NO1b-p*-tvd@Z5U?LGLav@paU zFTH}Z@l5`9kwr)}%^sS&WxP*1Qlvs!dPp>R$e5H8DpsDUKNNeXGv}2jr_cF8b#?gP zwc~9IT+?QQ4+^vTIhdP20=;Z9*LW;ZF(|M|u>5Y-ugjgIMw@1C-4)-*V%eRT%Glc# z%0Fw5!CNWHYX;XSraWa$I(OdQO_+K7i9azKS2e0*v4+80j#Ojx((lNNdD)aoOG%a5 zzLlx+H=9Paz-9S`8MWo_qm?mD=7hAW+Q7!{#t6!reMc~gD*hO&j|qAV*KS?#50i_5 Ah5!Hn literal 0 HcmV?d00001 diff --git a/assets/image/icon_search.webp b/assets/image/icon_search.webp new file mode 100644 index 0000000000000000000000000000000000000000..6b5802a4def3dae68fe98e7469f9434091d92224 GIT binary patch literal 760 zcmWIYbaVT_#J~{l>J$(bU=hK^z`$St#Qb37>FgYEf)U7NU_1dLS%6Zxc_l?b?oJ93 zkx>fl4;UDM5DXHNiwhtutRzs?w`&l!mvynKz%R&|l3JV$RPq6cRf>R?1KlJ7WQ(Lj z*cu>q5`=97VwaZ`lmOKPfY?PLLC!#S3XrXlj>JwvVkZ|Afz- z3j@Qp^9V6Sm=q)yC4!A(0g_Bm$qafxmJu*g4H?XUG3>+0$iSe_e}Gvae&K>#Y0cYz|1iofaQ^Vt z%Q^A(w%$qa{`0?b+?%j8?8dg-#Y=wwZ>|c^k60@x3>G~qx3@f#y#N08vuE-Tti``Ncf8ntXj`td`pYjrm=n}J zxf#l5y`1CpJLH+~@+t-Isf4^fTI#LC8b0*4<+D=F-k)owe?_H6xx vM=~<`GUwhtESYIlzi!puhA+#n78G4s9P;?}>dVh}`Yrrml{NMM#c~D!-+{ routers = { MineGreenery(), '/router/mine_shop_page': (context, {arguments}) => MineShopPage(), + '/router/mine_shop_recharge': (context, {arguments}) => + MineShopRecharge(arguments: arguments,), '/router/mine_shop_details': (context, {arguments}) => MineShopDetails(arguments:arguments,), '/router/coupon_page': (context, {arguments}) => diff --git a/lib/mine/mine_shop_page.dart b/lib/mine/mine_shop_page.dart index 2c0e5953..8b1ae39b 100644 --- a/lib/mine/mine_shop_page.dart +++ b/lib/mine/mine_shop_page.dart @@ -27,28 +27,62 @@ class MineShopPage extends StatefulWidget { } } -class _MineShopPage extends State { +class _MineShopPage extends State with WidgetsBindingObserver{ List coupons = []; ApiService apiService; int current = 1; RefreshController refreshController ; + final TextEditingController editingController = TextEditingController(); + int optionIndex = 0; + bool isKeyBoardShow = false; + List hotSearch = []; + List historySearch = []; + FocusNode _focusNode = FocusNode(); + bool hasFocus = true; + int priceOrder = 0; @override void initState() { super.initState(); refreshController = RefreshController(); - SharedPreferences.getInstance().then((value) { apiService = ApiService(Dio(), context: context, token: value.getString("token")); queryVipCard(); }); + _focusNode.addListener(() { + setState(() { + hasFocus = _focusNode.hasFocus; + }); + }); } - _onRefresh() { - current = 1; - queryVipCard(); + @override + void didChangeMetrics() { + super.didChangeMetrics(); + WidgetsBinding.instance.addPostFrameCallback((_) { + setState(() { + print("object: ${MediaQuery.of(context).viewInsets.bottom}"); + if (MediaQuery.of(context).viewInsets.bottom == 0) { + if (isKeyBoardShow) { + isKeyBoardShow = false; + //关闭键盘 软键盘关闭了, 清除输入控件的焦点, 否则重新进入页面会导致软键盘再弹出问题 + FocusScope.of(context).requestFocus(FocusNode()); + } + } else { + isKeyBoardShow = true; + } + }); + }); + } + + ///离开页面记着销毁和清除 + @override + void dispose() { + _focusNode.unfocus(); + refreshController.dispose(); + super.dispose(); } queryVipCard() async { @@ -69,46 +103,105 @@ class _MineShopPage extends State { @override Widget build(BuildContext context) { - return Scaffold( - appBar: MyAppBar( - title: S.of(context).dianpuyue, - titleColor: Colors.black, - background: Colors.white, - leadingColor: Colors.black, + return GestureDetector( + behavior: HitTestBehavior.opaque, + onTap: (){ + FocusScope.of(context).requestFocus(FocusNode()); + }, + child: Scaffold( + appBar: MyAppBar( + title: "店铺充值", + titleColor: Colors.black, + background: Colors.white, + leadingColor: Colors.black, + ), + body:Column( + children: [ + Container( + color: Colors.white, + padding: EdgeInsets.only(top:10.h,bottom:18.h,), + child: searchShopItem(), + ), + Expanded(child: SmartRefresher( + enablePullDown: true, + enablePullUp: false, + header: MyHeader(), + footer: CustomFooter( + builder: (context, mode) { + return MyFooter(mode); + }, + ), + controller: refreshController, + onRefresh: queryVipCard, + physics: BouncingScrollPhysics(), + child: (coupons != null && coupons.length > 0) + ? ListView.builder( + padding: EdgeInsets.symmetric(vertical: 8.h), + itemBuilder: (context, position) { + return GestureDetector( + onTap: () { + Navigator.of(context).pushNamed( + '/router/mine_shop_recharge', + arguments: {"id": coupons[position].id}); + }, + child: shopItem(coupons[position]), + ); + }, + itemCount: coupons != null ? coupons.length : 0, + ) + : NoDataView( + src: "assets/image/icon_empty.webp", + isShowBtn: false, + text: "还没有会员卡~", + fontSize: 16.sp, + margin: EdgeInsets.only(top: 120.h), + ), + ),) + ], + ), + ), + ); + } + + Widget searchShopItem() { + return Container( + height: 36.h, + margin: EdgeInsets.fromLTRB(14.w, 0, 14.w, 0), + padding: EdgeInsets.fromLTRB(0, 6.h, 0, 6.h), + decoration: BoxDecoration( + color: Color(0xFFF5FAF7), + borderRadius: BorderRadius.circular(4), + boxShadow: [ + BoxShadow( + color: Colors.black.withAlpha(12), + offset: Offset(0, 3), + blurRadius: 14, + spreadRadius: 0, + ), + ], ), - body: SmartRefresher( - enablePullDown: true, - enablePullUp: false, - header: MyHeader(), - footer: CustomFooter( - builder: (context, mode) { - return MyFooter(mode); - }, + child: TextField( + textInputAction: TextInputAction.search, + onEditingComplete: () { + FocusScope.of(context).requestFocus(FocusNode()); + }, + controller: editingController, + cursorHeight: 25.h, + decoration: InputDecoration( + contentPadding: EdgeInsets.symmetric( + vertical: 12.h, + ), + hintText: "搜索联盟会员店", + hintStyle: TextStyle( + fontSize: 12.sp, + color: Color(0xFFB3B3B3), + ), + prefixIcon:Image.asset( + "assets/image/icon_search.webp", + width: 16, + height: 16, ), - controller: refreshController, - onRefresh: queryVipCard, - physics: BouncingScrollPhysics(), - child: (coupons != null && coupons.length > 0) - ? ListView.builder( - padding: EdgeInsets.symmetric(vertical: 8.h), - itemBuilder: (context, position) { - return GestureDetector( - onTap: () { - Navigator.of(context).pushNamed( - '/router/mine_shop_details', - arguments: {"id": coupons[position].id}); - }, - child: shopItem(coupons[position]), - ); - }, - itemCount: coupons != null ? coupons.length : 0, - ) - : NoDataView( - src: "assets/image/icon_empty.webp", - isShowBtn: false, - text: "还没有会员卡~", - fontSize: 16.sp, - margin: EdgeInsets.only(top: 120.h), + border: InputBorder.none, ), ), ); @@ -218,19 +311,20 @@ class _MineShopPage extends State { ), )), Text( - S.of(context).chakanxiangqing, + "去充值", style: TextStyle( - color: Color(0xFF353535), + color: Color(0xFF262626), fontSize: 12.sp, fontWeight: MyFontWeight.regular, ), ), SizedBox(width: 2,), - Icon( - Icons.chevron_right, - size: 24, - color: Colors.black, - ), + Image.asset( + "assets/image/icon_right_z.webp", + width: 16, + height: 16, + color: Color(0xFF262626), + ) ], ), ], diff --git a/lib/mine/mine_shop_recharge.dart b/lib/mine/mine_shop_recharge.dart new file mode 100644 index 00000000..f2d93a53 --- /dev/null +++ b/lib/mine/mine_shop_recharge.dart @@ -0,0 +1,664 @@ +import 'package:barcode_widget/barcode_widget.dart'; +import 'package:dio/dio.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_bmflocation/flutter_bmflocation.dart'; +import 'package:flutter_easyloading/flutter_easyloading.dart'; +import 'package:huixiang/generated/l10n.dart'; +import 'package:huixiang/retrofit/data/base_data.dart'; +import 'package:huixiang/retrofit/data/page.dart'; +import 'package:huixiang/retrofit/data/product.dart'; +import 'package:huixiang/retrofit/data/user_bill.dart'; +import 'package:huixiang/retrofit/data/vip_card.dart'; +import 'package:huixiang/retrofit/retrofit_api.dart'; +import 'package:huixiang/store/scan.dart'; +import 'package:huixiang/utils/font_weight.dart'; +import 'package:huixiang/utils/location.dart'; +import 'package:huixiang/utils/painter_bg.dart'; +import 'package:huixiang/view_widget/classic_header.dart'; +import 'package:huixiang/view_widget/custom_image.dart'; +import 'package:huixiang/view_widget/my_appbar.dart'; +import 'package:huixiang/view_widget/my_footer.dart'; +import 'package:flutter_screenutil/flutter_screenutil.dart'; +import 'package:pull_to_refresh/pull_to_refresh.dart'; +import 'package:shared_preferences/shared_preferences.dart'; + +import '../retrofit/data/rechargeActLists.dart'; +import '../utils/flutter_utils.dart'; +import '../view_widget/no_data_view.dart'; +import '../view_widget/recharge_details_dialog.dart'; + +class MineShopRecharge extends StatefulWidget { + final Map arguments; + + MineShopRecharge({this.arguments}); + + @override + State createState() { + return _MineShopRecharge(); + } +} + +class _MineShopRecharge extends State { + ApiService apiService; + VipCard vipCard; + RechargeActLists rechargeActLists; + int selectIndex = 0; + double discount = 100; + var checkIndex = 2; + final RefreshController refreshController = RefreshController(); + + @override + void dispose() { + super.dispose(); + refreshController.dispose(); + } + + @override + void initState() { + super.initState(); + vipDetail("", ""); + } + + ///会员卡详情 + vipDetail(latitude, longitude) async { + SharedPreferences value = await SharedPreferences.getInstance(); + if (apiService == null) + apiService = + ApiService(Dio(), context: context, token: value.getString("token")); + BaseData baseData = await apiService.vipDetail({ + "id": widget.arguments["id"], + "latitude": "$latitude", + "longitude": "$longitude", + }).catchError((onError) {}); + if (baseData != null && baseData.isSuccess) { + vipCard = baseData.data; + refreshController.loadComplete(); + } else { + refreshController.loadFailed(); + } + print("object:object"); + setState(() {}); + } + + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: MyAppBar( + title: "店铺充值", + titleColor: Colors.black, + background: Colors.white, + brightness: Brightness.dark, + leadingColor: Colors.black, + ), + body: + Column( + children: [ + shopRechargeCard(), + // NoDataView( + // src: "assets/image/xiao_fei.webp", + // isShowBtn: false, + // text: "当前店铺暂无充值套餐~", + // fontSize: 16.sp, + // margin: EdgeInsets.only(top: 120.h, left: 60.w, right: 60.w), + // ), + Expanded(child:ListView.builder( + padding: EdgeInsets.zero, + itemCount: 6, + scrollDirection: Axis.vertical, + shrinkWrap: true, + physics: BouncingScrollPhysics(), + itemBuilder: (context, position) { + return GestureDetector( + onTap: () { + setState(() { + selectIndex = position; + }); + }, + child: rechargeItem(position)); + }, + )), + Container( + width: double.infinity, + margin: EdgeInsets.only(left: 16, right: 16), + padding: EdgeInsets.only( + top: 20.h, + bottom: 24.h, + ), + child: Column( + mainAxisAlignment: + MainAxisAlignment.spaceAround, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Padding( + padding: EdgeInsets.only(bottom: 16.h), + child: Text( + S.of(context).zhifufangshi, + style: TextStyle( + fontSize: 16.sp, + color: Colors.black, + fontWeight: FontWeight.bold, + ), + ), + ), + GestureDetector( + behavior: HitTestBehavior.opaque, + onTap: () { + setState(() { + checkIndex = 2; + }); + }, + child: Row( + mainAxisAlignment: + MainAxisAlignment.start, + crossAxisAlignment: + CrossAxisAlignment.start, + children: [ + Image.asset( + "assets/image/icon_we_chat.webp"), + Expanded( + flex: 1, + child: Padding( + padding: EdgeInsets.only(left: 8.w), + child: Text( + S.of(context).weixinzhifu, + style: TextStyle( + fontSize: 14.sp, + color: Color(0xff353535), + ), + ), + ), + ), + checkView(2), + ], + ), + ), + SizedBox(height: 10.h), + GestureDetector( + behavior: HitTestBehavior.opaque, + onTap: () { + setState(() { + checkIndex = 3; + }); + }, + child: Row( + mainAxisAlignment: + MainAxisAlignment.start, + crossAxisAlignment: + CrossAxisAlignment.start, + children: [ + Image.asset( + "assets/image/icon_alipay.webp"), + Expanded( + flex: 1, + child: Padding( + padding: EdgeInsets.only(left: 8.w), + child: Text( + S.of(context).zhifubao, + style: TextStyle( + fontSize: 14.sp, + color: Color(0xff353535), + ), + ), + ), + ), + checkView(3), + ], + ), + ), + ], + ), + ), + Align( + alignment: Alignment.bottomCenter, + child: GestureDetector( + onTap: () { + }, + child: Container( + height: 56.h, + width: double.infinity, + alignment: Alignment.center, + decoration: BoxDecoration( + color: Color(0xFF32A060), + borderRadius: BorderRadius.circular(27), + ), + margin: EdgeInsets.only( + top: 12.h, left: 16.w, right: 16.w, bottom: 21.h), + child: Text( + S.of(context).querenchongzhi, + style: TextStyle( + fontSize: 16.sp, + fontWeight: MyFontWeight.medium, + color: Colors.white, + ), + ), + ), + ), + ) + ], + ), + ); + } + + ///卡片背景底色 + int colorByName(String storeName) { + if (storeName == null) return 0xFF32A060; + if (storeName.contains("百年川椒") || storeName.contains("百年川椒")) { + return 0xFFC30D23; + } else if (storeName.contains("海峡姐妹") || storeName.contains("海峽姐妹")) { + return 0xFFE4C796; + } else if (storeName.contains("前进麦味") || storeName.contains("前進麥味")) { + return 0xFF265782; + } + return 0xFF32A060; + } + + ///卡片详情 + Widget shopRechargeCard() { + return GestureDetector( + behavior: HitTestBehavior.opaque, + onTap: (){ + Navigator.of(context).pushNamed( + '/router/mine_shop_details', + arguments: {"id": widget.arguments["id"]}); + }, + child: Container( + width: double.infinity, + // height:140.h, + margin: EdgeInsets.only(bottom: 24.h, top: 14.h, left: 14.w, right: 14.w), + child: Column( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Container( + decoration: BoxDecoration( + borderRadius: new BorderRadius.only( + topLeft: Radius.circular(6), + topRight: Radius.circular(6), + ), + color: Color(colorByName(vipCard?.tenantName ?? "")), + ), + padding: EdgeInsets.only(left: 12.w), + height: 62.h, + child: Row( + children: [ + MImage( + (vipCard?.storeList?.length ?? 0) > 0 + ? vipCard.storeList[0].logo + : "", + width: 38, + height: 38, + radius: BorderRadius.circular(100), + fit: BoxFit.cover, + errorSrc: "assets/image/default_1.webp", + fadeSrc: "assets/image/default_1.webp", + ), + SizedBox( + width: 6, + ), + Text( + vipCard != null ? vipCard.tenantName : "", + style: TextStyle( + color: Color(0xFFFFFFFF), + fontSize: 15.sp, + fontWeight: MyFontWeight.medium, + ), + ), + ], + ), + ), + Container( + decoration: BoxDecoration( + borderRadius: new BorderRadius.only( + bottomRight: Radius.circular(6), + topRight: Radius.circular(6), + ), + color: Colors.white, + ), + padding: EdgeInsets.all(12.h), + child: Column( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + "店铺余额(元)", + style: TextStyle( + color: Color(0xFF262626), + fontSize: 12.sp, + fontWeight: MyFontWeight.regular, + ), + ), + Text( + "No.${vipCard?.id ?? ""}", + style: TextStyle( + color: Color(0xFF262626), + fontSize: 12.sp, + fontWeight: MyFontWeight.regular, + ), + ), + ], + ), + SizedBox( + height: 4.h, + ), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Expanded( + child: Text( + "¥ ${vipCard != null ? vipCard.balance : ""}", + style: TextStyle( + color: Color(0xFF262626), + fontSize: 24.sp, + fontFamily: 'JDZhengHT', + fontWeight: MyFontWeight.medium, + ), + ),), + Text( + "适用门店", + style: TextStyle( + color: Color(0xFF262626), + fontSize: 12.sp, + fontWeight: MyFontWeight.regular, + ), + ), + SizedBox(width: 2,), + Image.asset( + "assets/image/icon_right_z.webp", + width: 16, + height: 16, + color: Color(0xFF262626), + ) + ], + ), + ], + ), + ), + ], + ), + ), + ); + } + + ///充值item + Widget rechargeItem(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(0XFFF0FAF4) : Colors.white), + margin: EdgeInsets.only(bottom: 14.h,left: 14.w,right: 14.w), + padding: EdgeInsets.only(left: 16), + child: Flex( + direction: Axis.horizontal, + children: [ + Expanded( + flex: 1, + child: Container( + child: Text.rich( + TextSpan(children: [ + TextSpan( + text: "储值 ", + style: TextStyle( + fontSize: 12.sp, + color: selectIndex == index + ? Color(0xFF4D4D4D) + : Color(0xFF868686), + fontWeight: MyFontWeight.regular), + ), + TextSpan( + text: + "555元", + style: TextStyle( + fontSize: 18.sp, + fontFamily: 'JDZhengHT', + color: selectIndex == index + ? Color(0xFF353535) + : Color(0xFF868686), + fontWeight: MyFontWeight.semi_bold), + ), + ]), + ), + )), + Container( + width: 1.w, + height: 37.h, + 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), + ), + TextSpan( + text: + "526元", + style: TextStyle( + fontSize: 18.sp, + fontFamily: 'JDZhengHT', + color: selectIndex == index + ? Color(0xFF353535) + : Color(0xFF868686), + fontWeight: MyFontWeight.semi_bold), + ), + ]), + ), + 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), + ), + ], + )), + ], + )) + ], + )); + } + + Widget checkView(var index) { + return Container( + padding: EdgeInsets.only(right: 16.w, left: 46.w), + alignment: Alignment.center, + child: Image.asset( + checkIndex != index + ? "assets/image/icon_radio_unselected.webp" + : "assets/image/icon_radio_selected.webp", + width: 15.w, + height: 15.h, + ), + ); + } + + ///充值说明底部弹窗 + showRecharge(index) { + showModalBottomSheet( + context: context, + backgroundColor: Colors.transparent, + builder: (context) { + return RechargeWidget(rechargeActLists.preferentialList[index]); + }); + } + + Widget shopItem(StoreListBean store) { + return Container( + decoration: BoxDecoration( + borderRadius: new BorderRadius.circular(6), + color: Colors.white, + ), + padding: EdgeInsets.all(12), + margin: EdgeInsets.symmetric(horizontal: 16.w, vertical: 8.h), + child: Column( + mainAxisAlignment: MainAxisAlignment.spaceAround, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Row( + mainAxisAlignment: MainAxisAlignment.start, + children: [ + Expanded( + flex: 1, + child: Text( + (store != null) ? store.storeName : "", + style: TextStyle( + fontSize: 14.sp, + fontWeight: MyFontWeight.semi_bold, + color: Colors.black, + ), + ), + ), + GestureDetector( + onTap: () { + // Navigator.of(context).pushNamed('/router/union_detail_page', + // arguments: {"id": store.id}); + if (store.posType.code == "NORMALSTORE") { + Scan.toScan( + context, + store.id, + store.tenantCode, + store.storeName, + ); + } else { + Navigator.of(context).pushNamed( + '/router/store_order', + arguments: { + "id": store.id, + "tenant": store.tenantCode, + "storeName": store.storeName + }, + ); + } + }, + child: Text( + S.of(context).chakan, + style: TextStyle( + fontSize: 12.sp, + fontWeight: MyFontWeight.medium, + color: Color(0xff32A060), + ), + ), + ), + Icon( + Icons.chevron_right, + color: Color(0xff32A060), + size: 16, + ), + ], + ), + SizedBox( + height: 8.h, + ), + Row( + children: [ + Text( + "${S.of(context).dizhi}: ", + style: TextStyle( + fontSize: 12.sp, + fontWeight: MyFontWeight.regular, + color: Color(0xff353535), + ), + ), + Expanded( + child: Text( + store.address, + overflow: TextOverflow.ellipsis, + style: TextStyle( + fontSize: 12.sp, + fontWeight: MyFontWeight.regular, + color: Color(0xff353535), + ), + ), + flex: 1, + ) + ], + ), + SizedBox( + height: 4.h, + ), + Row( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Expanded( + flex: 1, + child: Text( + S.of(context).yingyeshijian((store.openStartTime == null && + store.openEndTime == null) + ? S.of(context).quantian + : "${store.openStartTime.substring(0, store.openStartTime.lastIndexOf(":"))} - ${store.openEndTime.substring(0, store.openEndTime.lastIndexOf(":"))}"), + style: TextStyle( + fontSize: 12.sp, + fontWeight: MyFontWeight.regular, + color: Color(0xff353535), + ), + ), + ), + Text( + (store.distance ?? 0) > 1000 + ? S.of(context).gongli( + ((store.distance ?? 0) / 1000 * 100).toInt() / 100.0) + : S + .of(context) + .mi(((store.distance ?? 0) * 100).toInt() / 100.0), + style: TextStyle( + fontSize: 12.sp, + fontWeight: MyFontWeight.regular, + color: Color(0xff868686), + ), + ), + ], + ), + ], + ), + ); + } +} diff --git a/lib/mine/mine_view/mine_item.dart b/lib/mine/mine_view/mine_item.dart index c53bcb3b..cd64533f 100644 --- a/lib/mine/mine_view/mine_item.dart +++ b/lib/mine/mine_view/mine_item.dart @@ -182,7 +182,7 @@ class _MineItem extends State { }); }, child: mineItem( - S.of(context).dianpuyue, + "店铺充值", "assets/image/shop_yue.webp", ), ),), diff --git a/lib/mine/recharge_page.dart b/lib/mine/recharge_page.dart index 31b82e0e..abd7ef2f 100644 --- a/lib/mine/recharge_page.dart +++ b/lib/mine/recharge_page.dart @@ -150,386 +150,374 @@ class _RechargePage extends State { body: Container( color: Color(0xFFFFFFFF), child: SingleChildScrollView( + physics: BouncingScrollPhysics(), child: Container( - child: Stack( + child: Column( children: [ - Column( - children: [ - SingleChildScrollView( - physics: BouncingScrollPhysics(), - child: Container( - child: Column( + Container( + margin: EdgeInsets.only(left: 16, right: 16), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisAlignment: MainAxisAlignment.start, + children: [ + // ItemInputWidget( + // S.of(context).qingshuruchongzhijine, + // hintText: "", + // controller: controller, + // padding: EdgeInsets.all(20), + // errorText: S.of(context).chongzhizuixiaojine(100), + // titleColor: Color(0xFF727272), + // errorTextColor: Color(0xFF32A060), + // radius: 8, + // discount: discount / 10, + // style: TextStyle( + // fontWeight: FontWeight.bold, + // fontSize: 27.sp, + // color: color, + // ), + // inputLimit: 6, + // textInputType: TextInputType.number, + // textInputFormatter: + // FilteringTextInputFormatter.digitsOnly, + // onChanged: (value) { + // if (value != null && + // value != "" && + // double.tryParse(value) < 100) { + // color = Colors.red; + // } else { + // color = Colors.black; + // } + // setState(() {}); + // }, + // ), + SizedBox( + height: 20, + ), + Row( children: [ - Container( - margin: EdgeInsets.only(left: 16, right: 16), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - mainAxisAlignment: MainAxisAlignment.start, - children: [ - // ItemInputWidget( - // S.of(context).qingshuruchongzhijine, - // hintText: "", - // controller: controller, - // padding: EdgeInsets.all(20), - // errorText: S.of(context).chongzhizuixiaojine(100), - // titleColor: Color(0xFF727272), - // errorTextColor: Color(0xFF32A060), - // radius: 8, - // discount: discount / 10, - // style: TextStyle( - // fontWeight: FontWeight.bold, - // fontSize: 27.sp, - // color: color, - // ), - // inputLimit: 6, - // textInputType: TextInputType.number, - // textInputFormatter: - // FilteringTextInputFormatter.digitsOnly, - // onChanged: (value) { - // if (value != null && - // value != "" && - // double.tryParse(value) < 100) { - // color = Colors.red; - // } else { - // color = Colors.black; - // } - // setState(() {}); - // }, - // ), - SizedBox( - height: 20, - ), - Row( - children: [ - Expanded( - child: Text( - S.of(context).zhanghuyue, - style: TextStyle( - fontSize: 15.sp, - color: Color(0xFF181818), - fontFamily: 'JDZhengHT', - fontWeight: - MyFontWeight.semi_bold), - )), - Text.rich( - TextSpan(children: [ - TextSpan( - text: "$mBalance", - style: TextStyle( - fontSize: 26.sp, - fontFamily: 'JDZhengHT', - color: Color(0xFF181818), - fontWeight: - MyFontWeight.semi_bold), - ), - TextSpan( - text: "元", - style: TextStyle( - fontSize: 15.sp, - color: Color(0xFF181818), - fontWeight: - MyFontWeight.semi_bold), - ), - ]), - ), - ], - ), - SizedBox(height: 28), - rechargeList(), - // Row( - // crossAxisAlignment: CrossAxisAlignment.start, - // mainAxisAlignment: MainAxisAlignment.spaceAround, - // children: [ - // if (vipRuleDetails?.recharge != null && - // vipRuleDetails.recharge != "") - // Expanded( - // child: Container( - // color: Colors.white, - // child: Html( - // data: "注意:${vipRuleDetails?.recharge ?? ""}", - // customImageRenders: { - // networkSourceMatcher(): networkImageRender( - // loadingWidget: () { - // return Container(); - // }, - // ), - // }, - // ), - // ), - // ) - // ], - // ), - ], + Expanded( + child: Text( + S.of(context).zhanghuyue, + style: TextStyle( + fontSize: 15.sp, + color: Color(0xFF181818), + fontFamily: 'JDZhengHT', + fontWeight: + MyFontWeight.semi_bold), )), - Container( - width: double.infinity, - margin: EdgeInsets.only(left: 16, right: 16), - padding: EdgeInsets.only( - top: 20.h, - bottom: 24.h, - ), - // decoration: BoxDecoration( - // color: Colors.white, - // borderRadius: BorderRadius.circular(4), - // ), - child: Column( - mainAxisAlignment: - MainAxisAlignment.spaceAround, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Padding( - padding: EdgeInsets.only(bottom: 16.h), - child: Text( - S.of(context).zhifufangshi, - style: TextStyle( - fontSize: 16.sp, - color: Colors.black, - fontWeight: FontWeight.bold, - ), - ), - ), - GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () { - setState(() { - checkIndex = 2; - }); - }, - child: Row( - mainAxisAlignment: - MainAxisAlignment.start, - crossAxisAlignment: - CrossAxisAlignment.start, - children: [ - Image.asset( - "assets/image/icon_we_chat.webp"), - Expanded( - flex: 1, - child: Padding( - padding: EdgeInsets.only(left: 8.w), - child: Text( - S.of(context).weixinzhifu, - style: TextStyle( - fontSize: 14.sp, - color: Color(0xff353535), - ), - ), - ), - ), - checkView(2), - ], - ), - ), - SizedBox(height: 10.h), - GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () { - setState(() { - checkIndex = 3; - }); - }, - child: Row( - mainAxisAlignment: - MainAxisAlignment.start, - crossAxisAlignment: - CrossAxisAlignment.start, - children: [ - Image.asset( - "assets/image/icon_alipay.webp"), - Expanded( - flex: 1, - child: Padding( - padding: EdgeInsets.only(left: 8.w), - child: Text( - S.of(context).zhifubao, - style: TextStyle( - fontSize: 14.sp, - color: Color(0xff353535), - ), - ), - ), - ), - checkView(3), - ], - ), - ), - ], - ), + Text.rich( + TextSpan(children: [ + TextSpan( + text: "$mBalance", + style: TextStyle( + fontSize: 26.sp, + fontFamily: 'JDZhengHT', + color: Color(0xFF181818), + fontWeight: + MyFontWeight.semi_bold), + ), + TextSpan( + text: "元", + style: TextStyle( + fontSize: 15.sp, + color: Color(0xFF181818), + fontWeight: + MyFontWeight.semi_bold), + ), + ]), ), - 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), + ], + ), + SizedBox(height: 28), + rechargeList(), + // Row( + // crossAxisAlignment: CrossAxisAlignment.start, + // mainAxisAlignment: MainAxisAlignment.spaceAround, + // children: [ + // if (vipRuleDetails?.recharge != null && + // vipRuleDetails.recharge != "") + // Expanded( + // child: Container( + // color: Colors.white, + // child: Html( + // data: "注意:${vipRuleDetails?.recharge ?? ""}", + // customImageRenders: { + // networkSourceMatcher(): networkImageRender( + // loadingWidget: () { + // return Container(); + // }, + // ), + // }, + // ), + // ), + // ) + // ], + // ), + ], + )), + Container( + width: double.infinity, + margin: EdgeInsets.only(left: 16, right: 16), + padding: EdgeInsets.only( + top: 20.h, + bottom: 24.h, + ), + // decoration: BoxDecoration( + // color: Colors.white, + // borderRadius: BorderRadius.circular(4), + // ), + child: Column( + mainAxisAlignment: + MainAxisAlignment.spaceAround, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Padding( + padding: EdgeInsets.only(bottom: 16.h), + child: Text( + S.of(context).zhifufangshi, + style: TextStyle( + fontSize: 16.sp, + color: Colors.black, + fontWeight: FontWeight.bold, + ), + ), + ), + GestureDetector( + behavior: HitTestBehavior.opaque, + onTap: () { + setState(() { + checkIndex = 2; + }); + }, + child: Row( + mainAxisAlignment: + MainAxisAlignment.start, + crossAxisAlignment: + CrossAxisAlignment.start, + children: [ + Image.asset( + "assets/image/icon_we_chat.webp"), + Expanded( + flex: 1, + child: Padding( + padding: EdgeInsets.only(left: 8.w), + child: Text( + S.of(context).weixinzhifu, + style: TextStyle( + fontSize: 14.sp, + color: Color(0xff353535), ), - 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( - onTap: () { - recharge(); - }, - child: Container( - height: 56.h, - width: double.infinity, - alignment: Alignment.center, - decoration: BoxDecoration( - color: Color(0xFF32A060), - borderRadius: BorderRadius.circular(27), - ), - margin: EdgeInsets.only( - left: 16, right: 16, bottom: 21), - child: Text( - S.of(context).querenchongzhi, - style: TextStyle( - fontSize: 16.sp, - fontWeight: MyFontWeight.medium, - color: Colors.white, - ), + checkView(2), + ], + ), + ), + SizedBox(height: 10.h), + GestureDetector( + behavior: HitTestBehavior.opaque, + onTap: () { + setState(() { + checkIndex = 3; + }); + }, + child: Row( + mainAxisAlignment: + MainAxisAlignment.start, + crossAxisAlignment: + CrossAxisAlignment.start, + children: [ + Image.asset( + "assets/image/icon_alipay.webp"), + Expanded( + flex: 1, + child: Padding( + padding: EdgeInsets.only(left: 8.w), + child: Text( + S.of(context).zhifubao, + style: TextStyle( + fontSize: 14.sp, + color: Color(0xff353535), ), ), ), - - // Container( - // height: 56.h, - // color: Colors.white, - // child: Row( - // children: [ - // Expanded(child:Container( - // padding:EdgeInsets.only(top: 7.h,left:16), - // child:Column( - // crossAxisAlignment: CrossAxisAlignment.start, - // children: [ - // Row( - // children: [ - // Text( - // S.of(context).heji, - // style: TextStyle( - // fontSize: 14.sp, - // fontWeight: MyFontWeight.regular, - // color: Colors.black, - // ), - // ), - // Text( - // controller.text, - // style: TextStyle( - // fontSize: 16.sp, - // fontWeight: MyFontWeight.medium, - // color: Color(0xFF32A060), - // ), - // ), - // ], - // ), - // if(controller.text != "") - // Text.rich( - // TextSpan( - // children: [ - // TextSpan( - // text: "充值", - // style: TextStyle( - // fontSize:12.sp, - // fontWeight: MyFontWeight.regular, - // color: Color(0xFFADADAD), - // ), - // ), - // TextSpan( - // text:"¥${controller.text}", - // style: TextStyle( - // fontSize: 12.sp, - // fontWeight: MyFontWeight.regular, - // color:Color(0xff3541C9), - // ), - // ), - // TextSpan( - // text: "赠送", - // style: TextStyle( - // fontSize:12.sp, - // fontWeight: MyFontWeight.regular, - // color: Color(0xFFADADAD), - // ), - // ), - // TextSpan( - // text:"¥${((double.tryParse(controller.text)??0) - ((double.tryParse(controller.text)??0) * (discount/100))).toStringAsFixed(2)}", - // style: TextStyle( - // fontSize: 12.sp, - // fontWeight: MyFontWeight.regular, - // color: Color(0xff3541C9), - // ), - // ),TextSpan( - // text: "元", - // style: TextStyle( - // fontSize:12.sp, - // fontWeight: MyFontWeight.regular, - // color: Color(0xFFADADAD), - // ), - // ), - // ], - // ), - // ), - // ], - // )) - // ), - // GestureDetector( - // onTap: () { - // recharge(); - // }, - // child: RoundButton( - // width: 103.w, - // height: 54.h, - // text: S.of(context).chongzhi, - // textColor: Colors.white, - // fontWeight: MyFontWeight.regular, - // backgroup: Color(0xFF32A060), - // radius: 0, - // fontSize: 16.sp, - // padding: EdgeInsets.symmetric(vertical: 5.h), - // ), - // ), - // ], - // ), - // ) - ) + ), + checkView(3), ], ), ), - ) - ], + ], + ), ), + 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( + onTap: () { + recharge(); + }, + child: Container( + height: 56.h, + width: double.infinity, + alignment: Alignment.center, + decoration: BoxDecoration( + color: Color(0xFF32A060), + borderRadius: BorderRadius.circular(27), + ), + margin: EdgeInsets.only( + left: 16, right: 16, bottom: 21), + child: Text( + S.of(context).querenchongzhi, + style: TextStyle( + fontSize: 16.sp, + fontWeight: MyFontWeight.medium, + color: Colors.white, + ), + ), + ), + ), + + // Container( + // height: 56.h, + // color: Colors.white, + // child: Row( + // children: [ + // Expanded(child:Container( + // padding:EdgeInsets.only(top: 7.h,left:16), + // child:Column( + // crossAxisAlignment: CrossAxisAlignment.start, + // children: [ + // Row( + // children: [ + // Text( + // S.of(context).heji, + // style: TextStyle( + // fontSize: 14.sp, + // fontWeight: MyFontWeight.regular, + // color: Colors.black, + // ), + // ), + // Text( + // controller.text, + // style: TextStyle( + // fontSize: 16.sp, + // fontWeight: MyFontWeight.medium, + // color: Color(0xFF32A060), + // ), + // ), + // ], + // ), + // if(controller.text != "") + // Text.rich( + // TextSpan( + // children: [ + // TextSpan( + // text: "充值", + // style: TextStyle( + // fontSize:12.sp, + // fontWeight: MyFontWeight.regular, + // color: Color(0xFFADADAD), + // ), + // ), + // TextSpan( + // text:"¥${controller.text}", + // style: TextStyle( + // fontSize: 12.sp, + // fontWeight: MyFontWeight.regular, + // color:Color(0xff3541C9), + // ), + // ), + // TextSpan( + // text: "赠送", + // style: TextStyle( + // fontSize:12.sp, + // fontWeight: MyFontWeight.regular, + // color: Color(0xFFADADAD), + // ), + // ), + // TextSpan( + // text:"¥${((double.tryParse(controller.text)??0) - ((double.tryParse(controller.text)??0) * (discount/100))).toStringAsFixed(2)}", + // style: TextStyle( + // fontSize: 12.sp, + // fontWeight: MyFontWeight.regular, + // color: Color(0xff3541C9), + // ), + // ),TextSpan( + // text: "元", + // style: TextStyle( + // fontSize:12.sp, + // fontWeight: MyFontWeight.regular, + // color: Color(0xFFADADAD), + // ), + // ), + // ], + // ), + // ), + // ], + // )) + // ), + // GestureDetector( + // onTap: () { + // recharge(); + // }, + // child: RoundButton( + // width: 103.w, + // height: 54.h, + // text: S.of(context).chongzhi, + // textColor: Colors.white, + // fontWeight: MyFontWeight.regular, + // backgroup: Color(0xFF32A060), + // radius: 0, + // fontSize: 16.sp, + // padding: EdgeInsets.symmetric(vertical: 5.h), + // ), + // ), + // ], + // ), + // ) + ) ], ), ),