From 7c660a2270b1365bad9672fcb72009a78a9ebfa8 Mon Sep 17 00:00:00 2001 From: wurong <953969641@qq.com> Date: Sat, 19 Nov 2022 16:18:27 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=94=B9ios=E7=BB=93=E7=AE=97?= =?UTF-8?q?=E6=94=AF=E4=BB=98vip=E4=BB=B7=E6=A0=BC=E6=A0=B7=E5=BC=8F?= =?UTF-8?q?=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- assets/image/2x/vip_price.webp | Bin 0 -> 1076 bytes assets/image/2x/vip_unprice.webp | Bin 0 -> 1080 bytes assets/image/3x/vip_price.webp | Bin 0 -> 1444 bytes assets/image/3x/vip_unprice.webp | Bin 0 -> 1416 bytes assets/image/vip_price.webp | Bin 0 -> 796 bytes assets/image/vip_unprice.webp | Bin 0 -> 788 bytes .../activity_coupon_remarks.dart | 191 ++++++++++-------- 7 files changed, 107 insertions(+), 84 deletions(-) create mode 100644 assets/image/2x/vip_price.webp create mode 100644 assets/image/2x/vip_unprice.webp create mode 100644 assets/image/3x/vip_price.webp create mode 100644 assets/image/3x/vip_unprice.webp create mode 100644 assets/image/vip_price.webp create mode 100644 assets/image/vip_unprice.webp diff --git a/assets/image/2x/vip_price.webp b/assets/image/2x/vip_price.webp new file mode 100644 index 0000000000000000000000000000000000000000..d2a158fcd5bdec512ba0b025ffaaf89bc680821c GIT binary patch literal 1076 zcmWIYbaT^TVPFV%bqWXzu!!JdU|=u+Vs8cpbp{4cXXgM3CLouANdiQ&0Ht#CN{WKq zofIM>qZB}5Fp!vBTmWNZp&1z%zFlJgk_-%&b+O1365>orElvh1`T)cwML^3L7#LH4 zY>{*by8^^cg0Oo)?4pn$XP}w|K(U&O#*@s)vrc>+Q#X(j{1_ErW4iCYLU zl?4n8{4ER&+s+px7A1lm1B^)qrnEE$hEK~G7A_ZFARq_i(L%{dow+-lQWweJjRy64$ASR;Dkm-sb0-uCF* zeDCh=_kS7xuq#O4b6W4Tde!0OA-eYCkNFv?DX-jdN^yT)PWt#EKMCWpZ;+?=l$we(fnl{A@kxngE*U7dS!*w zBJ`q{K1)hg7qJ$wi@jMg@wWR*xsCg7oY-`-iEWl6lYsI~v)r?r-{!B$uYNlJ=J&n7 z-!druI)5PdwnYzT1HU(P=J=!S5h_qR=mS}f~1NyYP))$N|x zl^yxp`0DZF|H@YWc^dRfd)xK0%sO9P!;jl{?`EuB-pYpl#mj6udJin6h zj`vg3pJ_4=r+-!wsfdWWVA=P;vFifIGr@m5w9eVTZ}EC;(3Gy}ws)U$MNg6i_d~O; zqgpMmHO#6NV_XUggbqcDEZ=#;bVByD80}MEd!AI474HoW+WWd_Z*y?1bW!c*pjz+X c+Q-GE{ULKTLc>pAQ4B7qZB}5Fp!vBTmWNZp&1z%zFlJgk_-%&b+O1365>orElvh1`T)cwML^3L7#LH4 zY>{*by8^^cg0Oo)?4pn$XP}w|K(U&O#*@s)vrc>+Q#X(j{1_ErW4iCYLU zl?4n8{4ER&+s+px7A1lm1B^)qrnEE$hEK~G7!o`c0(P$xX0Ui(Da82G&h$A?+lEUnpQcv?66j15_EJ?Q0m}F@SK!;YgP8=o3GLrKeylZdiV9% z_x6ka_uSdmtFmK;iter8X+J?ZVd}jP51xE__wLh^gd3}2;R>Rq*IavXWn1p;ZT{|S z??#?Ixixpa`8xHpvTF~v=H{E}vF+ZlD){!ja~1oit9VX=puF?_-+uM>uCB|-Uw@w6 zQ_Hey>;0Pv=ffwarL8P9Ubi+mb$ddvmRaBJ?7Yq1UxgNIes^lM_|rc&ZW%Y{+%TTn zu4IVs!d73yZ`v_~uIm&0|0{I$3w-li z^n>f+i=vqgCY%rd=ymNk6`8s(=1EbJ?8(x=buuTX?p~SYwJvJiF_mwnk@NW~OaDA!&3q=XZblyO96DZ~y=$em9H& literal 0 HcmV?d00001 diff --git a/assets/image/3x/vip_price.webp b/assets/image/3x/vip_price.webp new file mode 100644 index 0000000000000000000000000000000000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qug{@(1Lp8q!po6qafj@ff!qVThmo-Rsd zN_w3Yi#w*NFDmVQ;iyz~vSXsdkqq?&7jeTZUWu9RXY82LA_O;|XqZ`aB+Fq>m-~@b nen(D)?s*k+fGg#QR`w1rpm^mT;l_&Pa{rqr&uv&9&cFZwebWB> literal 0 HcmV?d00001 diff --git a/assets/image/3x/vip_unprice.webp b/assets/image/3x/vip_unprice.webp new file mode 100644 index 0000000000000000000000000000000000000000..a752fd3f57a2854cea9bcc67f53bfc529673d81b GIT binary patch literal 1416 zcmWIYbaQK9Wnc(*bqWXzu!!JdU|=u+;z9-nYX$~SXXgM3CLouANdiQ&0Ht#CN{WKq zofIM>qZB}5Fp!vBTmWNZp&1z%zFlJgk_-%&b+O1365>orElvh1`T)cwML^3L7#LH4 zY>{*by8^^cg0Oo)?4pn$XP}w|K(U&O#*@s)vrc>+Q#X(j{1_ErW4iCYLU zl?4n8{4ER&+s+px7A1lm!vZ9k($W|hJ}qZp;EiNp5Wc{`z!eR1C_*nHE^zo&0jNg? z=+As0OlQbpNM%r9@MOqiNM_IjvW$R<#E`)Zm|}dKm>C%K3lH!K+<&AoDL35m`JN>Y zX8-toqQ5%iq0T=I2J`;x!+|Qd*A<P{t0Brle>;fJW<-SOJ=o{ zO%)HrjG6t%4{y@Z?K+ei`R8w4+;!3KzxVF>zB4y^M&z~9xsxtc-#`ESvVc=a=+nx1 z^KZWmvwY5_IHP!7?ro<_H%ssCx&QvZMW1ic^-|O4Hs>sNtvj82JMOT-9{c&{P5T!A z|NmcEbN~JIY1dTV{;p%}nK}3NHrv|!>J3Z}cCBMn__gnRX{_mHrI`#Y0=4%)|E-&@ zQhR^*y4AJ!nGcl4vMPA0C~{7k(4um$+QUicy{(~}hf?Php>vjViYFYgY*+Dkw6|Ra zB=5m=b5hFeZK21v<=%FiU%f83=l}l+YqwsTm)!qb=3>2DpUPIr-lJ>>mh&Fq2S?Sc z-M`$^!^`>B%gL?dD-TO||Gj$_BP-_yY0`|s@TpNe{)Usp3NVZOq+OB+j#S%LswsUcrQ+T_TbxyFc$eyY%G2cUFh8Gya8dz z@yjpg{FrZO?5$l>Q6!-E+-j3S(FD2u_fIsY7e{KAZkGNss$_~kMAA`I~58N;R z^x&mSaOu=rW}hE?pL9EU^V)e@KB<4SKeoL;-F(>p`D(8E$`Towpa9j^y>lxb`k#Dz zXlmFj@zb8iJ^wywUYxk=+L=8+wpKlU@-$`P&iecO`{RD{NZ(!j^lIL#+fqx`U2fi- zR`*9k-fvyn0p-J1iJ8ZR?dNQ$oWa_D=xNK|o>vcpT;~+TX-$}S#_>>^nUa#0;BuEc z8cEMOXT&OpP3QUftaJ%!yMbF!XqZB}5Fp!vBTmWNZp&1z%zFlJgk_-%&b+O1365>orElvh1`T)cwML^3L7#LH4 zY>{*by8^^cg0Oo)?4pn$XP}w|K(U&O#*@s)vrc>+Q#X(j{1_ErW4iCYLU zl?4n8{4ER&+s+px7A1lm!vZ9k($W|hJ}qZp;Ee=E;spiq4zbSKAgXs9ngCJV8leqG;;OKoQTN;)nD3C3jdwvS@lZ2TE&R(77&elfaPw zgP)1v{n5463_kyUq;F@~fA8+@-M{CXYB}vPwiHaWVk-!_y>0d!l@Lvh1jR;0z7GdD zq|ekvdN_KmU!1M9GxDs1%YV@wxr+bwcm_-Iu|;YGbGKvjG5# C4W>i@ literal 0 HcmV?d00001 diff --git a/assets/image/vip_unprice.webp b/assets/image/vip_unprice.webp new file mode 100644 index 0000000000000000000000000000000000000000..27ac29134a59b47bf35f32def3ec81ba9de5a4c9 GIT binary patch literal 788 zcmWIYbaUfjW?%?+bqWXzu!!JdU|=u+VpRqPVFm_IXXgM3CLouANdiQ&0Ht#CN{WKq zofIM>qZB}5Fp!vBTmWNZp&1z%zFlJgk_-%&b+O1365>orElvh1`T)cwML^3L7#LH4 zY>{*by8^^cg0Oo)?4pn$XP}w|K(U&O#*@s)vrc>+Q#X(j{1_ErW4iCYLU zl?4n8{4ER&+s+px7A1lm!vZ9k($W|hJ}qZp;Ee=E;spi_jk9lUoBJZfqC=J|BXeUTUxlL+}qo7IrdDCiMrh26P1;2 ua%XO)>Yh0_J?qb1U8!>Y+E*7d-kV!4EK|SrX~OJz)u)%|{Mn@|&jSExZKu`% literal 0 HcmV?d00001 diff --git a/lib/settlement/settlement_view/activity_coupon_remarks.dart b/lib/settlement/settlement_view/activity_coupon_remarks.dart index ebcc690a..9fbe2070 100644 --- a/lib/settlement/settlement_view/activity_coupon_remarks.dart +++ b/lib/settlement/settlement_view/activity_coupon_remarks.dart @@ -1,3 +1,5 @@ +import 'dart:io'; + import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:flutter_smart_dialog/flutter_smart_dialog.dart'; @@ -24,20 +26,19 @@ class ActivityCouponRemarks extends StatefulWidget { final Function showVipTips; ActivityCouponRemarks( - this.couponCart, - this.activityCart, - this.settleOrderInfo, - this.minOrderInfo, - this.coupons, - this.promotions, - this.couponCount, - this.placeOrder, - this.remark, - this.editRemark, - this.tableId, - this.vipPriceSelect, - this.showVipTips - ); + this.couponCart, + this.activityCart, + this.settleOrderInfo, + this.minOrderInfo, + this.coupons, + this.promotions, + this.couponCount, + this.placeOrder, + this.remark, + this.editRemark, + this.tableId, + this.vipPriceSelect, + this.showVipTips); @override State createState() { @@ -64,12 +65,7 @@ class _ActivityCouponRemarks extends State { borderRadius: BorderRadius.circular(8), ), // height: 122.h / (!widget.placeOrder ? 2 : 1), - margin: EdgeInsets.only( - left: 16, - right: 16, - top: 15, - bottom: 14 - ), + margin: EdgeInsets.only(left: 16, right: 16, top: 15, bottom: 14), padding: EdgeInsets.only( left: 16, right: 16, @@ -81,70 +77,98 @@ class _ActivityCouponRemarks extends State { crossAxisAlignment: CrossAxisAlignment.center, children: [ // if(widget?.settleOrderInfo?.memberVO?.isVip ?? false) - Row( - mainAxisAlignment: MainAxisAlignment.center, - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - Expanded( - flex: 1, - child: Text( - "VIP价格", - style: TextStyle( - fontWeight: MyFontWeight.regular, - fontSize: 14.sp, - color: Color(0xFF353535), - ), + Row( + mainAxisAlignment: MainAxisAlignment.center, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Expanded( + flex: 1, + child: Text( + "VIP价格", + style: TextStyle( + fontWeight: MyFontWeight.regular, + fontSize: 14.sp, + color: Color(0xFF353535), ), ), - Switch.adaptive( - value: (widget.coupons != null && widget.coupons != ""||widget.promotions != null && widget.promotions != "") ? false:vipSelect, - materialTapTargetSize: MaterialTapTargetSize.shrinkWrap, - activeColor: Color(0xff32A060), - onChanged: (bool value) { - setState(() { - if((widget?.settleOrderInfo?.memberVO?.isVip ?? false)){ - vipSelect = !vipSelect; - widget.vipPriceSelect(vipSelect); - }else{ - widget.showVipTips(); - return; - } - }); - }, + ), + Platform.isAndroid ? + Switch.adaptive( + value: (widget.coupons != null && widget.coupons != ""||widget.promotions != null && widget.promotions != "") ? false:vipSelect, + materialTapTargetSize: MaterialTapTargetSize.shrinkWrap, + activeColor: Color(0xff32A060), + onChanged: (bool value) { + setState(() { + if((widget?.settleOrderInfo?.memberVO?.isVip ?? false)){ + vipSelect = !vipSelect; + widget.vipPriceSelect(vipSelect); + }else{ + widget.showVipTips(); + return; + } + }); + }, + ): + GestureDetector( + onTap: () { + setState(() { + // (widget.coupons != null && widget.coupons != ""||widget.promotions != null && widget.promotions != "") ? false:vipSelect, + if ((widget?.settleOrderInfo?.memberVO?.isVip ?? false)) { + vipSelect = !vipSelect; + widget.vipPriceSelect(vipSelect); + } else { + widget.showVipTips(); + return; + } + }); + }, + child: Container( + padding: EdgeInsets.only(bottom: 18.w), + alignment: Alignment.center, + child: Image.asset( + vipSelect + ? "assets/image/vip_price.webp" + : "assets/image/vip_unprice.webp", + width: 38.w, + height: 20.h, + ), ), - ], - ), - if (widget.placeOrder && widget?.settleOrderInfo?.benefitDiscountAmount != null && widget?.settleOrderInfo?.benefitDiscountAmount != "0") - Container( - margin:EdgeInsets.only(bottom: 13), - child:Row( - mainAxisAlignment: MainAxisAlignment.center, - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - Expanded( - flex: 1, - child: Text( - "会员优惠金额", + ) + ], + ), + if (widget.placeOrder && + widget?.settleOrderInfo?.benefitDiscountAmount != null && + widget?.settleOrderInfo?.benefitDiscountAmount != "0") + Container( + margin: EdgeInsets.only(bottom: 13), + child: Row( + mainAxisAlignment: MainAxisAlignment.center, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Expanded( + flex: 1, + child: Text( + "会员优惠金额", + style: TextStyle( + fontWeight: MyFontWeight.regular, + fontSize: 14.sp, + color: Color(0xFF353535), + ), + ), + ), + Text( + widget.settleOrderInfo.benefitDiscountAmount, + textAlign: TextAlign.end, style: TextStyle( - fontWeight: MyFontWeight.regular, fontSize: 14.sp, - color: Color(0xFF353535), + color: Color(0xFF32A060), + fontWeight: MyFontWeight.semi_bold, ), ), - ), - Text( - widget.settleOrderInfo.benefitDiscountAmount, - textAlign: TextAlign.end, - style: TextStyle( - fontSize: 14.sp, - color: Color(0xFF32A060), - fontWeight: MyFontWeight.semi_bold, - ), - ), - ], + ], + ), ), - ), - if (widget.placeOrder && widget.tableId <=0) + if (widget.placeOrder && widget.tableId <= 0) InkWell( onTap: () { widget.activityCart(); @@ -245,7 +269,7 @@ class _ActivityCouponRemarks extends State { ), Expanded( child: Text( - widget.remark != "" ? widget.remark:"点击添加备注", + widget.remark != "" ? widget.remark : "点击添加备注", textAlign: TextAlign.end, style: TextStyle( fontSize: 14.sp, @@ -286,13 +310,12 @@ class _ActivityCouponRemarks extends State { String coupon = ""; if (widget.coupons == null || widget.coupons == "") { coupon = "未选择任何优惠券"; - if(widget.placeOrder) - if(widget.minOrderInfo == null || - widget.minOrderInfo.orderInfoVo.couponList == null) - {coupon = "未选择任何优惠券";} - else if(widget.promotions != null && widget.promotions != ""){ - coupon = "优惠券与活动不可同享"; - } + if (widget.placeOrder) if (widget.minOrderInfo == null || + widget.minOrderInfo.orderInfoVo.couponList == null) { + coupon = "未选择任何优惠券"; + } else if (widget.promotions != null && widget.promotions != "") { + coupon = "优惠券与活动不可同享"; + } if (widget.settleOrderInfo == null || widget.settleOrderInfo.couponList == null) { coupon = "暂无可选优惠券";