提交 c507b566 authored 作者: yueweilu's avatar yueweilu

Merge remote-tracking branch 'origin/test' into test

......@@ -35,8 +35,9 @@ class _UserCouponPageState extends State<UserCouponPage> {
controller.getOverCoupons();
},
child: Container(
alignment: Alignment.center,
height: 40.w,
color: Colors.cyan,
// color: Colors.cyan,
child: Text('过期优惠券'),
),
);
......
......@@ -33,6 +33,7 @@ class BuildItem extends StatelessWidget {
child: Column(
children: [
RichText(
overflow: TextOverflow.ellipsis, // 设置省略号
text: TextSpan(
children: <TextSpan>[
TextSpan(
......@@ -40,7 +41,7 @@ class BuildItem extends StatelessWidget {
style: TextStyle(fontSize: 15.w,fontWeight: Fonts.boldSemi,height: 1.5,color: Colors.white)
),
TextSpan(
text: '5',
text: model.reducedPrice.toString(),
style: TextStyle(fontSize: 40.w,fontWeight: Fonts.boldSemi,height: 1.5,color: Colors.white)
),
]
......@@ -53,7 +54,7 @@ class BuildItem extends StatelessWidget {
),
Expanded(
child: Container(
margin: EdgeInsets.only(left:15.w,right: 15.w ),
margin: EdgeInsets.only(left:11.w,right: 10.w ),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
......@@ -74,30 +75,164 @@ class BuildItem extends StatelessWidget {
],
),
),
Column(
crossAxisAlignment: CrossAxisAlignment.end,
mainAxisAlignment: MainAxisAlignment.center,
Stack(
children: [
//TODO 暂时隐藏 立即使用 按钮
/* Positioned(
top: 40,
right: 0, // 右对齐的关键
child: Align(
alignment: Alignment.centerRight,
child: GestureDetector(
onTap: () {
Console.log("点击了优惠券使用");
},
child: Container(
width: 65.w,
height: 24.w,
alignment: Alignment.center,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(15.w),
color: Colors.white,
border: Border.all(width: 1.w,color: AppTheme.primary)
),
child: Text('立即使用',style: TextStyle(fontSize: 12.w,fontWeight: Fonts.medium,color: AppTheme.primary),),
),
),
),),*/
Align(
alignment: Alignment.bottomCenter,
child: Container(
width: 65.w,
height: 24.w,
alignment: Alignment.center,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(15.w),
color: Colors.white,
border: Border.all(width: 1.w,color: AppTheme.primary)
alignment: Alignment.bottomRight,
child: GestureDetector(
onTap: () {
Console.log("点击了优惠券使用规则");
showDialog(
context: context,
builder: (BuildContext context) {
return AlertDialog(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(8.0.w),
),
contentPadding: EdgeInsets.zero, // 移除内容部分的内边距
content: Wrap(children: [
Stack(
children: [
Stack(
children: [
Positioned(
right: 10.w,
top: 10.w,
child: GestureDetector(
onTap: (){
Navigator.of(context).pop();
},
child: SizedBox(
width: 20.w,
height: 20.w,
child: Image.asset('assets/images/close.png'),
),
),
),
Container(
padding: EdgeInsets.only(top: 29.5.w),
alignment: Alignment.topCenter,
child: Column(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Text(
'优惠券使用细则',
style: TextStyle(
fontSize: 15.w,
fontWeight: Fonts.medium,
color: Colours.c3,
),
),
SizedBox(height: 14.w,),
Container(
padding: EdgeInsets.only(left: 25.5.w,right: 18.w),
child: Text('1.在系统开启情况下购买书籍可使用优惠券,金额需满足优惠券的限制金额。 \n\n 2.每笔订单最多使用一张优惠券,不可叠加使用。',
style: TextStyle(
fontSize: 11.w,
color: Colours.c9,
),
),
),
SizedBox(height: 26.5.w,),
],
),
),
],
),
],
),
],),
// 去除操作按钮区域的内边距
actionsPadding: EdgeInsets.zero,
/* actions: <Widget>[
Row(
mainAxisAlignment: MainAxisAlignment.spaceEvenly, // 或者使用MainAxisAlignment.spaceEvenly
children: [
GestureDetector(
onTap: () => Navigator.of(context).pop(),
child: const Text(
'取消',
style: TextStyle(
fontSize: 12,
fontWeight: Fonts.medium,
color: Colours.c6,
),
),
),
Container(
height: 39.5.w, // 设置分割线的高度
width: 1, // 设置分割线的宽度
color: Colours.cLine, // 设置分割线的颜色
),
GestureDetector(
onTap: () {
controller.cancelPay();
Navigator.of(context).pop();
Navigator.pop(context);
},
child: const Text(
'确定',
style: TextStyle(
fontSize: 12,
fontWeight: Fonts.medium,
color: Colours.cAB1941,
),
),
),
],
),
],*/
);
},
);
},
child: Container(
padding: EdgeInsets.only(bottom: 14.w),
child: Text('优惠券使用规则>',style: TextStyle(fontSize: 10.w,fontWeight: Fonts.medium,color: AppTheme.primary),),
),
child: Text('立即使用',style: TextStyle(fontSize: 12.w,fontWeight: Fonts.medium,color: AppTheme.primary),),
),
),
],
),
/* Column(
crossAxisAlignment: CrossAxisAlignment.end,
mainAxisAlignment: MainAxisAlignment.center,
children: [
Gaps.vGaps10,
Text('优惠券使用规则',style: TextStyle(fontSize: 10.w,height: 1.5,color: Colours.cAB1941),
maxLines: 1,overflow: TextOverflow.ellipsis,),
],
),
),*/
],
),
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论