提交 a499f62e authored 作者: yueweilu's avatar yueweilu

订单的消息 暂时跳转订单列表

上级 1486cb3c
......@@ -14,7 +14,7 @@ class BuildItem extends StatelessWidget {
child: Stack(
children: [
Image.asset(
model.type == 2
model.type == 0
? 'assets/images/coupon_bg.png'
: 'assets/images/coupon_bg_expired.png',
fit: BoxFit.contain,
......@@ -44,7 +44,7 @@ class BuildItem extends StatelessWidget {
fontSize: 15.w,
fontWeight: Fonts.boldSemi,
height: 1.5,
color: model.type == 2
color: model.type == 0
? Colors.white
: Colours.cC8)),
TextSpan(
......@@ -53,7 +53,7 @@ class BuildItem extends StatelessWidget {
fontSize: 40.w,
fontWeight: Fonts.boldSemi,
height: 1.5,
color: model.type == 2
color: model.type == 0
? Colors.white
: Colours.cC8)),
]),
......@@ -61,7 +61,7 @@ class BuildItem extends StatelessWidget {
Text(
'满${model.normPrice}可用',
style: TextStyle(
fontSize: 11.w, height: 1.5, color: model.type == 2
fontSize: 11.w, height: 1.5, color: model.type == 0
? Colors.white
: Colours.cC8),
)
......@@ -87,7 +87,7 @@ class BuildItem extends StatelessWidget {
fontSize: 16.w,
fontWeight: Fonts.medium,
height: 1.5,
color: model.type == 2
color: model.type == 0
? Colours.c3
: Colours.c9),
maxLines: 1,
......@@ -116,7 +116,7 @@ class BuildItem extends StatelessWidget {
],
),
),
model.type == 2
model.type == 0
? Stack(
children: [
//TODO 暂时隐藏 立即使用 按钮
......
......@@ -26,6 +26,11 @@ class MsgController extends GetxController {
return result;
}
/// 获取订单详细
Future<OrderInfoModel> getOrderInfo(String orderNum) async {
return await MineAPI.getOrderInfo(orderNum: orderNum);
}
/// 获取课程内图书列表
Future<void> _getMsgs([bool isRefresh = false]) async {
if (isRefresh) _page = 1;
......
......@@ -34,12 +34,40 @@ class MsgPage extends StatelessWidget {
controller.read(model.id.toString());
if(model.type == 1){
// 1订单支付快要超时(跳转订单详情)
final result = await context.pushNamed(Routes.orderAwaiting,
queryParameters: {'orderNum': model.urlId?.orderNum.toString()});
final result = await context.pushNamed(Routes.order);
if (result == true){
controller.onRefresh();
}
// final orderInfo = await controller.getOrderInfo(model.urlId?.orderNum??'');
// // 待支付
// if (orderInfo.status == 1){
// // 书籍订单
// if (orderInfo.types ==1){
// final result = await context.pushNamed(Routes.orderAwaiting,
// queryParameters: {'orderNum': model.urlId?.orderNum.toString()});
// if (result == true){
// controller.onRefresh();
// }
// }
// // 充值订单
// else {
// final result = await context.pushNamed(Routes.orderCoinAwaiting,
// queryParameters: {'orderNum': model.urlId?.orderNum.toString()});
// if (result == true){
// controller.onRefresh();
// }
// }
//
// }
// // 已支付
// else if (orderInfo.status ==3){
//
// }
// // 已退款
// else if (orderInfo.status == 4){
//
// }
///TODO:
}else if (model.type == 2){
// 2 购买完成三天未评价(跳转订单列表--已完成)
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论