Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
B
book-app
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
book-app
Commits
c507b566
提交
c507b566
authored
2月 20, 2024
作者:
yueweilu
浏览文件
操作
浏览文件
下载
差异文件
Merge remote-tracking branch 'origin/test' into test
上级
68d91d12
d5482b2c
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
153 行增加
和
17 行删除
+153
-17
view.dart
lib/pages/user_coupon/view.dart
+2
-1
item.dart
lib/pages/user_coupon/widgets/item.dart
+151
-16
没有找到文件。
lib/pages/user_coupon/view.dart
浏览文件 @
c507b566
...
...
@@ -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
(
'过期优惠券'
),
),
);
...
...
lib/pages/user_coupon/widgets/item.dart
浏览文件 @
c507b566
...
...
@@ -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:
1
5
.
w
,
right:
15
.
w
),
margin:
EdgeInsets
.
only
(
left:
1
1
.
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
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论