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; + } }