Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
B
book-app
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
book-app
Commits
a5723e41
提交
a5723e41
authored
1月 27, 2024
作者:
maodou
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
1:订单列表页面
上级
03879430
全部展开
显示空白字符变更
内嵌
并排
正在显示
25 个修改的文件
包含
1261 行增加
和
17 行删除
+1261
-17
mine.dart
lib/apis/mine.dart
+21
-0
index.dart
lib/models/index.dart
+2
-0
order.dart
lib/models/order.dart
+253
-0
view.dart
lib/pages/login/view.dart
+1
-0
controller.dart
lib/pages/mine/controller.dart
+33
-14
controller.dart
lib/pages/user_feedback/controller.dart
+13
-0
view.dart
lib/pages/user_feedback/view.dart
+4
-2
controller.dart
lib/pages/user_order/controller.dart
+0
-0
index.dart
lib/pages/user_order/index.dart
+26
-0
view.dart
lib/pages/user_order/view.dart
+118
-0
awaiting.dart
lib/pages/user_order/widgets/awaiting.dart
+0
-0
canceled.dart
lib/pages/user_order/widgets/canceled.dart
+0
-0
coin.dart
lib/pages/user_order/widgets/coin.dart
+98
-0
completed.dart
lib/pages/user_order/widgets/completed.dart
+0
-0
list.dart
lib/pages/user_order/widgets/list.dart
+54
-0
refunded.dart
lib/pages/user_order/widgets/refunded.dart
+283
-0
controller.dart
lib/pages/user_order_awaiting/controller.dart
+35
-0
index.dart
lib/pages/user_order_awaiting/index.dart
+18
-0
view.dart
lib/pages/user_order_awaiting/view.dart
+208
-0
controller.dart
lib/pages/user_order_completed/controller.dart
+37
-0
index.dart
lib/pages/user_order_completed/index.dart
+18
-0
view.dart
lib/pages/user_order_completed/view.dart
+0
-0
index.dart
lib/routes/index.dart
+3
-0
routes.dart
lib/routes/routes.dart
+33
-1
styles.dart
lib/utils/styles.dart
+3
-0
没有找到文件。
lib/apis/mine.dart
浏览文件 @
a5723e41
...
...
@@ -309,4 +309,25 @@ abstract class MineAPI {
}
return
false
;
}
/// 19、订单列表
static
Future
<
List
<
OrderListModel
>>
orderList
({
int
page
=
1
,
int
limit
=
10
,
int
status
=
1
,
})
async
{
final
result
=
await
HttpService
.
to
.
post
(
'/v1/orders/Orders/getOrdersList'
,
params:
{
'page'
:
page
,
'page_size'
:
limit
,
'status'
:
status
,
},
);
if
(
result
.
data
is
!
Map
&&
result
.
data
[
'list'
]
is
!
List
)
return
[];
return
List
.
generate
(
result
.
data
[
'list'
].
length
,
(
index
)
{
return
OrderListModel
.
fromJson
(
result
.
data
[
'list'
][
index
]);
});
}
}
lib/models/index.dart
浏览文件 @
a5723e41
...
...
@@ -12,3 +12,4 @@ part 'msg.dart';
part
'study_history.dart'
;
part
'library.dart'
;
part
'mine.dart'
;
part
'order.dart'
;
\ No newline at end of file
lib/models/order.dart
0 → 100644
浏览文件 @
a5723e41
part of
models
;
/// 已完成订单
class
OrderCompletedModel
{
OrderCompletedModel
(
{
required
this
.
value
,
required
this
.
name
,
this
.
link
,
this
.
other
});
String
value
;
String
name
;
String
?
link
;
String
?
other
;
}
/// 已完成订单详细信息模型
class
OrderCompletedInfoModel
{
OrderCompletedInfoModel
({
this
.
id
,
this
.
price
,
this
.
totalPay
,
this
.
favorable
,
this
.
orderId
,
this
.
payWay
,
this
.
payTime
,
this
.
orderTime
,
});
OrderCompletedInfoModel
.
fromJson
(
dynamic
json
)
{
id
=
json
[
'id'
];
price
=
json
[
'price'
];
totalPay
=
json
[
'totalPay'
];
favorable
=
json
[
'favorable'
];
orderId
=
json
[
'orderId'
];
payWay
=
json
[
'payWay'
];
payTime
=
json
[
'payTime'
];
orderTime
=
json
[
'orderTime'
];
}
num
?
id
;
String
?
price
;
// 价格
String
?
totalPay
;
String
?
favorable
;
// 优惠
String
?
orderId
;
// 订单编号
String
?
payWay
;
// 支付方式
String
?
payTime
;
// 支付时间
String
?
orderTime
;
// 下单时间
OrderCompletedInfoModel
copyWith
({
num
?
id
,
String
?
price
,
String
?
totalPay
,
String
?
favorable
,
String
?
orderId
,
String
?
payWay
,
String
?
payTime
,
String
?
orderTime
,
})
=>
OrderCompletedInfoModel
(
id:
id
??
this
.
id
,
price:
price
??
this
.
price
,
totalPay:
totalPay
??
this
.
totalPay
,
favorable:
favorable
??
this
.
favorable
,
orderId:
orderId
??
this
.
orderId
,
payWay:
payWay
??
this
.
payWay
,
payTime:
payTime
??
this
.
payTime
,
orderTime:
orderTime
??
this
.
orderTime
,
);
Map
<
String
,
dynamic
>
toJson
()
{
final
map
=
<
String
,
dynamic
>{};
map
[
'id'
]
=
id
;
map
[
'price'
]
=
price
;
map
[
'totalPay'
]
=
totalPay
;
map
[
'favorable'
]
=
favorable
;
map
[
'orderId'
]
=
orderId
;
map
[
'payWay'
]
=
payWay
;
map
[
'payTime'
]
=
payTime
;
map
[
'orderTime'
]
=
orderTime
;
return
map
;
}
}
/// 订单列表模型
class
OrderListModel
{
OrderListModel
({
this
.
id
,
this
.
ordersnum
,
this
.
totalPrice
,
this
.
finalTotalPrice
,
this
.
num_
,
this
.
status
,
this
.
payType
,
this
.
types
,
this
.
createTime
,
this
.
cartList
,
});
OrderListModel
.
fromJson
(
dynamic
json
)
{
id
=
json
[
'id'
];
ordersnum
=
json
[
'ordersnum'
];
totalPrice
=
json
[
'total_price'
];
finalTotalPrice
=
json
[
'final_total_price'
];
num_
=
json
[
'num'
];
status
=
json
[
'status'
];
payType
=
json
[
'pay_type'
];
types
=
json
[
'types'
];
createTime
=
json
[
'create_time'
];
if
(
json
[
'cart_list'
]
!=
null
)
{
cartList
=
[];
json
[
'cart_list'
].
forEach
((
v
)
{
cartList
?.
add
(
CartListModel
.
fromJson
(
v
));
});
}
}
num
?
id
;
//订单id
String
?
ordersnum
;
//订单编号
String
?
totalPrice
;
// 原价总价
String
?
finalTotalPrice
;
//最终总价
num
?
num_
;
//商品数量
num
?
status
;
//订单状态 1:待支付,2取消支付,3:已支付 4:已退款
num
?
payType
;
//支付方式 1:微信 2:支付宝,3:紫荆币
num
?
types
;
//1是书籍订单 2是充值订单
String
?
createTime
;
//创建时间
List
<
CartListModel
>?
cartList
=
[];
OrderListModel
copyWith
({
num
?
id
,
String
?
ordersnum
,
String
?
totalPrice
,
String
?
finalTotalPrice
,
num
?
num
,
num
?
status
,
num
?
payType
,
num
?
types
,
String
?
createTime
,
List
<
CartListModel
>?
cartList
,
})
=>
OrderListModel
(
id:
id
??
this
.
id
,
ordersnum:
ordersnum
??
this
.
ordersnum
,
totalPrice:
totalPrice
??
this
.
totalPrice
,
finalTotalPrice:
finalTotalPrice
??
this
.
finalTotalPrice
,
status:
status
??
this
.
status
,
num_:
num_
??
this
.
num_
,
payType:
payType
??
this
.
payType
,
types:
types
??
this
.
types
,
createTime:
createTime
??
this
.
createTime
,
cartList:
cartList
??
this
.
cartList
,
);
Map
<
String
,
dynamic
>
toJson
()
{
final
map
=
<
String
,
dynamic
>{};
map
[
'id'
]
=
id
;
map
[
'ordersnum'
]
=
ordersnum
;
map
[
'total_price'
]
=
totalPrice
;
map
[
'final_total_price'
]
=
finalTotalPrice
;
map
[
'num'
]
=
num_
;
map
[
'status'
]
=
status
;
map
[
'pay_type'
]
=
payType
;
map
[
'types'
]
=
types
;
map
[
'create_time'
]
=
createTime
;
if
(
cartList
!=
null
)
{
map
[
'cart_list'
]
=
cartList
?.
map
((
v
)
=>
v
.
toJson
()).
toList
();
}
return
map
;
}
}
/// 书籍列表
class
CartListModel
{
CartListModel
({
this
.
recordId
,
this
.
orderId
,
this
.
price
,
this
.
num_
,
this
.
bookId
,
this
.
name
,
this
.
img
,
this
.
introduction
,
this
.
rating
,
this
.
comments
,
this
.
commentId
,
});
CartListModel
.
fromJson
(
dynamic
json
)
{
recordId
=
json
[
'record_id'
];
orderId
=
json
[
'order_id'
];
price
=
json
[
'price'
];
num_
=
json
[
'num'
];
bookId
=
json
[
'book_id'
];
name
=
json
[
'name'
];
img
=
json
[
'img'
];
introduction
=
json
[
'introduction'
];
rating
=
json
[
'rating'
];
comments
=
json
[
'comments'
];
commentId
=
json
[
'comment_id'
];
}
num
?
recordId
;
//书籍记录id
num
?
orderId
;
//对应订单id
String
?
price
;
// 书籍价格
num
?
num_
;
// 书籍价格
num
?
bookId
;
//书籍id,为0则是充值的没有书籍
String
?
name
;
// 书籍名
String
?
img
;
// 图片
String
?
introduction
;
// 简介
num
?
rating
;
// 评价星级
String
?
comments
;
// 评价内容
String
?
commentId
;
// 评价id
CartListModel
copyWith
({
num
?
recordId
,
//书籍记录id
num
?
orderId
,
//对应订单id
String
?
price
,
// 书籍价格
num
?
num_
,
// 书籍价格
num
?
bookId
,
//书籍id,为0则是充值的没有书籍
String
?
name
,
// 书籍名
String
?
img
,
// 图片
String
?
introduction
,
// 简介
num
?
rating
,
// 评价星级
String
?
comments
,
// 评价内容
String
?
commentId
,
// 评价id
})
=>
CartListModel
(
recordId:
recordId
??
this
.
recordId
,
orderId:
orderId
??
this
.
orderId
,
price:
price
??
this
.
price
,
num_:
num_
??
this
.
num_
,
bookId:
bookId
??
this
.
bookId
,
name:
name
??
this
.
name
,
img:
img
??
this
.
img
,
introduction:
introduction
??
this
.
introduction
,
rating:
rating
??
this
.
rating
,
comments:
comments
??
this
.
comments
,
commentId:
commentId
??
this
.
commentId
,
);
Map
<
String
,
dynamic
>
toJson
()
{
final
map
=
<
String
,
dynamic
>{};
map
[
'record_id'
]
=
recordId
;
map
[
'order_id'
]
=
orderId
;
map
[
'num'
]
=
num_
;
map
[
'price'
]
=
price
;
map
[
'book_id'
]
=
bookId
;
map
[
'name'
]
=
name
;
map
[
'img'
]
=
img
;
map
[
'introduction'
]
=
introduction
;
map
[
'rating'
]
=
rating
;
map
[
'comments'
]
=
comments
;
map
[
'comment_id'
]
=
commentId
;
return
map
;
}
}
lib/pages/login/view.dart
浏览文件 @
a5723e41
...
...
@@ -169,6 +169,7 @@ class _LoginPageState extends State<LoginPage> {
onPressed:
()
{
print
(
'11111111111111111'
);
controller
.
onLogin
(
context
);
// context.goNamed(Routes.order);
},
)
],
...
...
lib/pages/mine/controller.dart
浏览文件 @
a5723e41
part of
mine
;
class
MineController
extends
GetxController
{
// 广告数据
List
<
AdModel
>
ads
=
[];
// 个人信息数据
UserInfoModel
userInfo
=
UserInfoModel
();
// 笔记 讨论 错题 收藏
List
<
ReadModel
>
reads
=
[];
// 我的账户数据
List
<
ReadModel
>
accounts
=
[];
// 消息未读数
int
num
=
0
;
@override
void
onReady
()
{
_getAds
();
...
...
@@ -25,7 +24,6 @@ class MineController extends GetxController {
super
.
onReady
();
}
/// 获取广告数据
void
_getAds
()
async
{
ads
=
await
CommonAPI
.
list
(
type:
'4'
);
...
...
@@ -42,18 +40,39 @@ class MineController extends GetxController {
void
getInfo
()
async
{
userInfo
=
await
MineAPI
.
userInfo
();
reads
=
[
ReadModel
(
name:
'笔记'
,
value:
userInfo
.
noteNums
.
toString
(),
link:
Routes
.
note
),
ReadModel
(
name:
'讨论'
,
value:
userInfo
.
commentNums
.
toString
(),
link:
Routes
.
discuss
),
ReadModel
(
name:
'错题'
,
value:
userInfo
.
wrongNums
.
toString
(),
link:
Routes
.
wrong
),
ReadModel
(
name:
'收藏'
,
value:
userInfo
.
collectNums
.
toString
(),
link:
Routes
.
love
)
ReadModel
(
name:
'笔记'
,
value:
userInfo
.
noteNums
.
toString
(),
link:
Routes
.
note
),
ReadModel
(
name:
'讨论'
,
value:
userInfo
.
commentNums
.
toString
(),
link:
Routes
.
discuss
),
ReadModel
(
name:
'错题'
,
value:
userInfo
.
wrongNums
.
toString
(),
link:
Routes
.
wrong
),
ReadModel
(
name:
'收藏'
,
value:
userInfo
.
collectNums
.
toString
(),
link:
Routes
.
love
)
];
accounts
=
[
ReadModel
(
name:
'优惠券'
,
value:
userInfo
.
couponNums
.
toString
(),
link:
Routes
.
coupon
,
icon:
'assets/images/coupon.png'
),
ReadModel
(
name:
'积分'
,
value:
userInfo
.
integralNums
.
toString
(),
link:
Routes
.
point
,
icon:
'assets/images/point.png'
),
ReadModel
(
name:
'紫金币'
,
value:
userInfo
.
beanNums
.
toString
(),
link:
Routes
.
coin
,
icon:
'assets/images/coin.png'
),
ReadModel
(
name:
'订单'
,
value:
userInfo
.
ordersNums
.
toString
(),
link:
Routes
.
orderEvaluate
,
icon:
'assets/images/order.png'
)
ReadModel
(
name:
'优惠券'
,
value:
userInfo
.
couponNums
.
toString
(),
link:
Routes
.
coupon
,
icon:
'assets/images/coupon.png'
),
ReadModel
(
name:
'积分'
,
value:
userInfo
.
integralNums
.
toString
(),
link:
Routes
.
point
,
icon:
'assets/images/point.png'
),
ReadModel
(
name:
'紫金币'
,
value:
userInfo
.
beanNums
.
toString
(),
link:
Routes
.
coin
,
icon:
'assets/images/coin.png'
),
ReadModel
(
name:
'订单'
,
value:
userInfo
.
ordersNums
.
toString
(),
link:
Routes
.
order
,
icon:
'assets/images/order.png'
)
];
update
();
}
}
lib/pages/user_feedback/controller.dart
浏览文件 @
a5723e41
...
...
@@ -3,6 +3,9 @@ part of user_feedback;
/// 提交意见反馈
class
UserFeedbackController
extends
GetxController
{
late
TextEditingController
searchController
=
TextEditingController
();
// 按钮是否可用
bool
_enable
=
false
;
bool
get
enable
=>
_enable
;
/// 提交意见反馈
void
upFeedback
()
async
{
...
...
@@ -12,4 +15,14 @@ class UserFeedbackController extends GetxController {
update
();
}
}
void
setCanClick
(){
if
(
searchController
.
text
.
isNotEmpty
){
_enable
=
true
;
}
else
{
_enable
=
false
;
}
update
();
}
}
lib/pages/user_feedback/view.dart
浏览文件 @
a5723e41
...
...
@@ -48,6 +48,9 @@ class _UserFeedbackPageState extends State<UserFeedbackPage> {
controller:
controller
.
searchController
,
maxLines:
5
,
hintText:
'请描述你的问题,我们会尽快处理并回复'
,
onChanged:
(
text
){
controller
.
setCanClick
();
},
),
),
...
...
@@ -58,12 +61,11 @@ class _UserFeedbackPageState extends State<UserFeedbackPage> {
width:
double
.
infinity
,
child:
CustomGradientButton
(
text:
'提交反馈'
,
isEnabled:
tru
e
,
isEnabled:
controller
.
enabl
e
,
onPressed:
()
{
controller
.
upFeedback
();
FocusNode
blankNode
=
FocusNode
();
FocusScope
.
of
(
context
).
requestFocus
(
blankNode
);
print
(
'提交反馈'
);
// controller.onLogin(context);
},
)),
...
...
lib/pages/user_order/controller.dart
0 → 100644
浏览文件 @
a5723e41
差异被折叠。
点击展开。
lib/pages/user_order/index.dart
浏览文件 @
a5723e41
library
user_order
;
import
'package:easy_refresh/easy_refresh.dart'
;
import
'package:flutter/material.dart'
;
import
'package:flutter_book/theme.dart'
;
import
'package:flutter_book/utils/index.dart'
;
import
'package:flutter_book/widgets/index.dart'
;
import
'package:get/get_state_manager/src/rx_flutter/rx_ticket_provider_mixin.dart'
;
import
'package:get/get_state_manager/src/simple/get_controllers.dart'
;
import
'package:flutter_screenutil/flutter_screenutil.dart'
;
import
'package:get/get_state_manager/src/simple/get_state.dart'
;
import
'package:go_router/go_router.dart'
;
import
'../../apis/index.dart'
;
import
'../../models/index.dart'
;
import
'../../routes/index.dart'
;
part
'view.dart'
;
part
'controller.dart'
;
part
'widgets/list.dart'
;
part
'widgets/awaiting.dart'
;
part
'widgets/completed.dart'
;
part
'widgets/canceled.dart'
;
part
'widgets/refunded.dart'
;
part
'widgets/coin.dart'
;
\ No newline at end of file
lib/pages/user_order/view.dart
浏览文件 @
a5723e41
part of
user_order
;
class
UserOrderPage
extends
StatefulWidget
{
const
UserOrderPage
({
Key
?
key
/*, required this.userInfo*/
})
:
super
(
key:
key
);
@override
State
<
UserOrderPage
>
createState
()
=>
_UserOrderState
();
}
class
_UserOrderState
extends
State
<
UserOrderPage
>
{
/* late num? selectedGender ; // 选中的性别
@override
void initState() {
super.initState();
selectedGender = widget.userInfo.sex;
// 在这里可以使用 localVariable 进行操作
}*/
List
<
Tab
>
tabs
=
[
const
Tab
(
text:
'全部'
,),
const
Tab
(
text:
'待付款'
,),
const
Tab
(
text:
'已取消'
,),
const
Tab
(
text:
'已完成'
,),
const
Tab
(
text:
'已退款'
,),
];
@override
Widget
build
(
BuildContext
context
)
{
return
GetBuilder
<
UserOrderController
>(
init:
UserOrderController
(
tabs
[
0
].
toString
()),
builder:
(
controller
)
=>
Scaffold
(
appBar:
CustomAppBar
(
automaticallyImplyLeading:
false
,
titleSpacing:
0
,
title:
Padding
(
padding:
EdgeInsets
.
symmetric
(
horizontal:
AppTheme
.
margin
),
child:
CustomInputSearch
(
controller:
controller
.
searchController
,
readOnly:
false
,
hintText:
'搜索我的订单'
,
onTap:
()
{
// context.pushNamed(Routes.msgs);
},
onEditingComplete:
()
{
controller
.
search
();
// FocusScope.of(context).unfocus();
FocusNode
blankNode
=
FocusNode
();
FocusScope
.
of
(
context
).
requestFocus
(
blankNode
);
//指定为空白焦点
},
),
),
actions:
[
GestureDetector
(
onTap:
()
{
context
.
pop
();
},
child:
Container
(
padding:
EdgeInsets
.
only
(
left:
10
.
w
,
top:
10
.
w
,
bottom:
10
.
w
),
child:
Text
(
'取消'
,
style:
TextStyle
(
fontSize:
14
.
w
,
height:
1.5
,
color:
Colours
.
c3
),
),
),
)
],
),
body:
_buildBody
(
controller
),
),
);
}
Widget
_buildBody
(
UserOrderController
controller
){
return
DefaultTabController
(
length:
tabs
.
length
,
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
ClipRRect
(
borderRadius:
const
BorderRadius
.
only
(
topLeft:
Radius
.
circular
(
5
),
topRight:
Radius
.
circular
(
5
)),
child:
Container
(
width:
double
.
infinity
,
color:
Colors
.
white
,
height:
35
.
w
,
child:
TabBar
(
indicator:
UnderlineTabIndicator
(
borderRadius:
BorderRadius
.
circular
(
0.75
),
borderSide:
BorderSide
(
width:
1.5
.
w
,
color:
AppTheme
.
primary
),
insets:
EdgeInsets
.
symmetric
(
horizontal:
22
.
w
),
// 设置标签下面指示器的水平内边距
),
labelPadding:
EdgeInsets
.
symmetric
(
horizontal:
20
.
w
),
indicatorSize:
TabBarIndicatorSize
.
label
,
indicatorColor:
AppTheme
.
primary
,
indicatorWeight:
1.5
,
labelStyle:
TextStyle
(
color:
AppTheme
.
primary
,
fontSize:
15
.
w
,
height:
1.5
,
fontWeight:
Fonts
.
medium
),
unselectedLabelColor:
Colours
.
c9
,
unselectedLabelStyle:
TextStyle
(
color:
Colours
.
c9
,
fontSize:
15
.
w
,
height:
1.5
),
isScrollable:
true
,
tabs:
tabs
),
),
),
Expanded
(
child:
TabBarView
(
children:
List
.
generate
(
tabs
.
length
,
(
index
){
return
BuildListPage
(
tag:
'
$index
'
,
models:
controller
.
orderList
,
context:
context
,);
})
),
)
],
)
);
}
}
lib/pages/user_order/widgets/awaiting.dart
0 → 100644
浏览文件 @
a5723e41
差异被折叠。
点击展开。
lib/pages/user_order/widgets/canceled.dart
0 → 100644
浏览文件 @
a5723e41
差异被折叠。
点击展开。
lib/pages/user_order/widgets/coin.dart
0 → 100644
浏览文件 @
a5723e41
part of
user_order
;
/// 紫荆币item
class
BuiltCoin
extends
StatelessWidget
{
final
OrderListModel
model
;
const
BuiltCoin
({
Key
?
key
,
required
this
.
model
})
:
super
(
key:
key
);
@override
Widget
build
(
BuildContext
context
)
{
String
status
=
'已完成'
;
if
(
model
.
status
==
1
){
status
=
'待支付'
;
}
else
if
(
model
.
status
==
2
){
status
=
'已取消'
;
}
else
if
(
model
.
status
==
3
){
status
=
'已完成'
;
}
return
Container
(
margin:
EdgeInsets
.
only
(
left:
10
.
w
,
right:
10
.
w
,
top:
10
.
w
),
padding:
EdgeInsets
.
only
(
left:
11.5
.
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:
Row
(
mainAxisAlignment:
MainAxisAlignment
.
start
,
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
Container
(
margin:
EdgeInsets
.
only
(
top:
19
.
w
,
bottom:
19
.
w
,
right:
16.5
.
w
),
child:
Image
.
asset
(
'assets/images/coin.png'
,
height:
27
.
w
,
width:
27
.
w
,
),
),
Expanded
(
child:
Row
(
mainAxisAlignment:
MainAxisAlignment
.
spaceBetween
,
children:
[
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
SizedBox
(
height:
12
.
w
,
),
Text
(
model
.
createTime
.
toString
(),
style:
TextStyle
(
fontSize:
12
.
w
,
color:
Colours
.
c9
),
),
SizedBox
(
height:
4
.
w
,
),
Text
(
'充值紫荆币'
,
style:
TextStyle
(
fontSize:
13
.
w
,
color:
Colours
.
c3
,
fontWeight:
Fonts
.
medium
),
)
],
),
Container
(
margin:
EdgeInsets
.
only
(
right:
15
.
w
),
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
end
,
children:
[
SizedBox
(
height:
6.5
.
w
,
),
Text
(
status
,
style:
TextStyle
(
fontSize:
13
.
w
,
color:
Colours
.
c9
),),
SizedBox
(
height:
6.5
.
w
,),
Text
(
'¥
${model.finalTotalPrice}
'
,
style:
TextStyle
(
fontSize:
14
.
w
,
color:
Colours
.
cAB1941
,
fontWeight:
Fonts
.
medium
),
)
],
),
),
],
)),
],
),
);
}
}
lib/pages/user_order/widgets/completed.dart
0 → 100644
浏览文件 @
a5723e41
差异被折叠。
点击展开。
lib/pages/user_order/widgets/list.dart
0 → 100644
浏览文件 @
a5723e41
part of
user_order
;
class
BuildListPage
extends
StatefulWidget
{
final
String
tag
;
final
List
<
OrderListModel
>
models
;
final
BuildContext
context
;
const
BuildListPage
({
Key
?
key
,
required
this
.
tag
,
required
this
.
models
,
required
this
.
context
,
})
:
super
(
key:
key
);
@override
State
<
BuildListPage
>
createState
()
=>
_BuildListPageState
();
}
class
_BuildListPageState
extends
State
<
BuildListPage
>
with
AutomaticKeepAliveClientMixin
{
@override
Widget
build
(
BuildContext
context
)
{
return
GetBuilder
<
UserOrderController
>(
tag:
widget
.
tag
,
init:
UserOrderController
(
widget
.
tag
),
builder:
(
controller
)
=>
CustomPullScrollView
(
controller:
controller
.
refreshController
,
onLoading:
controller
.
onLoading
,
child:
ListView
.
builder
(
itemBuilder:
(
BuildContext
context
,
int
index
)
{
OrderListModel
model
=
controller
.
orderList
[
index
];
if
(
model
.
types
==
2
)
{
return
BuiltCoin
(
model:
model
,);
}
else
{
if
(
model
.
status
==
1
)
{
return
BuiltAwaiting
(
model:
model
,);
}
else
if
(
model
.
status
==
2
)
{
return
BuiltCanceled
(
model:
model
,);
}
else
if
(
model
.
status
==
3
)
{
return
BuiltCompleted
(
model:
model
,);
}
else
if
(
model
.
status
==
4
)
{
return
BuiltRefunded
(
model:
model
,);
}
}
},
itemCount:
controller
.
orderList
.
length
,
),
),
);
}
@override
bool
get
wantKeepAlive
=>
true
;
}
lib/pages/user_order/widgets/refunded.dart
0 → 100644
浏览文件 @
a5723e41
part of
user_order
;
/// 已退款item
class
BuiltRefunded
extends
StatelessWidget
{
final
OrderListModel
model
;
const
BuiltRefunded
({
Key
?
key
,
required
this
.
model
})
:
super
(
key:
key
);
@override
Widget
build
(
BuildContext
context
)
{
return
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
),
);
}
Widget
_buildCom
(
BuildContext
context
)
{
if
(
model
.
cartList
!.
length
==
1
)
{
return
_buildOne
(
context
);
}
else
if
(
model
.
cartList
!.
length
>
1
)
{
return
_buildList
(
context
);
}
return
_buildOne
(
context
);
}
Widget
_buildOne
(
BuildContext
context
)
{
return
Row
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
Column
(
mainAxisAlignment:
MainAxisAlignment
.
start
,
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
Container
(
margin:
EdgeInsets
.
only
(
top:
7.5
.
w
),
child:
Text
(
model
.
createTime
.
toString
().
split
(
" "
)[
0
],
style:
TextStyle
(
fontSize:
12
.
w
,
color:
Colours
.
c9
,
),
),
),
Container
(
margin:
EdgeInsets
.
only
(
top:
8
.
w
,
),
padding:
EdgeInsets
.
all
(
2
.
w
),
height:
88
.
w
,
width:
73
,
decoration:
BoxDecoration
(
borderRadius:
BorderRadius
.
circular
(
4
.
w
),
color:
Colors
.
white
,
boxShadow:
[
BoxShadow
(
color:
const
Color
(
0xFF707070
).
withOpacity
(
0.5
),
offset:
const
Offset
(
0
,
0
),
blurRadius:
4.5
.
w
,
spreadRadius:
0
.
w
,
),
],
),
child:
Image
.
network
(
model
.
cartList
![
0
].
img
??
''
,
// 用实际图片链接替换
fit:
BoxFit
.
cover
,
),
),
],
),
Expanded
(
child:
Column
(
mainAxisAlignment:
MainAxisAlignment
.
start
,
children:
[
// 右上角等待付款
Align
(
alignment:
Alignment
.
topRight
,
child:
Container
(
margin:
EdgeInsets
.
only
(
top:
6.5
.
w
,
right:
15
.
w
),
child:
Text
(
'已退款'
,
style:
TextStyle
(
fontSize:
13
.
w
,
color:
Colours
.
c9
),
)),
),
Align
(
alignment:
Alignment
.
centerLeft
,
child:
Container
(
padding:
EdgeInsets
.
only
(
left:
12.0
.
w
,
top:
12.5
.
w
,
right:
49.5
.
w
),
child:
RichText
(
text:
TextSpan
(
children:
[
TextSpan
(
text:
model
.
cartList
![
0
].
introduction
??
''
,
style:
TextStyle
(
color:
Colours
.
c3
,
fontWeight:
Fonts
.
medium
,
fontSize:
13
.
w
,
),
),
TextSpan
(
text:
'
\n\n
'
,
style:
TextStyle
(
color:
Colours
.
c3
,
fontWeight:
Fonts
.
medium
,
fontSize:
13
.
w
,
),
),
],
),
maxLines:
2
,
overflow:
TextOverflow
.
ellipsis
,
),
)),
SizedBox
(
height:
22.5
.
w
),
Container
(
margin:
EdgeInsets
.
only
(
left:
12
.
w
,
right:
15
.
w
),
child:
Row
(
mainAxisAlignment:
MainAxisAlignment
.
start
,
children:
[
Text
(
"¥
${model.finalTotalPrice}
"
,
style:
TextStyle
(
color:
Colours
.
cAB1941
,
fontWeight:
Fonts
.
medium
,
fontSize:
14
.
w
,
),
),
],
),
),
],
),
),
],
);
}
Widget
_buildList
(
BuildContext
context
)
{
return
Container
(
padding:
EdgeInsets
.
only
(
right:
15
.
w
),
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
mainAxisAlignment:
MainAxisAlignment
.
start
,
children:
[
Row
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
mainAxisAlignment:
MainAxisAlignment
.
spaceBetween
,
children:
[
Padding
(
padding:
EdgeInsets
.
only
(
top:
7.5
.
w
,
bottom:
8
.
w
),
child:
Text
(
model
.
createTime
.
toString
().
split
(
" "
)[
0
],
style:
TextStyle
(
fontSize:
12
.
w
,
color:
Colours
.
c9
,
),
),
),
Padding
(
padding:
EdgeInsets
.
only
(
top:
6.5
.
w
),
child:
Text
(
'已退款'
,
style:
TextStyle
(
fontSize:
13
.
w
,
color:
Colours
.
c9
),
),
),
],
),
Row
(
mainAxisAlignment:
MainAxisAlignment
.
spaceBetween
,
children:
[
SizedBox
(
height:
92
.
w
,
width:
260.5
.
w
,
child:
ListView
.
builder
(
itemBuilder:
(
BuildContext
context
,
int
index
)
{
CartListModel
cartModel
=
model
.
cartList
![
index
];
return
Container
(
margin:
EdgeInsets
.
only
(
right:
8
.
w
,
),
padding:
EdgeInsets
.
all
(
2
.
w
),
height:
88
.
w
,
width:
73
,
decoration:
BoxDecoration
(
borderRadius:
BorderRadius
.
circular
(
4
.
w
),
color:
Colors
.
white
,
boxShadow:
[
BoxShadow
(
color:
const
Color
(
0xFF707070
).
withOpacity
(
0.5
),
offset:
const
Offset
(
0
,
0
),
blurRadius:
4.5
.
w
,
spreadRadius:
0
.
w
,
),
],
),
child:
Image
.
network
(
cartModel
.
img
??
''
,
// 用实际图片链接替换
fit:
BoxFit
.
cover
,
),
);
},
scrollDirection:
Axis
.
horizontal
,
itemCount:
model
.
cartList
?.
length
,
),
),
Align
(
alignment:
Alignment
.
centerRight
,
child:
Column
(
mainAxisAlignment:
MainAxisAlignment
.
end
,
crossAxisAlignment:
CrossAxisAlignment
.
end
,
children:
[
SizedBox
(
height:
25
.
w
,
),
Padding
(
padding:
EdgeInsets
.
only
(
right:
11
.
w
),
child:
Text
(
'¥
${model.totalPrice ?? ''}
'
,
style:
TextStyle
(
color:
Colours
.
cAB1941
,
fontWeight:
Fonts
.
medium
,
fontSize:
14
.
w
,
),
),
),
Padding
(
padding:
EdgeInsets
.
only
(
right:
11
.
w
,
top:
0.5
),
child:
Text
(
'共
${model.cartList!.isEmpty ? 0 : model.cartList?.length}
件'
,
style:
TextStyle
(
color:
Colours
.
c9
,
fontSize:
10
.
w
,
),
),
),
SizedBox
(
height:
13.5
.
w
,
),
/*Container(
height: 23.w,
width: 60.w,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(10.w),
border:
Border.all(color: Colours.cC31F4C, width: 0.5.w)),
child: Center(
child: GestureDetector(
onTap: () {
context.pushNamed(Routes.orderEvaluate);
},
child: Text(
'继续评价',
style: TextStyle(
fontSize: 10.w, color: Colours.cC31F4C),
)),
),
),*/
],
),
)
],
),
],
),
);
}
}
lib/pages/user_order_awaiting/controller.dart
0 → 100644
浏览文件 @
a5723e41
part of
user_order_awaiting
;
/// 等待付款订单
class
UserOrderAwaitingController
extends
GetxController
{
// 已完成订单
OrderCompletedInfoModel
orderCompletedInfo
=
OrderCompletedInfoModel
();
// 应付款、订单编号等
List
<
OrderCompletedModel
>
orderAwaitings
=
[];
@override
void
onReady
()
{
getOrderInfo
();
super
.
onReady
();
}
/// 获取订单信息
void
getOrderInfo
()
async
{
// orderCompletedInfo = await MineAPI.userInfo();
orderCompletedInfo
=
OrderCompletedInfoModel
(
id:
1
,
price:
'88.00'
,
totalPay:
'58.00'
,
favorable:
'5.00'
,
orderId:
'ZJ2023122163728437'
,
payWay:
'微信支付'
,
payTime:
'2023-12-21 01:25:24'
,
orderTime:
'2023-12-21 01:25:15'
);
orderAwaitings
=
[
OrderCompletedModel
(
name:
'订单编号'
,
value:
orderCompletedInfo
.
orderId
.
toString
()),
OrderCompletedModel
(
name:
'支付方式'
,
value:
orderCompletedInfo
.
payWay
.
toString
()),
OrderCompletedModel
(
name:
'支付时间'
,
value:
orderCompletedInfo
.
payTime
.
toString
()),
];
update
();
}
}
lib/pages/user_order_awaiting/index.dart
0 → 100644
浏览文件 @
a5723e41
library
user_order_awaiting
;
import
'package:flutter/material.dart'
;
import
'package:flutter_book/theme.dart'
;
import
'package:flutter_book/utils/index.dart'
;
import
'package:flutter_book/widgets/index.dart'
;
import
'package:get/get_state_manager/src/simple/get_controllers.dart'
;
import
'package:flutter_screenutil/flutter_screenutil.dart'
;
import
'package:get/get_state_manager/src/simple/get_state.dart'
;
import
'package:go_router/go_router.dart'
;
import
'../../models/index.dart'
;
import
'../../routes/index.dart'
;
part
'view.dart'
;
part
'controller.dart'
;
\ No newline at end of file
lib/pages/user_order_awaiting/view.dart
0 → 100644
浏览文件 @
a5723e41
part of
user_order_awaiting
;
class
UserOrderAwaitingPage
extends
StatefulWidget
{
const
UserOrderAwaitingPage
({
Key
?
key
/*, required this.userInfo*/
})
:
super
(
key:
key
);
@override
State
<
UserOrderAwaitingPage
>
createState
()
=>
_UserOrderAwaitingState
();
}
class
_UserOrderAwaitingState
extends
State
<
UserOrderAwaitingPage
>
{
/* late num? selectedGender ; // 选中的性别
@override
void initState() {
super.initState();
selectedGender = widget.userInfo.sex;
// 在这里可以使用 localVariable 进行操作
}*/
@override
Widget
build
(
BuildContext
context
)
{
return
WillPopScope
(
onWillPop:
()
async
{
context
.
pop
(
true
);
return
false
;
},
child:
GetBuilder
<
UserOrderAwaitingController
>(
init:
UserOrderAwaitingController
(),
builder:
(
controller
)
=>
Scaffold
(
appBar:
CustomAppBar
(
title:
const
Text
(
'等待付款'
),
actions:
[],
),
body:
Column
(
children:
[
Container
(
width:
double
.
infinity
,
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:
[
Padding
(
padding:
EdgeInsets
.
only
(
left:
12.0
.
w
,
top:
12.0
.
w
,
bottom:
12.0
.
w
),
child:
Row
(
mainAxisAlignment:
MainAxisAlignment
.
start
,
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
Image
.
network
(
'http://zxts-user-file.oss-cn-beijing.aliyuncs.com/2024-01/20/eb167c2f59f7e34c0ef94a9f1ce736ee64d76a11.jpg'
,
// 用实际图片链接替换
fit:
BoxFit
.
cover
,
// 设置适应方式为充满
width:
72.0
.
w
,
height:
86.0
.
w
,
),
Expanded
(
child:
Padding
(
padding:
EdgeInsets
.
only
(
left:
12.0
.
w
,
top:
5.5
.
w
,
right:
23.5
.
w
),
child:
Column
(
mainAxisAlignment:
MainAxisAlignment
.
spaceBetween
,
crossAxisAlignment:
CrossAxisAlignment
.
end
,
// 下面的Text靠左
children:
[
Text
(
"一想到还有95%的问题留给人类,我就放一想到还有95%的问题留给问题留给"
,
style:
TextStyle
(
color:
Colours
.
c3
,
fontWeight:
Fonts
.
bold
,
fontSize:
13
.
w
,
),
maxLines:
2
,
overflow:
TextOverflow
.
ellipsis
,
// 超过部分显示省略号
),
SizedBox
(
height:
25.5
.
w
),
Text
(
"需付款 ¥
${controller.orderCompletedInfo.price}
"
,
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
(
height:
39
.
w
,
),
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:
GestureDetector
(
onTap:
()
{
// print("保存昵称");
context
.
pushNamed
(
Routes
.
orderEvaluate
);
},
child:
Text
(
'立即支付 ¥
${controller.orderCompletedInfo.price}
'
,
style:
TextStyle
(
fontWeight:
Fonts
.
medium
,
fontSize:
14
.
w
,
color:
Colours
.
cFF
),
)),
),
),
SizedBox
(
height:
11.5
.
w
,
),
GestureDetector
(
onTap:
()
{
print
(
'取消订单'
);
CustomDialog
.
show
(
context:
context
,
builder:
Text
(
'sdfsf'
)
as
WidgetBuilder
);
// Navigator.pop(context);
},
child:
Text
(
'取消订单'
,
style:
TextStyle
(
fontWeight:
Fonts
.
medium
,
fontSize:
15
.
w
,
color:
Colours
.
c9
),
),
),
],
),
)),
);
}
}
lib/pages/user_order_completed/controller.dart
0 → 100644
浏览文件 @
a5723e41
part of
user_order_completed
;
/// 已完成订单
class
UserOrderCompletedController
extends
GetxController
{
// 已完成订单
OrderCompletedInfoModel
orderCompletedInfo
=
OrderCompletedInfoModel
();
// 应付款、订单编号等
List
<
OrderCompletedModel
>
orderCompleteds
=
[];
@override
void
onReady
()
{
getOrderInfo
();
super
.
onReady
();
}
/// 获取订单信息
void
getOrderInfo
()
async
{
// orderCompletedInfo = await MineAPI.userInfo();
orderCompletedInfo
=
OrderCompletedInfoModel
(
id:
1
,
price:
'88'
,
totalPay:
'58.00'
,
favorable:
'5.00'
,
orderId:
'ZJ2023122163728437'
,
payWay:
'微信支付'
,
payTime:
'2023-12-21 01:25:24'
,
orderTime:
'2023-12-21 01:25:15'
);
orderCompleteds
=
[
OrderCompletedModel
(
name:
'应付款'
,
value:
orderCompletedInfo
.
totalPay
.
toString
()
/*,link: Routes.note*/
,
other:
orderCompletedInfo
.
favorable
.
toString
()),
OrderCompletedModel
(
name:
'订单编号'
,
value:
orderCompletedInfo
.
orderId
.
toString
()),
OrderCompletedModel
(
name:
'支付方式'
,
value:
orderCompletedInfo
.
payWay
.
toString
()),
OrderCompletedModel
(
name:
'支付时间'
,
value:
orderCompletedInfo
.
payTime
.
toString
()),
OrderCompletedModel
(
name:
'下单时间'
,
value:
orderCompletedInfo
.
orderTime
.
toString
()),
];
update
();
}
}
lib/pages/user_order_completed/index.dart
0 → 100644
浏览文件 @
a5723e41
library
user_order_completed
;
import
'package:flutter/material.dart'
;
import
'package:flutter_book/theme.dart'
;
import
'package:flutter_book/utils/index.dart'
;
import
'package:flutter_book/widgets/index.dart'
;
import
'package:get/get_state_manager/src/simple/get_controllers.dart'
;
import
'package:flutter_screenutil/flutter_screenutil.dart'
;
import
'package:get/get_state_manager/src/simple/get_state.dart'
;
import
'package:go_router/go_router.dart'
;
import
'../../models/index.dart'
;
import
'../../routes/index.dart'
;
part
'view.dart'
;
part
'controller.dart'
;
\ No newline at end of file
lib/pages/user_order_completed/view.dart
0 → 100644
浏览文件 @
a5723e41
差异被折叠。
点击展开。
lib/routes/index.dart
浏览文件 @
a5723e41
...
...
@@ -32,6 +32,8 @@ import 'package:flutter_book/pages/user_msg/index.dart';
import
'package:flutter_book/pages/user_nick/index.dart'
;
import
'package:flutter_book/pages/user_notes/index.dart'
;
import
'package:flutter_book/pages/user_notes_des/index.dart'
;
import
'package:flutter_book/pages/user_order_awaiting/index.dart'
;
import
'package:flutter_book/pages/user_order_completed/index.dart'
;
import
'package:flutter_book/pages/user_point/index.dart'
;
import
'package:flutter_book/pages/user_security/index.dart'
;
import
'package:flutter_book/pages/user_set/index.dart'
;
...
...
@@ -44,6 +46,7 @@ import '../models/index.dart';
import
'../pages/order_evaluate/index.dart'
;
import
'../pages/pay_coupon/index.dart'
;
import
'../pages/user_about/index.dart'
;
import
'../pages/user_order/index.dart'
;
import
'../pages/user_terms/index.dart'
;
import
'../pages/version/index.dart'
;
import
'../store/index.dart'
;
...
...
lib/routes/routes.dart
浏览文件 @
a5723e41
...
...
@@ -99,6 +99,12 @@ abstract class Routes {
static
const
helpCenter
=
'help_center'
;
// 帮助中心内容
static
const
helpCenterContent
=
'help_center_content'
;
// 订单列表
static
const
order
=
'order'
;
// 已完成订单
static
const
orderCompleted
=
'order_completed'
;
// 待付款订单
static
const
orderAwaiting
=
'order_awaiting'
;
...
...
@@ -486,7 +492,33 @@ abstract class Routes {
child:
HelpCenterContentPage
(
id:
state
.
uri
.
queryParameters
[
'id'
].
toString
())
)
),
GoRoute
(
// 已完成订单
path:
'/
$order
'
,
name:
order
,
pageBuilder:
(
context
,
state
)
=>
CupertinoPage
(
name:
state
.
uri
.
toString
(),
key:
state
.
pageKey
,
child:
const
UserOrderPage
()
)
),
GoRoute
(
// 已完成订单
path:
'/
$orderCompleted
'
,
name:
orderCompleted
,
pageBuilder:
(
context
,
state
)
=>
CupertinoPage
(
name:
state
.
uri
.
toString
(),
key:
state
.
pageKey
,
child:
const
UserOrderCompletedPage
()
)
),
GoRoute
(
// 待付款订单
path:
'/
$orderAwaiting
'
,
name:
orderAwaiting
,
pageBuilder:
(
context
,
state
)
=>
CupertinoPage
(
name:
state
.
uri
.
toString
(),
key:
state
.
pageKey
,
child:
const
UserOrderAwaitingPage
()
)
),
]
);
...
...
lib/utils/styles.dart
浏览文件 @
a5723e41
...
...
@@ -35,12 +35,15 @@ class Colours {
static
const
cF8
=
Color
(
0xFFF8F8F8
);
static
const
cF9
=
Color
(
0xFFF9F9F9
);
static
const
cC7
=
Color
(
0xFFC7C7C7
);
static
const
cC31F4C
=
Color
(
0xFFC31F4C
);
static
const
cC31F4C2
=
Color
(
0x1AC31F4C
);
static
const
cAB1941
=
Color
(
0xB3AB1941
);
}
class
Gaps
{
static
Widget
hGaps5
=
SizedBox
(
width:
5
.
w
,);
static
Widget
hGaps10
=
SizedBox
(
width:
10
.
w
,);
static
Widget
hGaps8
=
SizedBox
(
width:
8
.
w
,);
static
Widget
hGaps15
=
SizedBox
(
width:
15
.
w
,);
static
Widget
hGaps20
=
SizedBox
(
width:
20
.
w
,);
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论