1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950 |
-
-
- import 'package:dio/dio.dart';
- import 'package:farmer_client/utils/Request.dart';
- import 'package:fluttertoast/fluttertoast.dart';
-
-
- /**
- * 订单列表
- * @param {*} data
- * @returns
- */
- Future getOrderList(bool mine)async{
- return request('/order',options: Options(method: 'GET'),queryParameters: { 'mine': mine}).catchError((error) =>
- { Fluttertoast.showToast(
- msg: error.error['message']
- ),});
-
- }
-
-
- /**
- * 订单详情
- * @param {*} data
- * @returns
- */
- Future orderInfo(String id)async{
- return request('/order/$id',options: Options(method: 'GET'),).catchError((error) =>
- { Fluttertoast.showToast(
- msg: error.error['message']
- ),});
-
- }
-
-
- /**
- * 生成订单
- * @param {*} data
- * @returns
- */
-
- Future generateOrder(item)async{
- return request('/order',options: Options(method: 'POST'),data: item).catchError((error) =>
- { Fluttertoast.showToast(
- msg: error.error['message']
- ),});
-
- }
-
|