无故事王国
2023-11-14 2a7b12af07d814030c1326f56fec6ebf0d11619f
WanPai/Root/Course/VC/CourseDetailVC.swift
@@ -73,7 +73,7 @@
                     label_price.isHidden = true
                     label_originPrice.isHidden = true
                     label_vipPrice.isHidden = true
                     label_coin.isHidden = false
                     //玩湃币
                     label_coin.attributedText = AttributedStringbuilder.build()
                        .add(string: "玩湃币:", withFont: UIFont.systemFont(ofSize: 14, weight: .semibold), withColor: UIColor(hexStr: "#3F3F3F"))
@@ -87,6 +87,7 @@
                     }else{
                        label_originPrice.isHidden = false
                     }
                     label_coin.isHidden = false
                        //玩湃币
                     label_coin.attributedText = AttributedStringbuilder.build()
                        .add(string: "玩湃币:", withFont: UIFont.systemFont(ofSize: 14, weight: .semibold), withColor: UIColor(hexStr: "#3F3F3F"))
@@ -97,6 +98,7 @@
                     label_originPrice.attributedText = attribute.mutableAttributedString
                     if UserInfoModel.get()?.isVip == 1{
                        if subM.payType != .coin{
                           //会员
                        label_vipPrice.isHidden = true
                        //优惠价比会员价更优惠
@@ -112,7 +114,9 @@
                        }else{
                           label_price.text = subM.paymentPrice.currency()
                        }
                        }
                     }else{
                        if subM.payType != .coin{
                           //非会员
                        label_vipPrice.isHidden = subM.vipPrice == 0 || subM.vipPrice == subM.paymentPrice
                        let vipAttribute = AttributedStringbuilder.build()
@@ -133,14 +137,20 @@
                     }
               }
            }
            }
            if m.type == .experience{
               label_price.text = (m.list.first?.paymentPrice ?? 0).currency()
               if  m.list.first?.paymentPrice != 0{
                  label_price.text = (m.list.first!.paymentPrice).currency()
                  label_price.isHidden = false
               }
               label_vaildTime.text = "购买当天有效"
               label_originPrice.isHidden = true
               label_vipPrice.isHidden = true
               view_listen.isHidden = true
               label_price.isHidden = (m.list.first?.paymentPrice ?? 0) == 0
//               label_price.isHidden = (m.list.first?.paymentPrice ?? 0) == 0
            }
               //体验课,假期课不展示
@@ -149,9 +159,9 @@
               cons_handleHei.constant = 0
            }
            if label_originPrice.isHidden && label_vipPrice.isHidden && label_coin.isHidden{
               label_coin.alpha = 0
            }
//            if label_originPrice.isHidden && label_vipPrice.isHidden && label_coin.isHidden{
//               label_coin.alpha = 0
//            }
         }
        }
    }