[baozhangchao] 3 years ago
parent
commit
05d1e49f11
1 changed files with 7 additions and 14 deletions
  1. 7
    14
      lib/services/homeAPI.dart

+ 7
- 14
lib/services/homeAPI.dart View File

7
  * @param {*} data
7
  * @param {*} data
8
  * @returns
8
  * @returns
9
  */
9
  */
10
+
10
 Future getHomeBanner(String position) async {
11
 Future getHomeBanner(String position) async {
11
   return request('/banner',
12
   return request('/banner',
12
           options: Options(method: 'GET'), data: {'position': position})
13
           options: Options(method: 'GET'), data: {'position': position})
33
  * @param {*} data
34
  * @param {*} data
34
  * @returns
35
  * @returns
35
  */
36
  */
36
-<<<<<<< HEAD
37
-Future getMachineryInfo(String id,String location ,bool attached)async{
38
-  return request('/machinery-summary/$id',options: Options(method: 'GET'),queryParameters: { 'location': location,'attached': attached}).catchError((error) =>
37
+
38
+Future getMachineryInfo(String id,String location ,bool attached)async {
39
+  return request('/machinery-summary/$id', options: Options(method: 'GET'),
40
+      queryParameters: { 'location': location, 'attached': attached})
41
+      .catchError((error) =>
39
   { Fluttertoast.showToast(
42
   { Fluttertoast.showToast(
40
       msg: error.error['message']
43
       msg: error.error['message']
41
   ),});
44
   ),});
42
-
43
-=======
44
-Future getMachineryInfo(String id, String location, bool attached) async {
45
-  return request('/machinery-summary',
46
-          options: Options(method: 'GET'),
47
-          queryParameters: {'id': id},
48
-          data: {'location': location, 'attached': attached})
49
-      .catchError((error) => {
50
-            Fluttertoast.showToast(msg: error.error['message']),
51
-          });
52
->>>>>>> 40e1cb063352fdbd66774cfedb970a9d87bd4315
53
 }
45
 }
54
 
46
 
47
+
55
 /**
48
 /**
56
  * 农机分类Tab列查询
49
  * 农机分类Tab列查询
57
  * @param {*} data
50
  * @param {*} data