| | |
| | | @objc func opensAction(){ |
| | | Services.getWorldCupListFromRank(id: id, isStudent: isStudent).subscribe(onNext: { [weak self]data in |
| | | if data.data?.count != 0 { |
| | | WorldCupListRankView.show(arr: data.data ?? []) { id in |
| | | WorldCupListRankView.show(arr: data.data ?? []) { id,name in |
| | | self?.viewModel.worldCupId.accept(id) |
| | | self?.viewModel.beginRefresh() |
| | | self?.ratioRankBtn.setTitle(name, for: .normal) |
| | | } |
| | | } |
| | | }).disposed(by: disposeBag) |
| | | } |
| | | @objc func filterAction(){ |
| | | CommonYearsPickerView.show {[weak self] index,value in |
| | | CommonYearsPickerView.show {[weak self] index,value,name in |
| | | // if index == 0{ |
| | | // self?.viewModel.year.accept(nil) |
| | | // self?.yearBtn.setTitle(" 全部", for: .normal) |
| | |
| | | self?.viewModel.time.accept(nil) |
| | | } |
| | | self?.viewModel.beginRefresh() |
| | | self?.yearBtn.setTitle(name, for: .normal) |
| | | } |
| | | } |
| | | |
| | |
| | | } |
| | | ratioRankBtn.setTitle("赛事排名", for: .normal) |
| | | ratioRankBtn.setTitleColor(.black.withAlphaComponent(0.74), for: .normal) |
| | | ratioRankBtn.titleLabel?.font = UIFont.systemFont(ofSize: 16) |
| | | ratioRankBtn.titleLabel?.font = UIFont.systemFont(ofSize: 14) |
| | | ratioRankBtn.jq_borderColor = UIColor(hexString: "#D9D9D9") |
| | | ratioRankBtn.jq_borderWidth = 1 |
| | | ratioRankBtn.setImage(UIImage(named: "icon_down_arrow"), for: .normal) |
| | |
| | | ratioRankBtn.snp.makeConstraints { make in |
| | | make.right.equalTo(-20) |
| | | make.centerY.equalToSuperview() |
| | | make.width.greaterThanOrEqualTo(100) |
| | | make.width.greaterThanOrEqualTo(120) |
| | | make.height.equalTo(35) |
| | | } |
| | | |