GoodsDetailsVM.m 1.4 KB

1234567891011121314151617181920212223242526272829303132333435
  1. //
  2. // GoodsDetailsVM.m
  3. // Asteria
  4. //
  5. // Created by 王猛 on 2023/5/10.
  6. //
  7. #import "GoodsDetailsVM.h"
  8. @implementation GoodsDetailsVM
  9. -(void)ucm_confignormalnetworksuccesswithresponse:(UCMHttpRequestResponse *)response{
  10. if([response.ucm_responseObject[@"code"] integerValue] == -1){
  11. [MBProgressHUD hideHUDForView:[Current_normalTool topViewController].view animated:YES];
  12. return;
  13. }
  14. if([response.ucm_responseMark isEqualToString:GoodsDetails_productGetProduct]){
  15. GoodsInformationM *model = [GoodsInformationM mj_objectWithKeyValues:response.ucm_responseObject[@"data"][@"product"]];
  16. NSMutableArray *tempImgAry = [[NSMutableArray alloc]init];
  17. for (NSDictionary *tempDic in model.imgarr) {
  18. if([tempDic[@"type"] isEqualToString:@"mp4"]){
  19. model.mp4Str = tempDic[@"url"];
  20. }else if([tempDic[@"type"] isEqualToString:@"img"]){
  21. [tempImgAry addObject:tempDic];
  22. }
  23. }
  24. model.imgDicAry = [tempImgAry copy];
  25. [self ucm_configNewsRepose:response data:[NSMutableArray arrayWithObject:model] success:YES has_more:NO mark:response.ucm_responseMark extend_info:@{}];
  26. }
  27. }
  28. -(void)ucm_confignormalnetworkfailwithresponse:(UCMHttpRequestResponse *)response{
  29. [self ucm_configNewsRepose:response data:[NSMutableArray array] is_showmsg:YES is_list:NO success:NO has_more:NO mark:response.ucm_responseMark extend_info:@{}];
  30. }
  31. @end