Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
B
book-app
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
book-app
Commits
586ac1e7
提交
586ac1e7
authored
2月 20, 2024
作者:
maodou
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
1:待付款订单添加倒计时
2:书架订单默认选择支付宝 3:优化头像修改功能
上级
7db40230
隐藏空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
52 行增加
和
46 行删除
+52
-46
controller.dart
lib/pages/book_pay/controller.dart
+2
-2
controller.dart
lib/pages/login/controller.dart
+4
-4
view.dart
lib/pages/user_info/view.dart
+3
-0
awaiting.dart
lib/pages/user_order/widgets/awaiting.dart
+40
-37
routes.dart
lib/routes/routes.dart
+1
-1
validator.dart
lib/utils/validator.dart
+2
-2
没有找到文件。
lib/pages/book_pay/controller.dart
浏览文件 @
586ac1e7
...
...
@@ -24,7 +24,7 @@ class BookPayController extends GetxController {
PayModel
(
type:
3
,
name:
'紫荆币'
,
icon:
'assets/images/pay_coin.png'
,
selected:
true
),
]:[
// PayModel(type: 1, name: '微信', icon: 'assets/images/pay_wechat.png', selected: true),
PayModel
(
type:
2
,
name:
'支付宝'
,
icon:
'assets/images/pay_ali.png'
,
selected:
fals
e
),
PayModel
(
type:
2
,
name:
'支付宝'
,
icon:
'assets/images/pay_ali.png'
,
selected:
tru
e
),
PayModel
(
type:
3
,
name:
'紫荆币'
,
icon:
'assets/images/pay_coin.png'
,
selected:
false
),
];
...
...
@@ -161,7 +161,7 @@ class BookPayController extends GetxController {
// 书豆支付的话先判断书豆数量
if
(
payModel
.
type
==
3
){
if
(
finalPrice
.
toDouble
()
>
double
.
parse
(
showModel
.
membersBean
.
toString
())){
Toast
.
show
(
'紫
金
币不足,请先充值紫荆币'
);
Toast
.
show
(
'紫
荆
币不足,请先充值紫荆币'
);
return
;
}
}
...
...
lib/pages/login/controller.dart
浏览文件 @
586ac1e7
...
...
@@ -87,10 +87,10 @@ class LoginController extends GetxController {
// 定时器回调
});
/// 测试账号
//
if (kDebugMode) {
//
phoneInput.text = '13521054068';
//
passwordInput.text = '123456';
//
}
if
(
kDebugMode
)
{
phoneInput
.
text
=
'13521054068'
;
passwordInput
.
text
=
'123456'
;
}
super
.
onInit
();
}
...
...
lib/pages/user_info/view.dart
浏览文件 @
586ac1e7
...
...
@@ -173,6 +173,7 @@ class _UserInfoPageState extends State<UserInfoPage> {
},
child:
Container
(
height:
45
.
w
,
color:
Colours
.
cFF
,
padding:
EdgeInsets
.
all
(
12
.
w
),
child:
const
Row
(
mainAxisAlignment:
MainAxisAlignment
.
center
,
...
...
@@ -206,6 +207,7 @@ class _UserInfoPageState extends State<UserInfoPage> {
},
child:
Container
(
height:
45
.
w
,
color:
Colours
.
cFF
,
padding:
EdgeInsets
.
all
(
12
.
w
),
child:
const
Row
(
mainAxisAlignment:
MainAxisAlignment
.
center
,
...
...
@@ -235,6 +237,7 @@ class _UserInfoPageState extends State<UserInfoPage> {
},
child:
Container
(
height:
45
.
w
,
color:
Colours
.
cFF
,
padding:
EdgeInsets
.
all
(
12
.
w
),
child:
const
Row
(
mainAxisAlignment:
MainAxisAlignment
.
center
,
...
...
lib/pages/user_order/widgets/awaiting.dart
浏览文件 @
586ac1e7
...
...
@@ -8,28 +8,30 @@ class BuiltAwaiting extends StatelessWidget {
@override
Widget
build
(
BuildContext
context
)
{
return
GestureDetector
(
onTap:
()
{
context
.
pushNamed
(
Routes
.
orderAwaiting
,
queryParameters:
{
'orderNum'
:
model
.
ordersnum
});},
child:
Container
(
margin:
EdgeInsets
.
only
(
left:
10
.
w
,
right:
10
.
w
,
top:
10
.
w
),
padding:
EdgeInsets
.
only
(
left:
11.5
.
w
,
bottom:
12
.
w
),
decoration:
BoxDecoration
(
borderRadius:
BorderRadius
.
circular
(
8
.
w
),
color:
Colors
.
white
,
boxShadow:
[
BoxShadow
(
color:
const
Color
(
0xFFC7C7C7
).
withOpacity
(
0.5
),
offset:
Offset
(
1.5
.
w
,
0
),
blurRadius:
7
.
w
,
spreadRadius:
0
.
w
,
),
],
onTap:
()
{
context
.
pushNamed
(
Routes
.
orderAwaiting
,
queryParameters:
{
'orderNum'
:
model
.
ordersnum
});
},
child:
Container
(
margin:
EdgeInsets
.
only
(
left:
10
.
w
,
right:
10
.
w
,
top:
10
.
w
),
padding:
EdgeInsets
.
only
(
left:
11.5
.
w
,
bottom:
12
.
w
),
decoration:
BoxDecoration
(
borderRadius:
BorderRadius
.
circular
(
8
.
w
),
color:
Colors
.
white
,
boxShadow:
[
BoxShadow
(
color:
const
Color
(
0xFFC7C7C7
).
withOpacity
(
0.5
),
offset:
Offset
(
1.5
.
w
,
0
),
blurRadius:
7
.
w
,
spreadRadius:
0
.
w
,
),
],
),
child:
_buildCom
(
context
),
),
child:
_buildCom
(
context
),
),);
);
}
Widget
_buildCom
(
BuildContext
context
)
{
if
(
model
.
cartList
!.
length
==
1
)
{
return
_buildOne
(
context
);
...
...
@@ -40,7 +42,7 @@ class BuiltAwaiting extends StatelessWidget {
}
Widget
_buildOne
(
BuildContext
context
)
{
return
Row
(
return
Row
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
Container
(
...
...
@@ -63,7 +65,7 @@ class BuiltAwaiting extends StatelessWidget {
],
),
child:
Image
.
network
(
model
.
cartList
![
0
].
img
??
''
,
model
.
cartList
![
0
].
img
??
''
,
// 用实际图片链接替换
fit:
BoxFit
.
cover
,
),
...
...
@@ -121,7 +123,8 @@ class BuiltAwaiting extends StatelessWidget {
child:
Align
(
alignment:
Alignment
.
center
,
child:
Text
(
'29分钟'
,
'
${30 - (DateTime.now().difference(
DateTime.parse(model.createTime.toString()))).inMinutes}
分钟'
,
style:
TextStyle
(
color:
Colours
.
cC31F4C
,
fontSize:
10
.
w
,
...
...
@@ -133,7 +136,7 @@ class BuiltAwaiting extends StatelessWidget {
),
),
),
/* Align(
/* Align(
alignment: Alignment.centerLeft,
child: Container(
padding: EdgeInsets.only(left: 12.0.w, top: 8.w, right: 49.5.w),
...
...
@@ -176,27 +179,25 @@ class BuiltAwaiting extends StatelessWidget {
),
maxLines:
2
,
overflow:
TextOverflow
.
ellipsis
,
),
)),
SizedBox
(
height:
10.5
.
w
),
],
),
Container
(
height:
Checkbox
.
width
,
alignment:
Alignment
.
bottomLeft
,
margin:
EdgeInsets
.
only
(
left:
12
.
w
),
child:
Text
(
"¥
${model.finalTotalPrice}
"
,
style:
TextStyle
(
color:
Colours
.
cAB1941
,
fontWeight:
Fonts
.
medium
,
fontSize:
14
.
w
,
"¥
${model.finalTotalPrice}
"
,
style:
TextStyle
(
color:
Colours
.
cAB1941
,
fontWeight:
Fonts
.
medium
,
fontSize:
14
.
w
,
),
),
),
),
/* Align(
/* Align(
alignment: Alignment.bottomLeft,
child: Container(
margin: EdgeInsets.only(left: 12.w),
...
...
@@ -280,7 +281,9 @@ class BuiltAwaiting extends StatelessWidget {
),
),
),
SizedBox
(
height:
2
.
w
,),
SizedBox
(
height:
2
.
w
,
),
Row
(
mainAxisAlignment:
MainAxisAlignment
.
spaceBetween
,
children:
[
...
...
@@ -310,7 +313,7 @@ class BuiltAwaiting extends StatelessWidget {
],
),
child:
Image
.
network
(
cartModel
.
img
??
''
,
cartModel
.
img
??
''
,
// 用实际图片链接替换
fit:
BoxFit
.
cover
,
),
...
...
@@ -332,7 +335,7 @@ class BuiltAwaiting extends StatelessWidget {
Padding
(
padding:
EdgeInsets
.
only
(
right:
26
.
w
),
child:
Text
(
'¥
${model.totalPrice
??
''}
'
,
'¥
${model.totalPrice
??
''}
'
,
style:
TextStyle
(
color:
Colours
.
cAB1941
,
fontWeight:
Fonts
.
medium
,
...
...
@@ -343,7 +346,7 @@ class BuiltAwaiting extends StatelessWidget {
Padding
(
padding:
EdgeInsets
.
only
(
right:
26
.
w
,
top:
0.5
),
child:
Text
(
'共
${model.cartList!.isEmpty
?0:
model.cartList?.length}
件'
,
'共
${model.cartList!.isEmpty
? 0 :
model.cartList?.length}
件'
,
style:
TextStyle
(
color:
Colours
.
c9
,
fontSize:
10
.
w
,
...
...
@@ -360,7 +363,7 @@ class BuiltAwaiting extends StatelessWidget {
decoration:
BoxDecoration
(
borderRadius:
BorderRadius
.
circular
(
10
.
w
),
border:
Border
.
all
(
color:
Colours
.
cC31F4C
,
width:
0.5
.
w
)),
Border
.
all
(
color:
Colours
.
cC31F4C
,
width:
0.5
.
w
)),
child:
Center
(
child:
GestureDetector
(
onTap:
()
{
...
...
lib/routes/routes.dart
浏览文件 @
586ac1e7
...
...
@@ -112,7 +112,7 @@ abstract class Routes {
static
const
orderAwaiting
=
'order_awaiting'
;
// 已退款订单
static
const
orderRefunded
=
'order_refunded'
;
//
已退款
订单
//
搜索
订单
static
const
orderSearch
=
'order_search'
;
...
...
lib/utils/validator.dart
浏览文件 @
586ac1e7
...
...
@@ -91,9 +91,9 @@ class ValidatorTool {
// 密码
static
bool
isValidPassword
(
String
value
)
{
RegExp
passwordPattern
=
RegExp
(
r'^[A-Za-z0-9!@#\$%^&*()_+{}\[\]:;<>,.?~\\/-]{8,12}$'
);
//
RegExp passwordPattern = RegExp(r'^[A-Za-z0-9!@#\$%^&*()_+{}\[\]:;<>,.?~\\/-]{8,12}$');
// RegExp passwordPattern = RegExp(r'^(?=.*[A-Za-z])(?=.*\d)(?=.*[~@#%$*()_+{}\[\]:;<>,.?\\/-])[A-Za-z0-9~@#%$*()_+{}\[\]:;<>,.?\\/-]{8,12}$');
//
RegExp passwordPattern = RegExp(r'^\d{6}$');
RegExp
passwordPattern
=
RegExp
(
r'^\d{6}$'
);
return
passwordPattern
.
hasMatch
(
value
);
}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论