第一个model
+(NSMutableArray *)categoryGoodsList:(NSArray *)listArr{
NSMutableArray *nsArr = [[NSMutableArray alloc] init];
if([listArrisEqual:@""]) {
}else{
for(NSDictionary*listDicinlistArr) {
ShopCategoryGoodsModel *model = [[ShopCategoryGoodsModel alloc] init];
[modelsetValuesForKeysWithDictionary:listDic];
NSMutableArray*listArr = [[NSMutableArrayalloc]init];
for(NSDictionary*listDicinmodel.tertiaryCategories) {
ShopCategorySecondModel *scModel = [[ShopCategorySecondModel alloc] init];
scModel = [ShopCategorySecondModeltertiaryCategories:listDic];
[listArraddObject:scModel];
}
model.tertiaryCategories= listArr;
[nsArraddObject:model];
}
}
returnnsArr;
}
第二个model
+(ShopCategorySecondModel *)tertiaryCategories:(NSDictionary *)dic
{
ShopCategorySecondModel *model = [[ShopCategorySecondModel alloc] init];
[modelsetValuesForKeysWithDictionary:dic];
returnmodel;
}
赋值
CategoryListModel*listModel =_secondGoodsArr[section];
return listModel.tertiaryCategories.count;
网友评论