Parcourir la source

分类数据展示修复

Abel il y a 1 an
Parent
commit
d1276a0ad4

+ 1 - 1
Asteria/Fuction/Category/vm/ASCategoriesViewModel.m

@@ -19,7 +19,7 @@
     [ASNetTools.shared getWithPath:getAllCategoriesUrl param:dic success:^(id _Nonnull json) {
         NSArray *arr = json;
         if ([arr isKindOfClass:[NSArray class]] && arr != nil && arr.count > 0) {
-            NSMutableArray *arr = [KWMainTypeModel mj_objectArrayWithKeyValuesArray:json[0][@"children_data"]];
+            NSMutableArray *arr = [KWMainTypeModel mj_objectArrayWithKeyValuesArray:json];
             
             weakSelf.totalDatas = arr;
             [weakSelf addCurrencyData];            

+ 3 - 0
Asteria/NetTools/ASNetTools.m

@@ -153,6 +153,7 @@
         dispatch_async(dispatch_get_main_queue(), ^{
             NSString *json = [op responseJSON];
             id temp = [json mj_JSONObject];
+            NSLog(@"---post-----url:\n%@\n-----data:\n%@\n--",path, temp);
             if ([temp isKindOfClass:[NSDictionary class]]) {
                 NSDictionary *result = (NSDictionary *)temp;
                 NSString *status = [NSString stringWithFormat:@"%@", result[@"status"]];
@@ -209,6 +210,7 @@
         dispatch_async(dispatch_get_main_queue(), ^{
             NSString *json = [op responseJSON];
             id temp = [json mj_JSONObject];
+            NSLog(@"---Get-----url:\n%@\n-----data:\n%@\n--",path, temp);
             if ([temp isKindOfClass:[NSDictionary class]]) {
                 NSDictionary *result = (NSDictionary *)temp;
                 NSString *status = [NSString stringWithFormat:@"%@", result[@"status"]];
@@ -270,6 +272,7 @@
         dispatch_async(dispatch_get_main_queue(), ^{
             NSString *json = [op responseJSON];
             id temp = [json mj_JSONObject];
+            NSLog(@"---Put-----url:\n%@\n-----data:\n%@\n--",path, temp);
             if ([temp isKindOfClass:[NSDictionary class]]) {
                 NSDictionary *result = (NSDictionary *)temp;
                 NSString *status = [NSString stringWithFormat:@"%@", result[@"status"]];