Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
B
book-app
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
book-app
Commits
b0c5b2ee
提交
b0c5b2ee
authored
2月 22, 2024
作者:
maodou
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
1:修复订单列表点击查看详情与列表项不一致问题
2:修复订单列表进入后数据请求多次的问题 3:弹窗可点击区域扩大
上级
7a9c606e
隐藏空白字符变更
内嵌
并排
正在显示
8 个修改的文件
包含
539 行增加
和
500 行删除
+539
-500
order.dart
lib/models/order.dart
+5
-0
view.dart
lib/pages/login/view.dart
+5
-5
controller.dart
lib/pages/user_order/controller.dart
+2
-8
controller.dart
lib/pages/user_order_awaiting/controller.dart
+8
-2
view.dart
lib/pages/user_order_awaiting/view.dart
+239
-225
controller.dart
lib/pages/user_order_coin_awaiting/controller.dart
+7
-7
view.dart
lib/pages/user_order_coin_awaiting/view.dart
+250
-236
view.dart
lib/pages/user_set/view.dart
+23
-17
没有找到文件。
lib/models/order.dart
浏览文件 @
b0c5b2ee
...
@@ -164,6 +164,11 @@ class OrderListModel {
...
@@ -164,6 +164,11 @@ class OrderListModel {
}
}
return
map
;
return
map
;
}
}
@override
String
toString
()
{
return
'OrderListModel{id:
$id
, ordersnum:
$ordersnum
, totalPrice:
$totalPrice
, finalTotalPrice:
$finalTotalPrice
, num_:
$num_
, status:
$status
, payType:
$payType
, types:
$types
, createTime:
$createTime
, cartList:
$cartList
}'
;
}
}
}
/// 书籍列表
/// 书籍列表
...
...
lib/pages/login/view.dart
浏览文件 @
b0c5b2ee
...
@@ -195,26 +195,26 @@ class _LoginPageState extends State<LoginPage> {
...
@@ -195,26 +195,26 @@ class _LoginPageState extends State<LoginPage> {
child:
Row
(
child:
Row
(
children:
[
children:
[
SizedBox
(
SizedBox
(
width:
1
0
.
w
,
width:
1
4
.
w
,
height:
1
0
.
w
,
height:
1
4
.
w
,
// color: AppTheme.primary,
// color: AppTheme.primary,
child:
Image
.
asset
(
child:
Image
.
asset
(
controller
.
agree
?
'assets/images/check_box_select.png'
:
'assets/images/uncheck.png'
,
controller
.
agree
?
'assets/images/check_box_select.png'
:
'assets/images/uncheck.png'
,
),
),
),
),
Gaps
.
hGaps5
,
Gaps
.
hGaps5
,
Text
(
'我已阅读并同意'
,
style:
TextStyle
(
color:
Colours
.
c9
,
fontSize:
1
0
.
w
,
height:
1.4
)),
Text
(
'我已阅读并同意'
,
style:
TextStyle
(
color:
Colours
.
c9
,
fontSize:
1
4
.
w
,
height:
1.4
)),
],
],
),
),
),
),
GestureDetector
(
GestureDetector
(
child:
Text
(
'《用户协议》'
,
style:
TextStyle
(
color:
Colours
.
cBlue
,
fontSize:
1
0
.
w
,
height:
1.4
)),
child:
Text
(
'《用户协议》'
,
style:
TextStyle
(
color:
Colours
.
cBlue
,
fontSize:
1
4
.
w
,
height:
1.4
)),
onTap:
(){
onTap:
(){
context
.
pushNamed
(
Routes
.
terms
);
context
.
pushNamed
(
Routes
.
terms
);
},
},
),
),
GestureDetector
(
GestureDetector
(
child:
Text
(
'《隐私政策》'
,
style:
TextStyle
(
color:
Colours
.
cBlue
,
fontSize:
1
0
.
w
,
height:
1.4
)),
child:
Text
(
'《隐私政策》'
,
style:
TextStyle
(
color:
Colours
.
cBlue
,
fontSize:
1
4
.
w
,
height:
1.4
)),
onTap:
(){
onTap:
(){
context
.
pushNamed
(
Routes
.
terms
);
context
.
pushNamed
(
Routes
.
terms
);
},
},
...
...
lib/pages/user_order/controller.dart
浏览文件 @
b0c5b2ee
...
@@ -29,16 +29,9 @@ class UserOrderController extends GetxController
...
@@ -29,16 +29,9 @@ class UserOrderController extends GetxController
int
_page
=
1
;
int
_page
=
1
;
bool
_noMore
=
false
;
bool
_noMore
=
false
;
@override
void
onInit
()
{
super
.
onInit
();
}
@override
@override
void
onReady
()
{
void
onReady
()
{
onRefresh
();
//
onRefresh();
super
.
onReady
();
super
.
onReady
();
}
}
...
@@ -68,6 +61,7 @@ class UserOrderController extends GetxController
...
@@ -68,6 +61,7 @@ class UserOrderController extends GetxController
void
onRefresh
()
async
{
void
onRefresh
()
async
{
try
{
try
{
await
_getOrders
(
isRefresh:
true
);
await
_getOrders
(
isRefresh:
true
);
refreshController
.
finishRefresh
(
IndicatorResult
.
success
);
refreshController
.
finishRefresh
(
IndicatorResult
.
success
);
refreshController
.
resetFooter
();
refreshController
.
resetFooter
();
}
catch
(
error
)
{
}
catch
(
error
)
{
...
...
lib/pages/user_order_awaiting/controller.dart
浏览文件 @
b0c5b2ee
...
@@ -2,10 +2,10 @@ part of user_order_awaiting;
...
@@ -2,10 +2,10 @@ part of user_order_awaiting;
/// 等待付款订单
/// 等待付款订单
class
UserOrderAwaitingController
extends
GetxController
{
class
UserOrderAwaitingController
extends
GetxController
{
final
String
orderNum
;
late
String
_
orderNum
;
final
BuildContext
context
;
final
BuildContext
context
;
UserOrderAwaitingController
(
this
.
orderNum
,
this
.
context
);
// 订单编号
UserOrderAwaitingController
(
this
.
context
);
// 订单编号
late
OrderInfoModel
model
;
late
OrderInfoModel
model
;
// 应付款、订单编号等
// 应付款、订单编号等
...
@@ -18,6 +18,12 @@ class UserOrderAwaitingController extends GetxController {
...
@@ -18,6 +18,12 @@ class UserOrderAwaitingController extends GetxController {
late
PayOrderModel
payOrderModel
;
late
PayOrderModel
payOrderModel
;
String
get
orderNum
=>
_orderNum
;
// 获取订单编号的方法
// 更新订单编号的方法
void
updateOrderNum
(
String
newOrderNum
)
{
_orderNum
=
newOrderNum
;
}
@override
@override
void
onReady
()
{
void
onReady
()
{
...
...
lib/pages/user_order_awaiting/view.dart
浏览文件 @
b0c5b2ee
...
@@ -13,7 +13,8 @@ class _UserOrderAwaitingState extends State<UserOrderAwaitingPage> {
...
@@ -13,7 +13,8 @@ class _UserOrderAwaitingState extends State<UserOrderAwaitingPage> {
@override
@override
void
initState
()
{
void
initState
()
{
myController
=
Get
.
put
(
UserOrderAwaitingController
(
widget
.
orderNum
,
context
));
myController
=
Get
.
put
(
UserOrderAwaitingController
(
context
));
myController
.
updateOrderNum
(
widget
.
orderNum
);
super
.
initState
();
super
.
initState
();
}
}
...
@@ -33,254 +34,267 @@ class _UserOrderAwaitingState extends State<UserOrderAwaitingPage> {
...
@@ -33,254 +34,267 @@ class _UserOrderAwaitingState extends State<UserOrderAwaitingPage> {
context
.
pop
(
true
);
context
.
pop
(
true
);
return
false
;
return
false
;
},
},
child:
GetBuilder
<
UserOrderAwaitingController
>(
child:
Scaffold
(
init:
UserOrderAwaitingController
(
widget
.
orderNum
,
context
),
appBar:
CustomAppBar
(
builder:
(
controller
)
=>
Scaffold
(
title:
const
Text
(
'等待付款'
),
appBar:
CustomAppBar
(
actions:
[],
title:
const
Text
(
'等待付款'
),
),
actions:
[],
body:
Column
(
),
children:
[
body:
Column
(
Container
(
margin:
EdgeInsets
.
symmetric
(
horizontal:
AppTheme
.
margin
,
vertical:
AppTheme
.
margin
),
decoration:
BoxDecoration
(
borderRadius:
BorderRadius
.
circular
(
8
.
w
),
color:
Colors
.
white
,
boxShadow:
[
BoxShadow
(
color:
Colours
.
cC7
.
withOpacity
(
0.5
),
offset:
Offset
(
3
.
w
,
0
),
blurRadius:
10
.
w
,
spreadRadius:
0
.
w
,
),
],
),
child:
ClipRRect
(
borderRadius:
BorderRadius
.
circular
(
8
.
w
),
child:
Column
(
mainAxisAlignment:
MainAxisAlignment
.
start
,
mainAxisSize:
MainAxisSize
.
min
,
children:
[
children:
[
Container
(
Padding
(
margin:
EdgeInsets
.
symmetric
(
padding:
EdgeInsets
.
only
(
horizontal:
AppTheme
.
margin
,
left:
12.0
.
w
,
top:
12.0
.
w
,
bottom:
12.0
.
w
),
vertical:
AppTheme
.
margin
),
child:
Row
(
decoration:
BoxDecoration
(
mainAxisAlignment:
MainAxisAlignment
.
start
,
borderRadius:
BorderRadius
.
circular
(
8
.
w
),
crossAxisAlignment:
CrossAxisAlignment
.
start
,
color:
Colors
.
white
,
children:
[
boxShadow:
[
Image
.
network
(
BoxShadow
(
myController
.
model
?.
bookList
?[
0
].
img
??
''
,
color:
Colours
.
cC7
.
withOpacity
(
0.5
),
fit:
BoxFit
.
cover
,
// 设置适应方式为充满
offset:
Offset
(
3
.
w
,
0
),
width:
72.0
.
w
,
blurRadius:
10
.
w
,
height:
86.0
.
w
,
spreadRadius:
0
.
w
,
),
),
],
Expanded
(
),
child:
Padding
(
child:
ClipRRect
(
borderRadius:
BorderRadius
.
circular
(
8
.
w
),
child:
Column
(
mainAxisAlignment:
MainAxisAlignment
.
start
,
mainAxisSize:
MainAxisSize
.
min
,
children:
[
Padding
(
padding:
EdgeInsets
.
only
(
padding:
EdgeInsets
.
only
(
left:
12.0
.
w
,
top:
12.0
.
w
,
bottom:
12.0
.
w
),
left:
12.0
.
w
,
child:
Row
(
top:
5.5
.
w
,
mainAxisAlignment:
MainAxisAlignment
.
start
,
right:
23.5
.
w
),
crossAxisAlignment:
CrossAxisAlignment
.
start
,
child:
Column
(
mainAxisAlignment:
MainAxisAlignment
.
spaceBetween
,
crossAxisAlignment:
CrossAxisAlignment
.
end
,
// 下面的Text靠左
children:
[
children:
[
Image
.
network
(
Text
(
controller
.
model
?.
bookList
?[
0
].
img
??
''
,
myController
.
model
.
bookList
?[
0
].
name
??
''
,
fit:
BoxFit
.
cover
,
// 设置适应方式为充满
style:
TextStyle
(
width:
72.0
.
w
,
color:
Colours
.
c3
,
height:
86.0
.
w
,
fontWeight:
Fonts
.
bold
,
fontSize:
13
.
w
,
),
maxLines:
2
,
overflow:
TextOverflow
.
ellipsis
,
// 超过部分显示省略号
),
),
Expanded
(
SizedBox
(
height:
25.5
.
w
),
child:
Padding
(
Text
(
padding:
EdgeInsets
.
only
(
"需付款 ¥
${myController.model.finalTotalPrice}
"
,
left:
12.0
.
w
,
style:
TextStyle
(
top:
5.5
.
w
,
color:
Colours
.
cAB1941
,
right:
23.5
.
w
),
fontWeight:
Fonts
.
bold
,
child:
Column
(
fontSize:
14
.
w
,
mainAxisAlignment:
MainAxisAlignment
.
spaceBetween
,
crossAxisAlignment:
CrossAxisAlignment
.
end
,
// 下面的Text靠左
children:
[
Text
(
controller
.
model
.
bookList
?[
0
].
name
??
''
,
style:
TextStyle
(
color:
Colours
.
c3
,
fontWeight:
Fonts
.
bold
,
fontSize:
13
.
w
,
),
maxLines:
2
,
overflow:
TextOverflow
.
ellipsis
,
// 超过部分显示省略号
),
SizedBox
(
height:
25.5
.
w
),
Text
(
"需付款 ¥
${controller.model.finalTotalPrice}
"
,
style:
TextStyle
(
color:
Colours
.
cAB1941
,
fontWeight:
Fonts
.
bold
,
fontSize:
14
.
w
,
),
),
],
),
),
),
),
),
],
],
),
),
),
),
Container
(
),
color:
Colours
.
cLine
,
],
margin:
EdgeInsets
.
only
(
left:
10
.
w
,
right:
10
.
w
,
bottom:
12
.
w
),
height:
1
.
w
,
),
Container
(
padding:
EdgeInsets
.
only
(
left:
11.5
.
w
,
bottom:
8
.
w
,
right:
23.5
.
w
),
child:
Column
(
mainAxisAlignment:
MainAxisAlignment
.
spaceEvenly
,
children:
controller
.
orderAwaitings
.
map
((
model
)
{
return
Padding
(
padding:
EdgeInsets
.
only
(
top:
12
.
w
),
child:
Row
(
mainAxisAlignment:
MainAxisAlignment
.
spaceBetween
,
children:
[
Text
(
model
.
name
,
style:
TextStyle
(
fontSize:
13
.
w
,
height:
1.6
.
w
,
color:
Colours
.
c9
),
),
Text
(
model
.
value
.
toString
(),
style:
TextStyle
(
fontSize:
13
.
w
,
height:
1.6
.
w
,
color:
Colours
.
c3
),
),
],
),
);
}).
toList
(),
),
),
SizedBox
(
height:
13.5
.
w
,
),
],
),
),
),
),
),
SizedBox
(
Container
(
height:
39
.
w
,
color:
Colours
.
cLine
,
margin:
EdgeInsets
.
only
(
left:
10
.
w
,
right:
10
.
w
,
bottom:
12
.
w
),
height:
1
.
w
,
),
),
GestureDetector
(
Container
(
onTap:
(){
padding:
EdgeInsets
.
only
(
controller
.
payOrder
();
left:
11.5
.
w
,
bottom:
8
.
w
,
right:
23.5
.
w
),
},
child:
Column
(
child:
Container
(
mainAxisAlignment:
margin:
EdgeInsets
.
symmetric
(
horizontal:
15
.
w
),
MainAxisAlignment
.
spaceEvenly
,
height:
40
.
w
,
children:
decoration:
BoxDecoration
(
myController
.
orderAwaitings
.
map
((
model
)
{
color:
AppTheme
.
primary
,
return
Padding
(
borderRadius:
BorderRadius
.
circular
(
180
.
w
),
padding:
EdgeInsets
.
only
(
top:
12
.
w
),
border:
child:
Row
(
Border
.
all
(
color:
Colours
.
cC31F4C
,
width:
0.5
.
w
)),
mainAxisAlignment:
child:
Center
(
MainAxisAlignment
.
spaceBetween
,
child:
Text
(
children:
[
'立即支付 ¥
${controller.model.finalTotalPrice}
'
,
Text
(
style:
TextStyle
(
model
.
name
,
fontWeight:
Fonts
.
medium
,
style:
TextStyle
(
fontSize:
14
.
w
,
fontSize:
13
.
w
,
color:
Colours
.
cFF
),
height:
1.6
.
w
,
),
color:
Colours
.
c9
),
),
),
Text
(
model
.
value
.
toString
(),
style:
TextStyle
(
fontSize:
13
.
w
,
height:
1.6
.
w
,
color:
Colours
.
c3
),
),
],
),
);
}).
toList
(),
),
),
),
),
SizedBox
(
SizedBox
(
height:
1
1
.5
.
w
,
height:
1
3
.5
.
w
,
),
),
GestureDetector
(
],
onTap:
()
{
),
showDialog
(
),
context:
context
,
),
builder:
(
BuildContext
context
)
{
SizedBox
(
return
AlertDialog
(
height:
39
.
w
,
shape:
RoundedRectangleBorder
(
),
borderRadius:
BorderRadius
.
circular
(
8.0
.
w
),
GestureDetector
(
onTap:
(){
myController
.
payOrder
();
},
child:
Container
(
margin:
EdgeInsets
.
symmetric
(
horizontal:
15
.
w
),
height:
40
.
w
,
decoration:
BoxDecoration
(
color:
AppTheme
.
primary
,
borderRadius:
BorderRadius
.
circular
(
180
.
w
),
border:
Border
.
all
(
color:
Colours
.
cC31F4C
,
width:
0.5
.
w
)),
child:
Center
(
child:
Text
(
'立即支付 ¥
${myController.model.finalTotalPrice}
'
,
style:
TextStyle
(
fontWeight:
Fonts
.
medium
,
fontSize:
14
.
w
,
color:
Colours
.
cFF
),
),
),
),
),
SizedBox
(
height:
11.5
.
w
,
),
GestureDetector
(
onTap:
()
{
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
,
),
),
contentPadding:
EdgeInsets
.
zero
,
// 移除内容部分的内边距
),
content:
Wrap
(
children:
[
),
Container
(
),
margin:
EdgeInsets
.
only
(
top:
44
.
w
,
bottom:
29
.
w
),
// 调整上下间距
Container
(
child:
Center
(
height:
1
.
w
,
// 设置分割线的高度
child:
Text
(
width:
double
.
infinity
,
// 设置分割线的宽度
'确定取消订单吗'
,
color:
Colours
.
cLine
,
// 设置分割线的颜色
style:
TextStyle
(
),
fontSize:
15
.
w
,
],),
fontWeight:
Fonts
.
medium
,
// 去除操作按钮区域的内边距
color:
Colours
.
c3
,
actionsPadding:
EdgeInsets
.
zero
,
),
actions:
<
Widget
>[
),
Row
(
mainAxisAlignment:
MainAxisAlignment
.
spaceEvenly
,
// 或者使用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:
1
.
w
,
// 设置分割线的高度
),
width:
double
.
infinity
,
// 设置分割线的宽度
Container
(
color:
Colours
.
cLine
,
// 设置分割线的颜色
height:
39.5
.
w
,
// 设置分割线的高度
),
width:
1
,
// 设置分割线的宽度
],),
color:
Colours
.
cLine
,
// 设置分割线的颜色
// 去除操作按钮区域的内边距
),
actionsPadding:
EdgeInsets
.
zero
,
GestureDetector
(
actions:
<
Widget
>[
onTap:
()
{
Row
(
myController
.
cancelPay
();
mainAxisAlignment:
MainAxisAlignment
.
spaceEvenly
,
// 或者使用MainAxisAlignment.spaceEvenly
Navigator
.
of
(
context
).
pop
();
children:
[
Navigator
.
pop
(
context
);
GestureDetector
(
},
onTap:
()
=>
Navigator
.
of
(
context
).
pop
(),
child:
Container
(
child:
const
Text
(
width:
105
.
w
,
'取消'
,
color:
Colours
.
cFF
,
style:
TextStyle
(
alignment:
Alignment
.
center
,
fontSize:
12
,
child:
const
Text
(
fontWeight:
Fonts
.
medium
,
'确定'
,
color:
Colours
.
c6
,
style:
TextStyle
(
),
fontSize:
12
,
),
fontWeight:
Fonts
.
medium
,
),
color:
Colours
.
cAB1941
,
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:
Text
(
'取消订单'
,
style:
TextStyle
(
fontWeight:
Fonts
.
medium
,
fontSize:
15
.
w
,
color:
Colours
.
c9
,
),
),
),
),
],
],
);
},
);
},
child:
Container
(
width:
105
.
w
,
color:
Colours
.
cFF
,
alignment:
Alignment
.
center
,
child:
const
Text
(
'取消订单'
,
style:
TextStyle
(
fontWeight:
Fonts
.
medium
,
fontSize:
15
,
color:
Colours
.
c9
,
),
),
),
)),
),
);
;
),
],
),
),
);
}
}
...
...
lib/pages/user_order_coin_awaiting/controller.dart
浏览文件 @
b0c5b2ee
...
@@ -2,10 +2,14 @@ part of user_order_coin_awaiting;
...
@@ -2,10 +2,14 @@ part of user_order_coin_awaiting;
/// 紫荆币等待付款订单
/// 紫荆币等待付款订单
class
UserOrderCoinAwaitingController
extends
GetxController
{
class
UserOrderCoinAwaitingController
extends
GetxController
{
final
String
orderNum
;
late
String
_orderNum
;
UserOrderCoinAwaitingController
(
this
.
orderNum
);
// 订单编号
String
get
orderNum
=>
_orderNum
;
// 获取订单编号的方法
UserOrderCoinAwaitingController
();
// 更新订单编号的方法
void
updateOrderNum
(
String
newOrderNum
)
{
_orderNum
=
newOrderNum
;
}
late
OrderInfoModel
model
;
late
OrderInfoModel
model
;
// 应付款、订单编号等
// 应付款、订单编号等
List
<
OrderCompletedModel
>
orderAwaitings
=
[];
List
<
OrderCompletedModel
>
orderAwaitings
=
[];
...
@@ -33,9 +37,6 @@ class UserOrderCoinAwaitingController extends GetxController {
...
@@ -33,9 +37,6 @@ class UserOrderCoinAwaitingController extends GetxController {
}
}
}
}
/// 获取订单信息
/// 获取订单信息
Future
<
void
>
getOrderInfo
()
async
{
Future
<
void
>
getOrderInfo
()
async
{
model
=
await
MineAPI
.
getOrderInfo
(
orderNum:
orderNum
);
model
=
await
MineAPI
.
getOrderInfo
(
orderNum:
orderNum
);
...
@@ -91,7 +92,6 @@ class UserOrderCoinAwaitingController extends GetxController {
...
@@ -91,7 +92,6 @@ class UserOrderCoinAwaitingController extends GetxController {
// 支付宝支付
// 支付宝支付
void
requestAliPay
(){
void
requestAliPay
(){
print
(
'================================================================
${payOrderModel.encryptionOrder!}
'
);
print
(
'================================================================
${payOrderModel.encryptionOrder!}
'
);
tobias
.
pay
(
payOrderModel
.
encryptionOrder
!).
then
((
payResult
){
tobias
.
pay
(
payOrderModel
.
encryptionOrder
!).
then
((
payResult
){
if
(
payResult
[
'resultStatus'
]
==
'9000'
)
{
if
(
payResult
[
'resultStatus'
]
==
'9000'
)
{
...
...
lib/pages/user_order_coin_awaiting/view.dart
浏览文件 @
b0c5b2ee
...
@@ -16,7 +16,8 @@ class _UserOrderCoinAwaitingState extends State<UserOrderCoinAwaitingPage> {
...
@@ -16,7 +16,8 @@ class _UserOrderCoinAwaitingState extends State<UserOrderCoinAwaitingPage> {
@override
@override
void
initState
()
{
void
initState
()
{
myController
=
Get
.
put
(
UserOrderCoinAwaitingController
(
widget
.
orderNum
));
myController
=
Get
.
put
(
UserOrderCoinAwaitingController
());
myController
.
updateOrderNum
(
widget
.
orderNum
);
super
.
initState
();
super
.
initState
();
}
}
...
@@ -38,266 +39,279 @@ class _UserOrderCoinAwaitingState extends State<UserOrderCoinAwaitingPage> {
...
@@ -38,266 +39,279 @@ class _UserOrderCoinAwaitingState extends State<UserOrderCoinAwaitingPage> {
context
.
pop
(
true
);
context
.
pop
(
true
);
return
false
;
return
false
;
},
},
child:
GetBuilder
<
UserOrderCoinAwaitingController
>(
child:
Scaffold
(
init:
UserOrderCoinAwaitingController
(
widget
.
orderNum
),
appBar:
CustomAppBar
(
builder:
(
controller
)
=>
Scaffold
(
title:
const
Text
(
'待支付'
),
appBar:
CustomAppBar
(
actions:
[],
title:
const
Text
(
'待支付'
),
),
actions:
[],
body:
Column
(
),
children:
[
body:
Column
(
Container
(
margin:
EdgeInsets
.
symmetric
(
horizontal:
AppTheme
.
margin
,
vertical:
AppTheme
.
margin
),
decoration:
BoxDecoration
(
borderRadius:
BorderRadius
.
circular
(
8
.
w
),
color:
Colors
.
white
,
boxShadow:
[
BoxShadow
(
color:
Colours
.
cC7
.
withOpacity
(
0.5
),
offset:
Offset
(
3
.
w
,
0
),
blurRadius:
10
.
w
,
spreadRadius:
0
.
w
,
),
],
),
child:
ClipRRect
(
borderRadius:
BorderRadius
.
circular
(
8
.
w
),
child:
Column
(
mainAxisAlignment:
MainAxisAlignment
.
start
,
mainAxisSize:
MainAxisSize
.
min
,
children:
[
children:
[
Container
(
Padding
(
margin:
EdgeInsets
.
symmetric
(
padding:
EdgeInsets
.
only
(
horizontal:
AppTheme
.
margin
,
left:
12.0
.
w
,
vertical:
AppTheme
.
margin
),
top:
17.5
.
w
,
decoration:
BoxDecoration
(
bottom:
12.0
.
w
),
borderRadius:
BorderRadius
.
circular
(
8
.
w
),
child:
Row
(
color:
Colors
.
white
,
mainAxisAlignment:
boxShadow:
[
MainAxisAlignment
.
start
,
BoxShadow
(
crossAxisAlignment:
color:
Colours
.
cC7
.
withOpacity
(
0.5
),
CrossAxisAlignment
.
start
,
offset:
Offset
(
3
.
w
,
0
),
children:
[
blurRadius:
10
.
w
,
Image
.
asset
(
spreadRadius:
0
.
w
,
'assets/images/coin.png'
,
// fit: BoxFit.cover, // 设置适应方式为充满
width:
42.0
.
w
,
height:
42.0
.
w
,
),
),
],
Expanded
(
),
child:
Padding
(
child:
ClipRRect
(
padding:
borderRadius:
BorderRadius
.
circular
(
8
.
w
),
EdgeInsets
.
only
(
right:
16.5
.
w
),
child:
Column
(
child:
Column
(
mainAxisAlignment:
MainAxisAlignment
.
start
,
mainAxisSize:
MainAxisSize
.
min
,
children:
[
Padding
(
padding:
EdgeInsets
.
only
(
left:
12.0
.
w
,
top:
17.5
.
w
,
bottom:
12.0
.
w
),
child:
Row
(
mainAxisAlignment:
mainAxisAlignment:
MainAxisAlignment
.
start
,
MainAxisAlignment
.
spaceBetween
,
crossAxisAlignment:
crossAxisAlignment:
CrossAxisAlignment
.
start
,
CrossAxisAlignment
.
end
,
// 下面的Text靠左
children:
[
children:
[
Image
.
asset
(
Text
(
'assets/images/coin.png'
,
'充值
${myController.model.bean}
紫荆币'
,
// fit: BoxFit.cover, // 设置适应方式为充满
style:
TextStyle
(
width:
42.0
.
w
,
color:
Colours
.
c3
,
height:
42.0
.
w
,
fontWeight:
Fonts
.
bold
,
fontSize:
13
.
w
,
),
maxLines:
2
,
overflow:
TextOverflow
.
ellipsis
,
// 超过部分显示省略号
),
),
Expanded
(
SizedBox
(
height:
9
.
w
),
child:
Padding
(
Text
(
padding:
"需付款 ¥
${myController.model.finalTotalPrice}
"
,
EdgeInsets
.
only
(
right:
16.5
.
w
),
style:
TextStyle
(
child:
Column
(
color:
Colours
.
cAB1941
,
mainAxisAlignment:
fontWeight:
Fonts
.
bold
,
MainAxisAlignment
fontSize:
14
.
w
,
.
spaceBetween
,
crossAxisAlignment:
CrossAxisAlignment
.
end
,
// 下面的Text靠左
children:
[
Text
(
'充值
${controller.model.bean}
紫荆币'
,
style:
TextStyle
(
color:
Colours
.
c3
,
fontWeight:
Fonts
.
bold
,
fontSize:
13
.
w
,
),
maxLines:
2
,
overflow:
TextOverflow
.
ellipsis
,
// 超过部分显示省略号
),
SizedBox
(
height:
9
.
w
),
Text
(
"需付款 ¥
${controller.model.finalTotalPrice}
"
,
style:
TextStyle
(
color:
Colours
.
cAB1941
,
fontWeight:
Fonts
.
bold
,
fontSize:
14
.
w
,
),
),
],
),
),
),
),
),
],
],
),
),
),
),
Container
(
),
color:
Colours
.
cLine
,
],
margin:
EdgeInsets
.
only
(
left:
10
.
w
,
right:
10
.
w
,
bottom:
12
.
w
),
height:
1
.
w
,
),
Container
(
padding:
EdgeInsets
.
only
(
left:
11.5
.
w
,
bottom:
8
.
w
,
right:
23.5
.
w
),
child:
Column
(
mainAxisAlignment:
MainAxisAlignment
.
spaceEvenly
,
children:
controller
.
orderAwaitings
.
map
((
model
)
{
return
Padding
(
padding:
EdgeInsets
.
only
(
top:
12
.
w
),
child:
Row
(
mainAxisAlignment:
MainAxisAlignment
.
spaceBetween
,
children:
[
Text
(
model
.
name
,
style:
TextStyle
(
fontSize:
13
.
w
,
height:
1.6
.
w
,
color:
Colours
.
c9
),
),
Text
(
model
.
value
.
toString
(),
style:
TextStyle
(
fontSize:
13
.
w
,
height:
1.6
.
w
,
color:
Colours
.
c3
),
),
],
),
);
}).
toList
(),
),
),
SizedBox
(
height:
13.5
.
w
,
),
],
),
),
),
),
),
SizedBox
(
Container
(
height:
11.5
.
w
,
color:
Colours
.
cLine
,
margin:
EdgeInsets
.
only
(
left:
10
.
w
,
right:
10
.
w
,
bottom:
12
.
w
),
height:
1
.
w
,
),
),
Container
(
Container
(
margin:
EdgeInsets
.
symmetric
(
horizontal:
15
.
w
),
padding:
EdgeInsets
.
only
(
height:
40
.
w
,
left:
11.5
.
w
,
decoration:
BoxDecoration
(
bottom:
8
.
w
,
color:
AppTheme
.
primary
,
right:
23.5
.
w
),
borderRadius:
BorderRadius
.
circular
(
180
.
w
),
child:
Column
(
border:
Border
.
all
(
mainAxisAlignment:
color:
Colours
.
cC31F4C
,
width:
0.5
.
w
)),
MainAxisAlignment
.
spaceEvenly
,
child:
Center
(
children:
myController
.
orderAwaitings
child:
GestureDetector
(
.
map
((
model
)
{
onTap:
()
{
return
Padding
(
// print("保存昵称");
padding:
EdgeInsets
.
only
(
top:
12
.
w
),
// context.pushNamed(Routes.orderEvaluate);
child:
Row
(
},
mainAxisAlignment:
child:
Text
(
MainAxisAlignment
.
spaceBetween
,
'立即支付 ¥
${controller.model.finalTotalPrice}
'
,
children:
[
style:
TextStyle
(
Text
(
fontWeight:
Fonts
.
medium
,
model
.
name
,
fontSize:
14
.
w
,
style:
TextStyle
(
color:
Colours
.
cFF
),
fontSize:
13
.
w
,
)),
height:
1.6
.
w
,
color:
Colours
.
c9
),
),
Text
(
model
.
value
.
toString
(),
style:
TextStyle
(
fontSize:
13
.
w
,
height:
1.6
.
w
,
color:
Colours
.
c3
),
),
],
),
);
}).
toList
(),
),
),
),
),
SizedBox
(
SizedBox
(
height:
1
1
.5
.
w
,
height:
1
3
.5
.
w
,
),
),
GestureDetector
(
],
onTap:
()
{
),
showDialog
(
),
context:
context
,
),
builder:
(
BuildContext
context
)
{
SizedBox
(
return
AlertDialog
(
height:
11.5
.
w
,
shape:
RoundedRectangleBorder
(
),
borderRadius:
Container
(
BorderRadius
.
circular
(
8.0
.
w
),
margin:
EdgeInsets
.
symmetric
(
horizontal:
15
.
w
),
height:
40
.
w
,
decoration:
BoxDecoration
(
color:
AppTheme
.
primary
,
borderRadius:
BorderRadius
.
circular
(
180
.
w
),
border:
Border
.
all
(
color:
Colours
.
cC31F4C
,
width:
0.5
.
w
)),
child:
Center
(
child:
GestureDetector
(
onTap:
()
{
// print("保存昵称");
// context.pushNamed(Routes.orderEvaluate);
},
child:
Text
(
'立即支付 ¥
${myController.model.finalTotalPrice}
'
,
style:
TextStyle
(
fontWeight:
Fonts
.
medium
,
fontSize:
14
.
w
,
color:
Colours
.
cFF
),
)),
),
),
SizedBox
(
height:
11.5
.
w
,
),
GestureDetector
(
onTap:
()
{
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
,
),
),
),
contentPadding:
EdgeInsets
.
zero
,
),
// 移除内容部分的内边距
),
content:
Wrap
(
Container
(
children:
[
height:
1
.
w
,
// 设置分割线的高度
Container
(
width:
double
.
infinity
,
// 设置分割线的宽度
margin:
EdgeInsets
.
only
(
color:
Colours
.
cLine
,
// 设置分割线的颜色
top:
44
.
w
,
),
bottom:
29
.
w
),
// 调整上下间距
],
child:
Center
(
),
child:
Text
(
// 去除操作按钮区域的内边距
'确定取消订单吗'
,
actionsPadding:
EdgeInsets
.
zero
,
style:
TextStyle
(
actions:
<
Widget
>[
fontSize:
15
.
w
,
Row
(
fontWeight:
Fonts
.
medium
,
mainAxisAlignment:
color:
Colours
.
c3
,
MainAxisAlignment
.
spaceEvenly
,
),
// 或者使用MainAxisAlignment.spaceEvenly
),
children:
[
),
GestureDetector
(
),
onTap:
()
=>
Container
(
Navigator
.
of
(
context
).
pop
(),
height:
1
.
w
,
// 设置分割线的高度
child:
Container
(
width:
double
.
infinity
,
// 设置分割线的宽度
width:
105
.
w
,
color:
Colours
.
cLine
,
// 设置分割线的颜色
color:
Colours
.
cFF
,
alignment:
Alignment
.
center
,
child:
const
Text
(
'取消'
,
style:
TextStyle
(
fontSize:
12
,
fontWeight:
Fonts
.
medium
,
color:
Colours
.
c6
,
),
),
]
,
)
,
),
),
// 去除操作按钮区域的内边距
),
actionsPadding:
EdgeInsets
.
zero
,
Container
(
actions:
<
Widget
>[
height:
39.5
.
w
,
// 设置分割线的高度
Row
(
width:
1
,
// 设置分割线的宽度
mainAxisAlignment:
color:
Colours
.
cLine
,
// 设置分割线的颜色
MainAxisAlignment
.
spaceEvenly
,
),
// 或者使用MainAxisAlignment.spaceEvenly
GestureDetector
(
children:
[
onTap:
()
{
GestureDetector
(
myController
.
cancelPay
();
onTap:
()
=>
Navigator
.
of
(
context
).
pop
();
Navigator
.
of
(
context
).
pop
(),
Navigator
.
pop
(
context
);
child:
const
Text
(
},
'取消'
,
child:
Container
(
style:
TextStyle
(
width:
105
.
w
,
fontSize:
12
,
color:
Colours
.
cFF
,
fontWeight:
Fonts
.
medium
,
alignment:
Alignment
.
center
,
color:
Colours
.
c6
,
child:
const
Text
(
),
'确定'
,
),
style:
TextStyle
(
),
fontSize:
12
,
Container
(
fontWeight:
Fonts
.
medium
,
height:
39.5
.
w
,
// 设置分割线的高度
color:
Colours
.
cAB1941
,
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:
Text
(
'取消订单'
,
style:
TextStyle
(
fontWeight:
Fonts
.
medium
,
fontSize:
15
.
w
,
color:
Colours
.
c9
,
),
),
),
],
),
);
],
},
);
},
child:
Container
(
width:
105
.
w
,
color:
Colours
.
cFF
,
alignment:
Alignment
.
center
,
child:
const
Text
(
'取消订单'
,
style:
TextStyle
(
fontWeight:
Fonts
.
medium
,
fontSize:
15
,
color:
Colours
.
c9
,
),
),
),
)),
),
),
],
),
),
);
);
}
}
},
},
...
...
lib/pages/user_set/view.dart
浏览文件 @
b0c5b2ee
...
@@ -259,11 +259,6 @@ class _UserSetPageState extends State<UserSetPage> {
...
@@ -259,11 +259,6 @@ class _UserSetPageState extends State<UserSetPage> {
// 去除操作按钮区域的内边距
// 去除操作按钮区域的内边距
actionsPadding:
EdgeInsets
.
zero
,
actionsPadding:
EdgeInsets
.
zero
,
actions:
<
Widget
>[
actions:
<
Widget
>[
Wrap
(
children:
[
],
),
Row
(
Row
(
mainAxisAlignment:
MainAxisAlignment
.
center
,
mainAxisAlignment:
MainAxisAlignment
.
center
,
children:
[
children:
[
...
@@ -312,12 +307,18 @@ class _UserSetPageState extends State<UserSetPage> {
...
@@ -312,12 +307,18 @@ class _UserSetPageState extends State<UserSetPage> {
if
(!
forcedUpgrade
)
if
(!
forcedUpgrade
)
Padding
(
padding:
EdgeInsets
.
only
(
right:
28
.
w
),
Padding
(
padding:
EdgeInsets
.
only
(
right:
28
.
w
),
child:
GestureDetector
(
child:
GestureDetector
(
child:
const
Text
(
child:
'稍后再说'
,
Container
(
style:
TextStyle
(
width:
85
.
w
,
color:
Colours
.
c6
,
color:
Colours
.
cFF
,
fontSize:
12
,
alignment:
Alignment
.
center
,
fontWeight:
Fonts
.
medium
),
child:
const
Text
(
'稍后再说'
,
style:
TextStyle
(
color:
Colours
.
c6
,
fontSize:
12
,
fontWeight:
Fonts
.
medium
),
),
),
),
onTap:
()
=>
Navigator
.
of
(
context
).
pop
(),
onTap:
()
=>
Navigator
.
of
(
context
).
pop
(),
),),
),),
...
@@ -329,12 +330,17 @@ class _UserSetPageState extends State<UserSetPage> {
...
@@ -329,12 +330,17 @@ class _UserSetPageState extends State<UserSetPage> {
),
),
Padding
(
padding:
EdgeInsets
.
only
(
left:
28
.
w
),
Padding
(
padding:
EdgeInsets
.
only
(
left:
28
.
w
),
child:
GestureDetector
(
child:
GestureDetector
(
child:
const
Text
(
child:
Container
(
'立即更新'
,
width:
85
.
w
,
style:
TextStyle
(
color:
Colours
.
cFF
,
color:
Colours
.
cAB1941
,
alignment:
Alignment
.
center
,
fontSize:
12
,
child:
const
Text
(
fontWeight:
Fonts
.
medium
),
'立即更新'
,
style:
TextStyle
(
color:
Colours
.
cAB1941
,
fontSize:
12
,
fontWeight:
Fonts
.
medium
),
),
),
),
onTap:
()
{
onTap:
()
{
_appUpdate
();
_appUpdate
();
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论