无故事王国
2023-10-17 77041c81c325c0bc88c94dc28d732f656cc4c885
WanPai/Root/Yard/VC/YardDetailDateTimeVC.swift
@@ -70,6 +70,15 @@
    }
   //清除水
   public func clearALL(){
      drop1 = nil
      drop2 = nil
      selects.removeAll()
      collectionView.reloadData()
   }
        /// 获得请求后,更新的高度,来使父更新并缓存,滑动时获取
    func updateInnerHeight(clouse:@escaping (Double,Int)->Void){
        self.clouse = clouse
@@ -147,13 +156,26 @@
        let cell = collectionView.dequeueReusableCell(withReuseIdentifier: "_CalendarDateTimeTCell", for: indexPath) as! CalendarDateTimeTCell
        let m = items[indexPath.row]
        cell.label_content.text = m.time
        if m.selectable == 0{
            cell.contentView.backgroundColor = UIColor(hexStr: "#EC0808").withAlphaComponent(0.16)
            cell.label_content.textColor = UIColor(hexStr: "#EC0808")
        }else if m.selectable == 1{
            cell.contentView.backgroundColor = UIColor.white
            cell.label_content.textColor = UIColor(hexStr: "#323232")
        }
      let d = date.jq_format("yyyy-MM-dd ") + m.time.components(separatedBy: "-").last!
      let interval = Date.jq_StringToTimeInterval(d, "yyyy-MM-dd HH:mm")
      let canSelect = Date().timeIntervalSince1970 < interval
      if canSelect && m.selectable == 1{
         cell.contentView.backgroundColor = UIColor.white
         cell.label_content.textColor = UIColor(hexStr: "#323232")
      }else{
         cell.contentView.backgroundColor = UIColor(hexStr: "#EC0808").withAlphaComponent(0.16)
         cell.label_content.textColor = UIColor(hexStr: "#EC0808")
      }
//        if m.selectable == 0{
//            cell.contentView.backgroundColor = UIColor(hexStr: "#EC0808").withAlphaComponent(0.16)
//            cell.label_content.textColor = UIColor(hexStr: "#EC0808")
//        }else if m.selectable == 1{
//            cell.contentView.backgroundColor = UIColor.white
//            cell.label_content.textColor = UIColor(hexStr: "#323232")
//        }
        if indexPath.row == drop2 || indexPath.row == drop1{
            cell.contentView.backgroundColor = UIColor(hexStr: "#256D0F").withAlphaComponent(0.24)