From 7fc9cd8aba943842973afa4750ab64bdc8ec10ff Mon Sep 17 00:00:00 2001 From: zhang <494089941@qq.com> Date: Mon, 1 Feb 2021 10:48:33 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AF=B9=E6=8E=A5=EF=BC=9A=E6=8A=A5=E6=8D=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/constants/api.dart | 3 +++ .../mine_goods_page/mine_goods_page.dart | 9 ++++++--- lib/pages/manager_func.dart | 10 ++++++++++ 3 files changed, 19 insertions(+), 3 deletions(-) diff --git a/lib/constants/api.dart b/lib/constants/api.dart index 4517dca6..3482c98d 100644 --- a/lib/constants/api.dart +++ b/lib/constants/api.dart @@ -136,6 +136,9 @@ class _Manager { ///借还管理:查询该用户的所有物品借还信息 String get articleBorrowMylist => '/user/articleBorrow/myList'; + + ///借还管理:报损 + String get fromLoss => '/user/articleBorrow/frmLoss'; } class _Community { diff --git a/lib/pages/goods_manage_page/mine_goods_page/mine_goods_page.dart b/lib/pages/goods_manage_page/mine_goods_page/mine_goods_page.dart index 6fd9cb5b..3d091341 100644 --- a/lib/pages/goods_manage_page/mine_goods_page/mine_goods_page.dart +++ b/lib/pages/goods_manage_page/mine_goods_page/mine_goods_page.dart @@ -1,6 +1,7 @@ // Flutter imports: import 'package:akuCommunity/constants/api.dart'; import 'package:akuCommunity/model/manager/mine_goods_model.dart'; +import 'package:akuCommunity/pages/manager_func.dart'; import 'package:akuCommunity/pages/things_page/widget/bee_list_view.dart'; import 'package:akuCommunity/utils/bee_map.dart'; import 'package:flutter/cupertino.dart'; @@ -33,9 +34,11 @@ class _MineGoodsPageState extends State { _controller.dispose(); } - InkWell _frmLoss() { + InkWell _frmLoss(int id) { return InkWell( - onTap: () {}, + onTap: () async { + await ManagerFunc.fromLoss(id); + }, child: Container( width: 120.w, height: 44.w, @@ -135,7 +138,7 @@ class _MineGoodsPageState extends State { color: Color(0xff999999), ), ), - _frmLoss(), + _frmLoss(model.id), ], ), ), diff --git a/lib/pages/manager_func.dart b/lib/pages/manager_func.dart index 1b86ea40..9e1a2155 100644 --- a/lib/pages/manager_func.dart +++ b/lib/pages/manager_func.dart @@ -148,4 +148,14 @@ class ManagerFunc { return baseModel; } + static Future fromLoss(int id)async{ + BaseModel baseModel = await NetUtil().post( + API.manager.fromLoss, + params: { + 'articleBorrowId':id + }, + showMessage: true, + ); + return baseModel; + } }