RQHTTPService+RQGetMenuInfo.m 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. //
  2. // RQHTTPService+RQGetMenuInfo.m
  3. // jiaPei
  4. //
  5. // Created by 张嵘 on 2022/4/28.
  6. // Copyright © 2022 JCZ. All rights reserved.
  7. //
  8. #import "RQHTTPService+RQGetMenuInfo.h"
  9. @implementation RQHTTPService (RQGetMenuInfo)
  10. - (RACSignal *)getMenuInfo {
  11. /// 1. 配置参数
  12. RQKeyedSubscript *subscript = [RQKeyedSubscript subscript];
  13. subscript[@"stuOutId"] = RQStringIsNotEmpty(RQ_USER_MANAGER.currentUser.outId)? RQ_USER_MANAGER.currentUser.outId : @"";
  14. /// 2. 配置参数模型
  15. RQURLParameters *paramters = [RQURLParameters urlParametersWithMethod:RQ_HTTTP_METHOD_POST path:RQ_POST_GetMenuInfo parameters:subscript.dictionary];
  16. /// 3.发起请求
  17. return [[[RQHTTPRequest requestWithParameters:paramters]
  18. enqueueResultClass:[RQMenuInfoModel class]]
  19. rq_parsedResults];
  20. }
  21. /// student/getMenuInfo
  22. /// * HTTP方法:POST
  23. /// * 报文格式:{'stuOutId':'3502004042'}
  24. /// 返回字典数组
  25. /// {
  26. /// body = [
  27. /// {
  28. /// MENU_URL = https://p.pinduoduo.com/otrFYWZC,
  29. /// MENU_NAME = 话费充值,
  30. /// MENU_ICON = https://image.jppt.com.cn/appimg/sjcz.png,
  31. /// MENU_TYPE = 1,
  32. /// MENU_REMARK = 100元立减8
  33. /// },
  34. /// {
  35. /// MENU_URL = https://sqxh.zzxcx.net/,
  36. /// MENU_NAME = 淘宝特价,
  37. /// MENU_ICON = https://image.jppt.com.cn/appimg/taobao.png,
  38. /// MENU_TYPE = 1,
  39. /// MENU_REMARK = 优惠多多
  40. /// }
  41. /// ],
  42. /// code = 0,
  43. /// other = ,
  44. /// msg = 操作成功
  45. /// }
  46. /// MENU_URL(H5的链接或小程序的username);
  47. /// MENU_NAME(标题);
  48. /// MENU_ICON(图标地址);
  49. /// MENU_TYPE (类型 1:H5;2:小程序);
  50. /// MENU_REMARK(副标题);
  51. @end