netWorkManager.h 955 B

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