part of user_order_refunded;

/// 已完成订单
class UserOrderCRefundedController 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()),
      OrderCompletedModel(name: '退款时间',value: orderCompletedInfo.orderTime.toString()),
    ];

    update();
  }

}
