12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061 |
- //
- // FKWantBuyRequest.m
- // FirstLink
- //
- // Created by 施昌鹏 on 16/8/18.
- // Copyright © 2016年 FirstLink. All rights reserved.
- //
- #import "FKWantBuyRequest.h"
- const int REQ_WANT_BUY_DETAIL_IDENTIFY = 1002;
- const int REQ_WANT_BUY_NEXT_PAGE = 1003;
- const int REQ_WANT_BUY_RETURN_DATA = 1004;
- const int REQ_WANT_BUY_DELETE_DATA = 1005;
- @implementation FKWantBuyRequest
- +(void)reqWantBuyDetailWithStartRow:(NSInteger)startRow
- identify:(int)identify
- delegate:(id<FLNetworkDelegate>)delegate {
- NSString *urlString = [NSString stringWithFormat:@"%@/link-site/api/recommend_url/find_urls_result.json",[[FKServerUtil sharedInstance] apiServer]];
-
- NSString *itemJson = [FLRequestHelper JSONStringWithKeys:@[@"start_row", @"page_size"]
- values:@[@(startRow), @(20)]];
-
- NSMutableDictionary *dicM = [NSMutableDictionary dictionary];
- [dicM setValue:itemJson forKey:@"user_recommend_url_json"];
- [dicM addEntriesFromDictionary:[FLRequestHelper commonParamater]];
-
- [[FLDataCenter sharedDataCenter] POST:urlString
- para:dicM
- identify:identify
- delegate:delegate];
- }
- +(void)reqWantBuyWithUrl:(NSString *)url identify:(int)identify delegate:(id<FLNetworkDelegate>)delegate userInfo:(NSDictionary *)userInfo {
- NSString *urlString = [NSString stringWithFormat:@"%@/link-site/api/recommend_url/create_urls.json",[[FKServerUtil sharedInstance] apiServer]];
- NSMutableDictionary *dicM = [NSMutableDictionary dictionary];
- [dicM setValue:url forKey:@"urls"];
- [dicM addEntriesFromDictionary:[FLRequestHelper commonParamater]];
- [[FLDataCenter sharedDataCenter] POST:urlString
- para:dicM
- identify:identify
- delegate:delegate
- userInfo:userInfo];
-
- }
- +(void)reqWantBuyDeleteWithUrl:(NSString *)url identify:(int)identify delegate:(id<FLNetworkDelegate>)delegate {
- NSString *urlString = [NSString stringWithFormat:@"%@/link-site/api/recommend_url/delete_url.json",[[FKServerUtil sharedInstance] apiServer]];
- NSMutableDictionary *dicM = [NSMutableDictionary dictionary];
- [dicM setValue:url forKey:@"url"];
- [dicM addEntriesFromDictionary:[FLRequestHelper commonParamater]];
- [[FLDataCenter sharedDataCenter] POST:urlString
- para:dicM
- identify:identify
- delegate:delegate];
- }
- @end
|