修复 评价/退换接口错误的问题,修改退换申请页面按钮文字为 退款/换货

hmxc
张萌 4 years ago
parent f910d38daa
commit 84e462b308

@ -12,27 +12,30 @@ class MyOrderFunc {
///退 ///退
static Future refundOrder(int goodsAppointmentId, String reson) async { 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}, params: {"goodsAppointmentId": goodsAppointmentId, "backReason": reson},
showMessage: true); showMessage: true);
return baseModel;
} }
/// ///
static Future cancelOrder(int goodsAppointmentId) async { 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); params: {"goodsAppointmentId": goodsAppointmentId}, showMessage: true);
return baseModel;
} }
/// ///
static Future goodsEvalution( static Future goodsEvalution(
int goodsAppointmentId, int rating, String evaluationReason) async { int goodsAppointmentId, int rating, String evaluationReason) async {
BaseModel baseModel = await NetUtil().get(API.market.confirmReceive, BaseModel baseModel = await NetUtil().get(API.market.goodsEvaluation,
params: { params: {
"goodsAppointmentId": goodsAppointmentId, "goodsAppointmentId": goodsAppointmentId,
"score": rating, "score": rating,
"evaluationReason": evaluationReason "evaluationReason": evaluationReason
}, },
showMessage: true); showMessage: true);
return baseModel;
} }
/// ///

@ -1,6 +1,8 @@
import 'package:aku_community/utils/network/base_model.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import 'package:velocity_x/velocity_x.dart'; import 'package:velocity_x/velocity_x.dart';
import 'package:aku_community/base/base_style.dart'; import 'package:aku_community/base/base_style.dart';
@ -52,8 +54,11 @@ class _MyOrderRefundPageState extends State<MyOrderRefundPage> {
), ),
bottomNavi: BottomButton( bottomNavi: BottomButton(
onPressed: () async { onPressed: () async {
await MyOrderFunc.refundOrder( BaseModel baseModel = await MyOrderFunc.refundOrder(
widget.model.id, _editingController.text); widget.model.id, _editingController.text);
if (baseModel.status ?? false) {
Get.back();
}
}, },
child: '确认提交'.text.size(32.sp).color(ktextPrimary).bold.make()), child: '确认提交'.text.size(32.sp).color(ktextPrimary).bold.make()),
); );
@ -167,7 +172,7 @@ class _MyOrderRefundPageState extends State<MyOrderRefundPage> {
Row( Row(
children: [ children: [
AkuSingleCheckButton( AkuSingleCheckButton(
text: '正常', text: '退款',
value: 1, value: 1,
gropValue: _type, gropValue: _type,
onPressed: () { onPressed: () {
@ -177,7 +182,7 @@ class _MyOrderRefundPageState extends State<MyOrderRefundPage> {
), ),
80.w.widthBox, 80.w.widthBox,
AkuSingleCheckButton( AkuSingleCheckButton(
text: '异常', text: '换货',
value: 2, value: 2,
gropValue: _type, gropValue: _type,
onPressed: () { onPressed: () {

Loading…
Cancel
Save