GoodsBannerModel.m 854 B

12345678910111213141516171819202122232425262728
  1. //
  2. // GoodsBannerModel.m
  3. // westkissMob
  4. //
  5. // Created by 王猛 on 2022/9/14.
  6. //
  7. #import "GoodsBannerModel.h"
  8. @implementation GoodsBannerModel
  9. + (GoodsBannerModel *)xxx_loadWithModel:(MediaGalleryEntriesModel *)tempModel{
  10. GoodsBannerModel *model = [[GoodsBannerModel alloc]init];
  11. if([tempModel.media_type isEqualToString:@"external-video"]){
  12. model.cellType = CellContentTypeVideo;
  13. model.url = tempModel.label;
  14. model.small = [NSString stringWithFormat:@"https:%@%@%@",HostPath,ProductImgPath,tempModel.file];
  15. }else{
  16. model.cellType = CellContentTypeImg;
  17. model.url = [NSString stringWithFormat:@"https:%@%@%@",HostPath,ProductImgPath,tempModel.file];
  18. model.small = [NSString stringWithFormat:@"https:%@%@%@",HostPath,ProductImgPath,tempModel.file];
  19. }
  20. return model;
  21. }
  22. @end