无故事王国
2024-03-14 a478b668ca1a5d4f6d2d9b1075d292cbbef90de5
WanPai/Root/Search/VC/WorldCupHeaderVC.swift
@@ -43,6 +43,10 @@
                        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() {
@@ -65,7 +69,7 @@
                                                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)
@@ -75,6 +79,15 @@
                        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
            }