| | |
| | | |
| | | setProvince(rank: 0) |
| | | setCity(cityName: "", rank: 0) |
| | | |
| | | let tap = UITapGestureRecognizer(target: self, action: #selector(showBigPicAction)) |
| | | img_QR.isUserInteractionEnabled = true |
| | | img_QR.addGestureRecognizer(tap) |
| | | } |
| | | |
| | | override func setRx() { |
| | |
| | | self?.setCity(cityName: model.cityName, rank: model.cityRank) |
| | | self?.label_winNum.text = "\(model.win)" |
| | | self?.label_loseNum.text = "\(model.lose)" |
| | | self?.label_winRate.text = "\(model.winRate)%" |
| | | self?.label_winRate.text = String(format: "%.1lf%%", model.winRate) |
| | | } |
| | | }).disposed(by: disposeBag) |
| | | |
| | |
| | | label_provinceRank.attributedText = AttributedStringbuilder.build().add(string: "全国排名 ", withFont: .systemFont(ofSize: 14), withColor: .white).add(string: "\(rank)", withFont: .systemFont(ofSize: 28, weight: .semibold), withColor: .white).mutableAttributedString |
| | | } |
| | | |
| | | @objc private func showBigPicAction(){ |
| | | |
| | | if let model = partModel?.value{ |
| | | if let qrCode = WorldCupUserInfoQRCodel(id: model.id, isStudent: model.isStudent).toJSONString(){ |
| | | QRPreview.show(qrCode,title: model.name) |
| | | } |
| | | } |
| | | } |
| | | |
| | | private func setCity(cityName:String,rank:Int){ |
| | | label_cityRank.attributedText = AttributedStringbuilder.build().add(string: "\(cityName)排名 ", withFont: .systemFont(ofSize: 14), withColor: .white).add(string: "\(rank)", withFont: .systemFont(ofSize: 28, weight: .semibold), withColor: .white).mutableAttributedString |
| | | } |