| | |
| | | self.webView.loadHTMLString(string.jq_wrapHtml(), baseURL: nil) |
| | | } |
| | | }).disposed(by: disposeBag) |
| | | |
| | | Services.getUserDetail(showProgress: false).subscribe(onNext: {[weak self]data in |
| | | if let model = data.data{ |
| | | if model.isVip == .yes{ |
| | | self?.bg_vip.image = UIImage(named: "bg_vip") |
| | | self?.label_vipHint.text = "您将享受所有会员专享音频,尽情畅游泉疗愈世界" |
| | | self?.label_expirtTime.text = model.vipExpireTime.components(separatedBy: " ").first! + "到期" |
| | | }else{ |
| | | self?.bg_vip.image = UIImage(named: "bg_vip_u") |
| | | self?.label_vipHint.text = "升级为会员,解锁会员专属体验" |
| | | self?.label_expirtTime.text = "你还未开通会员服务" |
| | | } |
| | | } |
| | | }) { _ in |
| | | |
| | | }.disposed(by: disposeBag) |
| | | } |
| | | |
| | | override func setRx() { |
| | |
| | | priorDayPrice = product.price.doubleValue / 365.0 |
| | | // case "com.XQmuse.Non.renewing.half.year.1": |
| | | case "com.XQmuse.non.renewable.sub.quarter.1": |
| | | priorDayPrice = product.price.doubleValue / 180.0 |
| | | priorDayPrice = product.price.doubleValue / 90.0 |
| | | // case "com.XQmuse.Non.renewing.month.1": |
| | | case "com.XQmuse.non.renewable.sub.month.1": |
| | | priorDayPrice = product.price.doubleValue / 30.0 |
| | |
| | | lable_priorDay.text = String(format: "¥%.2lf/天", vipContentModel.monthlyVipIos / 30.0) |
| | | case 1: |
| | | // price = vipContentModel.quarterlyVipIos |
| | | label_title.text = "半年会员" |
| | | label_title.text = "季度会员" |
| | | formartPrice = vipContentModel.quarterlyVipIos.jq_formatFloat |
| | | lable_priorDay.text = String(format: "¥%.2lf/天", vipContentModel.quarterlyVipIos / 30.0) |
| | | lable_priorDay.text = String(format: "¥%.2lf/天", vipContentModel.quarterlyVipIos / 90) |
| | | case 2: |
| | | // price = vipContentModel.annualVipIos |
| | | label_title.text = "年度会员" |
| | | formartPrice = vipContentModel.annualVipIos.jq_formatFloat |
| | | lable_priorDay.text = String(format: "¥%.2lf/天", vipContentModel.annualVipIos / 30.0) |
| | | lable_priorDay.text = String(format: "¥%.2lf/天", vipContentModel.annualVipIos / 365) |
| | | default:break |
| | | } |
| | | |