| | |
| | | class WorldCupHeaderVC: BaseVC { |
| | | |
| | | @IBOutlet weak var btn_exchange: QMUIButton! |
| | | @IBOutlet weak var headerImg: UIImageView! |
| | | @IBOutlet weak var label_name: UILabel! |
| | | @IBOutlet weak var img_QR: UIImageView! |
| | | @IBOutlet weak var label_provinceRank: UILabel! |
| | |
| | | @IBOutlet weak var label_winNum: UILabel! |
| | | @IBOutlet weak var label_loseNum: UILabel! |
| | | @IBOutlet weak var label_winRate: UILabel! |
| | | |
| | | // var currentPartModel:ActivityDetailPartModel?{ |
| | | // didSet{ |
| | | // if let m = currentPartModel{ |
| | | // label_name.text = m.name |
| | | // if let qrCode = WorldCupUserInfoQRCodel(id: m.id, isStudent: m.isStudent).toJSONString(){ |
| | | // img_QR.image = UIImage.jq_GenerateQRCode(with: "\(qrCode)", width: 76) |
| | | // } |
| | | // getData(id: m.id, isStudent: m.isStudent) |
| | | // } |
| | | // |
| | | // } |
| | | // } |
| | | |
| | | var partModel:BehaviorRelay<ActivityDetailPartModel?>? |
| | | |
| | |
| | | partModel?.subscribe(onNext: {[weak self]model in |
| | | if let m = model{ |
| | | self?.label_name.text = m.name |
| | | self?.headerImg.sd_setImage(with: URL(string: m.avatar)) |
| | | if let qrCode = WorldCupUserInfoQRCodel(id: m.id, isStudent: m.isStudent).toJSONString(){ |
| | | self?.img_QR.image = UIImage.jq_GenerateQRCode(with: "\(qrCode)", width: 76) |
| | | } |
| | |
| | | |
| | | @IBAction func exchangeAction(_ sender: Any) { |
| | | |
| | | StudentChoose2View.show {[weak self] item in |
| | | StudentChoose2View.show(defaultStu: partModel?.value) {[weak self] item in |
| | | self?.partModel?.accept(item) |
| | | } |
| | | } |