酷店

AlibcMtopRequestHelp.h 1.9KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. /*
  2. * AlibcMtopRequestHelp.h
  3. *
  4. * 阿里百川电商
  5. * 项目名称:阿里巴巴电商 AlibcTradeCommon
  6. * 版本号:3.1.1.93
  7. * 发布时间:2017-03-06
  8. * 开发团队:阿里巴巴百川商业化团队
  9. * 阿里巴巴电商SDK答疑群号:1229144682(阿里旺旺)
  10. * Copyright (c) 2016-2019 阿里巴巴-移动事业群-百川. All rights reserved.
  11. */
  12. #import <Foundation/Foundation.h>
  13. #import "AlibcMtopCmd.h"
  14. #import "AlibcNetError.h"
  15. #import "AlibcConfig.h"
  16. #ifndef AlibcMtopRequestHelp_h
  17. #define AlibcMtopRequestHelp_h
  18. //dataObj是mtop返回数据的data节点
  19. typedef void(^MtopRequestCallback)(AlibcNetError *_Nullable error, _Nullable id dataObj);
  20. @interface AlibcMtopRequestHelp : NSObject
  21. //uniqueKey长度大于0,会以cmd+uniqueKey作为值请求去重.
  22. //NSDictionary里面可以包含基本的array,NSDictionary,内部会自己转换成string的
  23. //needLogin,needAuth不填,则默认都欧式NO
  24. //version可以填nil,默认版本是1.0
  25. + (void)ProcessMtopRequest:(nonnull AlibcMtopCmd *)cmd
  26. data:(nullable NSDictionary *)dict
  27. complete:(nullable MtopRequestCallback)callback;
  28. + (void)ProcessMtopRequest:(nonnull AlibcMtopCmd *)cmd
  29. data:(nullable NSDictionary *)dict
  30. uniqueKey:(nullable NSString *)uniqueKey
  31. complete:(nullable MtopRequestCallback)callback;
  32. //这个接口专给组件用的
  33. + (void)ProcessMtopRequest:(nonnull NSString *)cmdName
  34. version:(nullable NSString *)version
  35. data:(nullable NSDictionary *)dict
  36. bizId:(nullable NSString *)bizId
  37. uniqueKey:(nullable NSString *)uniqueKey
  38. needLogin:(BOOL)needLogin
  39. needAuth:(BOOL)needAuth
  40. needWua:(BOOL)needWua
  41. complete:(nullable MtopRequestCallback)callback;
  42. @end
  43. #endif