无故事王国
2023-09-26 c86ac49db2969495ec21fae2a27956cad9499752
WanPai/Root/Activity/VC/ActivitySignupDetailVC.swift
@@ -52,14 +52,15 @@
            label_ageScope.text = m.age + "岁"
            label_introducion.text = m.introduction
            label_city.text = m.province + "|" + m.city
            SDWebImageDownloader.shared.downloadImage(with: URL(string: m.registrationNotes)!) {[weak self] image, data, error, status in
                guard let img = image else {
                    self?.cons_imgEnrollHei.constant = 0;return
                }
                let radio = img.size.width / img.size.height
                self?.cons_imgEnrollHei.constant = radio * JQ_ScreenW
            }
         img_enrollRequired.sd_setImage(with: URL(string: m.registrationNotes)) {[weak self] image, error, type, url in
            guard let img = image else {
               self?.cons_imgEnrollHei.constant = 0;return
            }
            let radio = img.size.width / img.size.height
            self?.cons_imgEnrollHei.constant = JQ_ScreenW / radio
         }
            if m.cashPrice != 0 {
                label_money.text =  String(format: "%@/人", m.cashPrice.currency())
@@ -79,10 +80,27 @@
            cons_tableHei.constant = Double(m.participant.count) * 100
            tableView.reloadData()
         let name = m.apply == 1 ? "已取消":"取消"
         let color = m.apply == 1 ? UIColor.gray:Def_ThemeColor
         btn_cancel.setTitle(name, for: .normal)
         btn_cancel.backgroundColor = color
         switch m.status {
            case .prepare:
               let name = m.apply == 1 ? "取消":"已取消"
               let color = m.apply == 1 ? Def_ThemeColor:UIColor(hexStr: "#C0C0C0")
               btn_cancel.isEnabled = m.apply == 1
               btn_cancel.setTitle(name, for: .normal)
               btn_cancel.backgroundColor = color
            case .ongoing:
               btn_cancel.setTitle("进行中", for: .normal)
               btn_cancel.isEnabled = false
               btn_cancel.backgroundColor = UIColor(hexStr: "#C0C0C0")
            case .over:
               btn_cancel.setTitle("已结束", for: .normal)
               btn_cancel.isEnabled = false
               btn_cancel.backgroundColor = UIColor(hexStr: "#C0C0C0")
            case .cancel:
               btn_cancel.setTitle("已取消", for: .normal)
               btn_cancel.isEnabled = false
               btn_cancel.backgroundColor = UIColor(hexStr: "#C0C0C0")
            default:break
         }
        }
    }