Browse Source

vip规则弹窗更改

dart3_last
wurong 2 years ago
parent
commit
698bb28c8b
  1. 306
      lib/vip/vip_view/exclusive_coupon.dart
  2. 131
      lib/vip/vip_view/vip_goods_discount.dart

306
lib/vip/vip_view/exclusive_coupon.dart

@ -19,7 +19,8 @@ class _ExclusiveCoupon extends State<ExclusiveCoupon> {
return Container( return Container(
margin: EdgeInsets.only(left: 14.w, right: 14.w, bottom: 40.h), margin: EdgeInsets.only(left: 14.w, right: 14.w, bottom: 40.h),
width: double.infinity, width: double.infinity,
padding: EdgeInsets.only(top: 20.h,left: 20.h,bottom: 10.h,right: 20.w), padding:
EdgeInsets.only(top: 20.h, left: 20.h, bottom: 10.h, right: 20.w),
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: BorderRadius.circular(6.w), borderRadius: BorderRadius.circular(6.w),
color: Colors.white, color: Colors.white,
@ -38,14 +39,18 @@ class _ExclusiveCoupon extends State<ExclusiveCoupon> {
children: [ children: [
Row( Row(
children: [ children: [
SizedBox(width: 7.w,), SizedBox(
width: 7.w,
),
Image.asset( Image.asset(
"assets/image/vip_title.webp", "assets/image/vip_title.webp",
fit: BoxFit.fill, // fit: BoxFit.fill, //
height:13.h, height: 13.h,
width: 27.w, width: 27.w,
), ),
SizedBox(width: 4.w,), SizedBox(
width: 4.w,
),
Text( Text(
S.of(context).zhuanxiangyouhuiquan, S.of(context).zhuanxiangyouhuiquan,
style: TextStyle( style: TextStyle(
@ -56,15 +61,16 @@ class _ExclusiveCoupon extends State<ExclusiveCoupon> {
), ),
GestureDetector( GestureDetector(
behavior: HitTestBehavior.translucent, behavior: HitTestBehavior.translucent,
onTap: (){ onTap: () {
showAlertDialog(); showAlertDialog();
}, },
child:Container( child: Container(
padding: EdgeInsets.only(left: 8.w,right:30.w,top: 3.h,bottom: 3.h), padding: EdgeInsets.only(
left: 8.w, right: 30.w, top: 3.h, bottom: 3.h),
child: Image.asset( child: Image.asset(
"assets/image/vip_tips.webp", "assets/image/vip_tips.webp",
fit: BoxFit.fill, // fit: BoxFit.fill, //
height:14, height: 14,
width: 14, width: 14,
), ),
), ),
@ -82,7 +88,7 @@ class _ExclusiveCoupon extends State<ExclusiveCoupon> {
Image.asset( Image.asset(
"assets/image/vip_shop_bj.webp", "assets/image/vip_shop_bj.webp",
fit: BoxFit.fill, // fit: BoxFit.fill, //
height:double.infinity, height: double.infinity,
width: double.infinity, width: double.infinity,
), ),
Container( Container(
@ -90,51 +96,55 @@ class _ExclusiveCoupon extends State<ExclusiveCoupon> {
mainAxisAlignment: MainAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center,
children: [ children: [
Expanded(child:Padding( Expanded(
padding:EdgeInsets.only(top:25.h,left: 19.w), child: Padding(
padding: EdgeInsets.only(top: 25.h, left: 19.w),
child: Column( child: Column(
mainAxisAlignment: MainAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Text( Text(
"海峡姐妹饮品券", "海峡姐妹饮品券",
style: TextStyle( style: TextStyle(
color: Color(0xff32A060), color: Color(0xff32A060),
fontSize: 15.sp, fontSize: 15.sp,
fontWeight: MyFontWeight.semi_bold, fontWeight: MyFontWeight.semi_bold,
),
), ),
), SizedBox(
SizedBox(height: 5.h,), height: 5.h,
Text.rich( ),
TextSpan( Text.rich(
children: [ TextSpan(
TextSpan( children: [
text: "6", TextSpan(
style: TextStyle( text: "6",
fontWeight: MyFontWeight.extra_bold, style: TextStyle(
fontSize: 36.sp, fontWeight: MyFontWeight.extra_bold,
fontFamily: 'JDZhengHT', fontSize: 36.sp,
color: Color(0xffFF7E12), fontFamily: 'JDZhengHT',
color: Color(0xffFF7E12),
),
), ),
), TextSpan(
TextSpan( text: "",
text: "", style: TextStyle(
style: TextStyle( fontSize: 24.sp,
fontSize: 24.sp, color: Color(0xffFF7E12),
color: Color(0xffFF7E12), fontWeight: MyFontWeight.semi_bold,
fontWeight: MyFontWeight.semi_bold, ),
), ),
), ],
], ),
textDirection: TextDirection.ltr,
), ),
textDirection: TextDirection.ltr, ],
), ),
], )),
),)),
Image.asset( Image.asset(
"assets/image/vip_shop_hx.webp", "assets/image/vip_shop_hx.webp",
fit: BoxFit.fill, // fit: BoxFit.fill, //
height:85, height: 85,
width: 85, width: 85,
), ),
], ],
@ -151,7 +161,7 @@ class _ExclusiveCoupon extends State<ExclusiveCoupon> {
Image.asset( Image.asset(
"assets/image/vip_shop_bj.webp", "assets/image/vip_shop_bj.webp",
fit: BoxFit.fill, // fit: BoxFit.fill, //
height:double.infinity, height: double.infinity,
width: double.infinity, width: double.infinity,
), ),
Container( Container(
@ -159,8 +169,9 @@ class _ExclusiveCoupon extends State<ExclusiveCoupon> {
mainAxisAlignment: MainAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center,
children: [ children: [
Expanded(child:Padding( Expanded(
padding:EdgeInsets.only(top:25.h,left: 19.w), child: Padding(
padding: EdgeInsets.only(top: 25.h, left: 19.w),
child: Column( child: Column(
mainAxisAlignment: MainAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
@ -173,7 +184,9 @@ class _ExclusiveCoupon extends State<ExclusiveCoupon> {
fontWeight: MyFontWeight.semi_bold, fontWeight: MyFontWeight.semi_bold,
), ),
), ),
SizedBox(height: 5.h,), SizedBox(
height: 5.h,
),
Text.rich( Text.rich(
TextSpan( TextSpan(
children: [ children: [
@ -199,11 +212,12 @@ class _ExclusiveCoupon extends State<ExclusiveCoupon> {
textDirection: TextDirection.ltr, textDirection: TextDirection.ltr,
), ),
], ],
),)), ),
)),
Image.asset( Image.asset(
"assets/image/vip_shop_qj.webp", "assets/image/vip_shop_qj.webp",
fit: BoxFit.fill, // fit: BoxFit.fill, //
height:85, height: 85,
width: 85, width: 85,
), ),
], ],
@ -220,7 +234,7 @@ class _ExclusiveCoupon extends State<ExclusiveCoupon> {
Image.asset( Image.asset(
"assets/image/vip_shop_bj.webp", "assets/image/vip_shop_bj.webp",
fit: BoxFit.fill, // fit: BoxFit.fill, //
height:double.infinity, height: double.infinity,
width: double.infinity, width: double.infinity,
), ),
Container( Container(
@ -228,8 +242,9 @@ class _ExclusiveCoupon extends State<ExclusiveCoupon> {
mainAxisAlignment: MainAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center,
children: [ children: [
Expanded(child:Padding( Expanded(
padding:EdgeInsets.only(top:25.h,left: 19.w), child: Padding(
padding: EdgeInsets.only(top: 25.h, left: 19.w),
child: Column( child: Column(
mainAxisAlignment: MainAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
@ -242,7 +257,9 @@ class _ExclusiveCoupon extends State<ExclusiveCoupon> {
fontWeight: MyFontWeight.semi_bold, fontWeight: MyFontWeight.semi_bold,
), ),
), ),
SizedBox(height: 5.h,), SizedBox(
height: 5.h,
),
Text.rich( Text.rich(
TextSpan( TextSpan(
children: [ children: [
@ -268,11 +285,12 @@ class _ExclusiveCoupon extends State<ExclusiveCoupon> {
textDirection: TextDirection.ltr, textDirection: TextDirection.ltr,
), ),
], ],
),)), ),
)),
Image.asset( Image.asset(
"assets/image/vip_shop_hg.webp", "assets/image/vip_shop_hg.webp",
fit: BoxFit.fill, // fit: BoxFit.fill, //
height:85, height: 85,
width: 85, width: 85,
), ),
], ],
@ -288,104 +306,88 @@ class _ExclusiveCoupon extends State<ExclusiveCoupon> {
/// ///
showAlertDialog() { showAlertDialog() {
// showModalBottomSheet(
showDialog( builder: (BuildContext context) {
context: context, return StatefulBuilder(builder: (
builder: (BuildContext context) { context,
return SimpleDialog( state,
backgroundColor: Colors.transparent, ) {
elevation: 0, return WillPopScope(
shape: RoundedRectangleBorder( ///
borderRadius: BorderRadius.circular(6), // onWillPop: () async => false,
), child:Stack(
children: <Widget>[ alignment: Alignment.topRight,
Container( children: [
width: double.infinity, Container(
height:470.h, width: double.infinity,
padding: EdgeInsets.only(left: 14.w,right: 14.w,bottom: 16.h), height: 370.h,
decoration: new BoxDecoration( padding: EdgeInsets.symmetric(horizontal: 14.w, vertical: 16.h),
color: Colors.white, decoration: new BoxDecoration(
borderRadius: BorderRadius.circular(8), color: Colors.white,
), borderRadius: BorderRadius.only(
child: Scaffold( topLeft: Radius.circular(8),
appBar: MyAppBar( topRight: Radius.circular(8),
title:"", ),
titleColor: Colors.black, ),
titleSize: 10.sp, child: SingleChildScrollView(
background: Colors.white, physics: BouncingScrollPhysics(),
leadingColor: Colors.white, child: Container(
actions: [ padding: EdgeInsets.only(right: 18.w),
child:
Column(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
SizedBox(
height: 10.h,
),
Text(
"VIP会员专享优惠券:"
"\n ①海峡姐妹饮品券"
"\n *用户开通回乡VIP卡,可享全单饮品6折优惠。"
"\n *适用饮品:门店现制奶茶类饮品及现制咖啡类饮品。"
"\n *适用门店:海峡姐妹茶汉街店、前进麦味*海峡姐妹茶哈乐城店"
"\n ②前进麦味烘焙券"
"\n *用户开通回乡VIP卡,可享全单面包7折优惠。"
"\n *适用产品:门店现制面包类产品及甜品类产品。"
"\n *适用门店:前进麦味凯德1818店、前进麦味*海峡姐妹茶哈乐城店"
"\n ③回乡农场火锅券"
"\n *用户开通回乡VIP卡,可享全单菜品(小料、酒水、饮品不参与)8折优惠。"
"\n *适用产品:门店现制菜品"
"\n *适用门店:回乡农场火锅汉街店"
"\n ④百年川椒火锅券"
"\n *用户开通回乡VIP卡,可享全单菜品(小料、酒水、饮品不参与)8折优惠。"
"\n *适用产品:门店现制菜品"
"\n *适用门店:百年川椒重庆老火锅光谷店",
style: TextStyle(
fontWeight: MyFontWeight.medium,
fontSize: 14.sp,
height: 1.7.h,
color: Colors.black,
),
),
],
),
),
),
),
GestureDetector( GestureDetector(
onTap: () { onTap: () {
Navigator.of(context).pop(); Navigator.of(context).pop();
}, },
child: Icon( child: Container(
Icons.clear, margin: EdgeInsets.only(right: 14.w,top: 16.h),
color: Colors.black, child: Image.asset(
), "assets/image/cancel.webp",
) width: 24,
], height: 24,
), ),
body: Container(
color: Colors.white,
child: SingleChildScrollView(
physics: BouncingScrollPhysics(),
child: Container(
child:Column(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
// Row(
// children: [
// Spacer(),
// GestureDetector(
// onTap: () {
// Navigator.of(context).pop();
// },
// child: Icon(
// Icons.clear,
// color: Colors.black,
// ),
// )
// ],
// ),
SizedBox(height: 10.h,),
Text(
"VIP会员专享优惠券:"
"\n ①海峡姐妹饮品券"
"\n *用户开通回乡VIP卡,可享全单饮品6折优惠。"
"\n *适用饮品:门店现制奶茶类饮品及现制咖啡类饮品。"
"\n *适用门店:海峡姐妹茶汉街店、前进麦味*海峡姐妹茶哈乐城店"
"\n ②前进麦味烘焙券"
"\n *用户开通回乡VIP卡,可享全单面包7折优惠。"
"\n *适用产品:门店现制面包类产品及甜品类产品。"
"\n *适用门店:前进麦味凯德1818店、前进麦味*海峡姐妹茶哈乐城店"
"\n ③回乡农场火锅券"
"\n *用户开通回乡VIP卡,可享全单菜品(小料、酒水、饮品不参与)8折优惠。"
"\n *适用产品:门店现制菜品"
"\n *适用门店:回乡农场火锅汉街店"
"\n ④百年川椒火锅券"
"\n *用户开通回乡VIP卡,可享全单菜品(小料、酒水、饮品不参与)8折优惠。"
"\n *适用产品:门店现制菜品"
"\n *适用门店:百年川椒重庆老火锅光谷店",
style: TextStyle(
fontWeight: MyFontWeight.medium,
fontSize: 14.sp,
height: 1.7.h,
color: Colors.black,
),
),
SizedBox(height: 15.h,)
],
), ),
), )],
), ));
), });
), },
), backgroundColor: Colors.transparent,
], context: context);
);
},
);
} }
} }

131
lib/vip/vip_view/vip_goods_discount.dart

@ -8,7 +8,6 @@ import '../../retrofit/data/vip_card_home.dart';
import '../../utils/flutter_utils.dart'; import '../../utils/flutter_utils.dart';
import '../../view_widget/custom_image.dart'; import '../../view_widget/custom_image.dart';
class VipGoodsDiscount extends StatefulWidget { class VipGoodsDiscount extends StatefulWidget {
final VipCardHome vipCardHome; final VipCardHome vipCardHome;
@ -194,7 +193,7 @@ class _VipGoodsDiscount extends State<VipGoodsDiscount> {
Widget vipGoodsRecommendItem(ProductVips productVips) { Widget vipGoodsRecommendItem(ProductVips productVips) {
return Container( return Container(
width: 116.w, width: 116.w,
margin: EdgeInsets.only(right:4.w,left:3.w), margin: EdgeInsets.only(right: 4.w, left: 3.w),
child: Column( child: Column(
mainAxisAlignment: MainAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
@ -215,8 +214,7 @@ class _VipGoodsDiscount extends State<VipGoodsDiscount> {
Container( Container(
// width:53.w, // width:53.w,
// alignment: Alignment.center, // alignment: Alignment.center,
padding: padding: EdgeInsets.symmetric(vertical: 2.h, horizontal: 8.w),
EdgeInsets.symmetric(vertical: 2.h, horizontal:8.w),
margin: EdgeInsets.only(left: 5.w), margin: EdgeInsets.only(left: 5.w),
decoration: BoxDecoration( decoration: BoxDecoration(
color: Color(0xffF96519), color: Color(0xffF96519),
@ -264,7 +262,9 @@ class _VipGoodsDiscount extends State<VipGoodsDiscount> {
fontWeight: MyFontWeight.medium, fontWeight: MyFontWeight.medium,
), ),
), ),
SizedBox(width: 4.w,), SizedBox(
width: 4.w,
),
Text( Text(
"${AppUtils.calculateDouble(double.tryParse(productVips.applyPrice ?? "0.00"))}", "${AppUtils.calculateDouble(double.tryParse(productVips.applyPrice ?? "0.00"))}",
textAlign: TextAlign.end, textAlign: TextAlign.end,
@ -285,69 +285,76 @@ class _VipGoodsDiscount extends State<VipGoodsDiscount> {
/// ///
showAlertDialog() { showAlertDialog() {
// showModalBottomSheet(
showDialog( builder: (BuildContext context) {
context: context, return StatefulBuilder(builder: (
builder: (BuildContext context) { context,
return SimpleDialog( state,
backgroundColor: Colors.transparent, ) {
elevation: 0, return WillPopScope(
shape: RoundedRectangleBorder( ///
borderRadius: BorderRadius.circular(6), // onWillPop: () async => false,
), child: Stack(
children: <Widget>[ alignment: Alignment.topRight,
Container( children: [
width: double.infinity, Container(
height: 470.h, width: double.infinity,
padding: EdgeInsets.symmetric(horizontal: 14.w, vertical: 16.h), height: 370.h,
decoration: new BoxDecoration( padding:
color: Colors.white, EdgeInsets.symmetric(horizontal: 14.w, vertical: 16.h),
borderRadius: BorderRadius.circular(8), decoration: new BoxDecoration(
), color: Colors.white,
child: SingleChildScrollView( borderRadius: BorderRadius.only(
physics: BouncingScrollPhysics(), topLeft: Radius.circular(8),
child: Container( topRight: Radius.circular(8),
child: Column( ),
mainAxisAlignment: MainAxisAlignment.start, ),
crossAxisAlignment: CrossAxisAlignment.start, child: SingleChildScrollView(
children: [ physics: BouncingScrollPhysics(),
Row( child: Container(
padding: EdgeInsets.only(right: 18.w),
child: Column(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Spacer(), SizedBox(
GestureDetector( height: 10.h,
onTap: () { ),
Navigator.of(context).pop(); Text(
}, "VIP会员专享价格"
child: Icon( "\n*用户开通回乡VIP卡,可享以专享优惠价格购买一心回乡APP入驻商户部分门店商品的会员权益。"
Icons.clear, "\n*权益适用产品及专享价格,以会员权益页面公示为准。"
"\n为满足不同用户的需求,一心回乡将可能适时调整权益适用产品及专享价格,具体权益内容以会员权益页面公示为准。",
style: TextStyle(
fontWeight: MyFontWeight.medium,
fontSize: 14.sp,
height: 1.7.h,
color: Colors.black, color: Colors.black,
), ),
) ),
], ],
), ),
SizedBox( ),
height: 10.h,
),
Text(
"VIP会员专享价格"
"\n*用户开通回乡VIP卡,可享以专享优惠价格购买一心回乡APP入驻商户部分门店商品的会员权益。"
"\n*权益适用产品及专享价格,以会员权益页面公示为准。"
"\n为满足不同用户的需求,一心回乡将可能适时调整权益适用产品及专享价格,具体权益内容以会员权益页面公示为准。",
style: TextStyle(
fontWeight: MyFontWeight.medium,
fontSize: 14.sp,
height: 1.7.h,
color: Colors.black,
),
),
],
), ),
), ),
), GestureDetector(
), onTap: () {
], Navigator.of(context).pop();
); },
}, child: Container(
); margin: EdgeInsets.only(right: 14.w, top: 16.h),
child: Image.asset(
"assets/image/cancel.webp",
width: 24,
height: 24,
),
),
)
],
));
});
},
backgroundColor: Colors.transparent,
context: context);
} }
} }

Loading…
Cancel
Save