酷店

ALPOpenUtil.h 1.1KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. //
  2. // ALPOpenUtil.h
  3. // ALPLinkPartnerSDK
  4. //
  5. // Created by czp on 16/9/22.
  6. // Copyright © 2016年 czp. All rights reserved.
  7. //
  8. #import "ALPJumpParam.h"
  9. #import <UIKit/UIKit.h>
  10. @interface ALPOpenUtil : NSObject
  11. /**
  12. * 把dictionary转为json
  13. *
  14. */
  15. + (NSString *)pareseToJSONWithDictionary:(NSDictionary *)dictionary;
  16. /**
  17. * 把json转为dictionary
  18. *
  19. */
  20. + (NSDictionary *)parseToDictionaryWithJSON:(NSString *)json;
  21. + (NSString *)encodeALLWithURL:(NSString *)url;
  22. /**
  23. * query转Dictionary
  24. */
  25. + (NSDictionary*)queryDictionaryFromURL:(NSString*)urlString;
  26. /**
  27. * Dictionary转query
  28. *
  29. * @param dic 字典
  30. *
  31. * @return query字符串
  32. */
  33. + (NSString *)queryStringFromDictionary:(NSDictionary *)dic;
  34. /**
  35. * md5加密算法,传入待加密string
  36. */
  37. + (NSString *)encodeToMD5:(NSString *)string;
  38. /**
  39. * 获取ttid
  40. */
  41. + (NSString *)getTtid;
  42. /**
  43. * 当前viewController
  44. *
  45. * @return 当前viewController
  46. */
  47. + (UIViewController *)currentVC;
  48. /**
  49. * urldecode
  50. */
  51. + (NSString *)urlDecoded:(NSString *)string;
  52. /*
  53. * 转换为base64字符串
  54. */
  55. + (NSString *)base64EncodedWithString:(NSString*)str;
  56. @end