From 84e462b308700e2ebaf634cb5ce79a945181e523 Mon Sep 17 00:00:00 2001 From: zhangmeng <494089941@qq.com> Date: Mon, 31 May 2021 19:17:49 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=20=E8=AF=84=E4=BB=B7/?= =?UTF-8?q?=E9=80=80=E6=8D=A2=E6=8E=A5=E5=8F=A3=E9=94=99=E8=AF=AF=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98=EF=BC=8C=E4=BF=AE=E6=94=B9=E9=80=80=E6=8D=A2?= =?UTF-8?q?=E7=94=B3=E8=AF=B7=E9=A1=B5=E9=9D=A2=E6=8C=89=E9=92=AE=E6=96=87?= =?UTF-8?q?=E5=AD=97=E4=B8=BA=20=E9=80=80=E6=AC=BE/=E6=8D=A2=E8=B4=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/ui/market/order/my_order_func.dart | 9 ++++++--- lib/ui/market/order/my_order_refund_page.dart | 11 ++++++++--- 2 files changed, 14 insertions(+), 6 deletions(-) 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: () {