ZYLNetworkConfig.h 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. //
  2. // ZYLNetworkConfig.h
  3. // NetworkLayerBuild
  4. //
  5. // Created by 翟玉磊 on 2017/8/31.
  6. // Copyright © 2017年 翟玉磊. All rights reserved.
  7. //
  8. #ifndef ZYLNetworkConfig_h
  9. #define ZYLNetworkConfig_h
  10. //接口环境选择
  11. typedef enum : NSUInteger {
  12. ZYLServiceEnvironmentTest = 0,
  13. ZYLServiceEnvironmentDevelop,
  14. ZYLServiceEnvironmentRelease,
  15. ZYLServiceEnvironmentTestGy, //127.xxx、192.168.x.x
  16. } ZYLServiceEnvironment;
  17. /// 3:127.xxx、192.168.x.x 2:预发 1:测试 0:正式
  18. #if IS_DEBUG == 0
  19. #define BuildServiceEnvironment ZYLServiceEnvironmentRelease
  20. #elif IS_DEBUG == 1
  21. #define BuildServiceEnvironment ZYLServiceEnvironmentTest
  22. #elif IS_DEBUG == 2
  23. #define BuildServiceEnvironment ZYLServiceEnvironmentDevelop
  24. #else
  25. #define BuildServiceEnvironment ZYLServiceEnvironmentTestGy
  26. #endif
  27. //请求方式
  28. typedef enum : NSUInteger {
  29. ZYLNetworkRequestTypeGet,
  30. ZYLNetworkRequestTypePost,
  31. } ZYLNetworkRequestType;
  32. #define RequestTimeoutInterval 15 //默认请求超时时间
  33. #endif /* ZYLNetworkConfig_h */