Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
B
book-app
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
book-app
Commits
47cdef08
提交
47cdef08
authored
1月 21, 2024
作者:
yueweilu
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
积分界面布局修正
上级
93fc8b4a
显示空白字符变更
内嵌
并排
正在显示
8 个修改的文件
包含
67 行增加
和
62 行删除
+67
-62
point_bg.png
assets/images/2.0x/point_bg.png
+0
-0
point_bg.png
assets/images/3.0x/point_bg.png
+0
-0
point_bg.png
assets/images/point_bg.png
+0
-0
index.dart
lib/pages/book_pay/index.dart
+2
-0
view.dart
lib/pages/book_pay/view.dart
+33
-48
view.dart
lib/pages/credit_points/view.dart
+21
-14
index.dart
lib/routes/index.dart
+1
-0
routes.dart
lib/routes/routes.dart
+10
-0
没有找到文件。
assets/images/2.0x/point_bg.png
0 → 100644
浏览文件 @
47cdef08
161.6 KB
assets/images/3.0x/point_bg.png
0 → 100644
浏览文件 @
47cdef08
378.9 KB
assets/images/point_bg.png
0 → 100644
浏览文件 @
47cdef08
47.9 KB
lib/pages/book_pay/index.dart
浏览文件 @
47cdef08
...
@@ -7,9 +7,11 @@ import 'package:flutter_book/theme.dart';
...
@@ -7,9 +7,11 @@ import 'package:flutter_book/theme.dart';
import
'package:flutter_screenutil/flutter_screenutil.dart'
;
import
'package:flutter_screenutil/flutter_screenutil.dart'
;
import
'package:flutter_slidable/flutter_slidable.dart'
;
import
'package:flutter_slidable/flutter_slidable.dart'
;
import
'package:get/get.dart'
;
import
'package:get/get.dart'
;
import
'package:go_router/go_router.dart'
;
import
'../../models/index.dart'
;
import
'../../models/index.dart'
;
import
'../../models/shop.dart'
;
import
'../../models/shop.dart'
;
import
'../../routes/index.dart'
;
import
'../../utils/index.dart'
;
import
'../../utils/index.dart'
;
import
'../../widgets/index.dart'
;
import
'../../widgets/index.dart'
;
import
'../book_shop/index.dart'
;
import
'../book_shop/index.dart'
;
...
...
lib/pages/book_pay/view.dart
浏览文件 @
47cdef08
...
@@ -41,30 +41,40 @@ class _BookPayPageState extends State<BookPayPage> {
...
@@ -41,30 +41,40 @@ class _BookPayPageState extends State<BookPayPage> {
boxShadow:
[
boxShadow:
[
BoxShadow
(
BoxShadow
(
color:
Colours
.
cC7
.
withOpacity
(
0.5
),
color:
Colours
.
cC7
.
withOpacity
(
0.5
),
spreadRadius:
2
,
spreadRadius:
2
.
w
,
blurRadius:
5
,
blurRadius:
5
.
w
,
offset:
Offset
(
3
.
w
,
0
),
// changes the position of the shadow
offset:
Offset
(
3
.
w
,
0
),
// changes the position of the shadow
),
),
]
]
),
),
child:
Column
(
child:
Column
(
children:
[
children:
[
_buildPointWidget
(),
GestureDetector
(
child:
_buildWidget
(
title:
'优惠券'
,
icon:
'assets/images/pay_coupon.png'
,),
onTap:
(){
context
.
pushNamed
(
Routes
.
payCoupon
);
},
),
Container
(
height:
0.5
.
w
,
color:
Colours
.
cF0
,
margin:
EdgeInsets
.
only
(
left:
10
.
w
),),
Container
(
height:
0.5
.
w
,
color:
Colours
.
cF0
,
margin:
EdgeInsets
.
only
(
left:
10
.
w
),),
_buildCouponWidget
()
GestureDetector
(
child:
_buildWidget
(
title:
'积分抵扣'
,
icon:
'assets/images/pay_point.png'
,),
onTap:
(){
context
.
pushNamed
(
Routes
.
creditPoints
);
},
),
],
],
),
),
),
),
Container
(
Container
(
margin:
const
EdgeInsets
.
only
(
left:
10
,
right:
10
,
top:
10
),
margin:
EdgeInsets
.
only
(
left:
10
.
w
,
right:
10
.
w
,
top:
10
.
w
),
decoration:
BoxDecoration
(
decoration:
BoxDecoration
(
borderRadius:
BorderRadius
.
circular
(
8
),
borderRadius:
BorderRadius
.
circular
(
8
.
w
),
color:
Colors
.
white
,
color:
Colors
.
white
,
boxShadow:
[
boxShadow:
[
BoxShadow
(
BoxShadow
(
color:
Colours
.
cC7
.
withOpacity
(
0.5
),
color:
Colours
.
cC7
.
withOpacity
(
0.5
),
spreadRadius:
2
,
spreadRadius:
2
.
w
,
blurRadius:
5
,
blurRadius:
5
.
w
,
offset:
const
Offset
(
3
,
0
),
// changes the position of the shadow
offset:
const
Offset
(
3
,
0
),
// changes the position of the shadow
),
),
]
]
...
@@ -93,29 +103,33 @@ class _BookPayPageState extends State<BookPayPage> {
...
@@ -93,29 +103,33 @@ class _BookPayPageState extends State<BookPayPage> {
}
}
Widget
_buildPointWidget
(){
Widget
_buildWidget
({
required
String
title
,
required
String
icon
,
}){
return
Container
(
return
Container
(
margin:
EdgeInsets
.
only
(
left:
13
,
right:
13
),
margin:
EdgeInsets
.
only
(
left:
13
.
w
,
right:
13
.
w
),
color:
Colors
.
white
,
child:
Row
(
child:
Row
(
mainAxisAlignment:
MainAxisAlignment
.
spaceBetween
,
mainAxisAlignment:
MainAxisAlignment
.
spaceBetween
,
children:
[
children:
[
Row
(
Row
(
children:
[
children:
[
Container
(
Container
(
margin:
const
EdgeInsets
.
symmetric
(
vertical:
12
),
margin:
EdgeInsets
.
symmetric
(
vertical:
12
.
w
),
// color: Colors.cyan,
// color: Colors.cyan,
width:
20
,
width:
20
.
w
,
height:
20
,
height:
20
.
w
,
child:
Image
.
asset
(
'assets/images/pay_coupon.png'
),
child:
Image
.
asset
(
icon
),
),
),
const
SizedBox
(
width:
7
,),
SizedBox
(
width:
7
.
w
,),
const
Text
(
'优惠券'
,
style:
TextStyle
(
fontSize:
14
,
color:
Colours
.
c3
,
height:
1.1
)),
Text
(
title
,
style:
TextStyle
(
fontSize:
14
.
w
,
color:
Colours
.
c3
,
height:
1.1
)),
],
],
),
),
Container
(
SizedBox
(
// color: Colors.cyan,
// color: Colors.cyan,
width:
5
,
width:
5
.
w
,
height:
8
,
height:
8
.
w
,
child:
Image
.
asset
(
'assets/images/right_arrow.png'
),
child:
Image
.
asset
(
'assets/images/right_arrow.png'
),
),
),
],
],
...
@@ -123,33 +137,4 @@ class _BookPayPageState extends State<BookPayPage> {
...
@@ -123,33 +137,4 @@ class _BookPayPageState extends State<BookPayPage> {
);
);
}
}
Widget
_buildCouponWidget
(){
return
Container
(
margin:
EdgeInsets
.
only
(
left:
13
,
right:
13
),
child:
Row
(
mainAxisAlignment:
MainAxisAlignment
.
spaceBetween
,
children:
[
Row
(
children:
[
Container
(
margin:
const
EdgeInsets
.
symmetric
(
vertical:
12
),
// color: Colors.cyan,
width:
20
,
height:
20
,
child:
Image
.
asset
(
'assets/images/pay_point.png'
),
),
const
SizedBox
(
width:
7
,),
const
Text
(
'积分抵扣'
,
style:
TextStyle
(
fontSize:
14
,
color:
Colours
.
c3
,
height:
1.1
)),
],
),
Container
(
// color: Colors.cyan,
width:
5
,
height:
8
,
child:
Image
.
asset
(
'assets/images/right_arrow.png'
),
),
],
),
);
}
}
}
lib/pages/credit_points/view.dart
浏览文件 @
47cdef08
...
@@ -11,29 +11,32 @@ class CreditPointsPage extends StatelessWidget {
...
@@ -11,29 +11,32 @@ class CreditPointsPage extends StatelessWidget {
return
false
;
return
false
;
},
},
child:
Scaffold
(
child:
Scaffold
(
extendBodyBehindAppBar:
true
,
appBar:
AppBar
(
appBar:
AppBar
(
centerTitle:
true
,
centerTitle:
true
,
title:
const
Text
(
'积分'
),
title:
const
Text
(
'积分'
),
backgroundColor:
Colors
.
transparent
,
),
),
body:
Column
(
body:
Stack
(
children:
[
Image
.
asset
(
'assets/images/point_bg.png'
,
fit:
BoxFit
.
contain
,
width:
double
.
infinity
,
),
SafeArea
(
top:
true
,
child:
Column
(
children:
[
children:
[
// 积分卡片
// 积分卡片
Container
(
Container
(
color:
AppTheme
.
primary
.
withOpacity
(
0.02
),
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
.
w
),
padding:
EdgeInsets
.
all
(
10
.
w
),
child:
Container
(
child:
Container
(
padding:
EdgeInsets
.
only
(
left:
17
.
w
,
top:
18
.
w
,
bottom:
24
.
w
,
right:
17
.
w
),
padding:
EdgeInsets
.
only
(
left:
17
.
w
,
top:
18
.
w
,
bottom:
24
.
w
,
right:
17
.
w
),
decoration:
BoxDecoration
(
decoration:
BoxDecoration
(
color:
Colors
.
white
,
color:
Colors
.
white
.
withOpacity
(
0.58
),
boxShadow:
[
borderRadius:
BorderRadius
.
circular
(
8
.
w
),
BoxShadow
(
border:
Border
.
all
(
width:
2
.
w
,
color:
Colors
.
white
)
color:
Colours
.
cC7
.
withOpacity
(
0.5
),
offset:
Offset
(
0
,
3
.
w
),
blurRadius:
4
.
w
,
spreadRadius:
0
,
),
],
borderRadius:
BorderRadius
.
circular
(
8
)
),
),
height:
175
.
w
,
height:
175
.
w
,
child:
Column
(
child:
Column
(
...
@@ -74,13 +77,14 @@ class CreditPointsPage extends StatelessWidget {
...
@@ -74,13 +77,14 @@ class CreditPointsPage extends StatelessWidget {
// 使用积分
// 使用积分
Container
(
Container
(
// height: 105,
// height: 105,
margin:
EdgeInsets
.
symmetric
(
horizontal:
10
.
w
),
padding:
EdgeInsets
.
all
(
20
.
w
),
padding:
EdgeInsets
.
all
(
20
.
w
),
decoration:
BoxDecoration
(
decoration:
BoxDecoration
(
color:
Colors
.
white
,
color:
Colors
.
white
,
boxShadow:
[
boxShadow:
[
BoxShadow
(
BoxShadow
(
color:
Colours
.
cC7
.
withOpacity
(
0.5
),
color:
Colours
.
cC7
.
withOpacity
(
0.5
),
offset:
Offset
(
0
,
3
.
w
),
offset:
Offset
(
3
.
w
,
0
.
w
),
blurRadius:
4
.
w
,
blurRadius:
4
.
w
,
spreadRadius:
0
,
spreadRadius:
0
,
),
),
...
@@ -123,6 +127,9 @@ class CreditPointsPage extends StatelessWidget {
...
@@ -123,6 +127,9 @@ class CreditPointsPage extends StatelessWidget {
],
],
),
),
),
),
],
)
),
);
);
}
}
}
}
lib/routes/index.dart
浏览文件 @
47cdef08
...
@@ -40,6 +40,7 @@ import 'package:go_router/go_router.dart';
...
@@ -40,6 +40,7 @@ import 'package:go_router/go_router.dart';
import
'../models/index.dart'
;
import
'../models/index.dart'
;
import
'../pages/order_evaluate/index.dart'
;
import
'../pages/order_evaluate/index.dart'
;
import
'../pages/pay_coupon/index.dart'
;
import
'../pages/user_about/index.dart'
;
import
'../pages/user_about/index.dart'
;
import
'../pages/user_terms/index.dart'
;
import
'../pages/user_terms/index.dart'
;
import
'../pages/version/index.dart'
;
import
'../pages/version/index.dart'
;
...
...
lib/routes/routes.dart
浏览文件 @
47cdef08
...
@@ -42,6 +42,7 @@ abstract class Routes {
...
@@ -42,6 +42,7 @@ abstract class Routes {
/// 书架模块
/// 书架模块
static
const
creditPoints
=
'credit_points'
;
static
const
creditPoints
=
'credit_points'
;
static
const
shop
=
'shop'
;
static
const
shop
=
'shop'
;
static
const
payCoupon
=
'pay_coupon'
;
...
@@ -274,6 +275,15 @@ abstract class Routes {
...
@@ -274,6 +275,15 @@ abstract class Routes {
child:
const
CreditPointsPage
()
child:
const
CreditPointsPage
()
)
)
),
),
GoRoute
(
path:
'/
$payCoupon
'
,
name:
payCoupon
,
pageBuilder:
(
context
,
state
)
=>
CupertinoPage
(
name:
state
.
uri
.
toString
(),
key:
state
.
pageKey
,
child:
const
PayCouponPage
()
)
),
GoRoute
(
GoRoute
(
path:
'/
$search
'
,
path:
'/
$search
'
,
name:
search
,
name:
search
,
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论