Bez popisu

FKWantBuyRequest.m 2.6KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. //
  2. // FKWantBuyRequest.m
  3. // FirstLink
  4. //
  5. // Created by 施昌鹏 on 16/8/18.
  6. // Copyright © 2016年 FirstLink. All rights reserved.
  7. //
  8. #import "FKWantBuyRequest.h"
  9. const int REQ_WANT_BUY_DETAIL_IDENTIFY = 1002;
  10. const int REQ_WANT_BUY_NEXT_PAGE = 1003;
  11. const int REQ_WANT_BUY_RETURN_DATA = 1004;
  12. const int REQ_WANT_BUY_DELETE_DATA = 1005;
  13. @implementation FKWantBuyRequest
  14. +(void)reqWantBuyDetailWithStartRow:(NSInteger)startRow
  15. identify:(int)identify
  16. delegate:(id<FLNetworkDelegate>)delegate {
  17. NSString *urlString = [NSString stringWithFormat:@"%@/link-site/api/recommend_url/find_urls_result.json",[[FKServerUtil sharedInstance] apiServer]];
  18. NSString *itemJson = [FLRequestHelper JSONStringWithKeys:@[@"start_row", @"page_size"]
  19. values:@[@(startRow), @(20)]];
  20. NSMutableDictionary *dicM = [NSMutableDictionary dictionary];
  21. [dicM setValue:itemJson forKey:@"user_recommend_url_json"];
  22. [dicM addEntriesFromDictionary:[FLRequestHelper commonParamater]];
  23. [[FLDataCenter sharedDataCenter] POST:urlString
  24. para:dicM
  25. identify:identify
  26. delegate:delegate];
  27. }
  28. +(void)reqWantBuyWithUrl:(NSString *)url identify:(int)identify delegate:(id<FLNetworkDelegate>)delegate userInfo:(NSDictionary *)userInfo {
  29. NSString *urlString = [NSString stringWithFormat:@"%@/link-site/api/recommend_url/create_urls.json",[[FKServerUtil sharedInstance] apiServer]];
  30. NSMutableDictionary *dicM = [NSMutableDictionary dictionary];
  31. [dicM setValue:url forKey:@"urls"];
  32. [dicM addEntriesFromDictionary:[FLRequestHelper commonParamater]];
  33. [[FLDataCenter sharedDataCenter] POST:urlString
  34. para:dicM
  35. identify:identify
  36. delegate:delegate
  37. userInfo:userInfo];
  38. }
  39. +(void)reqWantBuyDeleteWithUrl:(NSString *)url identify:(int)identify delegate:(id<FLNetworkDelegate>)delegate {
  40. NSString *urlString = [NSString stringWithFormat:@"%@/link-site/api/recommend_url/delete_url.json",[[FKServerUtil sharedInstance] apiServer]];
  41. NSMutableDictionary *dicM = [NSMutableDictionary dictionary];
  42. [dicM setValue:url forKey:@"url"];
  43. [dicM addEntriesFromDictionary:[FLRequestHelper commonParamater]];
  44. [[FLDataCenter sharedDataCenter] POST:urlString
  45. para:dicM
  46. identify:identify
  47. delegate:delegate];
  48. }
  49. @end