From 19e3fd5eecfa5fdf1b16b60e3462a5a61de1136e Mon Sep 17 00:00:00 2001 From: 杨锴 <841720330@qq.com> Date: 星期二, 26 十一月 2024 18:47:27 +0800 Subject: [PATCH] fix BUG --- XQMuse/Root/Me/VC/VIPCenterVC.swift | 24 ++++++++++++------------ 1 files changed, 12 insertions(+), 12 deletions(-) diff --git a/XQMuse/Root/Me/VC/VIPCenterVC.swift b/XQMuse/Root/Me/VC/VIPCenterVC.swift index 6e0b38c..f5a994c 100644 --- a/XQMuse/Root/Me/VC/VIPCenterVC.swift +++ b/XQMuse/Root/Me/VC/VIPCenterVC.swift @@ -353,23 +353,23 @@ func isSelect(_ state:Bool,indexPath:IndexPath,vipContentModel:VIPContentModel){ - var price:Int = 0 + var formartPrice:String = "" switch indexPath.row{ case 0: - price = vipContentModel.monthlyVipIos +// price = vipContentModel.monthlyVipIos label_title.text = "月度会员" - label_price.text = "¥" + vipContentModel.monthlyVipIos.string - lable_priorDay.text = String(format: "¥%.2lf/天", vipContentModel.monthlyVipIos.double / 30.0) + formartPrice = vipContentModel.monthlyVipIos.jq_formatFloat + lable_priorDay.text = String(format: "¥%.2lf/天", vipContentModel.monthlyVipIos / 30.0) case 1: - price = vipContentModel.quarterlyVipIos +// price = vipContentModel.quarterlyVipIos label_title.text = "半年会员" - label_price.text = "¥" + vipContentModel.quarterlyVipIos.string - lable_priorDay.text = String(format: "¥%.2lf/天", vipContentModel.quarterlyVipIos.double / 30.0) + formartPrice = vipContentModel.quarterlyVipIos.jq_formatFloat + lable_priorDay.text = String(format: "¥%.2lf/天", vipContentModel.quarterlyVipIos / 30.0) case 2: - price = vipContentModel.annualVipIos +// price = vipContentModel.annualVipIos label_title.text = "年度会员" - label_price.text = "¥" + vipContentModel.annualVipIos.string - lable_priorDay.text = String(format: "¥%.2lf/天", vipContentModel.annualVipIos.double / 30.0) + formartPrice = vipContentModel.annualVipIos.jq_formatFloat + lable_priorDay.text = String(format: "¥%.2lf/天", vipContentModel.annualVipIos / 30.0) default:break } @@ -377,12 +377,12 @@ contentView.backgroundColor = UIColor(hexString: "#A6C586") label_title.textColor = .white lable_priorDay.textColor = .white - label_price.attributedText = AttributedStringbuilder.build().add(string: "¥", withFont: .systemFont(ofSize: 15, weight:.heavy), withColor: .white).add(string: "\(price)", withFont: .systemFont(ofSize: 20, weight:.heavy), withColor: .white).mutableAttributedString + label_price.attributedText = AttributedStringbuilder.build().add(string: "¥", withFont: .systemFont(ofSize: 15, weight:.heavy), withColor: .white).add(string: formartPrice, withFont: .systemFont(ofSize: 20, weight:.heavy), withColor: .white).mutableAttributedString }else{ contentView.backgroundColor = UIColor(hexString: "#EFF2F2") label_title.textColor = UIColor(hexString: "#353535") lable_priorDay.textColor = UIColor(hexString: "#B7B7B7") - label_price.attributedText = AttributedStringbuilder.build().add(string: "¥", withFont: .systemFont(ofSize: 15, weight:.heavy), withColor: UIColor(hexString: "#353535")!).add(string: "\(price)", withFont: .systemFont(ofSize: 20, weight:.heavy), withColor: UIColor(hexString: "#353535")!).mutableAttributedString + label_price.attributedText = AttributedStringbuilder.build().add(string: "¥", withFont: .systemFont(ofSize: 15, weight:.heavy), withColor: UIColor(hexString: "#353535")!).add(string: formartPrice, withFont: .systemFont(ofSize: 20, weight:.heavy), withColor: UIColor(hexString: "#353535")!).mutableAttributedString } } -- Gitblit v1.7.1