diff --git a/lib/ui/market/order/my_order_func.dart b/lib/ui/market/order/my_order_func.dart index 4a318512..e53f5903 100644 --- a/lib/ui/market/order/my_order_func.dart +++ b/lib/ui/market/order/my_order_func.dart @@ -12,27 +12,30 @@ class MyOrderFunc { ///申请退换 static Future refundOrder(int goodsAppointmentId, String reson) async { - BaseModel baseModel = await NetUtil().get(API.market.confirmReceive, + BaseModel baseModel = await NetUtil().get(API.market.refundOrder, params: {"goodsAppointmentId": goodsAppointmentId, "backReason": reson}, showMessage: true); + return baseModel; } ///取消预约 static Future cancelOrder(int goodsAppointmentId) async { - BaseModel baseModel = await NetUtil().get(API.market.confirmReceive, + BaseModel baseModel = await NetUtil().get(API.market.cancleOrder, params: {"goodsAppointmentId": goodsAppointmentId}, showMessage: true); + return baseModel; } ///商品评价 static Future goodsEvalution( int goodsAppointmentId, int rating, String evaluationReason) async { - BaseModel baseModel = await NetUtil().get(API.market.confirmReceive, + BaseModel baseModel = await NetUtil().get(API.market.goodsEvaluation, params: { "goodsAppointmentId": goodsAppointmentId, "score": rating, "evaluationReason": evaluationReason }, showMessage: true); + return baseModel; } /// 获取热度最高的商品 diff --git a/lib/ui/market/order/my_order_refund_page.dart b/lib/ui/market/order/my_order_refund_page.dart index 7713494e..27f74f2c 100644 --- a/lib/ui/market/order/my_order_refund_page.dart +++ b/lib/ui/market/order/my_order_refund_page.dart @@ -1,6 +1,8 @@ +import 'package:aku_community/utils/network/base_model.dart'; import 'package:flutter/material.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; +import 'package:get/get.dart'; import 'package:velocity_x/velocity_x.dart'; import 'package:aku_community/base/base_style.dart'; @@ -52,8 +54,11 @@ class _MyOrderRefundPageState extends State { ), bottomNavi: BottomButton( onPressed: () async { - await MyOrderFunc.refundOrder( + BaseModel baseModel = await MyOrderFunc.refundOrder( widget.model.id, _editingController.text); + if (baseModel.status ?? false) { + Get.back(); + } }, child: '确认提交'.text.size(32.sp).color(ktextPrimary).bold.make()), ); @@ -167,7 +172,7 @@ class _MyOrderRefundPageState extends State { Row( children: [ AkuSingleCheckButton( - text: '正常', + text: '退款', value: 1, gropValue: _type, onPressed: () { @@ -177,7 +182,7 @@ class _MyOrderRefundPageState extends State { ), 80.w.widthBox, AkuSingleCheckButton( - text: '异常', + text: '换货', value: 2, gropValue: _type, onPressed: () {