zoukankan      html  css  js  c++  java
  • 解析字典套字典

    //解析字典套字典
    -(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"];

  • 相关阅读:
    直接插入排序
    直接选择排序
    冒泡排序
    归并排序
    进程调度
    进程与线程
    c语言struct和c++struct的区别
    二叉搜索树、AVL平衡二叉搜索树、红黑树、多路查找树

    6-11 先序输出叶结点
  • 原文地址:https://www.cnblogs.com/-ios/p/4672508.html
Copyright © 2011-2022 走看看