02 创建字典的时候出错

113 阅读1分钟
#pragma mark 请求数据
- (void)getGoodsData
{
    NSNumber *start = @0;
    NSNumber *length = LIST_PAGE_SIZE;
    
    NSDictionary *pageddddd = @{@"start" : start, @"length" : length};
    NSDictionary *pagination1 = [NSMutableDictionary dictionaryWithObject:@[start, length] forKey:@[@"start", @"length"]];
    NSDictionary *pagination = [[NSDictionary alloc] initWithObjects:@[start, length] forKeys:@[@"start", @"length"]];
    
    // 1. 构建参数
    NSNumber *franchiseeId = @1;
    NSString *categoryId = @"CDC-CC-07C9C70F-1474334570270";

    NSDictionary *paramDic = [[NSDictionary alloc] initWithObjects:@[franchiseeId, categoryId, start, length] forKeys:@[@"franchiseeId", @"categoryId", @"start", @"length"]];
    
    // 2. 发送请求
    RequestHelper *requestGoodsList = [[RequestHelper alloc] init];
    requestGoodsList.delegate = self;
    [requestGoodsList sendRequestWithType:RPC_COMMODITY_LIST andParams:paramDic];
}