解析字典套字典
//解析字典套字典
-(void)requestUrl{
NSString *str = [NSString stringWithFormat:@"http://www.aliyueba.com:8080/ci/index.php/api/lists/shop_de?shopid=%@&cateid=%@&userid=%@",self.shopid,self.cateid,@"18"];
AFHTTPRequestOperationManager *manager=[AFHTTPRequestOperationManager manager];
NSURL *url = [NSURL URLWithString:str];
manager.responseSerializer.acceptableContentTypes = [NSSet setWithObject:@"text/html"];
__weak typeof(self) weakSelf=self;
NSMutableDictionary *dict = [NSMutableDictionary dictionary];
MapAroundModle *shopidValue = [[MapAroundModle alloc]init];
// shopidValue.shopid
dict[@"shopid"] = self.shopid;
[manager GET:str parameters:dict success:^(AFHTTPRequestOperation *operation, id responseObject) {
//NSLog(@"++++++%@",responseObject);
flagName=YES;
weakSelf.nameDic=[NSMutableDictionary dictionaryWithDictionary:responseObject[@"result"]];
[weakSelf.tableView reloadData];
// NSLog(@"nameDic---%@",weakSelf.nameDic);
} failure:^(AFHTTPRequestOperation *operation, NSError *error) {
NSLog(@"%@",error);
}];
}
//赋值
cell1.howmuchlabel.text=[self.nameDic objectForKey:@"price"];
posted on 2015-07-24 09:47 yucaijiang 阅读(289) 评论(0) 编辑 收藏 举报
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】凌霞软件回馈社区,博客园 & 1Panel & Halo 联合会员上线
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步