netWorkManager.h 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. //
  2. // netWorkManager.h
  3. // 隐私保护
  4. //
  5. // Created by xd h on 2023/10/8.
  6. //
  7. #import <Foundation/Foundation.h>
  8. #import "connectDeviceManager.h"
  9. NS_ASSUME_NONNULL_BEGIN
  10. /**
  11. * 成功请求Block返回的字典
  12. */
  13. typedef void (^netWork_Success) (id responseObject);
  14. /**
  15. * 失败Block返回
  16. */
  17. typedef void (^netWork_Faild) (NSError *error);
  18. @interface netWorkManager : NSObject
  19. +(netWorkManager *)shareInstance;
  20. #pragma mark afnetwork post 请求
  21. - (void)CommonPostCallBackCode:(NSString*)code Parameters:(NSDictionary*)dict success:(netWork_Success)success failure:(netWork_Faild)failure;
  22. #pragma mark afnetwork get 请求
  23. - (void)CommonGetWithCallBackCode:(NSString *)code Parameters:(NSDictionary *_Nullable)dic success:(netWork_Success)success failure:(netWork_Faild)faildStr;
  24. - (void)doUploadFileToFileServiceWithParams:(NSMutableDictionary *)params data:(NSData *)data success:(netWork_Success)success faild:(netWork_Faild)faildStr;
  25. #pragma mark afnetwork post 请求
  26. - (void)cloudPhonePostCallBackCode:(NSString*)code Parameters:(NSDictionary*)dict success:(netWork_Success)success failure:(netWork_Faild)failure;
  27. #pragma mark afnetwork get 请求
  28. - (void)cloudPhoneGETCallBackCode:(NSString*)code Parameters:(NSDictionary*)dict success:(netWork_Success)success failure:(netWork_Faild)failure;
  29. @end
  30. NS_ASSUME_NONNULL_END