netWorkManager.h 797 B

123456789101112131415161718192021222324252627282930313233343536
  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. @end
  24. NS_ASSUME_NONNULL_END