Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
B
book-app
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
book-app
Commits
5cdb7467
提交
5cdb7467
authored
2月 25, 2024
作者:
maodou
浏览文件
操作
浏览文件
下载
差异文件
Merge remote-tracking branch 'origin/test' into test
上级
4d922c99
8613b26a
隐藏空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
202 行增加
和
181 行删除
+202
-181
mine.dart
lib/models/mine.dart
+7
-1
view.dart
lib/pages/credit_points/view.dart
+31
-28
view.dart
lib/pages/mine/view.dart
+5
-2
item.dart
lib/pages/pay_coupon/widgets/item.dart
+1
-1
view.dart
lib/pages/user_info/view.dart
+4
-1
view.dart
lib/pages/user_security/view.dart
+154
-148
没有找到文件。
lib/models/mine.dart
浏览文件 @
5cdb7467
...
...
@@ -72,6 +72,7 @@ class CouponModel {
CouponModel
({
this
.
couponRecId
,
this
.
endTime
,
this
.
startTime
,
this
.
couponId
,
this
.
useStatus
,
this
.
couponName
,
...
...
@@ -83,6 +84,7 @@ class CouponModel {
CouponModel
.
fromJson
(
dynamic
json
)
{
couponRecId
=
json
[
'coupon_rec_id'
];
endTime
=
json
[
'end_time'
];
startTime
=
json
[
'start_time'
];
couponId
=
json
[
'coupon_id'
];
useStatus
=
json
[
'use_status'
];
couponName
=
json
[
'coupon_name'
];
...
...
@@ -93,6 +95,7 @@ class CouponModel {
num
?
couponRecId
;
String
?
endTime
;
String
?
startTime
;
num
?
couponId
;
num
?
useStatus
;
String
?
couponName
;
...
...
@@ -103,6 +106,7 @@ class CouponModel {
CouponModel
copyWith
({
num
?
couponRecId
,
String
?
endTime
,
String
?
startTime
,
num
?
couponId
,
num
?
useStatus
,
String
?
couponName
,
...
...
@@ -113,6 +117,7 @@ class CouponModel {
CouponModel
(
couponRecId:
couponRecId
??
this
.
couponRecId
,
endTime:
endTime
??
this
.
endTime
,
startTime:
startTime
??
this
.
startTime
,
couponId:
couponId
??
this
.
couponId
,
useStatus:
useStatus
??
this
.
useStatus
,
couponName:
couponName
??
this
.
couponName
,
...
...
@@ -124,7 +129,8 @@ class CouponModel {
Map
<
String
,
dynamic
>
toJson
()
{
final
map
=
<
String
,
dynamic
>{};
map
[
'coupon_rec_id'
]
=
couponRecId
;
// map['end_time'] = endTime;
map
[
'end_time'
]
=
endTime
;
map
[
'start_time'
]
=
startTime
;
map
[
'coupon_id'
]
=
couponId
;
map
[
'use_status'
]
=
useStatus
;
map
[
'coupon_name'
]
=
couponName
;
...
...
lib/pages/credit_points/view.dart
浏览文件 @
5cdb7467
...
...
@@ -105,34 +105,37 @@ class CreditPointsPage extends StatelessWidget {
color:
Colours
.
cE7
,
// color: Colors.red,
),
GestureDetector
(
onTap:
(){
controller
.
setUse
();
if
(
controller
.
useCreditPoint
)
{
context
.
pop
();
}
},
child:
Container
(
color:
Colors
.
white
,
height:
54
,
child:
Row
(
mainAxisAlignment:
MainAxisAlignment
.
spaceBetween
,
children:
[
RichText
(
text:
TextSpan
(
children:
[
TextSpan
(
text:
'抵扣'
,
style:
TextStyle
(
color:
Colours
.
c9
,
fontSize:
13
.
w
,
height:
1.4
)),
TextSpan
(
text:
'¥
${controller.creditPointModel.deductibleAmount}
'
,
style:
TextStyle
(
color:
AppTheme
.
primary
,
fontSize:
13
.
w
,
height:
1.4
,
fontWeight:
Fonts
.
medium
)),
TextSpan
(
text:
'使用
${controller.creditPointModel.deductibleIntegral}
积分'
,
style:
TextStyle
(
color:
Colours
.
c9
,
fontSize:
13
.
w
,
height:
1.4
)),
]
)),
SizedBox
(
width:
15
.
w
,
height:
15
.
w
,
child:
Image
.
asset
(
controller
.
useCreditPoint
?
'assets/images/check.png'
:
'assets/images/uncheck.png'
,
),
)
],
Visibility
(
visible:
controller
.
creditPointModel
.
deductibleIntegral
==
0
?
false
:
true
,
child:
GestureDetector
(
onTap:
(){
controller
.
setUse
();
if
(
controller
.
useCreditPoint
)
{
context
.
pop
();
}
},
child:
Container
(
color:
Colors
.
white
,
height:
54
,
child:
Row
(
mainAxisAlignment:
MainAxisAlignment
.
spaceBetween
,
children:
[
RichText
(
text:
TextSpan
(
children:
[
TextSpan
(
text:
'抵扣'
,
style:
TextStyle
(
color:
Colours
.
c9
,
fontSize:
13
.
w
,
height:
1.4
)),
TextSpan
(
text:
'¥
${controller.creditPointModel.deductibleAmount}
'
,
style:
TextStyle
(
color:
AppTheme
.
primary
,
fontSize:
13
.
w
,
height:
1.4
,
fontWeight:
Fonts
.
medium
)),
TextSpan
(
text:
'使用
${controller.creditPointModel.deductibleIntegral}
积分'
,
style:
TextStyle
(
color:
Colours
.
c9
,
fontSize:
13
.
w
,
height:
1.4
)),
]
)),
SizedBox
(
width:
15
.
w
,
height:
15
.
w
,
child:
Image
.
asset
(
controller
.
useCreditPoint
?
'assets/images/check.png'
:
'assets/images/uncheck.png'
,
),
)
],
),
),
),
)
...
...
lib/pages/mine/view.dart
浏览文件 @
5cdb7467
...
...
@@ -132,8 +132,11 @@ class _MinePageState extends State<MinePage> {
child:
Column
(
children:
[
GestureDetector
(
onTap:
(){
context
.
pushNamed
(
Routes
.
security
,
extra:
controller
.
userInfo
);
onTap:
()
async
{
final
result
=
await
context
.
pushNamed
(
Routes
.
security
,
extra:
controller
.
userInfo
);
if
(
result
==
true
){
controller
.
getInfo
();
}
},
child:
_buildItem
(
'账户安全'
)
),
Container
(
color:
Colours
.
cLine
,
margin:
EdgeInsets
.
symmetric
(
horizontal:
15
.
w
),
height:
1
.
w
,),
...
...
lib/pages/pay_coupon/widgets/item.dart
浏览文件 @
5cdb7467
...
...
@@ -74,7 +74,7 @@ class BuildItem extends StatelessWidget {
Gaps
.
vGaps5
,
Text
(
'满
${model.normPrice}
减
${model.reducedPrice}
元'
,
style:
TextStyle
(
fontSize:
12
.
w
,
height:
1.5
,
color:
Colours
.
c9
),),
Gaps
.
vGaps5
,
Text
(
'有效至:
${model.endTime}
'
,
style:
TextStyle
(
fontSize:
12
.
w
,
height:
1.5
,
color:
Colours
.
c9
),),
model
.
type
==
1
?
Text
(
'有效至:
${model.endTime}
'
,
style:
TextStyle
(
fontSize:
12
.
w
,
height:
1.5
,
color:
Colours
.
c9
),):
Text
(
'有效期
${model.startTime}
至
${model.endTime}
'
,
style:
TextStyle
(
fontSize:
12
.
w
,
height:
1.5
,
color:
Colours
.
c9
),),
],
),
if
(
model
.
type
==
1
)
GestureDetector
(
...
...
lib/pages/user_info/view.dart
浏览文件 @
5cdb7467
...
...
@@ -261,7 +261,10 @@ class _UserInfoPageState extends State<UserInfoPage> {
getGender
(
num
?
sex
)
{
String
gender
;
if
(
sex
==
1
)
{
if
(
sex
==
0
)
{
gender
=
""
;
}
else
if
(
sex
==
1
)
{
gender
=
"男"
;
}
else
if
(
sex
==
2
)
{
gender
=
"女"
;
...
...
lib/pages/user_security/view.dart
浏览文件 @
5cdb7467
...
...
@@ -12,169 +12,175 @@ class UserSecurityPage extends StatefulWidget {
class
_UserSecurityPageState
extends
State
<
UserSecurityPage
>
{
@override
Widget
build
(
BuildContext
context
)
{
return
Scaffold
(
appBar:
AppBar
(
centerTitle:
true
,
title:
const
Text
(
'账号安全'
),
),
body:
Column
(
children:
[
Container
(
margin:
EdgeInsets
.
symmetric
(
vertical:
10
.
w
,
horizontal:
10
.
w
),
decoration:
BoxDecoration
(
borderRadius:
BorderRadius
.
circular
(
8
.
w
),
color:
Colors
.
white
,
boxShadow:
[
BoxShadow
(
color:
const
Color
(
0xFFC7C7C7
).
withOpacity
(
0.5
),
offset:
Offset
(
3
.
w
,
0
),
blurRadius:
10
.
w
,
spreadRadius:
0
.
w
,
),
],
),
child:
Column
(
children:
[
GestureDetector
(
onTap:
()
{
context
.
pushNamed
(
Routes
.
changePhone
);
},
child:
_buildItem
(
title:
'修改手机号码'
,
value:
widget
.
model
.
phone
??
''
)),
Container
(
margin:
EdgeInsets
.
symmetric
(
horizontal:
10
.
w
),
height:
0.5
.
w
,
color:
Colours
.
cF0
,
),
GestureDetector
(
onTap:
()
{
context
.
pushNamed
(
Routes
.
changePwd
,
extra:
widget
.
model
);
},
child:
_buildItem
(
title:
'修改密码'
,
value:
widget
.
model
.
password
.
toString
().
isEmpty
?
'未设置'
:
''
)),
],
),
),
Container
(
margin:
EdgeInsets
.
symmetric
(
horizontal:
10
.
w
),
decoration:
BoxDecoration
(
borderRadius:
BorderRadius
.
circular
(
8
.
w
),
color:
Colors
.
white
,
boxShadow:
[
BoxShadow
(
color:
const
Color
(
0xFFC7C7C7
).
withOpacity
(
0.5
),
offset:
Offset
(
3
.
w
,
0
),
blurRadius:
10
.
w
,
spreadRadius:
0
.
w
,
),
],
return
WillPopScope
(
onWillPop:
()
async
{
context
.
pop
(
true
);
return
false
;
},
child:
Scaffold
(
appBar:
AppBar
(
centerTitle:
true
,
title:
const
Text
(
'账号安全'
),
),
body:
Column
(
children:
[
Container
(
margin:
EdgeInsets
.
symmetric
(
vertical:
10
.
w
,
horizontal:
10
.
w
),
decoration:
BoxDecoration
(
borderRadius:
BorderRadius
.
circular
(
8
.
w
),
color:
Colors
.
white
,
boxShadow:
[
BoxShadow
(
color:
const
Color
(
0xFFC7C7C7
).
withOpacity
(
0.5
),
offset:
Offset
(
3
.
w
,
0
),
blurRadius:
10
.
w
,
spreadRadius:
0
.
w
,
),
],
),
child:
Column
(
children:
[
GestureDetector
(
onTap:
()
{
context
.
pushNamed
(
Routes
.
changePhone
);
},
child:
_buildItem
(
title:
'修改手机号码'
,
value:
widget
.
model
.
phone
??
''
)),
Container
(
margin:
EdgeInsets
.
symmetric
(
horizontal:
10
.
w
),
height:
0.5
.
w
,
color:
Colours
.
cF0
,
),
GestureDetector
(
onTap:
()
{
context
.
pushNamed
(
Routes
.
changePwd
,
extra:
widget
.
model
);
},
child:
_buildItem
(
title:
'修改密码'
,
value:
widget
.
model
.
password
.
toString
().
isEmpty
?
'未设置'
:
''
)),
],
),
),
child:
Column
(
children:
[
GestureDetector
(
child:
_buildItem
(
title:
'账号注销'
,
value:
''
),
onTap:
()
async
{
showDialog
(
context:
context
,
builder:
(
BuildContext
context
)
{
return
AlertDialog
(
shape:
RoundedRectangleBorder
(
borderRadius:
BorderRadius
.
circular
(
8.0
.
w
),
),
contentPadding:
EdgeInsets
.
zero
,
// 移除内容部分的内边距
content:
Wrap
(
children:
[
Container
(
margin:
EdgeInsets
.
only
(
top:
44
.
w
,
bottom:
29
.
w
),
// 调整上下间距
child:
Center
(
child:
Text
(
'确定注销账号吗'
,
style:
TextStyle
(
fontSize:
15
.
w
,
fontWeight:
Fonts
.
medium
,
color:
Colours
.
c3
,
),
),
),
),
Container
(
height:
1
.
w
,
// 设置分割线的高度
width:
double
.
infinity
,
// 设置分割线的宽度
color:
Colours
.
cLine
,
// 设置分割线的颜色
),
],
),
// 去除操作按钮区域的内边距
actionsPadding:
EdgeInsets
.
zero
,
actions:
<
Widget
>[
Row
(
mainAxisAlignment:
MainAxisAlignment
.
spaceEvenly
,
Container
(
margin:
EdgeInsets
.
symmetric
(
horizontal:
10
.
w
),
decoration:
BoxDecoration
(
borderRadius:
BorderRadius
.
circular
(
8
.
w
),
color:
Colors
.
white
,
boxShadow:
[
BoxShadow
(
color:
const
Color
(
0xFFC7C7C7
).
withOpacity
(
0.5
),
offset:
Offset
(
3
.
w
,
0
),
blurRadius:
10
.
w
,
spreadRadius:
0
.
w
,
),
],
),
child:
Column
(
children:
[
GestureDetector
(
child:
_buildItem
(
title:
'账号注销'
,
value:
''
),
onTap:
()
async
{
showDialog
(
context:
context
,
builder:
(
BuildContext
context
)
{
return
AlertDialog
(
shape:
RoundedRectangleBorder
(
borderRadius:
BorderRadius
.
circular
(
8.0
.
w
),
),
contentPadding:
EdgeInsets
.
zero
,
// 移除内容部分的内边距
content:
Wrap
(
children:
[
GestureDetector
(
onTap:
()
=>
Navigator
.
of
(
context
).
pop
(),
child:
Container
(
width:
105
.
w
,
color:
Colours
.
cFF
,
alignment:
Alignment
.
center
,
child:
const
Text
(
'取消'
,
Container
(
margin:
EdgeInsets
.
only
(
top:
44
.
w
,
bottom:
29
.
w
),
// 调整上下间距
child:
Center
(
child:
Text
(
'确定注销账号吗'
,
style:
TextStyle
(
fontSize:
1
2
,
fontSize:
1
5
.
w
,
fontWeight:
Fonts
.
medium
,
color:
Colours
.
c
6
,
color:
Colours
.
c
3
,
),
),
),
),
Container
(
height:
39.5
.
w
,
// 设置分割线的高度
width:
1
,
// 设置分割线的宽度
height:
1
.
w
,
// 设置分割线的高度
width:
double
.
infinity
,
// 设置分割线的宽度
color:
Colours
.
cLine
,
// 设置分割线的颜色
),
GestureDetector
(
onTap:
()
async
{
final
result
=
await
AccountAPI
.
delete
();
if
(
result
)
{
CustomToast
.
loading
();
await
UserStore
.
to
.
logout
();
CustomToast
.
dismiss
();
if
(
context
.
mounted
)
{
context
.
goNamed
(
Routes
.
splash
);
],
),
// 去除操作按钮区域的内边距
actionsPadding:
EdgeInsets
.
zero
,
actions:
<
Widget
>[
Row
(
mainAxisAlignment:
MainAxisAlignment
.
spaceEvenly
,
children:
[
GestureDetector
(
onTap:
()
=>
Navigator
.
of
(
context
).
pop
(),
child:
Container
(
width:
105
.
w
,
color:
Colours
.
cFF
,
alignment:
Alignment
.
center
,
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:
()
async
{
final
result
=
await
AccountAPI
.
delete
();
if
(
result
)
{
CustomToast
.
loading
();
await
UserStore
.
to
.
logout
();
CustomToast
.
dismiss
();
if
(
context
.
mounted
)
{
context
.
goNamed
(
Routes
.
splash
);
}
}
}
},
child:
Container
(
width:
105
.
w
,
color:
Colours
.
cFF
,
alignment:
Alignment
.
center
,
child:
const
Text
(
'确定'
,
style:
TextStyle
(
fontSize:
12
,
fontWeight:
Fonts
.
medium
,
color:
Colours
.
cAB1941
,
}
,
child:
Container
(
width:
105
.
w
,
color:
Colours
.
cFF
,
alignment:
Alignment
.
center
,
child:
const
Text
(
'确定'
,
style:
TextStyle
(
fontSize:
12
,
fontWeight:
Fonts
.
medium
,
color:
Colours
.
cAB1941
,
)
,
),
),
),
)
,
]
,
)
,
],
);
},
);
}
,
)
,
]
,
)
,
)
]
,
]
,
)
,
]
,
);
},
);
},
)
,
]
,
)
,
)
],
)
,
),
);
}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论