| | |
| | | }).disposed(by: disposeBag) |
| | | |
| | | Services.bannerList(position: .homeTop).subscribe(onNext: {[weak self] data in |
| | | guard let weakSelf = self else { return } |
| | | if let models = data.data{ |
| | | let imgs = models.compactMap({$0.img}) |
| | | self?.view_banner.setImages(images: imgs, type: .URL) { index in |
| | | jumpPage(model: models[index].model, page: models[index].page, type: models[index].type, id: models[index].turnId) |
| | | var bannerResources = [CommonBannerModel]() |
| | | for (i,item) in models.enumerated() { |
| | | bannerResources.append(CommonBannerModel(index:i,resource:item.img,mediaType:.imageUrl)) |
| | | } |
| | | self?.view_banner.setItems(items: bannerResources,selectClouse: { m in |
| | | jumpPage(model: models[m.index].model, page: models[m.index].page, type: models[m.index].type, id: models[m.index].turnId) |
| | | }) |
| | | } |
| | | }) { error in |
| | | |