| | |
| | | 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") |
| | | let endTime = Date.jq_StringToTimeInterval(m.registerEndTime, "yyyy-MM-dd HH:mm") |
| | | let a = Date.jq_CalByDays(startDate: Date(), endDate: Date(timeIntervalSince1970: endTime)) |
| | | if Date.jq_CalByEnum(startDate: Date(), endDate: Date(timeIntervalSince1970: endTime)).minute > 0{ |
| | | 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 |
| | | }else{ |
| | | 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 |