glglove 1 month ago
parent
commit
d5f9cdd859

+ 0 - 36
packages/cpt_services/lib/modules/services/history/history_vm.dart

@@ -286,42 +286,6 @@ class HistoryVm extends _$HistoryVm {
     }
   }
 
-
-  // 点击 收藏/取消收藏
-  Future<bool?> handlerClickCollection(int id, bool? isCollection) async{
-    try {
-      //请求网络
-      Map<String, dynamic>  params = {
-        "id": id,
-      };
-      Log.d("请求参数------$params");
-      final result = await servicesRespositoryInstance.fetchGarageColleciton(params);
-      //校验成功失败
-      if (result.isSuccess) {
-        // 修改 该id 的 liked 和 likes_count 字段
-        state.list!.forEach((Map<String, dynamic> element) {
-          GarageSaleRentList elementEntity = GarageSaleRentList.fromJson(element);
-
-          if(elementEntity.id == id){
-            elementEntity.liked = !elementEntity.liked!;
-            elementEntity.likesCount = elementEntity.liked! ? (elementEntity.likesCount! + 1) : (elementEntity.likesCount! - 1);
-          }
-
-          element = elementEntity.toJson();
-
-        });
-        return true;
-      } else {
-        String errorMessage = result.errorMsg!;
-        changeLoadingState(LoadState.State_Error, errorMessage);
-        ToastEngine.show(result.errorMsg ?? "Network Load Error");
-      }
-    } catch (e) {
-      Log.e("Error: $e");
-      ToastEngine.show("Error: $e");
-    }
-  }
-
   // 设置当前的 _queryParams
   setCurrentQueryParams(Map<String, dynamic> params){
     _queryParams.addAll(params);

+ 1 - 1
packages/cpt_services/lib/modules/services/homeService/home_service_vm.dart

@@ -415,7 +415,7 @@ class HomeServiceVm extends _$HomeServiceVm {
         "id": id,
       };
       Log.d("请求参数------$params");
-      final result = await servicesRespositoryInstance.fetchGarageColleciton(params);
+      final result = await servicesRespositoryInstance.fetchServiceLiked(params);
       //校验成功失败
       if (result.isSuccess) {
         // 修改 该id 的 liked 和 likes_count 字段

+ 0 - 36
packages/cpt_services/lib/modules/services/inProgress/in_progress_vm.dart

@@ -286,42 +286,6 @@ class InProgressVm extends _$InProgressVm {
     }
   }
 
-
-  // 点击 收藏/取消收藏
-  Future<bool?> handlerClickCollection(int id, bool? isCollection) async{
-    try {
-      //请求网络
-      Map<String, dynamic>  params = {
-        "id": id,
-      };
-      Log.d("请求参数------$params");
-      final result = await servicesRespositoryInstance.fetchGarageColleciton(params);
-      //校验成功失败
-      if (result.isSuccess) {
-        // 修改 该id 的 liked 和 likes_count 字段
-        state.list!.forEach((Map<String, dynamic> element) {
-          GarageSaleRentList elementEntity = GarageSaleRentList.fromJson(element);
-
-          if(elementEntity.id == id){
-            elementEntity.liked = !elementEntity.liked!;
-            elementEntity.likesCount = elementEntity.liked! ? (elementEntity.likesCount! + 1) : (elementEntity.likesCount! - 1);
-          }
-
-          element = elementEntity.toJson();
-
-        });
-        return true;
-      } else {
-        String errorMessage = result.errorMsg!;
-        changeLoadingState(LoadState.State_Error, errorMessage);
-        ToastEngine.show(result.errorMsg ?? "Network Load Error");
-      }
-    } catch (e) {
-      Log.e("Error: $e");
-      ToastEngine.show("Error: $e");
-    }
-  }
-
   // 设置当前的 _queryParams
   setCurrentQueryParams(Map<String, dynamic> params){
     _queryParams.addAll(params);

+ 0 - 36
packages/cpt_services/lib/modules/services/repair_history/history_vm.dart

@@ -286,42 +286,6 @@ class RepairHistoryVm extends _$RepairHistoryVm {
     }
   }
 
-
-  // 点击 收藏/取消收藏
-  Future<bool?> handlerClickCollection(int id, bool? isCollection) async{
-    try {
-      //请求网络
-      Map<String, dynamic>  params = {
-        "id": id,
-      };
-      Log.d("请求参数------$params");
-      final result = await servicesRespositoryInstance.fetchGarageColleciton(params);
-      //校验成功失败
-      if (result.isSuccess) {
-        // 修改 该id 的 liked 和 likes_count 字段
-        state.list!.forEach((Map<String, dynamic> element) {
-          GarageSaleRentList elementEntity = GarageSaleRentList.fromJson(element);
-
-          if(elementEntity.id == id){
-            elementEntity.liked = !elementEntity.liked!;
-            elementEntity.likesCount = elementEntity.liked! ? (elementEntity.likesCount! + 1) : (elementEntity.likesCount! - 1);
-          }
-
-          element = elementEntity.toJson();
-
-        });
-        return true;
-      } else {
-        String errorMessage = result.errorMsg!;
-        changeLoadingState(LoadState.State_Error, errorMessage);
-        ToastEngine.show(result.errorMsg ?? "Network Load Error");
-      }
-    } catch (e) {
-      Log.e("Error: $e");
-      ToastEngine.show("Error: $e");
-    }
-  }
-
   // 设置当前的 _queryParams
   setCurrentQueryParams(Map<String, dynamic> params){
     _queryParams.addAll(params);

+ 1 - 1
packages/cpt_services/lib/modules/services/repair_homeService/home_service_vm.dart

@@ -411,7 +411,7 @@ class RepairHomeServiceVm extends _$RepairHomeServiceVm {
         "id": id,
       };
       Log.d("请求参数------$params");
-      final result = await servicesRespositoryInstance.fetchGarageColleciton(params);
+      final result = await servicesRespositoryInstance.fetchServiceLiked(params);
       //校验成功失败
       if (result.isSuccess) {
         // 修改 该id 的 liked 和 likes_count 字段

+ 0 - 36
packages/cpt_services/lib/modules/services/repair_inProgress/in_progress_vm.dart

@@ -286,42 +286,6 @@ class RepairInProgressVm extends _$RepairInProgressVm {
     }
   }
 
-
-  // 点击 收藏/取消收藏
-  Future<bool?> handlerClickCollection(int id, bool? isCollection) async{
-    try {
-      //请求网络
-      Map<String, dynamic>  params = {
-        "id": id,
-      };
-      Log.d("请求参数------$params");
-      final result = await servicesRespositoryInstance.fetchGarageColleciton(params);
-      //校验成功失败
-      if (result.isSuccess) {
-        // 修改 该id 的 liked 和 likes_count 字段
-        state.list!.forEach((Map<String, dynamic> element) {
-          GarageSaleRentList elementEntity = GarageSaleRentList.fromJson(element);
-
-          if(elementEntity.id == id){
-            elementEntity.liked = !elementEntity.liked!;
-            elementEntity.likesCount = elementEntity.liked! ? (elementEntity.likesCount! + 1) : (elementEntity.likesCount! - 1);
-          }
-
-          element = elementEntity.toJson();
-
-        });
-        return true;
-      } else {
-        String errorMessage = result.errorMsg!;
-        changeLoadingState(LoadState.State_Error, errorMessage);
-        ToastEngine.show(result.errorMsg ?? "Network Load Error");
-      }
-    } catch (e) {
-      Log.e("Error: $e");
-      ToastEngine.show("Error: $e");
-    }
-  }
-
   // 设置当前的 _queryParams
   setCurrentQueryParams(Map<String, dynamic> params){
     _queryParams.addAll(params);

+ 1 - 1
packages/cpt_services/lib/modules/services/service_clean_detail/service_clean_detail_vm.dart

@@ -174,7 +174,7 @@ class ServiceCleanDetailVm extends _$ServiceCleanDetailVm {
       Map<String, dynamic> params = {
         "id": _detailId,
       };
-      final result = await serviceRespositoryInstance.fetchServiceCleanDetailInfo(params);
+      final result = await serviceRespositoryInstance.fetchPaidServiceCleanDetailInfo(params);
       if(result.isSuccess){
         state = state.copyWith(datas: result.data as Map<String, dynamic>);
         changeLoadingState(LoadState.State_Success, null);

+ 0 - 36
packages/cpt_services/lib/modules/services/service_evaluate_list/service_evaluate_list_vm.dart

@@ -285,42 +285,6 @@ class ServiceEvaluateListVm extends _$ServiceEvaluateListVm {
     }
   }
 
-
-  // 点击 收藏/取消收藏
-  Future<bool?> handlerClickCollection(int id, bool? isCollection) async{
-    try {
-      //请求网络
-      Map<String, dynamic>  params = {
-        "id": id,
-      };
-      Log.d("请求参数------$params");
-      final result = await servicesRespositoryInstance.fetchGarageColleciton(params);
-      //校验成功失败
-      if (result.isSuccess) {
-        // 修改 该id 的 liked 和 likes_count 字段
-        state.list!.forEach((Map<String, dynamic> element) {
-          GarageSaleRentList elementEntity = GarageSaleRentList.fromJson(element);
-
-          if(elementEntity.id == id){
-            elementEntity.liked = !elementEntity.liked!;
-            elementEntity.likesCount = elementEntity.liked! ? (elementEntity.likesCount! + 1) : (elementEntity.likesCount! - 1);
-          }
-
-          element = elementEntity.toJson();
-
-        });
-        return true;
-      } else {
-        String errorMessage = result.errorMsg!;
-        changeLoadingState(LoadState.State_Error, errorMessage);
-        ToastEngine.show(result.errorMsg ?? "Network Load Error");
-      }
-    } catch (e) {
-      Log.e("Error: $e");
-      ToastEngine.show("Error: $e");
-    }
-  }
-
   // 设置当前的 _queryParams
   setCurrentQueryParams(Map<String, dynamic> params){
     _queryParams.addAll(params);

+ 337 - 34
packages/cpt_services/lib/respository/services_respository.dart

@@ -33,8 +33,8 @@ class ServicesRespository {
 
   ServicesRespository({required this.dioEngine});
 
-  // garage 获取 分类 字典
-  Future<HttpResult<Object>> fetchGarageCateGoryList(
+  //服务 获取 分类 字典
+  Future<HttpResult<Object>> fetchServiceCateGoryList(
       Map<String, dynamic>? data, {
         CancelToken? cancelToken,
       }) async {
@@ -46,7 +46,7 @@ class ServicesRespository {
 
     final result = await dioEngine.requestNetResult(
       // ApiConstants.apiServerTime, // api 地址
-      '/api/v1/user/garage-sale/category/index', // api 地址
+      '/api/v1/user/service/category/index', // api 地址
       params: params,
       headers: headers,
       method: HttpMethod.GET,
@@ -70,8 +70,8 @@ class ServicesRespository {
     return result.convert();
   }
 
-  // garage 获取 列表
-  Future<HttpResult<Object>> fetchGarageDataList(
+  // 付费服务 获取 列表
+  Future<HttpResult<Object>> fetchPaidServiceDataList(
       Map<String, dynamic>? data, {
         CancelToken? cancelToken,
       }) async {
@@ -83,7 +83,7 @@ class ServicesRespository {
 
     final result = await dioEngine.requestNetResult(
       // ApiConstants.apiServerTime, // api 地址
-      '/api/v1/user/garage-sale/index/type', // api 地址
+      '/api/v1/user/service/paid-service/index', // api 地址
       params: params,
       headers: headers,
       method: HttpMethod.GET,
@@ -107,8 +107,95 @@ class ServicesRespository {
     return result.convert();
   }
 
-  // myposts 中 garage 获取 列表
-  Future<HttpResult<Object>> fetchMyPostsGarageDataList(
+
+  // 付费/维修 服务 列表 点赞/取消点赞
+  Future<HttpResult<Object>> fetchServiceLiked(
+      Map<String, dynamic>? data, {
+        CancelToken? cancelToken,
+      }) async {
+    Map<String, dynamic> params = {};
+    params = data!;
+    Map<String, String> headers = {};
+    headers["Content-Type"] = "application/x-www-form-urlencoded";
+    headers["Accept"] = "application/x.yyjobs-api.v1+json";
+
+    final result = await dioEngine.requestNetResult(
+      // ApiConstants.apiServerTime, // api 地址
+      '/api/v1/user/service/paid-service/liked', // api 地址
+      params: params,
+      headers: headers,
+      method: HttpMethod.POST,
+      isShowLoadingDialog: true,  //是否展示默认的Loading弹窗
+      networkDebounce: true,   //是否防抖防止重复请求
+      cancelToken: cancelToken,
+    );
+    //根据返回的结果,封装原始数据为Bean/Entity对象
+    if (result.isSuccess) {
+      //重新赋值data或list
+      final json = result.getDataDynamic();
+      // var data = NewsfeedForyouEntity.fromJson(json!);
+      //重新赋值data或list
+      return result.convert(data: json);
+    }else {
+      if(result.errorMsg != null && result.errorMsg!.isNotEmpty){
+        ToastEngine.show("${result.errorMsg}");
+      }
+    }
+    return result.convert();
+  }
+
+
+  // 提交评价
+  Future<HttpResult<Object>> fetchPublishEvaluation(
+      Map<String, dynamic>? data, {
+        CancelToken? cancelToken,
+      }) async {
+    Map<String, dynamic> params = {};
+    params = data!;
+    Map<String, String> headers = {};
+    headers["Content-Type"] = "application/x-www-form-urlencoded";
+    headers["Accept"] = "application/x.yyjobs-api.v1+json";
+
+    List<String> paths = data!["resources"] as List<String>;
+
+    Map<String, String> files = {};
+    if (paths != null && paths.isNotEmpty) {
+      paths.asMap().forEach((index, path) {
+        files["resources[$index]"] = path;
+      });
+    }
+    // 删除 resources 属性
+    params.remove("resources");
+
+    final result = await dioEngine.requestNetResult(
+      // ApiConstants.apiServerTime, // api 地址
+      '/api/v1/user/service/evaluation/publish', // api 地址
+      params: params,
+      paths: files,
+      headers: headers,
+      method: HttpMethod.POST,
+      isShowLoadingDialog: true,  //是否展示默认的Loading弹窗
+      networkDebounce: true,   //是否防抖防止重复请求
+      cancelToken: cancelToken,
+    );
+    //根据返回的结果,封装原始数据为Bean/Entity对象
+    if (result.isSuccess) {
+      //重新赋值data或list
+      final json = result.getDataJson();
+      // var data = NewsfeedForyouEntity.fromJson(json!);
+      //重新赋值data或list
+      return result.convert(data: json);
+    }else {
+      if(result.errorMsg != null && result.errorMsg!.isNotEmpty){
+        ToastEngine.show("${result.errorMsg}");
+      }
+    }
+    return result.convert();
+  }
+
+
+  // 评价列表
+  Future<HttpResult<Object>> fetchEvaluationDataList(
       Map<String, dynamic>? data, {
         CancelToken? cancelToken,
       }) async {
@@ -120,7 +207,7 @@ class ServicesRespository {
 
     final result = await dioEngine.requestNetResult(
       // ApiConstants.apiServerTime, // api 地址
-      '/api/v1/user/me/post/garage-sale', // api 地址
+      '/api/v1/user/service/evaluation/index', // api 地址
       params: params,
       headers: headers,
       method: HttpMethod.GET,
@@ -133,8 +220,7 @@ class ServicesRespository {
     if (result.isSuccess) {
       //重新赋值data或list
       final json = result.getDataJson();
-
-      var data = MypostsSaleRentEntity.fromJson(json!);
+      var data = GarageSaleRentEntity.fromJson(json!);
       //重新赋值data或list
       return result.convert(data: data);
     }else {
@@ -145,9 +231,45 @@ class ServicesRespository {
     return result.convert();
   }
 
+  // 获取 付费服务 详情信息
+  Future<HttpResult<Object>> fetchPaidServiceCleanDetailInfo(
+      Map<String, dynamic>? data, {
+        CancelToken? cancelToken,
+      }) async {
+    Map<String, dynamic> params = {};
+    params = data!;
+    Map<String, String> headers = {};
+    // headers["Content-Type"] = "application/x-www-form-urlencoded";
+    // headers["Accept"] = "application/x.yyjobs-api.v1+json";
+
+    final result = await dioEngine.requestNetResult(
+      // ApiConstants.apiServerTime, // api 地址
+      '/api/v1/user/service/paid-service/detail', // api 地址
+      params: params,
+      headers: headers,
+      method: HttpMethod.GET,
+      isShowLoadingDialog: false,  //是否展示默认的Loading弹窗
+      networkDebounce: true,   //是否防抖防止重复请求
+      cancelToken: cancelToken,
+    );
+
+    //根据返回的结果,封装原始数据为Bean/Entity对象
+    if (result.isSuccess) {
+      //重新赋值data或list
+      final json = result.getDataJson();
+      // var data = GarageSaleRentDetailEntity.fromJson(json!);
+      //重新赋值data或list
+      return result.convert(data: json);
+    }else {
+      if(result.errorMsg != null && result.errorMsg!.isNotEmpty){
+        ToastEngine.show("${result.errorMsg}");
+      }
+    }
+    return result.convert();
+  }
 
-  // garage 点赞/取消点赞
-  Future<HttpResult<Object>> fetchGarageColleciton(
+  // 付费服务 下单
+  Future<HttpResult<Object>> fetchPaidServiceBook(
       Map<String, dynamic>? data, {
         CancelToken? cancelToken,
       }) async {
@@ -159,7 +281,7 @@ class ServicesRespository {
 
     final result = await dioEngine.requestNetResult(
       // ApiConstants.apiServerTime, // api 地址
-      '/api/v1/user/garage-sale/like/click', // api 地址
+      '/api/v1/user/service/paid-service-order/book', // api 地址
       params: params,
       headers: headers,
       method: HttpMethod.POST,
@@ -170,7 +292,7 @@ class ServicesRespository {
     //根据返回的结果,封装原始数据为Bean/Entity对象
     if (result.isSuccess) {
       //重新赋值data或list
-      final json = result.getDataDynamic();
+      final json = result.getDataJson();
       // var data = NewsfeedForyouEntity.fromJson(json!);
       //重新赋值data或list
       return result.convert(data: json);
@@ -183,8 +305,8 @@ class ServicesRespository {
   }
 
 
-  // 发布 garage
-  Future<HttpResult<Object>> fetchPublishGarage(
+  // 付费服务  订单列表
+  Future<HttpResult<Object>> fetchPaidServiceOrderList(
       Map<String, dynamic>? data, {
         CancelToken? cancelToken,
       }) async {
@@ -194,33 +316,60 @@ class ServicesRespository {
     headers["Content-Type"] = "application/x-www-form-urlencoded";
     headers["Accept"] = "application/x.yyjobs-api.v1+json";
 
-    List<String> paths = data!["resources"] as List<String>;
+    final result = await dioEngine.requestNetResult(
+      // ApiConstants.apiServerTime, // api 地址
+      '/api/v1/user/service/paid-service-order/index', // api 地址
+      params: params,
+      headers: headers,
+      method: HttpMethod.GET,
+      isShowLoadingDialog: false,  //是否展示默认的Loading弹窗
+      networkDebounce: true,   //是否防抖防止重复请求
+      cancelToken: cancelToken,
+    );
 
-    Map<String, String> files = {};
-    if (paths != null && paths.isNotEmpty) {
-      paths.asMap().forEach((index, path) {
-        files["resources[$index]"] = path;
-      });
+    //根据返回的结果,封装原始数据为Bean/Entity对象
+    if (result.isSuccess) {
+      //重新赋值data或list
+      final json = result.getDataJson();
+      var data = GarageSaleRentEntity.fromJson(json!);
+      //重新赋值data或list
+      return result.convert(data: data);
+    }else {
+      if(result.errorMsg != null && result.errorMsg!.isNotEmpty){
+        ToastEngine.show("${result.errorMsg}");
+      }
     }
-    // 删除 resources 属性
-    params.remove("resources");
+    return result.convert();
+  }
+
+
+  // 获取 付费服务 订单详情
+  Future<HttpResult<Object>> fetchPaidServiceCleanOrderDetailInfo(
+      Map<String, dynamic>? data, {
+        CancelToken? cancelToken,
+      }) async {
+    Map<String, dynamic> params = {};
+    params = data!;
+    Map<String, String> headers = {};
+    // headers["Content-Type"] = "application/x-www-form-urlencoded";
+    // headers["Accept"] = "application/x.yyjobs-api.v1+json";
 
     final result = await dioEngine.requestNetResult(
       // ApiConstants.apiServerTime, // api 地址
-      '/api/v1/user/garage-sale/index/publish', // api 地址
+      '/api/v1/user/service/paid-service-order/detail', // api 地址
       params: params,
-      paths: files,
       headers: headers,
-      method: HttpMethod.POST,
-      isShowLoadingDialog: true,  //是否展示默认的Loading弹窗
+      method: HttpMethod.GET,
+      isShowLoadingDialog: false,  //是否展示默认的Loading弹窗
       networkDebounce: true,   //是否防抖防止重复请求
       cancelToken: cancelToken,
     );
+
     //根据返回的结果,封装原始数据为Bean/Entity对象
     if (result.isSuccess) {
       //重新赋值data或list
       final json = result.getDataJson();
-      // var data = NewsfeedForyouEntity.fromJson(json!);
+      // var data = GarageSaleRentDetailEntity.fromJson(json!);
       //重新赋值data或list
       return result.convert(data: json);
     }else {
@@ -231,8 +380,9 @@ class ServicesRespository {
     return result.convert();
   }
 
-  // 获取 clean 详情信息
-  Future<HttpResult<Object>> fetchServiceCleanDetailInfo(
+
+  // 获取 付费订单实际需要支付的价格
+  Future<HttpResult<Object>> fetchPaidServiceCleanOrderPrice(
       Map<String, dynamic>? data, {
         CancelToken? cancelToken,
       }) async {
@@ -244,7 +394,7 @@ class ServicesRespository {
 
     final result = await dioEngine.requestNetResult(
       // ApiConstants.apiServerTime, // api 地址
-      '/api/v1/user/garage-sale/index/detail', // api 地址
+      '/api/v1/user/service/paid-service-order/price', // api 地址
       params: params,
       headers: headers,
       method: HttpMethod.GET,
@@ -268,6 +418,84 @@ class ServicesRespository {
     return result.convert();
   }
 
+
+  // 付费服务 取消订单
+  Future<HttpResult<Object>> fetchCancelPaidServiceOrder(
+      Map<String, dynamic>? data, {
+        CancelToken? cancelToken,
+      }) async {
+    Map<String, dynamic> params = {};
+    params = data!;
+    Map<String, String> headers = {};
+    headers["Content-Type"] = "application/x-www-form-urlencoded";
+    headers["Accept"] = "application/x.yyjobs-api.v1+json";
+
+    final result = await dioEngine.requestNetResult(
+      // ApiConstants.apiServerTime, // api 地址
+      '/api/v1/user/service/paid-service-order/cancel', // api 地址
+      params: params,
+      headers: headers,
+      method: HttpMethod.POST,
+      isShowLoadingDialog: true,  //是否展示默认的Loading弹窗
+      networkDebounce: true,   //是否防抖防止重复请求
+      cancelToken: cancelToken,
+    );
+    //根据返回的结果,封装原始数据为Bean/Entity对象
+    if (result.isSuccess) {
+      //重新赋值data或list
+      final json = result.getDataJson();
+      // var data = NewsfeedForyouEntity.fromJson(json!);
+      //重新赋值data或list
+      return result.convert(data: json);
+    }else {
+      if(result.errorMsg != null && result.errorMsg!.isNotEmpty){
+        ToastEngine.show("${result.errorMsg}");
+      }
+    }
+    return result.convert();
+  }
+
+
+  ///-------------------咨询类---------------------------------
+
+
+  // 维修服务  列表
+  Future<HttpResult<Object>> fetchRepairServiceList(
+      Map<String, dynamic>? data, {
+        CancelToken? cancelToken,
+      }) async {
+    Map<String, dynamic> params = {};
+    params = data!;
+    Map<String, String> headers = {};
+    headers["Content-Type"] = "application/x-www-form-urlencoded";
+    headers["Accept"] = "application/x.yyjobs-api.v1+json";
+
+    final result = await dioEngine.requestNetResult(
+      // ApiConstants.apiServerTime, // api 地址
+      '/api/v1/user/service/inquiry-service/index', // api 地址
+      params: params,
+      headers: headers,
+      method: HttpMethod.GET,
+      isShowLoadingDialog: false,  //是否展示默认的Loading弹窗
+      networkDebounce: true,   //是否防抖防止重复请求
+      cancelToken: cancelToken,
+    );
+
+    //根据返回的结果,封装原始数据为Bean/Entity对象
+    if (result.isSuccess) {
+      //重新赋值data或list
+      final json = result.getDataJson();
+      var data = GarageSaleRentEntity.fromJson(json!);
+      //重新赋值data或list
+      return result.convert(data: data);
+    }else {
+      if(result.errorMsg != null && result.errorMsg!.isNotEmpty){
+        ToastEngine.show("${result.errorMsg}");
+      }
+    }
+    return result.convert();
+  }
+
   // 获取 repair 详情信息
   Future<HttpResult<Object>> fetchServiceRepairDetailInfo(
       Map<String, dynamic>? data, {
@@ -281,7 +509,7 @@ class ServicesRespository {
 
     final result = await dioEngine.requestNetResult(
       // ApiConstants.apiServerTime, // api 地址
-      '/api/v1/user/garage-sale/index/detail', // api 地址
+      '/api/v1/user/service/inquiry-service/detail', // api 地址
       params: params,
       headers: headers,
       method: HttpMethod.GET,
@@ -306,4 +534,79 @@ class ServicesRespository {
   }
 
 
+  // 维修服务 提交咨询
+  Future<HttpResult<Object>> fetchRepairServiceSubmit(
+      Map<String, dynamic>? data, {
+        CancelToken? cancelToken,
+      }) async {
+    Map<String, dynamic> params = {};
+    params = data!;
+    Map<String, String> headers = {};
+    headers["Content-Type"] = "application/x-www-form-urlencoded";
+    headers["Accept"] = "application/x.yyjobs-api.v1+json";
+
+    final result = await dioEngine.requestNetResult(
+      // ApiConstants.apiServerTime, // api 地址
+      '/api/v1/user/service/inquiry-service-order/submit', // api 地址
+      params: params,
+      headers: headers,
+      method: HttpMethod.POST,
+      isShowLoadingDialog: true,  //是否展示默认的Loading弹窗
+      networkDebounce: true,   //是否防抖防止重复请求
+      cancelToken: cancelToken,
+    );
+    //根据返回的结果,封装原始数据为Bean/Entity对象
+    if (result.isSuccess) {
+      //重新赋值data或list
+      final json = result.getDataJson();
+      // var data = NewsfeedForyouEntity.fromJson(json!);
+      //重新赋值data或list
+      return result.convert(data: json);
+    }else {
+      if(result.errorMsg != null && result.errorMsg!.isNotEmpty){
+        ToastEngine.show("${result.errorMsg}");
+      }
+    }
+    return result.convert();
+  }
+
+
+  // 维修服务  订单列表
+  Future<HttpResult<Object>> fetchRepairServiceOrderList(
+      Map<String, dynamic>? data, {
+        CancelToken? cancelToken,
+      }) async {
+    Map<String, dynamic> params = {};
+    params = data!;
+    Map<String, String> headers = {};
+    headers["Content-Type"] = "application/x-www-form-urlencoded";
+    headers["Accept"] = "application/x.yyjobs-api.v1+json";
+
+    final result = await dioEngine.requestNetResult(
+      // ApiConstants.apiServerTime, // api 地址
+      '/api/v1/user/service/inquiry-service-order/index', // api 地址
+      params: params,
+      headers: headers,
+      method: HttpMethod.GET,
+      isShowLoadingDialog: false,  //是否展示默认的Loading弹窗
+      networkDebounce: true,   //是否防抖防止重复请求
+      cancelToken: cancelToken,
+    );
+
+    //根据返回的结果,封装原始数据为Bean/Entity对象
+    if (result.isSuccess) {
+      //重新赋值data或list
+      final json = result.getDataJson();
+      var data = GarageSaleRentEntity.fromJson(json!);
+      //重新赋值data或list
+      return result.convert(data: data);
+    }else {
+      if(result.errorMsg != null && result.errorMsg!.isNotEmpty){
+        ToastEngine.show("${result.errorMsg}");
+      }
+    }
+    return result.convert();
+  }
+
+
 }