Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

求助:大神,跟着你代码走的,在rac_GET没有反应 #6

Open
feng-tianyou opened this issue Jul 21, 2016 · 0 comments
Open

Comments

@feng-tianyou
Copy link

@lzyy 我使用你源码的路径(http://api.huaban.com/fm/wallpaper/tags)请求,GET请求正常,但是使用我的路径(http://api.wd.tgnet.com/Info/NewestList),GET请求就没有一点反应。我把两个路径在浏览器上跑,有数据的。我的不需要token,请问是什么回事?请教一下
`

  • (RACSignal *)getHomeDataWithClassNo:(NSString *)classNo
    page:(NSInteger)page
    limit:(NSInteger)limit{
    NSDictionary *paraDic = @{@"class_no":TG_SERVER_INTERFACE_IS_EMTYPE(classNo),
    @"page":@(page),
    @"limit":@(limit)
    };
    // NSString *urlString = [NSString stringWithFormat:@"http://api.wd.tgnet.com/Info/NewestList?class_no=%@page=%@limit=%@", classNo, @(page), @(limit)];

    NSString *urlStr = @"http://api.wd.tgnet.com/Info/NewestList";
    // http://api.huaban.com/fm/wallpaper/tags
    return [[self rac_GET:urlStr parameters:paraDic] map:^id(RACTuple *tuple) {
    NSDictionary *data = tuple.first;
    NSLog(@"%@", data);
    return [[((NSArray *)data[@"info"]).rac_sequence map:^id(id value) {
    return [[TGPostInfoModel alloc] initWithDictionary:value error:nil];
    }] array];
    }];
    }
    `

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant