杨锴
2024-11-09 5415b6659e542b21058428bbc0d38e7f5783815b
fix bug
66个文件已修改
1398 ■■■■■ 已修改文件
XQMuse.xcodeproj/project.pbxproj 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
XQMuse/Base/BaseNav.swift 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
XQMuse/Config/Def.swift 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
XQMuse/Root/Course/CCell/CourseOfficalCommendTopCCell.swift 27 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
XQMuse/Root/Course/CourseVC.swift 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
XQMuse/Root/Course/TCell/CourseDetail_2_TCell.swift 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
XQMuse/Root/Course/TCell/CourseDetail_3_TCell.swift 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
XQMuse/Root/Course/VC/CourseDetialOfflineVC.swift 17 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
XQMuse/Root/Course/VC/CourseDetialOfflineVC.xib 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
XQMuse/Root/Course/VC/CourseDetialVC.swift 81 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
XQMuse/Root/Course/VC/CourseMenuVC.swift 63 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
XQMuse/Root/Course/VC/CourseVCOfficalCommentVC.swift 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
XQMuse/Root/Home/CCell/HomeRelaxBannerCCell.swift 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
XQMuse/Root/Home/CCell/HomeRelaxBannerCCell.xib 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
XQMuse/Root/Home/CCell/HomeRelaxBanner_2_1_CCell.swift 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
XQMuse/Root/Home/CCell/HomeRelaxBanner_2_1_CCell.xib 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
XQMuse/Root/Home/CCell/HomeRelaxBanner_2_CCell.swift 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
XQMuse/Root/Home/CCell/HomeRelaxBanner_2_CCell.xib 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
XQMuse/Root/Home/CCell/HomeTopMenuCCell.xib 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
XQMuse/Root/Home/CCell/Home_Style_4_Inner_CCell.swift 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
XQMuse/Root/Home/CCell/Home_Style_4_Inner_CCell.xib 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
XQMuse/Root/Home/HomeVC.swift 91 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
XQMuse/Root/Home/TCell/Home_Style_1_TCell.swift 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
XQMuse/Root/Home/TCell/Home_Style_1_TCell.xib 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
XQMuse/Root/Home/TCell/Home_Style_3_TCell.swift 43 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
XQMuse/Root/Home/TCell/Home_Style_4_TCell.swift 58 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
XQMuse/Root/Home/VC/BackgroundVoiceVC.swift 31 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
XQMuse/Root/Home/VC/HomeItemDetailVC.swift 79 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
XQMuse/Root/Home/VC/HomeItemListVC.swift 58 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
XQMuse/Root/Home/VC/HomeItemListVC.xib 21 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
XQMuse/Root/Home/VC/HomeTyroGuideVC.swift 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
XQMuse/Root/Home/VC/PaymentOrderResultVC.swift 43 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
XQMuse/Root/Home/VC/PaymentOrderVC.swift 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
XQMuse/Root/Home/VC/SearchContentVC.swift 89 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
XQMuse/Root/Home/VC/SearchVC.swift 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
XQMuse/Root/Home/View/PaymentOrderResultTopView.swift 27 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
XQMuse/Root/Login/VC/ForgotPasswordChangeVC.swift 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
XQMuse/Root/Login/VC/ForgotPasswordInputCodeVC.swift 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
XQMuse/Root/Login/VC/ForgotPasswordVC.swift 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
XQMuse/Root/Me/CCell/EmptyCCell.swift 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
XQMuse/Root/Me/CCell/EmptyCCell.xib 14 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
XQMuse/Root/Me/MeVC.swift 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
XQMuse/Root/Me/MeVC.xib 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
XQMuse/Root/Me/VC/BankWithdrawVC.swift 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
XQMuse/Root/Me/VC/BankWithdrawVC.xib 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
XQMuse/Root/Me/VC/HelpCenterVC.swift 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
XQMuse/Root/Me/VC/LogoutAccountVC.swift 36 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
XQMuse/Root/Me/VC/LogoutAccountVC.xib 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
XQMuse/Root/Me/VC/SpendingDetailContentVC.swift 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
XQMuse/Root/Me/VC/SpendingDetailVC.swift 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
XQMuse/Root/Me/VC/StudyListVC.swift 16 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
XQMuse/Root/Me/VC/UserProfileVC.swift 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
XQMuse/Root/Me/VC/VIPCenterVC.swift 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
XQMuse/Root/Me/VC/VIPCenterVC.xib 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
XQMuse/Root/Me/VC/WalletRechargeVC.swift 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
XQMuse/Root/Me/VC/WatchHistoryDetailVC.swift 26 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
XQMuse/Root/Network/Models.swift 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
XQMuse/Root/Network/Services.swift 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
XQMuse/Root/Other/View/CountdownChooseListView.swift 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
XQMuse/Root/PayMusicView/PayMusicVC.swift 187 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
XQMuse/Root/Plans/PlanGuideVC.swift 50 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
XQMuse/Root/Plans/PlanGuideVC.xib 16 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
XQMuse/Root/TreeGroup/TreeTeskVC.swift 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
XQMuse/Root/TreeGroup/VC/TreeTeskEnergyExchangeVC.swift 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
XQMuse/Root/TreeGroup/View/TreeTeskFirstRuleView.swift 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
XQMuse/Root/TreeGroup/View/TreeTeskFirstRuleView.xib 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
XQMuse.xcodeproj/project.pbxproj
@@ -1951,9 +1951,11 @@
                CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES = YES;
                CODE_SIGN_ENTITLEMENTS = XQMuse/XQMuse.entitlements;
                CODE_SIGN_IDENTITY = "Apple Development";
                CODE_SIGN_STYLE = Automatic;
                "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
                CODE_SIGN_STYLE = Manual;
                CURRENT_PROJECT_VERSION = 1;
                DEVELOPMENT_TEAM = 5ZV937VB25;
                DEVELOPMENT_TEAM = "";
                "DEVELOPMENT_TEAM[sdk=iphoneos*]" = M9T3KVL537;
                ENABLE_USER_SCRIPT_SANDBOXING = NO;
                FRAMEWORK_SEARCH_PATHS = (
                    "$(inherited)",
@@ -1962,7 +1964,7 @@
                GCC_OPTIMIZATION_LEVEL = s;
                GENERATE_INFOPLIST_FILE = YES;
                INFOPLIST_FILE = XQMuse/Info.plist;
                INFOPLIST_KEY_CFBundleDisplayName = "心泉·疗愈";
                INFOPLIST_KEY_CFBundleDisplayName = "泉疗愈";
                INFOPLIST_KEY_LSApplicationCategoryType = "";
                INFOPLIST_KEY_NSCameraUsageDescription = "相机";
                INFOPLIST_KEY_NSLocationAlwaysUsageDescription = "定位";
@@ -2083,9 +2085,10 @@
                    "$(SRCROOT)/XQMuse/Config/SDK/OBS.framework/OBS",
                    "\"-ld64\"",
                );
                PRODUCT_BUNDLE_IDENTIFIER = com.sinata.XQMuse.test;
                PRODUCT_BUNDLE_IDENTIFIER = com.sinata.XQMuse;
                PRODUCT_NAME = "$(TARGET_NAME)";
                PROVISIONING_PROFILE_SPECIFIER = "";
                "PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]" = muse_dev;
                SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
                SUPPORTS_MACCATALYST = NO;
                SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO;
@@ -2106,9 +2109,11 @@
                CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES = YES;
                CODE_SIGN_ENTITLEMENTS = XQMuse/XQMuse.entitlements;
                CODE_SIGN_IDENTITY = "Apple Development";
                CODE_SIGN_STYLE = Automatic;
                "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution";
                CODE_SIGN_STYLE = Manual;
                CURRENT_PROJECT_VERSION = 1;
                DEVELOPMENT_TEAM = 5ZV937VB25;
                DEVELOPMENT_TEAM = "";
                "DEVELOPMENT_TEAM[sdk=iphoneos*]" = M9T3KVL537;
                ENABLE_USER_SCRIPT_SANDBOXING = NO;
                FRAMEWORK_SEARCH_PATHS = (
                    "$(inherited)",
@@ -2117,7 +2122,7 @@
                GCC_OPTIMIZATION_LEVEL = s;
                GENERATE_INFOPLIST_FILE = YES;
                INFOPLIST_FILE = XQMuse/Info.plist;
                INFOPLIST_KEY_CFBundleDisplayName = "心泉·疗愈";
                INFOPLIST_KEY_CFBundleDisplayName = "泉疗愈";
                INFOPLIST_KEY_LSApplicationCategoryType = "";
                INFOPLIST_KEY_NSCameraUsageDescription = "相机";
                INFOPLIST_KEY_NSLocationAlwaysUsageDescription = "定位";
@@ -2238,9 +2243,10 @@
                    "$(SRCROOT)/XQMuse/Config/SDK/OBS.framework/OBS",
                    "\"-ld64\"",
                );
                PRODUCT_BUNDLE_IDENTIFIER = com.sinata.XQMuse.test;
                PRODUCT_BUNDLE_IDENTIFIER = com.sinata.XQMuse;
                PRODUCT_NAME = "$(TARGET_NAME)";
                PROVISIONING_PROFILE_SPECIFIER = "";
                "PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]" = muse_adhoc;
                SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
                SUPPORTS_MACCATALYST = NO;
                SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO;
XQMuse/Base/BaseNav.swift
@@ -12,7 +12,7 @@
                /// 需要透明Nav的VC
                private var lucencyVCs = [LoginVC.self]
    private var whiteStyleVCs = [HomeItemDetailVC.self,CourseDetialVC.self,CourseDetialOfflineVC.self,CourseDetialVideoVC.self,PavilionDetailVC.self]
    private var whiteStyleVCs = [HomeItemDetailVC.self,CourseDetialVC.self,CourseDetialVideoVC.self,PavilionDetailVC.self]
                open override func viewDidLoad() {
                                super.viewDidLoad()
XQMuse/Config/Def.swift
@@ -103,7 +103,7 @@
extension UIButton {
    func localGradientColor(cornerRadius:Double,bounds:CGRect? = nil){
        self.layer.sublayers?.removeAll(where: {$0 is CAGradientLayer})
        self.jq_gradientColor(colorArr: [UIColor(hexStr: "#8EA47A").cgColor,UIColor(hexStr: "#AFCA98").cgColor], cornerRadius: cornerRadius, startPoint: CGPoint(x: 0, y: 0), endPoint: CGPoint(x: 0, y: 1), bounds: bounds)
        self.jq_gradientColor(colorArr: [UIColor(hexStr: "#8EA47A").cgColor,UIColor(hexStr: "#AFCA98").cgColor], cornerRadius: cornerRadius, startPoint: CGPoint(x: 0, y: 0), endPoint: CGPoint(x: 1, y: 0), bounds: bounds)
    }
    public func openCountDown(_ t:Int = 59,defultTitle:String = "获取验证码"){
XQMuse/Root/Course/CCell/CourseOfficalCommendTopCCell.swift
@@ -7,6 +7,7 @@
import UIKit
import JQTools
import RxSwift
class CourseOfficalCommendTopCCell: UICollectionViewCell {
@@ -16,6 +17,9 @@
                private var titleItems = [TitleItem]()
                private var bannerModels = [CommonBannerModel]()
                private var clouse:((Int)->Void)?
    private var disposeBag = DisposeBag()
                override func awakeFromNib() {
        super.awakeFromNib()
@@ -33,11 +37,26 @@
                func setBanners(_ items:[CommonBannerModel]){
                                bannerModels = items
        view_bannerContentView.setItems(items: items) { m in
        view_bannerContentView.setItems(items: items) {[weak self] m in
            guard let weakSelf = self else { return }
            if let id = m.courseId?.int{
                let courseDetialVC = CourseDetialVC(courseId: id)
                courseDetialVC.hidesBottomBarWhenPushed = true
                JQ_currentNavigationController().pushViewController(courseDetialVC)
                Services.getCourseDetail(courseId: id).subscribe(onNext: {data in
                    if let m = data.data{
                        if m.isVip == .no && m.chargeType == .vipFree{
                            let vc = VIPCenterVC()
                            vc.hidesBottomBarWhenPushed = true
                            JQ_currentNavigationController().pushViewController(vc)
                        }else if m.courseType == .online{
                            let courseDetialVC = CourseDetialVC(courseModel: m)
                            courseDetialVC.hidesBottomBarWhenPushed = true
                            JQ_currentNavigationController().pushViewController(courseDetialVC)
                        }else{
                            let vc = CourseDetialOfflineVC(courseId: m.id)
                            vc.hidesBottomBarWhenPushed = true
                            JQ_currentNavigationController().pushViewController(vc)
                        }
                    }
                }).disposed(by: weakSelf.disposeBag)
            }
        }
                }
XQMuse/Root/Course/CourseVC.swift
@@ -116,7 +116,7 @@
                }
                @objc func settingvoiceAction(){
                                let vc = BackgroundVoiceVC()
        let vc = BackgroundVoiceVC(isFromFist: false)
                                push(vc: vc)
                }
XQMuse/Root/Course/TCell/CourseDetail_2_TCell.swift
@@ -50,6 +50,7 @@
                let vc = VIPCenterVC()
                JQ_currentViewController().jq_push(vc: vc)
            }else{
                guard sceneDelegate!.checkisLoginState() else{return}
                let vc = PaymentOrderVC(courseItemModel: m,type: .course,giftToOther: true,showType: .horizontal)
                JQ_currentViewController().jq_push(vc:vc)
            }
XQMuse/Root/Course/TCell/CourseDetail_3_TCell.swift
@@ -7,6 +7,7 @@
import UIKit
import JQTools
import RxSwift
class CourseDetail_3_TCell: UITableViewCell {
                @IBOutlet weak var collectionView: UICollectionView!
@@ -15,6 +16,7 @@
                private let CellH = ((JQ_ScreenW - 21.5 * 2 - 13.5) / 2) * 1.313
                var items = [CourseModel]()
    private var disposeBag = DisposeBag()
                override func awakeFromNib() {
                                super.awakeFromNib()
@@ -51,8 +53,22 @@
                func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) {
                                let model = items[indexPath.row]
        if model.courseType == .online{
            let vc = CourseDetialVC(courseId: model.id)
            JQ_currentViewController().jq_push(vc: vc)
            Services.getCourseDetail(courseId: model.id).subscribe(onNext: {data in
                if let m = data.data{
                    if m.isVip == .no && m.chargeType == .vipFree{
                        let vc = VIPCenterVC()
                        JQ_currentNavigationController().pushViewController(vc)
                    }else if m.courseType == .online{
                        let vc = CourseDetialVC(courseModel: m)
                        JQ_currentViewController().jq_push(vc: vc)
                    }else{
                        let vc = CourseDetialOfflineVC(courseId: m.id)
                        JQ_currentViewController().jq_push(vc: vc)
                    }
                }
            }).disposed(by: disposeBag)
        }else{
            let vc = CourseDetialOfflineVC(courseId: model.id)
            JQ_currentViewController().jq_push(vc: vc)
XQMuse/Root/Course/VC/CourseDetialOfflineVC.swift
@@ -105,10 +105,10 @@
                weakSelf.label_title.text = m.courseTitle
                weakSelf.label_tutor.text = "导师 " + m.tutor
                weakSelf.label_address.text = m.address + m.addressDetail
                weakSelf.img_cover.sd_setImage(with: URL(string: m.coverUrl))
                weakSelf.webView.loadHTMLString(m.briefIntroduction.jq_wrapHtml(edge: UIEdgeInsets(top: 0, left: 5, bottom: 0, right: 5)), baseURL: nil)
                weakSelf.img_cover.sd_setImage(with: URL(string: m.coverUrl.jq_urlEncoded()))
                weakSelf.webView.loadHTMLString(m.briefIntroduction.jq_wrapHtml(edge: UIEdgeInsets(top: 0, left: 8, bottom: 0, right: 8)), baseURL: nil)
                weakSelf.img_cusomter.sd_setImage(with: URL(string: m.wxQrCode))
                weakSelf.img_cusomter.sd_setImage(with: URL(string: m.wxQrCode.jq_urlEncoded()))
                if m.detailUrl.jq_isVideo{
                    weakSelf.videoView = VideoView(url: m.detailUrl.jq_urlEncoded(),autoPlay: false,needFirstImage: true, delegate: self!)
@@ -118,8 +118,17 @@
                    weakSelf.videoView!.snp.makeConstraints { make in
                        make.edges.equalToSuperview()
                    }
                    if #available(iOS 15.0, *) {
                        weakSelf.navigationController!.navigationBar.standardAppearance.titleTextAttributes  = [.foregroundColor:UIColor.white,.font:Def_NavFont]
                        weakSelf.navigationController!.navigationBar.scrollEdgeAppearance?.titleTextAttributes  = [.foregroundColor:UIColor.white,.font:Def_NavFont]
                    }else{
                        weakSelf.navigationController!.navigationBar.setBackgroundImage(UIImage(), for: .default)
                        weakSelf.navigationController!.navigationBar.shadowImage = UIImage()
                    }
                }else{
                    weakSelf.scrollView.contentInset = UIEdgeInsets(top: JQ_NavBarHeight, left: 0, bottom: 0, right: 0)
                    weakSelf.scrollView.contentInset = UIEdgeInsets(top: 0, left: 0, bottom: 0, right: 0)
                    weakSelf.navigationController?.navigationBar.standardAppearance.backgroundColor = .white
                    weakSelf.navigationController?.navigationBar.titleTextAttributes = [.foregroundColor:Def_NavFontColor,.font:Def_NavFont]
                    weakSelf.barStyle = .darkContent
XQMuse/Root/Course/VC/CourseDetialOfflineVC.xib
@@ -112,7 +112,7 @@
                                            <nil key="highlightedColor"/>
                                        </label>
                                        <wkWebView contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="UmN-R4-VrQ">
                                            <rect key="frame" x="10" y="76.333333333333314" width="373" height="100"/>
                                            <rect key="frame" x="0.0" y="76.333333333333314" width="393" height="100"/>
                                            <constraints>
                                                <constraint firstAttribute="height" constant="100" id="daa-AS-pyV"/>
                                            </constraints>
@@ -124,7 +124,7 @@
                                        <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="i03-rW-DQq">
                                            <rect key="frame" x="137.66666666666666" y="211.33333333333337" width="117.66666666666666" height="144.66666666666663"/>
                                            <subviews>
                                                <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="zlO-OX-u5S">
                                                <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="zlO-OX-u5S">
                                                    <rect key="frame" x="10" y="10" width="97.666666666666671" height="97.666666666666671"/>
                                                    <constraints>
                                                        <constraint firstAttribute="width" secondItem="zlO-OX-u5S" secondAttribute="height" multiplier="1:1" id="s2S-ez-cbK"/>
@@ -158,9 +158,9 @@
                                        <constraint firstItem="UmN-R4-VrQ" firstAttribute="top" secondItem="7hg-kN-gqy" secondAttribute="bottom" constant="19.5" id="Egk-vS-HfY"/>
                                        <constraint firstItem="i03-rW-DQq" firstAttribute="top" secondItem="UmN-R4-VrQ" secondAttribute="bottom" constant="35" id="Ewn-Db-3aO"/>
                                        <constraint firstItem="7hg-kN-gqy" firstAttribute="top" secondItem="SHG-A0-P8Y" secondAttribute="top" constant="39" id="HOe-iO-2bP"/>
                                        <constraint firstItem="UmN-R4-VrQ" firstAttribute="leading" secondItem="SHG-A0-P8Y" secondAttribute="leading" constant="10" id="RP6-OF-MMB"/>
                                        <constraint firstItem="UmN-R4-VrQ" firstAttribute="leading" secondItem="SHG-A0-P8Y" secondAttribute="leading" id="RP6-OF-MMB"/>
                                        <constraint firstItem="i03-rW-DQq" firstAttribute="centerX" secondItem="SHG-A0-P8Y" secondAttribute="centerX" id="cDU-Lm-sXe"/>
                                        <constraint firstAttribute="trailing" secondItem="UmN-R4-VrQ" secondAttribute="trailing" constant="10" id="fOj-gF-2g4"/>
                                        <constraint firstAttribute="trailing" secondItem="UmN-R4-VrQ" secondAttribute="trailing" id="fOj-gF-2g4"/>
                                    </constraints>
                                </view>
                            </subviews>
XQMuse/Root/Course/VC/CourseDetialVC.swift
@@ -29,7 +29,7 @@
                private var currentShowIndex:IndexPath = IndexPath(row: 0, section: 0)
                var isAnimationing = false
                private var style:CourseDetialStyle = .style1
                private var courseId:Int!
//                private var courseId:Int!
                private var courseDetailModel:CourseModel?
                private var section0TCell:CourseDetail_1_TCell!
@@ -73,9 +73,9 @@
                                navigationController?.navigationBar.standardAppearance.backgroundColor = .clear
                }
                init(courseId:Int) {
                init(courseModel:CourseModel) {
                                super.init(nibName: nil, bundle: nil)
                                self.courseId = courseId
                                self.courseDetailModel = courseModel
                }
                
                required init?(coder: NSCoder) {
@@ -144,48 +144,44 @@
                }
                private func getData(){
                                Services.getCourseDetail(courseId: courseId).subscribe(onNext: {[weak self] data in
            guard let weakSelf = self else { return }
                                                if let m = data.data{
                weakSelf.courseDetailModel = m
                weakSelf.collect_bitem.image = m.isCollect == .yes ? UIImage(named: "btn_collect_1_s"):UIImage(named: "btn_collect")
                weakSelf.collect_bitem.tintColor = m.isCollect == .yes ? UIColor(hexString: "#fe5b60"):.white
                weakSelf.headerView.setCourseModel(m)
                weakSelf.section1TCell.setItems(m)
                weakSelf.section2TCell.setItems(m.list2)
        if let m = courseDetailModel{
            collect_bitem.image = m.isCollect == .yes ? UIImage(named: "btn_collect_1_s"):UIImage(named: "btn_collect")
           collect_bitem.tintColor = m.isCollect == .yes ? UIColor(hexString: "#fe5b60"):.white
           headerView.setCourseModel(m)
           section1TCell.setItems(m)
           section2TCell.setItems(m.list2)
                if m.courseType == .online{
                    weakSelf.style = .style1
                    weakSelf.pageMenu.setItems(["简介","章节","相关推荐"], selectedItemIndex: 0)
            if m.courseType == .online{
                style = .style1
                pageMenu.setItems(["简介","章节","相关推荐"], selectedItemIndex: 0)
                    //是否需要购买
                    var  needPayment:Bool = true
                    switch m.chargeType{
                        case .free:needPayment = false
                        case .payment:needPayment = !(m.isBuy == .yes)
                        case .vipFree:needPayment = !UserViewModel.getAvatarInfo().checkVip()
                    }
                //是否需要购买
                var  needPayment:Bool = true
                switch m.chargeType{
                    case .free:needPayment = false
                    case .payment:needPayment = !(m.isBuy == .yes)
                    case .vipFree:needPayment = !UserViewModel.getAvatarInfo().checkVip()
                }
                    if needPayment{
                        let attribute = AttributedStringbuilder.build().add(string: "    疗愈币", withFont: .systemFont(ofSize: 12,weight: .bold), withColor: UIColor(hexString: "#F6F6F6")!).add(string: "\(m.iosPrice.jq_formatFloat)", withFont: .systemFont(ofSize: 21.71, weight: .bold), withColor: UIColor(hexString: "#F6F6F6")!).add(string: "  立即购买     ", withFont: .systemFont(ofSize: 16, weight: .bold), withColor: UIColor(hexString: "#F6F6F6")!).mutableAttributedString
                        weakSelf.studyBtn.setAttributedTitle(attribute, for: .normal)
                    }else{
                        let attribute = AttributedStringbuilder.build().add(string: "    立即学习    ", withFont: .systemFont(ofSize: 16, weight: .bold), withColor: UIColor(hexString: "#F6F6F6")!).mutableAttributedString
                        weakSelf.studyBtn.setAttributedTitle(attribute, for: .normal)
                    }
                if needPayment{
                    let attribute = AttributedStringbuilder.build().add(string: "    疗愈币", withFont: .systemFont(ofSize: 12,weight: .bold), withColor: UIColor(hexString: "#F6F6F6")!).add(string: "\(m.iosPrice.jq_formatFloat)", withFont: .systemFont(ofSize: 21.71, weight: .bold), withColor: UIColor(hexString: "#F6F6F6")!).add(string: "  立即购买     ", withFont: .systemFont(ofSize: 16, weight: .bold), withColor: UIColor(hexString: "#F6F6F6")!).mutableAttributedString
                    studyBtn.setAttributedTitle(attribute, for: .normal)
                }else{
                    let attribute = AttributedStringbuilder.build().add(string: "    立即学习    ", withFont: .systemFont(ofSize: 16, weight: .bold), withColor: UIColor(hexString: "#F6F6F6")!).mutableAttributedString
                    studyBtn.setAttributedTitle(attribute, for: .normal)
                }
                    weakSelf.setFootView()
                setFootView()
                                                                }else{
                    weakSelf.style = .style2
                    DispatchQueue.main.asyncAfter(delay: 0.5) {
                        weakSelf.headerView.setVideo(url: m.detailUrl, coverImageUrl: m.coverUrl.jq_urlEncoded(), delegate: self!)
                    }
                    weakSelf.pageMenu.setItems(["简介"], selectedItemIndex: 0)
                                                                }
                weakSelf.tableView?.reloadData()
                                                }
                                }).disposed(by: disposeBag)
            }else{
                style = .style2
                DispatchQueue.main.asyncAfter(delay: 0.5) {
                    self.headerView.setVideo(url: m.detailUrl, coverImageUrl: m.coverUrl.jq_urlEncoded(), delegate: self)
                }
                pageMenu.setItems(["简介"], selectedItemIndex: 0)
            }
            tableView?.reloadData()
        }
                }
                private func setFootView(){
@@ -235,6 +231,8 @@
                }
    @objc func collectionAction(){
        guard let courseId = courseDetailModel?.id else { return }
        Services.clouseFavorite(id: courseId).subscribe(onNext: {[weak self]data in
            self?.courseDetailModel?.isCollect.troggle()
            if self?.courseDetailModel?.isCollect == .yes{
@@ -278,6 +276,7 @@
                @objc func sendGift(_ btn:QMUIButton){
        if let price = courseDetailModel?.iosPrice{
                                                CourseSendGiftView.show(price:price) {
                guard sceneDelegate!.checkisLoginState() else{return}
                let vc = PaymentOrderVC(courseItemModel: self.courseDetailModel!,type: .course,giftToOther: true, showType: .horizontal)
                                                                self.push(vc: vc)
                                                }
@@ -396,7 +395,7 @@
                                if let table = scrollView as? UITableView{
                                                if v > 0{
                                                                table.contentInset = UIEdgeInsets(top: JQ_NavBarHeight + 9, left: 0, bottom: 118, right: 0)
                                                                table.contentInset = UIEdgeInsets(top: JQ_NavBarHeight, left: 0, bottom: 118, right: 0)
                                                }else{
                                                                table.contentInset = UIEdgeInsets(top: 0, left: 0, bottom: 118, right: 0)
                                                }
XQMuse/Root/Course/VC/CourseMenuVC.swift
@@ -66,27 +66,11 @@
            }else{
                let v1 = UIView()
                let v1 = EmptyCCell.jq_loadNibView()
                v1.tag = 10010
                v1.bounds = CGRect(x: 0, y: 0, width: 100, height: 100)
                v1.center = CGPoint(x: v.center.x - 20, y: v.center.y - 150)
                v1.bounds = CGRect(x: 0, y: 0, width: 265, height: 300)
                v1.center = CGPoint(x: v.center.x, y: v.center.y - 100)
                v.addSubview(v1)
                let image = UIImageView(image: UIImage(named: "icon_empty"))
                image.contentMode = .scaleAspectFill
                v1.addSubview(image)
                image.snp.makeConstraints { make in
                    make.top.left.right.equalToSuperview()
                }
                let label = UILabel(text: "暂未找到相关内容哦~")
                label.font = .systemFont(ofSize: 14, weight: .medium)
                label.textColor = .gray
                v1.addSubview(label)
                label.snp.makeConstraints { make in
                    make.centerX.equalTo(image)
                    make.top.equalTo(image.snp.bottom).offset(8)
                }
            }
        }
                }
@@ -130,8 +114,25 @@
                                let model = viewModel.dataSource.value!.list[indexPath.row]
        if model.courseType == .online{
            let vc = CourseDetialVC(courseId: model.id)
            push(vc: vc)
            if model.chargeType == .payment || model.chargeType == .vipFree{
                guard sceneDelegate!.checkisLoginState() else {return}
            }
            Services.getCourseDetail(courseId: model.id).subscribe(onNext: {data in
                if let m = data.data{
                    if m.isVip == .no && m.chargeType == .vipFree{
                         let vc = VIPCenterVC()
                        self.push(vc: vc)
                    }else if m.courseType == .online{
                        let vc = CourseDetialVC(courseModel: m)
                        self.push(vc: vc)
                    }else{
                        let vc = CourseDetialOfflineVC(courseId: m.id)
                        self.push(vc: vc)
                    }
                }
            }).disposed(by: disposeBag)
        }else{
            let vc = CourseDetialOfflineVC(courseId: model.id)
            push(vc: vc)
@@ -165,25 +166,7 @@
}
extension CourseMenuVC:EmptyDataSetSource{
////    func image(forEmptyDataSet scrollView: UIScrollView) -> UIImage? {
////        return UIImage(named: "icon_empty")
////    }
//
//    func buttonBackgroundImage(forEmptyDataSet scrollView: UIScrollView, for state: UIControl.State) -> UIImage? {
//        return UIImage(named: "icon_empty")
//    }
//
//    func title(forEmptyDataSet scrollView: UIScrollView) -> NSAttributedString? {
//        return AttributedStringbuilder.build().add(string: "暂无数据", withFont: .systemFont(ofSize: 12, weight: .medium), withColor: .gray).mutableAttributedString
//    }
//
//    func verticalOffset(forEmptyDataSet scrollView: UIScrollView) -> CGFloat {
//        return 0
//    }
//
//    func spaceHeight(forEmptyDataSet scrollView: UIScrollView) -> CGFloat {
//        return 0
//    }
}
extension CourseMenuVC:EmptyDataSetDelegate{
XQMuse/Root/Course/VC/CourseVCOfficalCommentVC.swift
@@ -88,8 +88,25 @@
                                let model = viewModel.dataSource.value!.list[indexPath.row]
        if model.courseType == .online{
            let vc = CourseDetialVC(courseId: model.id)
            JQ_currentViewController().jq_push(vc: vc)
            if model.chargeType == .vipFree || model.chargeType == .payment{
                guard sceneDelegate!.checkisLoginState() else{return}
            }
            Services.getCourseDetail(courseId: model.id).subscribe(onNext: {data in
                if let m = data.data{
                    if m.isVip == .no && m.chargeType == .vipFree{
                        let vc = VIPCenterVC()
                        JQ_currentViewController().jq_push(vc: vc)
                    }else if m.courseType == .online{
                        let vc = CourseDetialVC(courseModel: m)
                        JQ_currentViewController().jq_push(vc: vc)
                    }else{
                        let vc = CourseDetialOfflineVC(courseId: m.id)
                        JQ_currentViewController().jq_push(vc: vc)
                    }
                }
            }).disposed(by: disposeBag)
        }else{
            let vc = CourseDetialOfflineVC(courseId: model.id)
            JQ_currentViewController().jq_push(vc: vc)
XQMuse/Root/Home/CCell/HomeRelaxBannerCCell.swift
@@ -52,7 +52,7 @@
            case .payment:
                image_free.isHidden = true
                view_price.isHidden = false
                label_price.attributedText = AttributedStringbuilder.build().add(string: "¥", withFont: UIFont(name: "DIN-Bold", size: 7.11) ?? UIFont.systemFont(ofSize: 7, weight: .bold), withColor: .white).add(string: "\(model.iosPrice.jq_formatFloat)", withFont: UIFont(name: "DIN-Bold", size: 11.44) ?? .systemFont(ofSize: 11,weight: .bold), withColor: .white).mutableAttributedString
                label_price.attributedText = AttributedStringbuilder.build().add(string: "¥", withFont: UIFont(name: "DIN-Bold", size: 7.11) ?? UIFont.systemFont(ofSize: 7, weight: .bold), withColor: .white).add(string: "\(model.iosPrice.jq_formatFloat)", withFont: UIFont(name: "DIN-Bold", size: 11) ?? .systemFont(ofSize: 11,weight: .bold), withColor: .white).mutableAttributedString
            default:break
        }
@@ -83,7 +83,7 @@
                case .payment:
                    image_free.isHidden = true
                    view_price.isHidden = false
                    label_price.attributedText = AttributedStringbuilder.build().add(string: "¥", withFont: UIFont(name: "DIN-Bold", size: 7.11) ?? UIFont.systemFont(ofSize: 7, weight: .bold), withColor: .white).add(string: "\(model.iosPrice.jq_formatFloat)", withFont: UIFont(name: "DIN-Bold", size: 11.44) ?? .systemFont(ofSize: 11,weight: .bold), withColor: .white).mutableAttributedString
                    label_price.attributedText = AttributedStringbuilder.build().add(string: "¥", withFont: UIFont(name: "DIN-Bold", size: 7.11) ?? UIFont.systemFont(ofSize: 7, weight: .bold), withColor: .white).add(string: "\(model.iosPrice.jq_formatFloat)", withFont: UIFont(name: "DIN-Bold", size: 11) ?? .systemFont(ofSize: 11,weight: .bold), withColor: .white).mutableAttributedString
                default:break
            }
        }
XQMuse/Root/Home/CCell/HomeRelaxBannerCCell.xib
@@ -23,10 +23,10 @@
                        <rect key="frame" x="10" y="10" width="34" height="18"/>
                    </imageView>
                    <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="xQS-TU-DTd">
                        <rect key="frame" x="10" y="10" width="38.666666666666664" height="25"/>
                        <rect key="frame" x="10.000000000000002" y="10" width="28.666666666666671" height="25"/>
                        <subviews>
                            <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="APF-eW-1da">
                                <rect key="frame" x="5.0000000000000018" y="0.0" width="28.666666666666671" height="25"/>
                                <rect key="frame" x="0.0" y="0.0" width="28.666666666666664" height="25"/>
                                <fontDescription key="fontDescription" type="system" pointSize="11"/>
                                <color key="textColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                                <nil key="highlightedColor"/>
@@ -35,9 +35,9 @@
                        <color key="backgroundColor" red="0.8980392157" green="0.71372549019999998" blue="0.3921568627" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                        <constraints>
                            <constraint firstAttribute="width" relation="greaterThanOrEqual" constant="25.100000000000001" id="83q-tN-O9w"/>
                            <constraint firstItem="APF-eW-1da" firstAttribute="leading" secondItem="xQS-TU-DTd" secondAttribute="leading" constant="5" id="JMa-Vt-vm6"/>
                            <constraint firstItem="APF-eW-1da" firstAttribute="leading" secondItem="xQS-TU-DTd" secondAttribute="leading" id="JMa-Vt-vm6"/>
                            <constraint firstItem="APF-eW-1da" firstAttribute="top" secondItem="xQS-TU-DTd" secondAttribute="top" id="O9I-d9-Xnk"/>
                            <constraint firstAttribute="trailing" secondItem="APF-eW-1da" secondAttribute="trailing" constant="5" id="aXq-X5-Ux2"/>
                            <constraint firstAttribute="trailing" secondItem="APF-eW-1da" secondAttribute="trailing" id="aXq-X5-Ux2"/>
                            <constraint firstAttribute="height" constant="25.100000000000001" id="d2N-VC-V1F"/>
                            <constraint firstAttribute="bottom" secondItem="APF-eW-1da" secondAttribute="bottom" id="uOl-Gh-Y2N"/>
                        </constraints>
XQMuse/Root/Home/CCell/HomeRelaxBanner_2_1_CCell.swift
@@ -44,9 +44,8 @@
                func setCourseModel(_ model:CourseModel){
        img_cover.sd_setImage(with: URL(string: model.coverUrl.jq_urlEncoded().components(separatedBy: ",").first))
        img_cover.sd_setImage(with: URL(string: model.coverUrl.jq_urlEncoded().components(separatedBy: ",").last))
                                label_title.text = model.courseTitle
//                                label_subTitle.text = model.briefIntroduction
        label_subTitle.text = model.description
                                label_num.text = "\(model.count)"
@@ -62,7 +61,7 @@
        }
        view_waitPay.isHidden = model.paymentStatus == .no
        label_price.attributedText = AttributedStringbuilder.build().add(string: "¥", withFont: .systemFont(ofSize: 7.2, weight: .bold), withColor: .white).add(string: model.generalPrice.jq_formatFloat, withFont: .systemFont(ofSize: 11.62), withColor: .white).mutableAttributedString
        label_price.attributedText = AttributedStringbuilder.build().add(string: "¥", withFont: .systemFont(ofSize: 7.2, weight: .bold), withColor: .white).add(string: model.generalPrice.jq_formatFloat, withFont: .systemFont(ofSize: 11), withColor: .white).mutableAttributedString
                }
    func setMeditationModel(_ model:MeditationModel){
@@ -75,7 +74,7 @@
        setChargePrice(model.chargeType, price: model.iosPrice)
        view_waitPay.isHidden = model.paymentStatus == .no
        label_price.attributedText = AttributedStringbuilder.build().add(string: "¥", withFont: .systemFont(ofSize: 7.2, weight: .bold), withColor: .white).add(string: model.generalPrice.jq_formatFloat, withFont: .systemFont(ofSize: 11.62), withColor: .white).mutableAttributedString
        label_price.attributedText = AttributedStringbuilder.build().add(string: "¥", withFont: .systemFont(ofSize: 7.2, weight: .bold), withColor: .white).add(string: model.generalPrice.jq_formatFloat, withFont: .systemFont(ofSize: 11), withColor: .white).mutableAttributedString
    }
    private func setChargePrice(_ type:ChargeType,price:Double){
@@ -86,7 +85,7 @@
        switch type {
            case .payment:
                label_price.attributedText = AttributedStringbuilder.build().add(string: "¥", withFont: UIFont(name: "DIN-Bold", size: 7.11) ?? UIFont.systemFont(ofSize: 7, weight: .bold), withColor: .white).add(string: "\(price.jq_formatFloat) ", withFont: UIFont(name: "DIN-Bold", size: 11.44) ?? .systemFont(ofSize: 11,weight: .bold), withColor: .white).mutableAttributedString
                label_price.attributedText = AttributedStringbuilder.build().add(string: "¥", withFont: UIFont(name: "DIN-Bold", size: 7.11) ?? UIFont.systemFont(ofSize: 7, weight: .bold), withColor: .white).add(string: "\(price.jq_formatFloat) ", withFont: UIFont(name: "DIN-Bold", size: 11) ?? .systemFont(ofSize: 11,weight: .bold), withColor: .white).mutableAttributedString
            default:break
        }
    }
XQMuse/Root/Home/CCell/HomeRelaxBanner_2_1_CCell.xib
@@ -25,10 +25,10 @@
                        <rect key="frame" x="11.000000000000002" y="8.6666666666666661" width="25.666666666666671" height="25.666666666666671"/>
                    </imageView>
                    <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="tNS-EM-X8Z">
                        <rect key="frame" x="7" y="5" width="38.666666666666664" height="25"/>
                        <rect key="frame" x="7.0000000000000018" y="5" width="28.666666666666671" height="25"/>
                        <subviews>
                            <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="KaS-j6-dko">
                                <rect key="frame" x="5.0000000000000018" y="0.0" width="28.666666666666671" height="25"/>
                                <rect key="frame" x="0.0" y="0.0" width="28.666666666666664" height="25"/>
                                <fontDescription key="fontDescription" type="system" pointSize="11"/>
                                <color key="textColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                                <nil key="highlightedColor"/>
@@ -39,8 +39,8 @@
                            <constraint firstAttribute="height" constant="25.100000000000001" id="L4H-E8-mqA"/>
                            <constraint firstAttribute="width" relation="greaterThanOrEqual" constant="25.100000000000001" id="PQi-Ka-PUO"/>
                            <constraint firstItem="KaS-j6-dko" firstAttribute="top" secondItem="tNS-EM-X8Z" secondAttribute="top" id="XkQ-YO-BTQ"/>
                            <constraint firstAttribute="trailing" secondItem="KaS-j6-dko" secondAttribute="trailing" constant="5" id="qWj-kT-K4d"/>
                            <constraint firstItem="KaS-j6-dko" firstAttribute="leading" secondItem="tNS-EM-X8Z" secondAttribute="leading" constant="5" id="xKe-fC-CpF"/>
                            <constraint firstAttribute="trailing" secondItem="KaS-j6-dko" secondAttribute="trailing" id="qWj-kT-K4d"/>
                            <constraint firstItem="KaS-j6-dko" firstAttribute="leading" secondItem="tNS-EM-X8Z" secondAttribute="leading" id="xKe-fC-CpF"/>
                            <constraint firstAttribute="bottom" secondItem="KaS-j6-dko" secondAttribute="bottom" id="zW6-UI-Hos"/>
                        </constraints>
                    </view>
XQMuse/Root/Home/CCell/HomeRelaxBanner_2_CCell.swift
@@ -50,9 +50,9 @@
        var imageUrl:String!
        switch showType {
            case .horizontal:
                imageUrl = model.coverUrl.components(separatedBy: ",").first
                imageUrl = model.coverUrl.components(separatedBy: ",").first?.jq_urlEncoded()
            case .vertical:
                imageUrl = model.coverUrl.components(separatedBy: ",").last
                imageUrl = model.coverUrl.components(separatedBy: ",").last?.jq_urlEncoded()
        }
        img_cover.sd_setImage(with: URL(string: imageUrl))
@@ -90,7 +90,7 @@
        switch type {
            case .payment:
                label_price.attributedText = AttributedStringbuilder.build().add(string: "¥", withFont: UIFont(name: "DIN-Bold", size: 7.11) ?? UIFont.systemFont(ofSize: 7, weight: .bold), withColor: .white).add(string: "\(price.jq_formatFloat) ", withFont: UIFont(name: "DIN-Bold", size: 11.44) ?? .systemFont(ofSize: 11,weight: .bold), withColor: .white).mutableAttributedString
                label_price.attributedText = AttributedStringbuilder.build().add(string: "¥", withFont: UIFont(name: "DIN-Bold", size: 7.11) ?? UIFont.systemFont(ofSize: 7, weight: .bold), withColor: .white).add(string: "\(price.jq_formatFloat)", withFont: UIFont(name: "DIN-Bold", size: 11) ?? .systemFont(ofSize: 11,weight: .bold), withColor: .white).mutableAttributedString
            default:break
        }
    }
XQMuse/Root/Home/CCell/HomeRelaxBanner_2_CCell.xib
@@ -31,7 +31,7 @@
                                <color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
                                <nil key="highlightedColor"/>
                            </label>
                            <label opaque="NO" userInteractionEnabled="NO" contentMode="left" verticalHuggingPriority="251" horizontalCompressionResistancePriority="1000" text="--" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="z5u-My-91l">
                            <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="750" verticalHuggingPriority="251" text="-----" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="z5u-My-91l">
                                <rect key="frame" x="20" y="34.666666666666686" width="106" height="10.333333333333336"/>
                                <constraints>
                                    <constraint firstAttribute="height" constant="10.57" id="epJ-Xi-ukn"/>
@@ -42,6 +42,10 @@
                            </label>
                            <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="icon_use_small" translatesAutoresizingMaskIntoConstraints="NO" id="hE1-AV-t8f">
                                <rect key="frame" x="136" y="34.666666666666686" width="10" height="10.333333333333336"/>
                                <constraints>
                                    <constraint firstAttribute="height" constant="10.33" id="1O9-vg-cNN"/>
                                    <constraint firstAttribute="width" constant="10" id="dcc-BO-frZ"/>
                                </constraints>
                            </imageView>
                            <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="1000" verticalHuggingPriority="251" horizontalCompressionResistancePriority="1000" text="0" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="JaY-19-IAL">
                                <rect key="frame" x="148" y="33" width="7" height="13.333333333333336"/>
@@ -64,14 +68,14 @@
                            <constraint firstItem="hE1-AV-t8f" firstAttribute="leading" secondItem="z5u-My-91l" secondAttribute="trailing" constant="10" id="wgV-ti-lnF"/>
                        </constraints>
                    </view>
                    <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="icon_vip" translatesAutoresizingMaskIntoConstraints="NO" id="yBF-fO-fwz">
                    <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="icon_vip" translatesAutoresizingMaskIntoConstraints="NO" id="yBF-fO-fwz">
                        <rect key="frame" x="14.666666666666666" y="7.6666666666666661" width="25.666666666666671" height="25.666666666666671"/>
                    </imageView>
                    <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="rmi-DQ-cp9">
                        <rect key="frame" x="14.666666666666668" y="7.6666666666666679" width="38.666666666666657" height="25.000000000000004"/>
                        <rect key="frame" x="14.666666666666666" y="7.6666666666666679" width="28.666666666666671" height="25.000000000000004"/>
                        <subviews>
                            <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="kTL-dA-lNA">
                                <rect key="frame" x="5.0000000000000018" y="0.0" width="28.666666666666671" height="25"/>
                                <rect key="frame" x="0.0" y="0.0" width="28.666666666666668" height="25"/>
                                <fontDescription key="fontDescription" type="system" pointSize="11"/>
                                <color key="textColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                                <nil key="highlightedColor"/>
@@ -79,9 +83,9 @@
                        </subviews>
                        <color key="backgroundColor" red="0.89803921568627454" green="0.71372549019607845" blue="0.39215686274509803" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                        <constraints>
                            <constraint firstAttribute="trailing" secondItem="kTL-dA-lNA" secondAttribute="trailing" constant="5" id="4rs-Ms-47V"/>
                            <constraint firstAttribute="trailing" secondItem="kTL-dA-lNA" secondAttribute="trailing" id="4rs-Ms-47V"/>
                            <constraint firstAttribute="bottom" secondItem="kTL-dA-lNA" secondAttribute="bottom" id="Gk6-tP-QxW"/>
                            <constraint firstItem="kTL-dA-lNA" firstAttribute="leading" secondItem="rmi-DQ-cp9" secondAttribute="leading" constant="5" id="Utr-e1-5lW"/>
                            <constraint firstItem="kTL-dA-lNA" firstAttribute="leading" secondItem="rmi-DQ-cp9" secondAttribute="leading" id="Utr-e1-5lW"/>
                            <constraint firstAttribute="width" relation="greaterThanOrEqual" constant="25.100000000000001" id="j5h-a9-Qj3"/>
                            <constraint firstItem="kTL-dA-lNA" firstAttribute="top" secondItem="rmi-DQ-cp9" secondAttribute="top" id="qKa-MB-Ohi"/>
                            <constraint firstAttribute="height" constant="25.100000000000001" id="xtT-s6-JWf"/>
@@ -111,6 +115,7 @@
            </constraints>
            <size key="customSize" width="178" height="301"/>
            <connections>
                <outlet property="cons_maxSubTitle" destination="bAF-ly-L4H" id="9gP-im-3qd"/>
                <outlet property="image_free" destination="deT-IZ-PtZ" id="kI7-7g-aIM"/>
                <outlet property="img_cover" destination="cCC-0f-GSV" id="85x-ue-edy"/>
                <outlet property="img_offline" destination="IJ3-94-7an" id="EYY-vi-GGP"/>
XQMuse/Root/Home/CCell/HomeTopMenuCCell.xib
@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="32700.99.1234" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="23094" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
    <device id="retina6_12" orientation="portrait" appearance="light"/>
    <dependencies>
        <deployment identifier="iOS"/>
        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="22685"/>
        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="23084"/>
        <capability name="Safe area layout guides" minToolsVersion="9.0"/>
        <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
    </dependencies>
@@ -34,8 +34,12 @@
                            <constraint firstAttribute="height" constant="49.649999999999999" id="x1a-4a-XWn"/>
                        </constraints>
                    </view>
                    <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="icon_sleep" translatesAutoresizingMaskIntoConstraints="NO" id="Kw2-y0-ygq">
                    <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="icon_sleep" translatesAutoresizingMaskIntoConstraints="NO" id="Kw2-y0-ygq">
                        <rect key="frame" x="60.333333333333336" y="40" width="28.666666666666664" height="30"/>
                        <constraints>
                            <constraint firstAttribute="height" relation="lessThanOrEqual" constant="37.5" id="CdI-kv-4Tq"/>
                            <constraint firstAttribute="width" relation="lessThanOrEqual" constant="43" id="kk9-gQ-apd"/>
                        </constraints>
                    </imageView>
                </subviews>
            </view>
XQMuse/Root/Home/CCell/Home_Style_4_Inner_CCell.swift
@@ -70,7 +70,7 @@
            case .payment:
                image_free.isHidden = true
                view_price.isHidden = false
                label_price.attributedText = AttributedStringbuilder.build().add(string: "¥", withFont: UIFont(name: "DIN-Bold", size: 7.11) ?? UIFont.systemFont(ofSize: 7, weight: .bold), withColor: .white).add(string: "\(model.iosPrice.jq_formatFloat)", withFont: UIFont(name: "DIN-Bold", size: 11.44) ?? .systemFont(ofSize: 11,weight: .bold), withColor: .white).mutableAttributedString
                label_price.attributedText = AttributedStringbuilder.build().add(string: "¥", withFont: UIFont(name: "DIN-Bold", size: 7.11) ?? UIFont.systemFont(ofSize: 7, weight: .bold), withColor: .white).add(string: "\(model.iosPrice.jq_formatFloat)", withFont: UIFont(name: "DIN-Bold", size: 11) ?? .systemFont(ofSize: 11,weight: .bold), withColor: .white).mutableAttributedString
            default:break
        }
    }
XQMuse/Root/Home/CCell/Home_Style_4_Inner_CCell.xib
@@ -28,10 +28,10 @@
                                <rect key="frame" x="10" y="25" width="50" height="18"/>
                            </imageView>
                            <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="uuN-2T-9v0">
                                <rect key="frame" x="20.999999999999996" y="21" width="38.666666666666657" height="25"/>
                                <rect key="frame" x="21" y="21" width="28.666666666666671" height="25"/>
                                <subviews>
                                    <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="GYP-BU-qEb">
                                        <rect key="frame" x="5.0000000000000018" y="0.0" width="28.666666666666671" height="25"/>
                                        <rect key="frame" x="0.0" y="0.0" width="28.666666666666664" height="25"/>
                                        <fontDescription key="fontDescription" type="system" pointSize="11"/>
                                        <color key="textColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                                        <nil key="highlightedColor"/>
@@ -41,14 +41,14 @@
                                <constraints>
                                    <constraint firstAttribute="height" constant="25.100000000000001" id="3O3-Wj-ZQk"/>
                                    <constraint firstItem="GYP-BU-qEb" firstAttribute="top" secondItem="uuN-2T-9v0" secondAttribute="top" id="Tzl-UN-BMh"/>
                                    <constraint firstItem="GYP-BU-qEb" firstAttribute="leading" secondItem="uuN-2T-9v0" secondAttribute="leading" constant="5" id="XsV-Ix-1OA"/>
                                    <constraint firstItem="GYP-BU-qEb" firstAttribute="leading" secondItem="uuN-2T-9v0" secondAttribute="leading" id="XsV-Ix-1OA"/>
                                    <constraint firstAttribute="bottom" secondItem="GYP-BU-qEb" secondAttribute="bottom" id="Ylc-8p-Xdu"/>
                                    <constraint firstAttribute="trailing" secondItem="GYP-BU-qEb" secondAttribute="trailing" constant="5" id="jS2-fF-2N8"/>
                                    <constraint firstAttribute="trailing" secondItem="GYP-BU-qEb" secondAttribute="trailing" id="jS2-fF-2N8"/>
                                    <constraint firstAttribute="width" relation="greaterThanOrEqual" constant="25.100000000000001" id="kwa-m0-MN9"/>
                                </constraints>
                            </view>
                            <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="icon_vip" translatesAutoresizingMaskIntoConstraints="NO" id="3SE-bW-QUN">
                                <rect key="frame" x="22.666666666666664" y="22" width="21.666666666666664" height="21.666666666666671"/>
                                <rect key="frame" x="22.666666666666664" y="22" width="25.666666666666664" height="25.666666666666671"/>
                            </imageView>
                            <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="1q9-TW-tvm">
                                <rect key="frame" x="11" y="229.99999999999997" width="395" height="66.666666666666657"/>
@@ -160,7 +160,7 @@
        <image name="icon_freee" width="50" height="18"/>
        <image name="icon_play" width="46" height="46"/>
        <image name="icon_use_small" width="10" height="10.666666984558105"/>
        <image name="icon_vip" width="21.666666030883789" height="21.666666030883789"/>
        <image name="icon_vip" width="25.666666030883789" height="25.666666030883789"/>
        <systemColor name="systemBackgroundColor">
            <color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
        </systemColor>
XQMuse/Root/Home/HomeVC.swift
@@ -36,6 +36,7 @@
                private let topMenuView = HomeTopMenuView.jq_loadNibView()
                private var titleItems = [TitleItem]()
                private var viewModel = HomeViewModel()
    private var timer:Timer?
    private var cellularData:CTCellularData!
@@ -48,12 +49,16 @@
                if let m = data.data{UserViewModel.saveAvatarInfo(m)}
            }).disposed(by: disposeBag)
        }
        self.navigationController?.interactivePopGestureRecognizer?.isEnabled = true
    }
    override func viewDidLoad() {
        super.viewDidLoad()
                                titleItems.removeAll()
        timer = Timer.scheduledTimer(timeInterval: 60, target: self, selector: #selector(autoUpdate), userInfo: nil, repeats: true)
        RunLoop.current.add(timer!, forMode: .default)
                                titleItems.append(TitleItem(title: "每日疗愈", subTitle: "Daily Meditation"))
                                titleItems.append(TitleItem(title: "私人订制", subTitle: "Private Customization",hasMore: true))
@@ -70,7 +75,7 @@
        })
        if let m = UserDefaultSettingViewModel.getSetting()?.bgm {
            topMenuView.image_top.sd_setImage(with: URL(string: m.imageUrl))
            topMenuView.image_top.sd_setImage(with: URL(string: m.imageUrl.jq_urlEncoded()))
        }
                                getData()
@@ -89,8 +94,14 @@
                                if !state{
                                    exit(0)
                                }else{
                                    if var m = UserDefaultSettingViewModel.getSetting(){
                                        m.userFirstLaunch = false
                                        UserDefaultSettingViewModel.saveSetting(m)
                                    }
                                    //跳转计划引导
                                    let nav  = BaseNav(rootViewController: PlanGuideVC())
                                    let nav  = BaseNav(rootViewController: PlanGuideVC(isFromFist: true))
                                    nav.modalPresentationStyle = .fullScreen
                                    weakSelf.present(nav, animated: true)
                                }
@@ -178,7 +189,7 @@
                override func setRx() {
                                topMenuView.clickItemAt {[unowned self] item in
            let vc = HomeItemListVC(topTitle: item.title, id: item.id, showType:.horizontal)
            let vc = HomeItemListVC(topTitle: item.title, id: item.id, showType:.vertical)
                                                self.push(vc: vc)
                                }
@@ -193,8 +204,8 @@
            Services.isFirst().subscribe(onNext: {data in
                if data.data == true{
                    weakSelf.navigationController?.tabBarController?.selectedIndex = 2
                    var viewModel = UserDefaultSettingViewModel.getSetting()
                    viewModel?.userFirstOpenTreeTask = false
                    let viewModel = UserDefaultSettingViewModel.getSetting()
//                    viewModel?.userFirstOpenTreeTask = false
                    UserDefaultSettingViewModel.saveSetting(viewModel!)
                }
            }).disposed(by: weakSelf.disposeBag)
@@ -202,6 +213,10 @@
                                }).disposed(by: disposeBag)
        NotificationCenter.default.rx.notification(LoginSuccess_Noti).take(until: self.rx.deallocated).subscribe(onNext: {data in
            self.getData()
        }).disposed(by: disposeBag)
        NotificationCenter.default.rx.notification(LoginQuit_Noti).take(until: self.rx.deallocated).subscribe(onNext: {data in
            self.getData()
        }).disposed(by: disposeBag)
                }
@@ -239,18 +254,21 @@
                                                self.tableView.reloadRows(at: [IndexPath(row: 0, section: 0)], with: .none)
                                }).disposed(by: disposeBag)
                                Services.getPersonalityPlan().subscribe(onNext: { data in
            if let m = data.data{
                if m.count > 0{
                    self.viewModel.privateTodyModels = m
                }else{
                    let m = MeditationModel()
                    m.id = 0
                    self.viewModel.privateTodyModels = [m]
        if !(UserViewModel.getLoginInfo()?.accessToken.isEmpty ?? true){
            Services.getPersonalityPlan().subscribe(onNext: { data in
                if let m = data.data{
                    if m.count > 0{
                        self.viewModel.privateTodyModels = m
                    }else{
                        let m = MeditationModel()
                        m.id = 0
                        self.viewModel.privateTodyModels = [m]
                    }
                    self.tableView.reloadRows(at: [IndexPath(row: 1, section: 0)], with: .none)
                }
                                                                self.tableView.reloadRows(at: [IndexPath(row: 1, section: 0)], with: .none)
            }
                                }).disposed(by: disposeBag)
            }).disposed(by: disposeBag)
        }
                                Services.getMeditationAndCateList().subscribe(onNext: { data in
                                                if let m = data.data{
@@ -296,22 +314,30 @@
        }).disposed(by: disposeBag)
                }
    @objc func autoUpdate(){
        print("--->")
        Services.getTopdayMedita().subscribe(onNext: { data in
            self.viewModel.todyModel = data.data?.clientMeditationVO
            self.tableView.reloadRows(at: [IndexPath(row: 0, section: 0)], with: .none)
        }).disposed(by: disposeBag)
    }
                @objc func searchAction(){
        let vc = SearchVC(serchType: .muse)
                                push(vc: vc)
                }
                @objc func settingvoiceAction(){
                                let vc = BackgroundVoiceVC()
        let vc = BackgroundVoiceVC(isFromFist: false)
                                push(vc: vc)
                }
                @objc func jumpMoreAction(_ sender:UIButton){
                                switch sender.tag {
                                                case 201:
                guard sceneDelegate!.checkisLoginState() else {return}
                                                                //跳转计划引导
                                                                let nav    = BaseNav(rootViewController: PlanGuideVC())
                let nav    = BaseNav(rootViewController: PlanGuideVC(isFromFist: false))
                                                                nav.modalPresentationStyle = .fullScreen
                                                                present(nav, animated: true)
                                                                break
@@ -332,8 +358,19 @@
        if indexPath.section == 0{
            if let m = viewModel.todyModel{
                let vc = HomeItemDetailVC(id: m.id)
                push(vc: vc)
                Services.getMeditationDetail(id: m.id).subscribe(onNext: {[weak self]data in
                    guard let weakSelf = self else { return }
                    if let m = data.data{
                        if AudioPlayer.getSharedInstance().meditationModel?.id == m.id && AudioPlayer.getSharedInstance().bgmPlayer?.timeControlStatus == .playing{
                            return
                        }
                        AudioPlayer.getSharedInstance().playBGMAt(firstPlayIndex: 0, model: m, delegate: self)
                        PayMusicVC.show(model: m,isHidden: false)
                        self?.tableView.reloadData()
                    }
                }).disposed(by: disposeBag)
            }else{
                alert(msg: "平台暂未设置今日疗愈")
            }
@@ -341,7 +378,7 @@
                                if indexPath.section == 2{
                                                let vc = WebVC(type: .guide)
                                                vc.title = "心泉·疗愈"
                                                vc.title = "泉疗愈"
                                                push(vc: vc)
                                }
                }
@@ -353,6 +390,8 @@
            if viewModel.todyModel?.id != 0{
                cell.model = viewModel.todyModel
                cell.view_data.isHidden = false
                cell.img_play.isHidden = AudioPlayer.getSharedInstance().meditationModel?.id == viewModel.todyModel?.id
            }else{
                cell.img_cover.image = UIImage(named: "bg_today")
                cell.view_data.isHidden = true
@@ -455,3 +494,11 @@
        navigationController?.navigationBar.scrollEdgeAppearance?.backgroundColor = .white
                }
}
extension HomeVC:PayMusicDelegate{
    func playState(_ state: PlayMusicState) {
    }
}
XQMuse/Root/Home/TCell/Home_Style_1_TCell.swift
@@ -6,6 +6,7 @@
//
import UIKit
import JQTools
class Home_Style_1_TCell: UITableViewCell {
@@ -18,8 +19,13 @@
                    view_data.isHidden = true
                }else{
                    view_data.isHidden = false
                    img_cover.sd_setImage(with: URL(string: m.backgroundUrl))
                    label_title.text = "\(m.meditationTitle) | 00:00"
                    img_cover.sd_setImage(with: URL(string: m.coverUrl.jq_urlEncoded()))
                    let turple = Date.jq_formateToTime_tuple(m.time)
                   let minute = (turple.hour * 60 + turple.minute)
                    let second = turple.second
                    label_title.text = "\(m.meditationTitle) | \(String(format: "%.2ld:%.2ld", minute,second))"
                    label_joinNum.text = "\(m.realLearnedNum + m.virtualLearnedNum)人已参加学习"
                }
                                                }
XQMuse/Root/Home/TCell/Home_Style_1_TCell.xib
@@ -23,14 +23,14 @@
                    <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="KW7-hr-gUW">
                        <rect key="frame" x="0.0" y="247.66666666666663" width="398" height="27"/>
                        <subviews>
                            <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="缓解压力|00:00" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="bu5-9N-LaQ">
                                <rect key="frame" x="19.666666666666671" y="7.3333333333333428" width="80.999999999999986" height="12"/>
                            <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="1000" verticalHuggingPriority="251" text="缓解压力|00:00" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="bu5-9N-LaQ">
                                <rect key="frame" x="19.666666666666671" y="7.3333333333333428" width="81" height="12"/>
                                <fontDescription key="fontDescription" type="system" weight="medium" pointSize="10"/>
                                <color key="textColor" red="0.94901960784313721" green="0.92549019607843142" blue="0.97254901960784312" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                                <nil key="highlightedColor"/>
                            </label>
                            <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="0人已参加练习" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="KpH-Aq-7Pf">
                                <rect key="frame" x="312.33333333333331" y="7.3333333333333428" width="67.666666666666686" height="12"/>
                            <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" horizontalCompressionResistancePriority="1000" text="0人已参加练习" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="KpH-Aq-7Pf">
                                <rect key="frame" x="110.66666666666666" y="7.3333333333333428" width="269.33333333333337" height="12"/>
                                <fontDescription key="fontDescription" type="system" weight="medium" pointSize="10"/>
                                <color key="textColor" red="0.94901960780000005" green="0.92549019610000005" blue="0.97254901959999995" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                                <nil key="highlightedColor"/>
@@ -38,6 +38,7 @@
                        </subviews>
                        <color key="backgroundColor" red="0.37647058823529411" green="0.37647058823529411" blue="0.37647058823529411" alpha="0.45000000000000001" colorSpace="custom" customColorSpace="sRGB"/>
                        <constraints>
                            <constraint firstItem="KpH-Aq-7Pf" firstAttribute="leading" secondItem="bu5-9N-LaQ" secondAttribute="trailing" constant="10" id="ARL-ki-Tdd"/>
                            <constraint firstItem="KpH-Aq-7Pf" firstAttribute="centerY" secondItem="KW7-hr-gUW" secondAttribute="centerY" id="D54-gl-Gr4"/>
                            <constraint firstAttribute="trailing" secondItem="KpH-Aq-7Pf" secondAttribute="trailing" constant="18" id="WSs-qt-tGn"/>
                            <constraint firstAttribute="height" constant="27" id="fli-jx-g1G"/>
XQMuse/Root/Home/TCell/Home_Style_3_TCell.swift
@@ -7,12 +7,14 @@
import UIKit
import JQTools
import RxSwift
class Home_Style_3_TCell: UITableViewCell {
                @IBOutlet weak var collectionView: UICollectionView!
                var meditationModels = [MeditationModel]()
    private var showType:DisplayType!
    private let disposeBag = DisposeBag()
                override func awakeFromNib() {
        super.awakeFromNib()
@@ -49,27 +51,32 @@
                }
                func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) {
                                let m = meditationModels[indexPath.row]
        let item = meditationModels[indexPath.row]
        let isVip = UserViewModel.getAvatarInfo().checkVip()
        Services.getMeditationDetail(id: item.id).subscribe(onNext: {[weak self]data in
            guard let weakSelf = self else { return }
            if let m = data.data{
                let isVip = m.isVip == .yes
                if m.chargeType == .free || (isVip && m.chargeType == .vipFree) || (m.chargeType == .payment && m.isBuy == .yes){
                    let vc = HomeItemDetailVC(model: m)
                    JQ_currentViewController().jq_push(vc: vc)
                    return
                }
        if m.chargeType == .free || (isVip && m.chargeType == .vipFree) || (m.chargeType == .payment && m.isBuy == .yes){
                                                let vc = HomeItemDetailVC(id: m.id)
                                                JQ_currentViewController().jq_push(vc: vc)
                                                return
                                }
                if m.chargeType == .payment && m.isBuy == .no{
                    guard sceneDelegate!.checkisLoginState() else{return}
                    let vc = PaymentOrderVC(museItemModel: m,type: .muse,showType: weakSelf.showType)
                    JQ_currentViewController().jq_push(vc: vc)
                    return
                }
                                if m.chargeType == .payment && m.isBuy == .no{
            let vc = PaymentOrderVC(museItemModel: m,type: .muse,showType: showType)
                                                JQ_currentViewController().jq_push(vc: vc)
                                                return
                                }
                                if m.chargeType == .vipFree{
                                                let vc = VIPCenterVC()
                                                JQ_currentViewController().jq_push(vc: vc)
                                                return
                                }
                if m.chargeType == .vipFree{
                    let vc = VIPCenterVC()
                    JQ_currentViewController().jq_push(vc: vc)
                    return
                }
            }
        }).disposed(by: self.disposeBag)
                }
}
XQMuse/Root/Home/TCell/Home_Style_4_TCell.swift
@@ -7,6 +7,7 @@
import UIKit
import JQTools
import RxSwift
enum Home_Style_4_Style{
                case style1
@@ -18,6 +19,7 @@
                var style:Home_Style_4_Style!
    private var showType: DisplayType!
                var meditationModels = [MeditationModel]()
    private let disposeBag = DisposeBag()
                @IBOutlet weak var collectionView: UICollectionView!
@@ -42,24 +44,52 @@
                func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) {
        let m = meditationModels[indexPath.row]
        guard m.id != 0 else{
        let item = meditationModels[indexPath.row]
        guard item.id != 0 else{
            alert(msg: "平台暂未设置私人定制");return
        }
        let isVip = UserViewModel.getAvatarInfo().checkVip()
        if m.chargeType == .free || (m.chargeType == .vipFree && isVip) || (m.chargeType == .payment && m.isBuy == .yes){
            let detailVC = HomeItemDetailVC(id: meditationModels[indexPath.row].id)
            JQ_currentViewController().jq_push(vc: detailVC)
        }else{
            if m.chargeType == .vipFree{
                let vc = VIPCenterVC()
                JQ_currentViewController().jq_push(vc: vc)
            }else{
                let vc = PaymentOrderVC(museItemModel: m,type: .muse,showType: .horizontal)
                JQ_currentViewController().jq_push(vc:vc)
        Services.getMeditationDetail(id: item.id).subscribe(onNext: {[weak self]data in
            guard let weakSelf = self else { return }
            if let m = data.data{
                let isVip = m.isVip == .yes
                if m.chargeType == .free || (isVip && m.chargeType == .vipFree) || (m.chargeType == .payment && m.isBuy == .yes){
                    let vc = HomeItemDetailVC(model: m)
                    JQ_currentViewController().jq_push(vc: vc)
                    return
                }
                if m.chargeType == .payment && m.isBuy == .no{
                    guard sceneDelegate!.checkisLoginState() else{return}
                    let vc = PaymentOrderVC(museItemModel: m,type: .muse,showType: weakSelf.showType)
                    JQ_currentViewController().jq_push(vc: vc)
                    return
                }
                if m.chargeType == .vipFree{
                    let vc = VIPCenterVC()
                    JQ_currentViewController().jq_push(vc: vc)
                    return
                }
            }
        }
        }).disposed(by: disposeBag)
//        let isVip = UserViewModel.getAvatarInfo().checkVip()
//        if m.chargeType == .free || (m.chargeType == .vipFree && isVip) || (m.chargeType == .payment && m.isBuy == .yes){
//            let detailVC = HomeItemDetailVC(id: meditationModels[indexPath.row].id)
//            JQ_currentViewController().jq_push(vc: detailVC)
//        }else{
//            if m.chargeType == .vipFree{
//                let vc = VIPCenterVC()
//                JQ_currentViewController().jq_push(vc: vc)
//            }else{
//                guard sceneDelegate!.checkisLoginState() else{return}
//                let vc = PaymentOrderVC(museItemModel: m,type: .muse,showType: .horizontal)
//                JQ_currentViewController().jq_push(vc:vc)
//            }
//        }
                }
                func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int {
XQMuse/Root/Home/VC/BackgroundVoiceVC.swift
@@ -21,20 +21,40 @@
                private var tempPlayer:AVPlayer?
                private var isPlaying:Bool = false
    private var needPopRoot = false
    private var isFromFist = false
                override func viewDidDisappear(_ animated: Bool) {
                                super.viewDidDisappear(animated)
                                audioPlayer.playScene()
        if audioPlayer.meditationModel != nil{
//            audioPlayer.masterPlayer?.play()
//            audioPlayer.bgmPlayer?.play()
        }else{
            audioPlayer.playScene()
        }
                }
                override func viewDidAppear(_ animated: Bool) {
                                super.viewDidAppear(animated)
                                audioPlayer.pauseScene()
        if audioPlayer.meditationModel != nil{
            audioPlayer.masterPlayer?.pause()
            audioPlayer.bgmPlayer?.pause()
            PayMusicVC.updateStatus(.pause)
        }
                }
    init(isFromFist:Bool){
        super.init(nibName: nil, bundle: nil)
        self.isFromFist = isFromFist
    }
    required init?(coder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
                override func viewDidLoad() {
        super.viewDidLoad()
                                title = "心泉·疗愈"
                                title = "泉疗愈"
        yy_popBlock = { [weak self] in
            if self?.needPopRoot ?? false{
@@ -103,8 +123,13 @@
                                                settingModel?.bgm = items[index.row]
                                                settingModel?.volume = Double(slider_voice.value)
                                                UserDefaultSettingViewModel.saveSetting(settingModel!)
                                                audioPlayer.playSceneAt(items[index.row].audioFile)
                                                alertSuccess(msg: "设置成功")
            if isFromFist{
                NotificationCenter.default.post(name: PlantGuideQuit_Noti, object: items[index.row])
                return
            }
            needPopRoot = true
                                                NotificationCenter.default.post(name: SetBGMSuccess_Noti, object: items[index.row])
            DispatchQueue.main.asyncAfter(delay: 0.6) {
XQMuse/Root/Home/VC/HomeItemDetailVC.swift
@@ -8,6 +8,8 @@
import UIKit
import JQTools
let CleanDetailTime_Noti = Notification.Name.init("CleanDetailTime_Noti") //2边都在记录,一方记录清除另一方
class HomeItemDetailVC: BaseVC,PayMusicDelegate{
                @IBOutlet weak var slider_voice: UISlider!
@@ -35,21 +37,17 @@
    private var currentInterval:TimeInterval = 0
    private var totalInterval:TimeInterval = 0
                private var model:MeditationModel?
                private var model:MeditationModel?{
                                didSet{
                                                if let m = model{
                                                                label_title.text = m.meditationTitle
                                                                label_subtitle.text = m.detailDescription
                                                                label_commentNum.text = "\(m.questionCount)"
                                                }
                                }
                }
//                init(id:Int) {
//                                super.init(nibName: nil, bundle: nil)
//                                self.id = id
//                }
                init(id:Int) {
                                super.init(nibName: nil, bundle: nil)
                                self.id = id
                }
    init(model:MeditationModel) {
        super.init(nibName: nil, bundle: nil)
        self.model = model
    }
                required init?(coder: NSCoder) {
                                fatalError("init(coder:) has not been implemented")
@@ -57,7 +55,18 @@
                override func viewDidLoad() {
                                super.viewDidLoad()
                                title = "心泉·疗愈"
                                title = "泉疗愈"
        if settingViewModel?.bgm != nil {
            audioPlayer.scenePlayer?.pause()
        }
        yy_popBlock = {[weak self] in
            if AudioPlayer.getSharedInstance().meditationModel == nil && self?.settingViewModel?.bgm != nil{
                self?.audioPlayer.playScene()
            }
            self?.navigationController?.popViewController()
        }
                                btn_playMode.isSelected = settingViewModel?.playModel == .singleLoop
@@ -67,19 +76,19 @@
                                                endMiniRunloop()
                                }
                                Services.getMeditationDetail(id: id).subscribe(onNext: {[unowned self] data in
            if let m = data.data{
                self.model = m
                let dateTuple = Date.jq_formateToTime_tuple(m.meditationSecondList.first ?? 0)
                self.label_totalTime.text = String(format: "%02ld:%02ld", dateTuple.hour * 60 + dateTuple.minute,dateTuple.second)
                self.collect_bitem.image = m.favorite == .yes ? UIImage(named: "btn_collect_1_s"):UIImage(named: "btn_collect_1")
                self.collect_bitem.tintColor = m.favorite == .yes ? UIColor(hexString: "fe5b60"):.white
                self.img_background.sd_setImage(with: URL(string: data.data?.backgroundUrl ?? ""))
                if audioPlayer.meditationModel?.id == m.id{
                    audioPlayer.delegate = self
                }
        if let m = model {
            label_title.text = m.meditationTitle
            label_subtitle.text = m.detailDescription
            label_commentNum.text = "\(m.questionCount)"
            let dateTuple = Date.jq_formateToTime_tuple(m.meditationSecondList.first ?? 0)
            self.label_totalTime.text = String(format: "%02ld:%02ld", dateTuple.hour * 60 + dateTuple.minute,dateTuple.second)
            self.collect_bitem.image = m.favorite == .yes ? UIImage(named: "btn_collect_1_s"):UIImage(named: "btn_collect_1")
            self.collect_bitem.tintColor = m.favorite == .yes ? UIColor(hexString: "fe5b60"):.white
            self.img_background.sd_setImage(with: URL(string: m.backgroundUrl.jq_urlEncoded()))
            if audioPlayer.meditationModel?.id == m.id{
                audioPlayer.delegate = self
            }
                                }).disposed(by: disposeBag)
        }
        //如果从支付过来的,移除支付
        navigationController!.viewControllers.removeAll { vc in
@@ -100,6 +109,7 @@
        super.viewDidDisappear(animated)
        if let m = model,timeLook > 0{
            audioPlayer.lisenMuseTime = 0
            Services.watchMuse(id: m.id, timeLook: timeLook).subscribe(onNext: {_ in
                NotificationCenter.default.post(name: TreeTaskUpdate_Noti, object: nil)
            }).disposed(by: disposeBag)
@@ -152,6 +162,10 @@
            let value = (v.double / 100.0) * weakSelf.totalInterval
            self?.audioPlayer.setBGMRate(value: value)
        }).disposed(by: disposeBag)
        NotificationCenter.default.rx.notification(CleanDetailTime_Noti).take(until: self.rx.deallocated).subscribe(onNext: {[weak self]_ in
            self?.timeLook = 0
        }).disposed(by: disposeBag)
                }
                private func startMiniRunloop(){
@@ -173,9 +187,18 @@
                @IBAction func playAction(_ sender: UIButton) {
        sender.isSelected = !sender.isSelected
                                if let m = model{
            if sender.isSelected{
                audioPlayer.playBGMAt(firstPlayIndex: 0, model: m, delegate: self,coverImage: img_background.image)
                if audioPlayer.meditationModel != nil{
                    if audioPlayer.meditationModel?.id != m.id{
                        audioPlayer.playBGMAt(firstPlayIndex: 0, model: m, delegate: self,coverImage: img_background.image)
                    }else{
                        audioPlayer.bgmPlayer?.play()
                        audioPlayer.masterPlayer?.play()
                    }
                }else{
                    audioPlayer.playBGMAt(firstPlayIndex: 0, model: m, delegate: self,coverImage: img_background.image)
                }
            }else{
                audioPlayer.bgmPlayer?.pause()
            }
XQMuse/Root/Home/VC/HomeItemListVC.swift
@@ -72,6 +72,8 @@
                                let cell = collectionView.dequeueReusableCell(withReuseIdentifier: "_HomeRelaxBanner_2_CCell", for: indexPath) as! HomeRelaxBanner_2_CCell
                                let model = viewModel.dataSource.value!.list[indexPath.row]
        cell.setMeditationModel(model,showType: showType)
        cell.label_title.font = .systemFont(ofSize: 18, weight: .bold)
        cell.cons_maxSubTitle.constant = 16
                                return cell
                }
@@ -80,21 +82,51 @@
                }
                func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) {
                                let m = viewModel.dataSource.value!.list[indexPath.row]
                                let item = viewModel.dataSource.value!.list[indexPath.row]
        let isVip = UserViewModel.getAvatarInfo().checkVip()
        Services.getMeditationDetail(id: item.id).subscribe(onNext: {[weak self]data in
            guard let weakSelf = self else { return }
            if let m = data.data{
                let isVip = m.isVip == .yes
                if m.chargeType == .free || (isVip && m.chargeType == .vipFree) || (m.chargeType == .payment && m.isBuy == .yes){
                    let vc = HomeItemDetailVC(model: m)
                    JQ_currentViewController().jq_push(vc: vc)
                    return
                }
        if m.chargeType == .free || (m.chargeType == .vipFree && isVip) || (m.chargeType == .payment && m.isBuy == .yes){
            let detailVC = HomeItemDetailVC(id: m.id)
            jq_push(vc: detailVC)
        }else{
            if m.chargeType == .vipFree{
                let vc = VIPCenterVC()
                jq_push(vc: vc)
            }else{
                let vc = PaymentOrderVC(museItemModel: m,type: .muse,showType: showType)
                jq_push(vc: vc)
                if m.chargeType == .payment && m.isBuy == .no{
                    guard sceneDelegate!.checkisLoginState() else{return}
                    let vc = PaymentOrderVC(museItemModel: m,type: .muse,showType: weakSelf.showType)
                    JQ_currentViewController().jq_push(vc: vc)
                    return
                }
                if m.chargeType == .vipFree{
                    let vc = VIPCenterVC()
                    JQ_currentViewController().jq_push(vc: vc)
                    return
                }
            }
        }
        }).disposed(by: disposeBag)
//        let isVip = UserViewModel.getAvatarInfo().checkVip()
//
//        if m.chargeType == .free || (m.chargeType == .vipFree && isVip) || (m.chargeType == .payment && m.isBuy == .yes){
//            let detailVC = HomeItemDetailVC(id: m.id)
//            jq_push(vc: detailVC)
//        }else{
//            if m.chargeType == .vipFree{
//                let vc = VIPCenterVC()
//                jq_push(vc: vc)
//            }else{
//                guard sceneDelegate!.checkisLoginState() else{return}
//                let vc = PaymentOrderVC(museItemModel: m,type: .muse,showType: showType)
//                jq_push(vc: vc)
//            }
//        }
                }
}
XQMuse/Root/Home/VC/HomeItemListVC.xib
@@ -1,22 +1,31 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="13142" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="23094" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
    <device id="retina6_12" orientation="portrait" appearance="light"/>
    <dependencies>
        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="12042"/>
        <deployment identifier="iOS"/>
        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="23084"/>
        <capability name="Safe area layout guides" minToolsVersion="9.0"/>
        <capability name="System colors in document resources" minToolsVersion="11.0"/>
        <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
    </dependencies>
    <objects>
        <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="HomeItemListVC" customModuleProvider="target">
        <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="HomeItemListVC" customModule="XQMuse" customModuleProvider="target">
            <connections>
                <outlet property="view" destination="i5M-Pr-FkT" id="sfx-zR-JGt"/>
            </connections>
        </placeholder>
        <placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
        <view clearsContextBeforeDrawing="NO" contentMode="scaleToFill" id="i5M-Pr-FkT">
            <rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
            <rect key="frame" x="0.0" y="0.0" width="393" height="852"/>
            <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
            <color key="backgroundColor" systemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/>
            <viewLayoutGuide key="safeArea" id="fnl-2z-Ty3"/>
            <color key="backgroundColor" systemColor="systemBackgroundColor"/>
            <point key="canvasLocation" x="-211" y="7"/>
        </view>
    </objects>
    <resources>
        <systemColor name="systemBackgroundColor">
            <color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
        </systemColor>
    </resources>
</document>
XQMuse/Root/Home/VC/HomeTyroGuideVC.swift
@@ -14,7 +14,7 @@
    override func viewDidLoad() {
        super.viewDidLoad()
                                title = "心泉·疗愈"
                                title = "泉疗愈"
                                Services.agreementBy(.guide).subscribe(onNext: {data in
                                }).disposed(by: disposeBag)
XQMuse/Root/Home/VC/PaymentOrderResultVC.swift
@@ -139,8 +139,20 @@
            case .course:
                let model = models[indexPath.row] as! CourseModel
                if model.courseType == .online{
                    let vc = CourseDetialVC(courseId: model.id)
                    push(vc: vc)
                    Services.getCourseDetail(courseId: model.id).subscribe(onNext: {[weak self]data in
                        if let m = data.data{
                            if m.isVip == .no && m.chargeType == .vipFree{
                                let vc = VIPCenterVC()
                                self?.push(vc: vc)
                            }else if m.courseType == .online{
                                let vc = CourseDetialVC(courseModel: m)
                                self?.push(vc: vc)
                            }else{
                                let vc = CourseDetialOfflineVC(courseId: m.id)
                                self?.push(vc: vc)
                            }
                        }
                    }).disposed(by: disposeBag)
                }else{
                    let vc = CourseDetialOfflineVC(courseId: model.id)
                    push(vc: vc)
@@ -148,8 +160,31 @@
            case .muse:
                let model = models[indexPath.row] as! MeditationModel
                let vc = HomeItemDetailVC(id: model.id)
                push(vc: vc)
                Services.getMeditationDetail(id: model.id).subscribe(onNext: {[weak self]data in
                    guard let weakSelf = self else { return }
                    if let m = data.data{
                        let isVip = m.isVip == .yes
                        if m.chargeType == .free || (isVip && m.chargeType == .vipFree) || (m.chargeType == .payment && m.isBuy == .yes){
                            let vc = HomeItemDetailVC(model: m)
                            weakSelf.jq_push(vc: vc)
                            return
                        }
                        if m.chargeType == .payment && m.isBuy == .no{
                            guard sceneDelegate!.checkisLoginState() else{return}
                            let vc = PaymentOrderVC(museItemModel: m,type: .muse,showType:.vertical)
                            weakSelf.jq_push(vc: vc)
                            return
                        }
                        if m.chargeType == .vipFree{
                            let vc = VIPCenterVC()
                            weakSelf.jq_push(vc: vc)
                            return
                        }
                    }
                }).disposed(by: disposeBag)
            case .none:break
        }
                }
XQMuse/Root/Home/VC/PaymentOrderVC.swift
@@ -156,8 +156,16 @@
                @IBAction func webAgreementAction(_ sender: UIButton) {
                                let vc = WebVC(type: .course)
                                push(vc: vc)
        Services.agreementBy(.course).subscribe(onNext: {data in
            if let model = data.data{
                let vc = VIPAgreementVC(title: "课程/疗愈音频购买协议", content: model.content) {
                    self.btn_isRead.isSelected = true
                }
                vc.modalPresentationStyle = .custom
                self.present(vc, animated: true)
            }
        }).disposed(by: disposeBag)
                }
                @IBAction func completeAction(_ sender: UIButton) {
XQMuse/Root/Home/VC/SearchContentVC.swift
@@ -49,7 +49,7 @@
                
    override func viewDidLoad() {
        super.viewDidLoad()
                                title = "心泉·疗愈"
                                title = "泉疗愈"
        switch serchType{
            case .course:tf_search.text = courseViewModel?.search.value ?? ""
@@ -133,39 +133,68 @@
        switch serchType{
            case .course:
                let m = courseViewModel!.dataSource.value!.list[indexPath.row]
                if m.chargeType == .free || (m.chargeType == .vipFree && isVip) || (m.chargeType == .payment && m.isBuy == .yes){
                Services.getCourseDetail(courseId: m.id).subscribe(onNext: {[weak self]data in
                    if let m = data.data{
                        if m.isVip == .no && m.chargeType == .vipFree{
                            let vc = VIPCenterVC()
                            self?.push(vc: vc)
                        }else if m.courseType == .online{
                            let vc = CourseDetialVC(courseModel: m)
                            self?.push(vc: vc)
                        }else{
                            let vc = CourseDetialOfflineVC(courseId: m.id)
                            JQ_currentViewController().jq_push(vc: vc)
                        }
                    }
                }).disposed(by: disposeBag)
                    if m.courseType == .online{
                        let vc = CourseDetialVC(courseId: m.id)
                        JQ_currentViewController().jq_push(vc: vc)
                    }else{
                        let vc = CourseDetialOfflineVC(courseId: m.id)
                        JQ_currentViewController().jq_push(vc: vc)
                    }
                }else{
                    if m.chargeType == .vipFree{
                        let vc = VIPCenterVC()
                        JQ_currentViewController().jq_push(vc: vc)
                    }else{
                        let vc = PaymentOrderVC(courseItemModel: m,type: .course,giftToOther: true, showType: .horizontal)
                        JQ_currentViewController().jq_push(vc:vc)
                    }
                }
//                if m.chargeType == .free || (m.chargeType == .vipFree && isVip) || (m.chargeType == .payment && m.isBuy == .yes){
//
//                    if m.courseType == .online{
//                        let vc = CourseDetialVC(courseId: m.id)
//                        JQ_currentViewController().jq_push(vc: vc)
//                    }else{
//                        let vc = CourseDetialOfflineVC(courseId: m.id)
//                        JQ_currentViewController().jq_push(vc: vc)
//                    }
//                }else{
//                    if m.chargeType == .vipFree{
//                        let vc = VIPCenterVC()
//                        JQ_currentViewController().jq_push(vc: vc)
//                    }else{
//                        guard sceneDelegate!.checkisLoginState() else{return}
//                        let vc = PaymentOrderVC(courseItemModel: m,type: .course,giftToOther: true, showType: .horizontal)
//                        JQ_currentViewController().jq_push(vc:vc)
//                    }
//                }
            case .muse:
                let m = museViewModel!.dataSource.value!.list[indexPath.row]
                if m.chargeType == .free || (m.chargeType == .vipFree && isVip) || (m.chargeType == .payment && m.isBuy == .yes){
                    let detailVC = HomeItemDetailVC(id: m.id)
                    JQ_currentViewController().jq_push(vc: detailVC)
                }else{
                    if m.chargeType == .vipFree{
                        let vc = VIPCenterVC()
                        JQ_currentViewController().jq_push(vc: vc)
                    }else{
                        let vc = PaymentOrderVC(museItemModel: m,type: .muse, showType: .vertical)
                        JQ_currentViewController().jq_push(vc:vc)
                let item = museViewModel!.dataSource.value!.list[indexPath.row]
                Services.getMeditationDetail(id: item.id).subscribe(onNext: {[weak self]data in
                    guard let weakSelf = self else { return }
                    if let m = data.data{
                        let isVip = m.isVip == .yes
                        if m.chargeType == .free || (isVip && m.chargeType == .vipFree) || (m.chargeType == .payment && m.isBuy == .yes){
                            let vc = HomeItemDetailVC(model: m)
                            JQ_currentViewController().jq_push(vc: vc)
                            return
                        }
                        if m.chargeType == .payment && m.isBuy == .no{
                            guard sceneDelegate!.checkisLoginState() else{return}
                            let vc = PaymentOrderVC(museItemModel: m,type: .muse,showType:.vertical)
                            JQ_currentViewController().jq_push(vc: vc)
                            return
                        }
                        if m.chargeType == .vipFree{
                            let vc = VIPCenterVC()
                            JQ_currentViewController().jq_push(vc: vc)
                            return
                        }
                    }
                }
                }).disposed(by: disposeBag)
            default:break
        }
XQMuse/Root/Home/VC/SearchVC.swift
@@ -88,7 +88,7 @@
    
                override func viewDidLoad() {
                                super.viewDidLoad()
                                title = "心泉·疗愈"
                                title = "泉疗愈"
        view_hotKeyword.isHidden = serchType == .course
        label_hotSearhTitle.isHidden = serchType == .course
XQMuse/Root/Home/View/PaymentOrderResultTopView.swift
@@ -7,6 +7,7 @@
import UIKit
import JQTools
import RxSwift
class PaymentOrderResultTopView: UIView,JQNibView{
@@ -14,6 +15,8 @@
                @IBOutlet weak var btn_lookCourse: UIButton!
    private var id:Int!
    private var type:PaymentOrderVC.PaymentOrderType!
    private let disposeBag = DisposeBag()
                override func awakeFromNib() {
                                super.awakeFromNib()
@@ -39,13 +42,29 @@
                @IBAction func lookCourseAction(_ sender: UIButton) {
        if type == .course{
            let vc = CourseDetialVC(courseId: id)
            JQ_currentViewController().jq_push(vc: vc)
            Services.getCourseDetail(courseId: id).subscribe(onNext: {data in
                if let m = data.data{
                    if m.isVip == .no && m.chargeType == .vipFree{
                        let vc = VIPCenterVC()
                        JQ_currentNavigationController().pushViewController(vc)
                    }else if m.courseType == .online{
                        let vc = CourseDetialVC(courseModel: m)
                        JQ_currentViewController().jq_push(vc: vc)
                    }else{
                        let vc = CourseDetialOfflineVC(courseId: m.id)
                        JQ_currentViewController().jq_push(vc: vc)
                    }
                }
            }).disposed(by: disposeBag)
        }
        if type == .muse{
            let vc = HomeItemDetailVC(id: id)
            JQ_currentViewController().jq_push(vc: vc)
            Services.getMeditationDetail(id: id).subscribe(onNext: {data in
                if let m = data.data{
                    let vc = HomeItemDetailVC(model: m)
                    JQ_currentViewController().jq_push(vc: vc)
                }
            }).disposed(by: disposeBag)
        }
                }
                
XQMuse/Root/Login/VC/ForgotPasswordChangeVC.swift
@@ -82,7 +82,17 @@
                                Services.updatePwd(cellPhone: phone, password: tf_input.text!, secretCode: secretCode).subscribe(onNext: {data in
            if data.code == 200{
                                                                Popup_1_View.show(state: .success, title: "修改成功", subtitle: "您的密码已修改成功,快去登录账户吧") {
                                                                                self.navigationController?.popToRootViewController(animated: true)
                    let loginNav = LoginNav(rootViewController: LoginVC())
                    loginNav.modalPresentationStyle = .fullScreen
                    JQ_currentViewController().present(loginNav, animated: true)
                    UserViewModel.clearToken()
                    UserViewModel.clearLoginInfo()
                    UserViewModel.clearAvatarInfo()
                    DispatchQueue.main.asyncAfter(delay: 0.3) {
                        NotificationCenter.default.post(name: LoginQuit_Noti, object: nil)
                    }
                                                                }
                                                }
                                }).disposed(by: disposeBag)
XQMuse/Root/Login/VC/ForgotPasswordInputCodeVC.swift
@@ -43,7 +43,7 @@
                                super.viewDidAppear(animated)
                                c1.becomeFirstResponder()
                                c1.jq_borderWidth = 1
                                sendCode()
//                                sendCode()
                }
    override func viewDidLoad() {
@@ -56,6 +56,8 @@
                                c4.delegate = self
                                c5.delegate = self
                                c6.delegate = self
        starTimer()
    }
                override func setUI() {
XQMuse/Root/Login/VC/ForgotPasswordVC.swift
@@ -45,8 +45,16 @@
                                if !tf_phone.text!.jq_isPhone{
                                                alertError(msg: "请输入正确手机号");return
                                }
                                let vc = ForgotPasswordInputCodeVC(phone: tf_phone.text!)
                                push(vc: vc)
        Services.sendCode(phone:tf_phone.text!,type: .forgetPwd).subscribe(onNext: {[weak self] data in
            guard let weakSelf = self else { return }
            if data.code == 200{
                let vc = ForgotPasswordInputCodeVC(phone: weakSelf.tf_phone.text!)
                weakSelf.push(vc: vc)
            }
        }).disposed(by: disposeBag)
                }
                
XQMuse/Root/Me/CCell/EmptyCCell.swift
@@ -8,7 +8,7 @@
import UIKit
import JQTools
class EmptyCCell: UICollectionViewCell {
class EmptyCCell: UICollectionViewCell,JQNibView{
    override func awakeFromNib() {
        super.awakeFromNib()
XQMuse/Root/Me/CCell/EmptyCCell.xib
@@ -11,17 +11,17 @@
        <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
        <placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
        <collectionViewCell opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" reuseIdentifier="_EmptyCCell" id="gTV-IL-0wX" customClass="EmptyCCell" customModule="XQMuse" customModuleProvider="target">
            <rect key="frame" x="0.0" y="0.0" width="354" height="335"/>
            <rect key="frame" x="0.0" y="0.0" width="264" height="301"/>
            <autoresizingMask key="autoresizingMask"/>
            <view key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center">
                <rect key="frame" x="0.0" y="0.0" width="354" height="335"/>
                <rect key="frame" x="0.0" y="0.0" width="264" height="301"/>
                <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
                <subviews>
                    <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="bg_empty" translatesAutoresizingMaskIntoConstraints="NO" id="KES-hR-eu2">
                        <rect key="frame" x="121.66666666666669" y="34.666666666666657" width="111" height="120"/>
                        <rect key="frame" x="76.666666666666686" y="34.666666666666657" width="111" height="120"/>
                    </imageView>
                    <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="你还没有购买课程" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="eBW-Bc-yAN">
                        <rect key="frame" x="129" y="176" width="96" height="12.666666666666657"/>
                        <rect key="frame" x="84" y="176" width="96" height="12.666666666666657"/>
                        <constraints>
                            <constraint firstAttribute="height" constant="12.5" id="cPC-co-C2P"/>
                        </constraints>
@@ -30,7 +30,7 @@
                        <nil key="highlightedColor"/>
                    </label>
                    <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Xpd-vb-LhG">
                        <rect key="frame" x="52" y="216" width="250" height="42.666666666666686"/>
                        <rect key="frame" x="52" y="216" width="160" height="42.666666666666686"/>
                        <color key="backgroundColor" red="0.54117647058823526" green="0.68235294117647061" blue="0.396078431372549" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                        <constraints>
                            <constraint firstAttribute="height" constant="42.5" id="muJ-bd-PyZ"/>
@@ -60,8 +60,8 @@
                <constraint firstItem="Xpd-vb-LhG" firstAttribute="top" secondItem="eBW-Bc-yAN" secondAttribute="bottom" constant="27.5" id="mqw-8O-YZD"/>
                <constraint firstAttribute="trailing" secondItem="Xpd-vb-LhG" secondAttribute="trailing" constant="52" id="xok-W2-twP"/>
            </constraints>
            <size key="customSize" width="354" height="335"/>
            <point key="canvasLocation" x="265.64885496183206" y="33.450704225352112"/>
            <size key="customSize" width="264" height="301"/>
            <point key="canvasLocation" x="196.94656488549617" y="21.47887323943662"/>
        </collectionViewCell>
    </objects>
    <resources>
XQMuse/Root/Me/MeVC.swift
@@ -135,7 +135,7 @@
        if model.isVip == .yes{
            self.image_vipBg.image = UIImage(named: "bg_vip")
            self.label_vipInfo.text = "您将享受所有会员专享音频,尽情畅游心泉·疗愈世界"
            self.label_vipInfo.text = "您将享受所有会员专享音频,尽情畅游泉疗愈世界"
            self.label_expirtTime.text = model.vipExpireTime.components(separatedBy: " ").first! + "到期"
        }else{
            self.image_vipBg.image = UIImage(named: "bg_vip_u")
@@ -145,6 +145,7 @@
    }
                @objc func rankAction(){
        guard sceneDelegate!.checkisLoginState() else {return}
        let vc = WebVC(url: ShareUrl + "/ranking/ranking?userId=\(UserViewModel.getAvatarInfo().id)")
                                vc.title = "爱心榜单"
                                push(vc: vc)
@@ -170,6 +171,7 @@
                }
                @IBAction func systemMessageAction(_ sender: UIButton) {
        guard sceneDelegate!.checkisLoginState() else {return}
                                let vc = NoticeCenterVC()
                                push(vc: vc)
                }
@@ -217,12 +219,14 @@
                /// 联系客服
                @IBAction func customerAction(_ sender: QMUIButton) {
        guard sceneDelegate!.checkisLoginState() else {return}
                                let vc = ContactCustomerVC()
                                push(vc: vc)
                }
                
                ///分享
                @IBAction func shareAction(_ sender: QMUIButton) {
        guard sceneDelegate!.checkisLoginState() else {return}
         let vc =  InviteVC()
        push(vc: vc)
                }
XQMuse/Root/Me/MeVC.xib
@@ -80,8 +80,8 @@
                                        <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="bg_vip_u" translatesAutoresizingMaskIntoConstraints="NO" id="lQe-up-4F0">
                                            <rect key="frame" x="0.0" y="0.0" width="368" height="114.33333333333333"/>
                                        </imageView>
                                        <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="心泉·疗愈会员" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Cy9-se-bLv">
                                            <rect key="frame" x="19.333333333333343" y="23.666666666666671" width="142" height="26.333333333333329"/>
                                        <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="泉疗愈会员" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Cy9-se-bLv">
                                            <rect key="frame" x="19.333333333333343" y="23.666666666666671" width="105" height="26.333333333333329"/>
                                            <fontDescription key="fontDescription" type="system" weight="semibold" pointSize="22"/>
                                            <color key="textColor" red="0.039215686274509803" green="0.25882352941176467" blue="0.074509803921568626" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                                            <nil key="highlightedColor"/>
@@ -232,7 +232,7 @@
                                                        </label>
                                                        <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Tba-o9-bKq">
                                                            <rect key="frame" x="193" y="15.666666666666627" width="6.6666666666666572" height="6.6666666666666661"/>
                                                            <color key="backgroundColor" red="0.6705882353" green="0.8980392157" blue="0.68627450980000004" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                                                            <color key="backgroundColor" red="0.63529411764705879" green="0.84313725490196079" blue="0.80784313725490198" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                                                            <constraints>
                                                                <constraint firstAttribute="width" constant="6.5" id="MST-0N-jSt"/>
                                                                <constraint firstAttribute="height" constant="6.5" id="xtI-HE-Qgg"/>
XQMuse/Root/Me/VC/BankWithdrawVC.swift
@@ -7,6 +7,7 @@
import UIKit
import QMUIKit
import JQTools
let WithDrawReply_Noti = Notification.Name.init("WithDrawReply_Noti")
@@ -39,6 +40,7 @@
        btn_complete.isEnabled = false
        btn_complete.alpha = 0.6
        tf_withdraw.delegate = self
    }
                override func setUI() {
@@ -79,12 +81,6 @@
                }
                @IBAction func withdrawAllAction(_ sender: UIButton) {
        tf_withdraw.resignFirstResponder()
        guard tf_withdraw.text?.toDouble ?? 0 > 0 else{
            alertError(msg: "提现余额不足");return
        }
                                tf_withdraw.resignFirstResponder()
                                tf_withdraw.text = income.jq_formatFloat
                }
@@ -177,3 +173,9 @@
                                return 84
                }
}
extension BankWithdrawVC:UITextFieldDelegate{
    func textField(_ textField: UITextField, shouldChangeCharactersIn range: NSRange, replacementString string: String) -> Bool {
        return textField.jq_filterDecimals(replacementString: string, range: range)
    }
}
XQMuse/Root/Me/VC/BankWithdrawVC.xib
@@ -128,7 +128,7 @@
                                        <textField opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="248" contentHorizontalAlignment="left" contentVerticalAlignment="center" placeholder="请输入提现金额" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="40r-zA-9fv">
                                            <rect key="frame" x="55" y="110.33333333333331" width="280" height="23.333333333333343"/>
                                            <fontDescription key="fontDescription" type="system" weight="medium" pointSize="18"/>
                                            <textInputTraits key="textInputTraits" keyboardType="numberPad"/>
                                            <textInputTraits key="textInputTraits" keyboardType="decimalPad"/>
                                        </textField>
                                        <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="可提现余额:¥0" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Jnw-DF-MrW">
                                            <rect key="frame" x="10" y="165.33333333333331" width="101" height="17"/>
XQMuse/Root/Me/VC/HelpCenterVC.swift
@@ -147,13 +147,13 @@
                                let attribute = AttributedStringbuilder.build()
                                switch page {
                                                case 0:
                                                                attribute.add(string: "如你当前登录心泉·疗愈的手机号码不是购买课程时填写的手机号码,请点击下方按钮,使用购买课程的手机号码登录即可。", withFont: .systemFont(ofSize: 13), withColor: UIColor(hexString:"#282828")!, indent: 0, lineSpace: 5)
                                                                attribute.add(string: "如你当前登录泉疗愈的手机号码不是购买课程时填写的手机号码,请点击下方按钮,使用购买课程的手机号码登录即可。", withFont: .systemFont(ofSize: 13), withColor: UIColor(hexString:"#282828")!, indent: 0, lineSpace: 5)
                                                                btn_handle.setTitle("换个手机号登录", for: .normal)
                                                case 1:
                                                                attribute.add(string: "如你希望变更心泉·疗愈的手机号码,请点击下方按钮,根据页面提示录入新的手机号码。", withFont: .systemFont(ofSize: 13), withColor: UIColor(hexString:"#282828")!, indent: 0, lineSpace: 5)
                                                                attribute.add(string: "如你希望变更泉疗愈的手机号码,请点击下方按钮,根据页面提示录入新的手机号码。", withFont: .systemFont(ofSize: 13), withColor: UIColor(hexString:"#282828")!, indent: 0, lineSpace: 5)
                                                                btn_handle.setTitle("前往改绑手机号", for: .normal)
                                                case 2:
                                                                attribute.add(string: "如你希望变更心泉·疗愈的微信号,请点击下方按钮,根据页面提示授权登录其他微信号。", withFont: .systemFont(ofSize: 13), withColor: UIColor(hexString:"#282828")!, indent: 0, lineSpace: 5)
                                                                attribute.add(string: "如你希望变更泉疗愈的微信号,请点击下方按钮,根据页面提示授权登录其他微信号。", withFont: .systemFont(ofSize: 13), withColor: UIColor(hexString:"#282828")!, indent: 0, lineSpace: 5)
                                                                btn_handle.setTitle("前往改绑微信号", for: .normal)
                                                default:break
XQMuse/Root/Me/VC/LogoutAccountVC.swift
@@ -12,38 +12,28 @@
class LogoutAccountVC: BaseVC {
    @IBOutlet weak var btn_logout: UIButton!
    @IBOutlet weak var webView: WKWebView!
    @IBOutlet weak var label_content: UILabel!
    override func viewDidLoad() {
        super.viewDidLoad()
        title = "注销账号"
        let htmlText = """
<h4>请认真阅读并理解,注销账号将产生以下后果:</h4>
<br/>
<p>1、账号信息、第三方授权、认证身份将被清空和取消;</p>
<p>2、所有使用、收藏、关注列表和购买记录将被清空;</p>
<p>3、账户中所有的余额将被清空;</p>
<p>4、账户对应的会员身份与权益将被取消;</p>
<p>5、您在平台发布的内容将做匿名处理。</p>
<br/>
<p>一经确认,以上内容将无法恢复,请谨慎考虑后决定。</p>
<br/>
<p>根据相关法律法规,注销心泉·疗愈账号并不代表注销前的账号行为和相关责任得到豁免或减轻。</p>
<br/>
<p>提交注销申请后的15日内,后台将进行审核工作,如无问题即可注销成功。在此期间如您登录,则视为取消注销申请</p>
"""
        label_content.attributedText =  AttributedStringbuilder.build().add(string: "请认真阅读并理解,注销账号将产生以下后果:\n", withFont: .systemFont(ofSize: 16, weight: .medium), withColor: .black.withAlphaComponent(0.6),lineSpace: 10)
            .add(string: "1、账号信息、第三方授权、认证身份将被清空和取消;\n2、所有使用、收藏、关注列表和购买记录将被清空;\n3、账户中所有的余额将被清空;\n4、账户对应的会员身份与权益将被取消;\n5、您在平台发布的内容将做匿名处理。\n\n", withFont: .systemFont(ofSize: 14, weight: .medium), withColor: .black.withAlphaComponent(0.6), lineSpace: 7)
            .add(string: "一经确认,以上内容将无法恢复,请谨慎考虑后决定。\n\n", withFont: .systemFont(ofSize: 14, weight: .medium), withColor: .black.withAlphaComponent(0.6),lineSpace: 7)
            .add(string: "根据相关法律法规,注销泉疗愈账号并不代表注销前的账号行为和相关责任得到豁免或减轻。", withFont: .systemFont(ofSize: 14, weight: .medium), withColor: .black.withAlphaComponent(0.6),lineSpace: 7).mutableAttributedString
        webView.loadHTMLString(htmlText.jq_wrapHtml(edge: UIEdgeInsets(top: 0, left: 5, bottom: 0, right: 5)), baseURL: nil)
    }
    @IBAction func completeAction(_ sender: UIButton) {
        Services.deleteUser().subscribe(onNext: {data in
            CommonAlertView.show(title: "提示", content: "注销成功", cancelStr: nil, completeStr: "确定", isSingle: true) { _ in
                sceneDelegate?.needLogin()
                self.navigationController?.popToRootViewController(animated: false)
                DispatchQueue.main.asyncAfter(delay: 0.5) {
                    self.navigationController?.tabBarController?.selectedIndex = 0
            CommonAlertView.show(title: "提示", content: "注销成功", cancelStr: nil, completeStr: "确定", isSingle: true) { state in
                if state{
                    sceneDelegate?.needLogin()
                    self.navigationController?.popToRootViewController(animated: false)
                    DispatchQueue.main.asyncAfter(delay: 0.5) {
                        self.navigationController?.tabBarController?.selectedIndex = 0
                    }
                }
            }
        }).disposed(by: disposeBag)
XQMuse/Root/Me/VC/LogoutAccountVC.xib
@@ -12,8 +12,8 @@
        <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="LogoutAccountVC" customModule="XQMuse" customModuleProvider="target">
            <connections>
                <outlet property="btn_logout" destination="4Xo-o1-mrz" id="DZ9-rg-p9P"/>
                <outlet property="label_content" destination="3t7-Gb-lpW" id="eRc-IJ-H9x"/>
                <outlet property="view" destination="i5M-Pr-FkT" id="sfx-zR-JGt"/>
                <outlet property="webView" destination="d3j-kz-WXp" id="CEY-be-K58"/>
            </connections>
        </placeholder>
        <placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
@@ -69,25 +69,22 @@
                        <constraint firstAttribute="height" constant="40" id="QVf-5k-qpm"/>
                    </constraints>
                </stackView>
                <wkWebView contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="d3j-kz-WXp">
                    <rect key="frame" x="0.0" y="69" width="393" height="694"/>
                    <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
                    <wkWebViewConfiguration key="configuration">
                        <audiovisualMediaTypes key="mediaTypesRequiringUserActionForPlayback" none="YES"/>
                        <wkPreferences key="preferences"/>
                    </wkWebViewConfiguration>
                </wkWebView>
                <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="3t7-Gb-lpW">
                    <rect key="frame" x="15" y="67" width="365" height="20.333333333333329"/>
                    <fontDescription key="fontDescription" type="system" pointSize="17"/>
                    <nil key="textColor"/>
                    <nil key="highlightedColor"/>
                </label>
            </subviews>
            <viewLayoutGuide key="safeArea" id="fnl-2z-Ty3"/>
            <color key="backgroundColor" systemColor="systemBackgroundColor"/>
            <constraints>
                <constraint firstItem="d3j-kz-WXp" firstAttribute="top" secondItem="fnl-2z-Ty3" secondAttribute="top" constant="10" id="9Zc-hc-sWZ"/>
                <constraint firstItem="3t7-Gb-lpW" firstAttribute="top" secondItem="fnl-2z-Ty3" secondAttribute="top" constant="8" id="FZu-Cc-tSz"/>
                <constraint firstItem="fnl-2z-Ty3" firstAttribute="bottom" secondItem="YEr-fo-buB" secondAttribute="bottom" constant="5" id="LiR-gK-AIq"/>
                <constraint firstItem="YEr-fo-buB" firstAttribute="top" secondItem="d3j-kz-WXp" secondAttribute="bottom" constant="10" id="OGD-qQ-2HX"/>
                <constraint firstItem="fnl-2z-Ty3" firstAttribute="trailing" secondItem="d3j-kz-WXp" secondAttribute="trailing" id="ddL-19-v1S"/>
                <constraint firstItem="fnl-2z-Ty3" firstAttribute="trailing" secondItem="YEr-fo-buB" secondAttribute="trailing" constant="40" id="lW9-H0-t1K"/>
                <constraint firstItem="YEr-fo-buB" firstAttribute="leading" secondItem="fnl-2z-Ty3" secondAttribute="leading" constant="40" id="lid-pq-M31"/>
                <constraint firstItem="d3j-kz-WXp" firstAttribute="leading" secondItem="fnl-2z-Ty3" secondAttribute="leading" id="ueU-mZ-xe5"/>
                <constraint firstItem="3t7-Gb-lpW" firstAttribute="leading" secondItem="fnl-2z-Ty3" secondAttribute="leading" constant="15" id="qIi-kx-qp4"/>
                <constraint firstItem="fnl-2z-Ty3" firstAttribute="trailing" secondItem="3t7-Gb-lpW" secondAttribute="trailing" constant="13" id="wfo-vL-YLQ"/>
            </constraints>
            <point key="canvasLocation" x="59" y="21"/>
        </view>
XQMuse/Root/Me/VC/SpendingDetailContentVC.swift
@@ -21,7 +21,7 @@
class SpendingDetailContentVC: BaseVC {
                private var tableView:UITableView!
                private(set) var tableView:UITableView!
                private var viewModel = SpendingDetailViewModel()
                init(state:Int) {
XQMuse/Root/Me/VC/SpendingDetailVC.swift
@@ -10,7 +10,7 @@
import JQTools
import SPPageMenu
class SpendingDetailVC: BaseVC {
class SpendingDetailVC: BaseVC{
                lazy var adapterVC:FFAdapterViewController = {
                                let adapterVC = FFAdapterViewController()
@@ -55,7 +55,7 @@
        super.viewDidLoad()
                                title = "余额明细"
                                headerVC.label_balance.text = "\(balance)"
                                headerVC.income = income
                                headerVC.income = balance
    }
                override func setUI() {
@@ -75,6 +75,7 @@
                                menuVC.pageMenu.bridgeScrollView = pageVC.scrollview
                                adapterVC.scrollview.delegate = self
        adapterVC.scrollview.isScrollEnabled = false
                }
}
XQMuse/Root/Me/VC/StudyListVC.swift
@@ -66,8 +66,20 @@
                                }
                                if let id = modelId{
                                                let vc = CourseDetialVC(courseId: id)
                                                push(vc: vc)
            Services.getCourseDetail(courseId: id).subscribe(onNext: {[weak self]data in
                if let m = data.data{
                    if m.isVip == .no && m.chargeType == .vipFree{
                        let vc = VIPCenterVC()
                        self?.push(vc: vc)
                    }else if m.courseType == .online{
                        let vc = CourseDetialVC(courseModel: m)
                        self?.push(vc: vc)
                    }else{
                        let vc = CourseDetialOfflineVC(courseId: m.id)
                        self?.push(vc: vc)
                    }
                }
            }).disposed(by: disposeBag)
                                }
                }
XQMuse/Root/Me/VC/UserProfileVC.swift
@@ -175,8 +175,6 @@
            let date = tf_birthday.text?.date(withFormat: "yyyy-MM-dd") //默认回填
            BitrhdayPickerView.show(title: "", type: .YMD,defaultYear: date?.year ?? Date().jq_nowYear(),defaultMonth: date?.month ?? Date().jq_nowMonth(),defaultDay: date?.day ?? Date().jq_nowDay()) {[weak self] date in
                self?.tf_birthday.text = date.jq_format("yyyy-MM-dd")
            }
@@ -192,6 +190,7 @@
        if let photo = photos.first{
            self.userClipAvar = photo.jq_scaled(to: CGSize(width: 250, height: 250))
            self.image_user.image = photo
//            self.image_placeholder.isHidden = true
        }
    }
@@ -216,6 +215,7 @@
        unowned let weakSelf = self
        corpperVC.imageCropperHandler { (vc, image) in
            weakSelf.userClipAvar = image
            weakSelf.image_user.image = image
//            weakSelf.image_placeholder.isHidden = true
        } cancelClouse: {
            corpperVC.dismiss(animated: true) {
XQMuse/Root/Me/VC/VIPCenterVC.swift
@@ -50,7 +50,7 @@
        if UserViewModel.getAvatarInfo().checkVip(){
            self.bg_vip.image = UIImage(named: "bg_vip")
            self.label_vipHint.text = "您将享受所有会员专享音频,尽情畅游心泉·疗愈世界"
            self.label_vipHint.text = "您将享受所有会员专享音频,尽情畅游泉疗愈世界"
            self.label_expirtTime.text = UserViewModel.getAvatarInfo().vipExpireTime.components(separatedBy: " ").first! + "到期"
        }else{
            self.bg_vip.image = UIImage(named: "bg_vip_u")
XQMuse/Root/Me/VC/VIPCenterVC.xib
@@ -47,8 +47,8 @@
                                            <color key="textColor" red="0.039215686270000001" green="0.25882352939999997" blue="0.074509803920000006" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                                            <nil key="highlightedColor"/>
                                        </label>
                                        <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="心泉·疗愈会员" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="YxW-A0-Oga">
                                            <rect key="frame" x="19.666666666666657" y="23.333333333333329" width="142" height="21"/>
                                        <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="泉疗愈会员" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="YxW-A0-Oga">
                                            <rect key="frame" x="19.666666666666657" y="23.333333333333329" width="105" height="21"/>
                                            <constraints>
                                                <constraint firstAttribute="height" constant="21" id="jjF-Bb-zsz"/>
                                            </constraints>
XQMuse/Root/Me/VC/WalletRechargeVC.swift
@@ -30,8 +30,8 @@
        view.backgroundColor = .white
        for v in 0...5{
            productList.insert("com.XQMuse.p.\(v)")
        for v in 0...3{
            productList.insert("com.XQmuse.coin.\(v + 1)")
        }
        collectionView.delegate = self
XQMuse/Root/Me/VC/WatchHistoryDetailVC.swift
@@ -99,12 +99,30 @@
                                if viewModel.state.value == 1{
            let vc = HomeItemDetailVC(id: m.businessId)
            JQ_currentViewController().jq_push(vc: vc)
            Services.getMeditationDetail(id: m.businessId).subscribe(onNext: {data in
                if let m = data.data{
                    let vc = HomeItemDetailVC(model: m)
                    JQ_currentViewController().jq_push(vc: vc)
                }
            }).disposed(by: disposeBag)
                                }else{
            if m.courseType == .online{
                let vc = CourseDetialVC(courseId: m.businessId)
                JQ_currentViewController().jq_push(vc: vc)
//                let vc = CourseDetialVC(courseId: m.businessId)
//                JQ_currentViewController().jq_push(vc: vc)
                Services.getCourseDetail(courseId: m.businessId).subscribe(onNext: {data in
                    if let m = data.data{
                        if m.isVip == .no && m.chargeType == .vipFree{
                            let vc = VIPCenterVC()
                            JQ_currentNavigationController().pushViewController(vc)
                        }else if m.courseType == .online{
                            let vc = CourseDetialVC(courseModel: m)
                            JQ_currentViewController().jq_push(vc: vc)
                        }else{
                            let vc = CourseDetialOfflineVC(courseId: m.id)
                            JQ_currentViewController().jq_push(vc: vc)
                        }
                    }
                }).disposed(by: disposeBag)
            }else{
                let vc = CourseDetialOfflineVC(courseId: m.businessId)
                push(vc: vc)
XQMuse/Root/Network/Models.swift
@@ -16,7 +16,7 @@
                var bgm:BGMModel?
                var playModel:PlayMode = .line
                var userFirstOpenTreeTask = false //第一次打开树苗
                var userFirstOpenTreeTask = true //第一次打开树苗
    var userFirstLaunch = true //第一次启动
}
@@ -122,6 +122,8 @@
    var meditationMusicList = [String]()
    var meditationSecondList = [Int]() //时长
    var paymentStatus:ConditionType = .no //支付状态 1待支付 2已支付
    var isVip:ConditionType = .no
    var time:Int = 0
    required init(){}
}
@@ -198,6 +200,7 @@
                var wxQrCode:String = ""
    var isCollect:ConditionType = .no // 是否收藏:1:是 2:否
    var paymentStatus:ConditionType = .no //支付状态 1待支付 2已支付
    var coverDescription:String = ""
                var list2 = [CourseModel]()
                var list = [CourseItemModel]()
XQMuse/Root/Network/Services.swift
@@ -13,10 +13,10 @@
import CoreLocation
#if DEBUG
let All_Url = "http://192.168.110.64:9000"
let All_Url = "https://xq.xqzhihui.com/api"
//let All_Url = "https://mock.apipost.net/mock/31b303c60464000"
#else
let All_Url = "http://192.168.110.64:9000"
let All_Url = "https://xq.xqzhihui.com/api"
#endif
let ShareUrl = "http://113.45.158.158/share/#/pages"
@@ -37,7 +37,7 @@
                                                case .pwd:
                                                                params.interface(url: "/auth/app/login")
                                                                                .append(key: "cellPhone", value: phone)
                                                                                .append(key: "password", value: content.jq_md5String().uppercased())
                                                                                .append(key: "password", value: content.jq_md5String())
                                                                                .append(key: "apipost_id", value: "246d780670e267")
                                                case .code:
                                                                params.interface(url: "/auth/app/captchaLogin")
@@ -99,7 +99,7 @@
                                                .append(key: "cellPhone", value: cellPhone)
                                                .append(key: "captcha", value: captcha)
                                                .append(key: "inviteUserId", value: inviteUserId)
            .append(key: "password", value: password.jq_md5String().lowercased())
            .append(key: "password", value: password.jq_md5String())
                                                .append(key: "apipost_id", value: "246d7806b0e268")
        return NetworkRequest.request(params: params, method: .post,encoding: JSONEncoding(), progress: true)
                }
@@ -118,7 +118,7 @@
                                let params = ParamsAppender.build(url: All_Url)
                                params.interface(url: "/auth/app/changePassword")
                                                .append(key: "cellPhone", value: cellPhone)
                                                .append(key: "password", value: password.jq_md5String().uppercased())
                                                .append(key: "password", value: password.jq_md5String())
                                                .append(key: "secret", value: secretCode)
                                                .append(key: "apipost_id", value: "246d780670e266")
        return NetworkRequest.request(params: params, method: .post,encoding: JSONEncoding(), progress: true)
@@ -280,7 +280,7 @@
        let params = ParamsAppender.build(url: All_Url)
        params.interface(url: "/user/user/app-user-viewing-history/saveCourseStudyHistory")
            .append(key: "chapterId", value: chapterId)
            .append(key: "isOver", value: isOver)
            .append(key: "isOver", value: isOver ? 1:2) //是否观看完成 1是2否
            .append(key: "secondLook", value: secondLook)
            .append(key: "minuteLook", value: 0)
        return NetworkRequest.request(params: params, method: .post, progress: false)
XQMuse/Root/Other/View/CountdownChooseListView.swift
@@ -29,7 +29,7 @@
                override func awakeFromNib() {
                                super.awakeFromNib()
                                tf_input.text = numberMinutes.string
                                tf_input.text = "1"
                                tf_input.tintColor = UIColor(hexString: "#8AAE65")
                                alpha = 0
XQMuse/Root/PayMusicView/PayMusicVC.swift
@@ -64,6 +64,15 @@
                                let tap = UITapGestureRecognizer(target: self, action: #selector(showDetailAction))
                                coverImage.isUserInteractionEnabled = true
                                coverImage.addGestureRecognizer(tap)
        NotificationCenter.default.rx.notification(UIApplication.didBecomeActiveNotification).subscribe(onNext: {noti in
            if self.audioPlayer.bgmPlayer?.timeControlStatus == .playing{
                PayMusicVC.updateStatus(.playing)
            }else{
                PayMusicVC.updateStatus(.pause)
            }
        }).disposed(by: disposeBag)
    }
                override func setUI() {
@@ -115,11 +124,11 @@
                                }
                }
                static func show(model:MeditationModel){
    static func show(model:MeditationModel,isHidden:Bool = true){
                                if let tabBarVC = JQ_currentViewController().navigationController?.tabBarController as? BaseTabBarVC{
                                                if !tabBarVC.children.contains(where: {$0 is PayMusicVC}){
                                                                let vc = PayMusicVC()
                                                                vc.view.isHidden = true
                                                                vc.view.isHidden = isHidden
                                                                vc.meditationModel = model
                                                                let tabBarHeight = JQ_currentViewController().navigationController?.tabBarController?.tabBar.height ?? 0
                                                                JQ_currentViewController().navigationController?.tabBarController?.addChild(vc)
@@ -130,17 +139,21 @@
                                                                                make.height.equalTo(46.5)
                                                                                make.bottom.equalToSuperview().offset(-(tabBarHeight))
                                                                }
                vc.view.layoutIfNeeded()
                                                                vc.startRunloopAni()
            }else{
                PayMusicVC.updateStatus(.playing)
                PayMusicVC.updateStatus(.playing, musicName: model.meditationTitle)
            }
                                }
                }
    static func updateStatus(_ state:PayMuiscState){
    static func updateStatus(_ state:PayMuiscState,musicName:String? = nil){
        if let tabBarVC = JQ_currentViewController().navigationController?.tabBarController as? BaseTabBarVC{
            if let vc = tabBarVC.children.filter({$0 is PayMusicVC}).first as? PayMusicVC{
                vc.btn_handle.isSelected = state == .pause
                if let musicName{
                    vc.label_name.text = musicName
                }
                switch state {
                    case .playing:
                        MPNowPlayingInfoCenter.default().playbackState = .playing
@@ -164,11 +177,34 @@
                @objc func showDetailAction(){
                                if let id = meditationModel?.id{
                                                let vc = HomeItemDetailVC(id: id)
                                                vc.hidesBottomBarWhenPushed = true
                                                JQ_currentNavigationController().pushViewController(vc)
                                }
            Services.getMeditationDetail(id: id).subscribe(onNext: {[weak self]data in
                guard let weakSelf = self else { return }
                if let m = data.data{
                    let isVip = m.isVip == .yes
                    if m.chargeType == .free || (isVip && m.chargeType == .vipFree) || (m.chargeType == .payment && m.isBuy == .yes){
                        let vc = HomeItemDetailVC(model: m)
                        vc.hidesBottomBarWhenPushed = true
                        JQ_currentNavigationController().jq_push(vc: vc)
                        return
                    }
                    if m.chargeType == .payment && m.isBuy == .no{
                        guard sceneDelegate!.checkisLoginState() else{return}
                        let vc = PaymentOrderVC(museItemModel: m,type: .muse,showType:.vertical)
                        vc.hidesBottomBarWhenPushed = true
                        JQ_currentNavigationController().jq_push(vc: vc)
                        return
                    }
                    if m.chargeType == .vipFree{
                        let vc = VIPCenterVC()
                        vc.hidesBottomBarWhenPushed = true
                        JQ_currentNavigationController().jq_push(vc: vc)
                        return
                    }
                }
            }).disposed(by: disposeBag)
                                }
                }
                private func startRunloopAni(){
@@ -196,6 +232,11 @@
                                                self.stopRunloopAni()
            PayMusicVC.updateStatus(.pause)
                                }else{
            if self.audioPlayer.scenePlayer?.timeControlStatus == .playing{
                self.audioPlayer.scenePlayer?.pause()
            }
                                                self.audioPlayer.bgmPlayer?.play()
                                                self.audioPlayer.masterPlayer?.play()
            self.audioPlayer.masterPlayer?.volume = Float(UserDefaultSettingViewModel.getSetting()?.masterVolume ?? 0.5)
@@ -205,11 +246,22 @@
                }
                @objc func closeAction(_ btn:UIButton){
                                CommonAlertView.show(title: "提示", content: "是否关闭当前播放音频?") { state in
                                CommonAlertView.show(title: "提示", content: "是否关闭当前播放音频?") {[weak self] state in
            guard let weakSelf = self else { return }
                                                if state{
                                                                self.audioPlayer.clean()
                                                                self.view.removeFromSuperview()
                                                                self.removeFromParent()
                self?.audioPlayer.cleanMuse()
                                                                self?.view.removeFromSuperview()
                                                                self?.removeFromParent()
                if let id = self?.audioPlayer.meditationModel?.id{
                    Services.watchMuse(id: id, timeLook: self?.audioPlayer.lisenMuseTime ?? 0).subscribe(onNext: { _ in
                        NotificationCenter.default.post(name: TreeTaskUpdate_Noti, object: nil)
                    }).disposed(by: weakSelf.disposeBag)
                }
                if UserDefaultSettingViewModel.getSetting()?.bgm != nil{
                    AudioPlayer.getSharedInstance().playSceneAt(UserDefaultSettingViewModel.getSetting()!.bgm!.audioFile)
                }
                                                }
                                }
                }
@@ -226,7 +278,9 @@
                private var timer:Timer?
                private(set) var times = BehaviorRelay<Int?>(value: nil) //倒计时定时器
                private static var _sharedInstance: AudioPlayer?
                private(set) var meditationModel:MeditationModel?
                private(set) var meditationModel:MeditationModel? //疗愈音频
    var lisenMuseTime:Int = 0 //听疗愈时间记录
                weak var delegate:PayMusicDelegate?
    private var disposeBag = DisposeBag()
@@ -245,7 +299,6 @@
                }
                private init() {
        NotificationCenter.default.addObserver(forName: ChangeMasterVoice_Noti, object: nil, queue: .main) { noti in
            if let value = noti.object as? Float{
                print("--->进入")
@@ -253,19 +306,20 @@
            }
        }
        NotificationCenter.default.rx.notification(.AVPlayerItemDidPlayToEndTime).subscribe(onNext: {[weak self]data in
            guard let weakSelf = self else { return }
            let notifiUrl = ((data.object as? AVPlayerItem)?.asset as? AVURLAsset)
            let sceneItem = (self?.scenePlayer?.currentItem?.asset as? AVURLAsset)
            let bgmItem = (self?.bgmPlayer?.currentItem?.asset as? AVURLAsset)
            let masterItem = (self?.masterPlayer?.currentItem?.asset as? AVURLAsset)
            if masterItem?.url == notifiUrl?.url{
                weakSelf.masterPlayer = nil
            }
            if bgmItem?.url == notifiUrl?.url{
//                self?.bgmPlayer?.seek(to: CMTime.zero)
//                self?.bgmPlayer?.play()
                if weakSelf.playIndex < weakSelf.urls.count - 1{
                    weakSelf.next()
                    weakSelf.delegate?.playState(.next)
@@ -274,12 +328,15 @@
                    weakSelf.playIndex = 0
                    weakSelf.bgmPlayer?.replaceCurrentItem(with: AVPlayerItem(url: weakSelf.urls[0]))
                    weakSelf.bgmPlayer?.play()
                    //                                                                                weakSelf.delegate?.playState(.end)
                    //                    PayMusicVC.hidden()
                    //                    MPNowPlayingInfoCenter.default().nowPlayingInfo = nil
                }
                if let id = weakSelf.meditationModel?.id{
                    Services.watchMuse(id: id, timeLook: weakSelf.lisenMuseTime).subscribe(onNext: { _ in
                        weakSelf.lisenMuseTime = 0
                        NotificationCenter.default.post(name: TreeTaskUpdate_Noti, object: nil)
                        NotificationCenter.default.post(name: CleanDetailTime_Noti, object: nil)
                    }).disposed(by: weakSelf.disposeBag)
                }
            }
            if sceneItem?.url == notifiUrl?.url{
@@ -288,12 +345,6 @@
            }
        }).disposed(by: disposeBag)
//        //播放完成
//        NotificationCenter.default.addObserver(self, selector: #selector(playBGMbackEnd), name:NSNotification.Name.AVPlayerItemDidPlayToEndTime, object: nil)
    } // 私有化init方法
                //销毁单例对象
@@ -305,9 +356,20 @@
                                self.bgmPlayer?.pause()
                                self.masterPlayer?.pause()
                                self.meditationModel = nil
        self.masterPlayer = nil
        self.bgmPlayer = nil
                                self.timer = nil
                                AudioPlayer.destroy()
                }
    func cleanMuse(){
        self.bgmPlayer?.pause()
        self.masterPlayer?.pause()
        self.meditationModel = nil
        self.masterPlayer = nil
        self.timer = nil
        self.lisenMuseTime = 0
    }
    func playBGMAt(firstPlayIndex:Int,model:MeditationModel,delegate:PayMusicDelegate?,coverImage:UIImage? = nil){
@@ -339,47 +401,29 @@
                                                                }
                                                }
                                                self.bgmPlayer = AVPlayer(url: self.urls[firstPlayIndex])
                                                self.bgmPlayer?.play()
                                                if masterUrl != nil{
                                                                self.masterPlayer = AVPlayer(url: masterUrl!)
                self.masterPlayer?.volume = Float(UserDefaultSettingViewModel.getSetting()?.masterVolume ?? 0.5)
                                                                self.masterPlayer?.play()
                                                }
            }
                                }
                                self.bgmPlayer!.addPeriodicTimeObserver(forInterval: CMTimeMake(value: 1, timescale: 1), queue: DispatchQueue.main) { [weak self](time) in
                                self.bgmPlayer?.addPeriodicTimeObserver(forInterval: CMTimeMake(value: 1, timescale: 1), queue: DispatchQueue.main) { [weak self](time) in
                                                guard let weakSelf = self else { return }
                                                weakSelf.delegate?.playState(.playing)
            guard weakSelf.bgmPlayer != nil else {return}
            weakSelf.lisenMuseTime += 1
                                                //当前正在播放的时间
                                                let loadTime = CMTimeGetSeconds(time)
                                                //视频总时间
                                                let totalTime = CMTimeGetSeconds((weakSelf.bgmPlayer?.currentItem?.duration)!)
//                                                if loadTime >= totalTime{
//                                                                if weakSelf.playIndex < urls.count - 1{
//                                                                                weakSelf.next()
//                                                                                weakSelf.delegate?.playState(.next)
//                                                                }else{
//                    weakSelf.bgmPlayer?.pause()
//                    weakSelf.playIndex = 0
//                    weakSelf.bgmPlayer?.replaceCurrentItem(with: AVPlayerItem(url: urls[0]))
//                    weakSelf.bgmPlayer?.play()
//                                                                                weakSelf.delegate?.playState(.end)
//                    PayMusicVC.hidden()
//                    MPNowPlayingInfoCenter.default().nowPlayingInfo = nil
//                                                                }
//                                                }
                                                weakSelf.delegate?.playListen?(currentInterval: loadTime, totalInterval: totalTime)
                                                if let m = weakSelf.meditationModel{
                                                                var dic = [String:Any]()
                                                                dic[MPMediaItemPropertyTitle] = m
                                                                dic[MPMediaItemPropertyArtist] = "心泉·疗愈"
                                                                dic[MPMediaItemPropertyArtist] = "泉疗愈"
                                                                dic[MPMediaItemPropertyDiscNumber] = 1
                                                                dic[MPNowPlayingInfoPropertyElapsedPlaybackTime] = loadTime
                                                                dic[MPNowPlayingInfoPropertyPlaybackRate] = 1
@@ -398,6 +442,23 @@
                                                }
                                }
        self.bgmPlayer?.currentItem?.rx.observe(AVPlayerItem.Status.self,"status").subscribe(onNext: { _ in
            if self.bgmPlayer?.status == .readyToPlay && self.masterPlayer?.status == .readyToPlay{
                self.bgmPlayer?.play()
                self.masterPlayer?.play()
            }
        }).disposed(by: disposeBag)
        self.masterPlayer?.currentItem?.rx.observe(AVPlayerItem.Status.self,"status").subscribe(onNext: { _ in
            print("---MasterStatus: \(self.masterPlayer?.status.rawValue ?? 0)")
            if self.bgmPlayer?.status == .readyToPlay && self.masterPlayer?.status == .readyToPlay{
                self.bgmPlayer?.play()
                self.masterPlayer?.play()
            }
        }).disposed(by: disposeBag)
                                setLockScreen()
                                do {
@@ -409,6 +470,7 @@
                                                print(error)
                                }
                }
    func setBGMRate(value:CGFloat){
        if let v = bgmPlayer?.currentItem?.duration.timescale,v > 0{
@@ -442,7 +504,9 @@
                }
                func playScene(){
                                scenePlayer?.play()
        if UserDefaultSettingViewModel.getSetting()?.bgm != nil{
            playSceneAt(UserDefaultSettingViewModel.getSetting()?.bgm?.audioFile ?? "")
        }
                }
                func next(){
@@ -454,11 +518,6 @@
                                bgmPlayer?.replaceCurrentItem(with: AVPlayerItem(url: urls[index]))
                                bgmPlayer?.play()
                }
//                @objc private func playBGMbackEnd(){
//                                self.scenePlayer?.seek(to: CMTimeMake(value: 0, timescale: 1))
//                                self.scenePlayer?.play()
//                }
                func previous(){
                                playIndex -= 1
@@ -487,15 +546,17 @@
                                }
                                // 播放
                                center.playCommand.addTarget {[unowned self] event in
                                                self.bgmPlayer?.play()
                                center.playCommand.addTarget {[weak self] event in
                                                self?.bgmPlayer?.play()
            self?.masterPlayer?.play()
            PayMusicVC.updateStatus(.playing)
                                                return .success
                                }
                                // 暂停
                                center.pauseCommand.addTarget {[unowned self] event in
                                                self.bgmPlayer?.pause()
                                center.pauseCommand.addTarget {[weak self] event in
                                                self?.bgmPlayer?.pause()
            self?.masterPlayer?.pause()
            PayMusicVC.updateStatus(.pause)
                                                return .success
                                }
XQMuse/Root/Plans/PlanGuideVC.swift
@@ -20,6 +20,8 @@
                @IBOutlet weak var label_info: UILabel!
                @IBOutlet weak var btn_custom: UIButton!
    private var isFromFist = false
                private lazy var player:AVPlayer = {
                                let bgPath = Bundle.main.url(forResource: "bg_movie", withExtension: "mov")
                                let p = AVPlayer(url: bgPath!)
@@ -38,6 +40,21 @@
                                return pLayer
                }()
    override func viewDidAppear(_ animated: Bool) {
        super.viewDidAppear(animated)
        self.navigationController?.interactivePopGestureRecognizer?.isEnabled = false
    }
    init(isFromFist:Bool){
        super.init(nibName: nil, bundle: nil)
        self.isFromFist = isFromFist
    }
    required init?(coder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
                override func viewDidLoad() {
                                super.viewDidLoad()
@@ -45,22 +62,15 @@
            if let url = data.data{
                self?.bgplayer.replaceCurrentItem(with: AVPlayerItem(url: URL(string: url.jq_urlEncoded())!))
                self?.bgplayer.play()
                PayMusicVC.updateStatus(.pause)
                AudioPlayer.getSharedInstance().bgmPlayer?.pause()
                AudioPlayer.getSharedInstance().masterPlayer?.pause()
                AudioPlayer.getSharedInstance().scenePlayer?.pause()
            }
        }).disposed(by: disposeBag)
//        self.bgplayer.addPeriodicTimeObserver(forInterval: CMTimeMake(value: 1, timescale: 1), queue: DispatchQueue.main) {[weak self] time in
//            guard let weakSelf = self else { return }
//            //当前正在播放的时间
//            let loadTime = CMTimeGetSeconds(time)
//            //视频总时间
//            let totalTime = CMTimeGetSeconds((weakSelf.bgplayer.currentItem?.duration)!)
//
//            if loadTime >= totalTime{
//                weakSelf.bgplayer.seek(to: CMTime.zero)
//                weakSelf.bgplayer.play()
//            }
//        }
                }
                override func viewWillAppear(_ animated: Bool) {
@@ -73,6 +83,14 @@
                override func viewDidDisappear(_ animated: Bool) {
                                super.viewDidDisappear(animated)
                                player.pause()
        if AudioPlayer.getSharedInstance().meditationModel != nil{
            AudioPlayer.getSharedInstance().bgmPlayer?.play()
            AudioPlayer.getSharedInstance().masterPlayer?.play()
            PayMusicVC.updateStatus(.playing)
        }else if UserDefaultSettingViewModel.getSetting()?.bgm != nil{
            AudioPlayer.getSharedInstance().playSceneAt(UserDefaultSettingViewModel.getSetting()!.bgm!.audioFile)
        }
                }
                override func setUI() {
@@ -80,7 +98,7 @@
                                label_title.font = Def_FlyFlowerSong(fontSize: 35)
                                label_title.textColor = .white
                                label_subTitle.attributedText =     AttributedStringbuilder.build().add(string: "亲爱的家人,温暖喜悦问候您\n我是心泉老师\n欢迎来到心泉·疗愈空间\n愿这一方空间为您带来\n平和 喜悦 放松 宁静", withFont: Def_SourceHanSerif_Regular(fontSize: 17), withColor: .white,lineSpace: 10).mutableAttributedString
                                label_subTitle.attributedText =     AttributedStringbuilder.build().add(string: "亲爱的家人,温暖喜悦问候您\n我是心泉老师\n欢迎来到泉疗愈空间\n愿这一方空间为您带来\n平和 喜悦 放松 宁静", withFont: Def_SourceHanSerif_Regular(fontSize: 17), withColor: .white,lineSpace: 10).mutableAttributedString
                                label_subTitle.textAlignment = .center
@@ -152,7 +170,7 @@
                                                                                self?.jq_push(vc: vc)
                                                                case .toSeting:
//                                                                                self?.dismiss(animated: true) {
                                                                                                let vc = BackgroundVoiceVC()
                    let vc = BackgroundVoiceVC(isFromFist: self?.isFromFist ?? false)
                                                                                                vc.hidesBottomBarWhenPushed = true
                                                                                                JQ_currentNavigationController().pushViewController(vc)
//                                                                                }
XQMuse/Root/Plans/PlanGuideVC.xib
@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="32700.99.1234" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="23094" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
    <device id="retina6_12" orientation="portrait" appearance="light"/>
    <dependencies>
        <deployment identifier="iOS"/>
        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="22685"/>
        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="23084"/>
        <capability name="System colors in document resources" minToolsVersion="11.0"/>
        <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
    </dependencies>
@@ -24,17 +24,17 @@
            <rect key="frame" x="0.0" y="0.0" width="393" height="852"/>
            <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
            <subviews>
                <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="心泉·疗愈空间" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="m80-i7-iKY">
                    <rect key="frame" x="60.666666666666657" y="67.666666666666671" width="272" height="48"/>
                <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="泉疗愈空间" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="m80-i7-iKY">
                    <rect key="frame" x="102.00000000000001" y="67.666666666666671" width="189.33333333333337" height="48"/>
                    <fontDescription key="fontDescription" type="system" pointSize="40"/>
                    <nil key="textColor"/>
                    <nil key="highlightedColor"/>
                </label>
                <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="niC-9x-eYG">
                    <rect key="frame" x="84.000000000000014" y="132" width="225.33333333333337" height="101.66666666666669"/>
                    <rect key="frame" x="87.000000000000014" y="132" width="219.33333333333337" height="101.66666666666669"/>
                    <string key="text">亲爱的家人,温暖喜悦问候您
我是心泉老师
欢迎来到心泉·疗愈空间
欢迎来到泉疗愈空间
愿这一方空间为您带来
平和 喜悦 放松 宁静</string>
                    <fontDescription key="fontDescription" type="system" pointSize="17"/>
@@ -48,7 +48,7 @@
                    </constraints>
                </view>
                <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="TWo-o0-Cau">
                    <rect key="frame" x="178" y="755" width="37" height="34"/>
                    <rect key="frame" x="178.66666666666666" y="755" width="36" height="34"/>
                    <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
                    <state key="normal" title="跳过"/>
                    <connections>
@@ -74,7 +74,7 @@
                    </connections>
                </button>
                <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="愿它成为您心灵栖息的幸福家园" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="4bb-F9-Dx2">
                    <rect key="frame" x="75.333333333333329" y="647.66666666666663" width="242.66666666666669" height="20.333333333333371"/>
                    <rect key="frame" x="78.666666666666686" y="647.66666666666663" width="236" height="20.333333333333371"/>
                    <fontDescription key="fontDescription" type="system" pointSize="17"/>
                    <nil key="textColor"/>
                    <nil key="highlightedColor"/>
XQMuse/Root/TreeGroup/TreeTeskVC.swift
@@ -174,7 +174,7 @@
                }
                private func updateTreeInfo(){
        btn_seedingAgain.isHidden = (treeInfoModel!.treeLevelType != .level_10 && treeInfoModel!.status == .no)
        btn_seedingAgain.isHidden = treeInfoModel!.treeLevelType != .level_10
//                                if treeLevel.rawValue != treeInfoModel?.treeLevelType.rawValue{
//                                                treeLevel = treeInfoModel!.treeLevelType
XQMuse/Root/TreeGroup/VC/TreeTeskEnergyExchangeVC.swift
@@ -104,7 +104,8 @@
                                                return
                                }
                                let attribute = AttributedStringbuilder.build().add(string: "是否确认使用  \(m.energyValue)  能量值兑换当前礼品?\n兑换后系统将自动扣除能量值", withFont: .systemFont(ofSize: 14, weight: .medium), withColor: .black.withAlphaComponent(0.59), indent: 0, lineSpace: 6).mutableAttributedString
        //17064
                                let attribute = AttributedStringbuilder.build().add(string: "是否确认使用\(m.energyValue)能量值兑换当前礼品?\n兑换后系统将自动扣除能量值", withFont: .systemFont(ofSize: 14, weight: .medium), withColor: .black.withAlphaComponent(0.59), indent: 0, lineSpace: 6).mutableAttributedString
                                CommonAlertView.show(title: "提示", attribute: attribute, isSingle: false, cancelStr: "再想想", completeStr: "确认") { state in
                                                if state{
XQMuse/Root/TreeGroup/View/TreeTeskFirstRuleView.swift
@@ -58,6 +58,6 @@
                
                override func layoutSubviews() {
                                super.layoutSubviews()
        btn_complete.localGradientColor(cornerRadius: 20,bounds: btn_complete.frame)
        btn_complete.localGradientColor(cornerRadius: 20,bounds: CGRect(x: 0, y: 0, width: JQ_ScreenW - 85 * 2, height: 40))
                }
}
XQMuse/Root/TreeGroup/View/TreeTeskFirstRuleView.xib
@@ -31,7 +31,7 @@
                        </label>
                        <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="2QG-Gl-6ul">
                            <rect key="frame" x="40" y="222.33333333333337" width="223" height="40"/>
                            <color key="backgroundColor" red="0.57254901960000004" green="0.6588235294" blue="0.4941176471" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                            <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
                            <constraints>
                                <constraint firstAttribute="height" constant="40" id="X5k-u6-c00"/>
                            </constraints>