From f88e04bd8b9ada306c7160367b57076db0be5e5c Mon Sep 17 00:00:00 2001
From: 杨锴 <841720330@qq.com>
Date: 星期五, 10 一月 2025 11:37:38 +0800
Subject: [PATCH] fix bug

---
 XQMuse/Root/Home/CCell/Home_Style_4_Inner_1_CCell.swift |    7 ++
 XQMuse/Root/Home/TCell/Home_Style_2_TCell.swift         |    7 +
 XQMuse/Root/Me/VC/WalletVC.xib                          |    4 
 XQMuse/Root/Home/VC/HomeItemDetailVC.swift              |    8 +-
 XQMuse/Root/Other/View/ShareView.xib                    |   12 ++--
 XQMuse/Root/PayMusicView/PayMusicVC.swift               |    8 +-
 XQMuse/Root/Plans/PlanGuideVC.swift                     |    4 
 XQMuse/Root/Home/HomeVC.swift                           |   41 +++++++++----
 XQMuse/Root/Me/VC/SettingVC.swift                       |    2 
 XQMuse/Root/Home/View/HomeTopMenuView.swift             |    2 
 XQMuse.xcodeproj/project.pbxproj                        |    8 +-
 XQMuse/Root/Home/VC/BackgroundVoiceVC.swift             |   13 ++-
 XQMuse/Root/TreeGroup/View/TreeTeskFirstRuleView.xib    |    4 
 XQMuse/Root/Me/VC/InviteVC.xib                          |    4 
 XQMuse/Root/Network/Models.swift                        |    2 
 XQMuse/Root/Home/VC/HomeItemDetailVC.xib                |    2 
 XQMuse/Root/Me/VC/SettingVC.xib                         |    4 
 XQMuse/Root/Plans/PlanGuide_3_VC.swift                  |    7 +
 XQMuse/Root/Network/Services.swift                      |   16 +++++
 19 files changed, 99 insertions(+), 56 deletions(-)

diff --git a/XQMuse.xcodeproj/project.pbxproj b/XQMuse.xcodeproj/project.pbxproj
index 90c1c91..3384ece 100644
--- a/XQMuse.xcodeproj/project.pbxproj
+++ b/XQMuse.xcodeproj/project.pbxproj
@@ -1973,7 +1973,7 @@
 				CODE_SIGN_IDENTITY = "Apple Development";
 				"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
 				CODE_SIGN_STYLE = Manual;
-				CURRENT_PROJECT_VERSION = 1;
+				CURRENT_PROJECT_VERSION = 3;
 				DEVELOPMENT_TEAM = "";
 				"DEVELOPMENT_TEAM[sdk=iphoneos*]" = M9T3KVL537;
 				ENABLE_USER_SCRIPT_SANDBOXING = NO;
@@ -1999,7 +1999,7 @@
 					"$(inherited)",
 					"@executable_path/Frameworks",
 				);
-				MARKETING_VERSION = 1.0.0;
+				MARKETING_VERSION = 1.0.1;
 				OTHER_LDFLAGS = (
 					"$(inherited)",
 					"-ObjC",
@@ -2131,7 +2131,7 @@
 				CODE_SIGN_IDENTITY = "Apple Development";
 				"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution";
 				CODE_SIGN_STYLE = Manual;
-				CURRENT_PROJECT_VERSION = 1;
+				CURRENT_PROJECT_VERSION = 3;
 				DEVELOPMENT_TEAM = "";
 				"DEVELOPMENT_TEAM[sdk=iphoneos*]" = M9T3KVL537;
 				ENABLE_USER_SCRIPT_SANDBOXING = NO;
@@ -2157,7 +2157,7 @@
 					"$(inherited)",
 					"@executable_path/Frameworks",
 				);
-				MARKETING_VERSION = 1.0.0;
+				MARKETING_VERSION = 1.0.1;
 				OTHER_LDFLAGS = (
 					"$(inherited)",
 					"-ObjC",
diff --git a/XQMuse/Root/Home/CCell/Home_Style_4_Inner_1_CCell.swift b/XQMuse/Root/Home/CCell/Home_Style_4_Inner_1_CCell.swift
index 42bbf0e..b317669 100644
--- a/XQMuse/Root/Home/CCell/Home_Style_4_Inner_1_CCell.swift
+++ b/XQMuse/Root/Home/CCell/Home_Style_4_Inner_1_CCell.swift
@@ -20,9 +20,14 @@
 
 				override func awakeFromNib() {
 								super.awakeFromNib()
-        view_shadow.jq_gradientColor(colorArr: [UIColor.black.withAlphaComponent(0.3).cgColor,UIColor.clear.cgColor], cornerRadius: 0, startPoint: CGPoint(x: 1, y: 1), endPoint: CGPoint(x: 1, y: 0), bounds: nil, locations: nil)
+        
 				}
 
+    override func layoutSubviews() {
+        super.layoutSubviews()
+        view_shadow.jq_gradientColor(colorArr: [UIColor.black.withAlphaComponent(0.3).cgColor,UIColor.clear.cgColor], cornerRadius: 0, startPoint: CGPoint(x: 1, y: 1), endPoint: CGPoint(x: 1, y: 0), bounds: CGRect(x: 0, y: 0, width: JQ_ScreenW, height: 100), locations: nil)
+    }
+
 
 				func setMeditationModel(_ model:MeditationModel,showType:DisplayType){
         self.showType = showType
diff --git a/XQMuse/Root/Home/HomeVC.swift b/XQMuse/Root/Home/HomeVC.swift
index ebd9a8e..8c5093a 100644
--- a/XQMuse/Root/Home/HomeVC.swift
+++ b/XQMuse/Root/Home/HomeVC.swift
@@ -40,7 +40,6 @@
     private var viewModel = HomeViewModel()
     private var timer:Timer?
     private var needPopToTree:Bool = false //是否需跳转到树苗
-
     private var cellularData:CTCellularData!
 
     override func viewDidAppear(_ animated: Bool) {
@@ -76,8 +75,8 @@
         }
 
 
-        if AudioPlayer.getSharedInstance().scenePlayer?.timeControlStatus == .paused && UserDefaultSettingViewModel.getSetting()?.bgm != nil{
-            AudioPlayer.getSharedInstance().playSceneAt(UserDefaultSettingViewModel.getSetting()!.bgm!.audioFile)
+        if AudioPlayer.getSharedInstance().scenePlayer?.timeControlStatus == .paused && UserDefaultSettingViewModel.getSetting()?.sceneMusicModel != nil{
+            AudioPlayer.getSharedInstance().playSceneAt(UserDefaultSettingViewModel.getSetting()!.sceneMusicModel!.audioFile)
         }
 
         if let meVC = (navigationController?.tabBarController?.viewControllers?.last as? BaseNav)?.viewControllers.first as? MeVC{
@@ -97,21 +96,14 @@
         titleItems.append(TitleItem(title: "私人订制", subTitle: "Private Customization",hasMore: true))
         titleItems.append(TitleItem(title: "新手冥想指南", subTitle: "Meditation guide"))
 
-        if let setting = UserDefaultSettingViewModel.getSetting(){
-            if let audioFile = setting.bgm?.audioFile{
-                AudioPlayer.getSharedInstance().playSceneAt(audioFile)
-            }
-        }
+
 
         tableView.mj_header = MJRefreshNormalHeader(refreshingBlock: {
             self.getData()
         })
 
-        if let m = UserDefaultSettingViewModel.getSetting()?.bgm {
-            topMenuView.image_top.sd_setImage(with: URL(string: m.imageUrl.jq_urlEncoded()))
-        }
-
         getData()
+        getBGMData()
 
         cellularData = CTCellularData()
         cellularData.cellularDataRestrictionDidUpdateNotifier = {[weak self] state in
@@ -153,7 +145,7 @@
         titleView.frame = CGRect(x: 0, y: 0, width: 100, height: 40)
         let titleL = UILabel()
         titleL.font = Def_SourceHanSansCN_Regular(fontSize: 21)
-        titleL.text = "心 泉 疗 愈"
+        titleL.text = "泉 疗 愈"
         titleL.textAlignment = .center
         titleL.textColor = UIColor(hexStr: "#252A23")
         titleL.frame = CGRect(x: 0, y: 0, width: 100, height: 19)
@@ -162,6 +154,7 @@
         subTitleL.font = Def_Agenda_Light(fontSize: 8)
         subTitleL.text = "XIN QUAN"
         subTitleL.textAlignment = .center
+        subTitleL.isHidden = true
         subTitleL.textColor = UIColor(hexStr: "#252A23")
         subTitleL.frame = CGRect(x: 0, y: 20, width: 100, height: 19)
 
@@ -226,6 +219,7 @@
 
         NotificationCenter.default.rx.notification(SetBGMSuccess_Noti).take(until: self.rx.deallocated).subscribe(onNext: {data in
             self.topMenuView.resetTopImage()
+            self.getBGMData()
         }).disposed(by: disposeBag)
 
         NotificationCenter.default.rx.notification(PlantGuideQuit_Noti).take(until: self.rx.deallocated).subscribe(onNext: {[weak self]data in
@@ -346,6 +340,27 @@
         }).disposed(by: disposeBag)
     }
 
+    private func getBGMData(){
+        Services.quryUserSceneMusic().subscribe(onNext: {data in
+            if var userDefaultSettingModel = UserDefaultSettingViewModel.getSetting(){
+                userDefaultSettingModel.sceneMusicModel = data.data
+                UserDefaultSettingViewModel.saveSetting(userDefaultSettingModel)
+
+                if AudioPlayer.getSharedInstance().bgmPlayer != nil && PayMusicVC.getCurrentStatus() != .pause{
+                    AudioPlayer.getSharedInstance().bgmPlayer?.play()
+                    return
+                }
+
+                if AudioPlayer.getSharedInstance().scenePlayer == nil || AudioPlayer.getSharedInstance().scenePlayer?.timeControlStatus == .paused{
+                    AudioPlayer.getSharedInstance().playSceneAt(userDefaultSettingModel.sceneMusicModel!.audioFile)
+                }
+
+                if let imageUrl = userDefaultSettingModel.sceneMusicModel?.imageUrl{
+                    self.topMenuView.image_top.sd_setImage(with: URL(string: imageUrl.jq_urlEncoded()))
+                }
+            }
+        }).disposed(by: disposeBag)
+    }
 
     @objc func autoUpdate() {
         guard let endPlayTime = viewModel.todyModel?.endPlayTime, !endPlayTime.isEmpty else { return }
diff --git a/XQMuse/Root/Home/TCell/Home_Style_2_TCell.swift b/XQMuse/Root/Home/TCell/Home_Style_2_TCell.swift
index e55a25c..b0c966f 100644
--- a/XQMuse/Root/Home/TCell/Home_Style_2_TCell.swift
+++ b/XQMuse/Root/Home/TCell/Home_Style_2_TCell.swift
@@ -16,7 +16,10 @@
 				override func awakeFromNib() {
         super.awakeFromNib()
 								selectionStyle = .none
-								view_shadow.jq_gradientColor(colorArr: [UIColor.black.withAlphaComponent(0.2).cgColor,UIColor.clear.cgColor], cornerRadius: 0, startPoint: CGPoint(x: 1, y: 1), endPoint: CGPoint(x: 1, y: 0), bounds: nil, locations: nil)
-								selectionStyle = .none
+    }
+
+    override func layoutSubviews() {
+        super.layoutSubviews()
+        view_shadow.jq_gradientColor(colorArr: [UIColor.black.withAlphaComponent(0.2).cgColor,UIColor.clear.cgColor], cornerRadius: 0, startPoint: CGPoint(x: 1, y: 1), endPoint: CGPoint(x: 1, y: 0), bounds: nil, locations: nil)
     }
 }
diff --git a/XQMuse/Root/Home/VC/BackgroundVoiceVC.swift b/XQMuse/Root/Home/VC/BackgroundVoiceVC.swift
index f0b4216..0c714c7 100644
--- a/XQMuse/Root/Home/VC/BackgroundVoiceVC.swift
+++ b/XQMuse/Root/Home/VC/BackgroundVoiceVC.swift
@@ -79,7 +79,7 @@
 
 																DispatchQueue.main.asyncAfter(delay: 0.8) {
 																				for (index,v) in m.enumerated(){
-																								if v.id == self.settingModel?.bgm?.id{
+																								if v.id == self.settingModel?.sceneMusicModel?.id{
 																												self.playAtIndex = IndexPath(row: index, section: 0)
 																												self.collectionView.scrollToItem(at: IndexPath(row: index, section: 0), at: .centeredHorizontally, animated: true)
 																												break
@@ -124,10 +124,13 @@
 				@IBAction func setttingAction(_ sender: UIButton) {
 								if settingModel != nil{
 												guard let index = playAtIndex else {return}
-												settingModel?.bgm = items[index.row]
-												settingModel?.volume = Double(slider_voice.value)
-												UserDefaultSettingViewModel.saveSetting(settingModel!)
-												alertSuccess(msg: "设置成功")
+            Services.saveUserSceneMusic(id: items[index.row].id).subscribe(onNext: {[weak self]data in
+                guard let weakSelf = self else { return }
+                weakSelf.settingModel?.sceneMusicModel = weakSelf.items[index.row]
+                weakSelf.settingModel?.volume = Double(weakSelf.slider_voice.value)
+                UserDefaultSettingViewModel.saveSetting(weakSelf.settingModel!)
+                alertSuccess(msg: "设置成功")
+            }).disposed(by: disposeBag)
 
             if isFromFist{
                 NotificationCenter.default.post(name: PlantGuideQuit_Noti, object: items[index.row])
diff --git a/XQMuse/Root/Home/VC/HomeItemDetailVC.swift b/XQMuse/Root/Home/VC/HomeItemDetailVC.swift
index 8a2443f..3392234 100644
--- a/XQMuse/Root/Home/VC/HomeItemDetailVC.swift
+++ b/XQMuse/Root/Home/VC/HomeItemDetailVC.swift
@@ -51,12 +51,12 @@
 								super.viewDidLoad()
 								title = "泉疗愈"
 
-        if settingViewModel?.bgm != nil {
+        if settingViewModel?.sceneMusicModel != nil {
             audioPlayer.scenePlayer?.pause()
         }
 
         yy_popBlock = {[weak self] in
-            if AudioPlayer.getSharedInstance().meditationModel == nil && self?.settingViewModel?.bgm != nil{
+            if AudioPlayer.getSharedInstance().meditationModel == nil && self?.settingViewModel?.sceneMusicModel != nil{
                 self?.audioPlayer.playScene()
             }
             self?.navigationController?.popViewController()
@@ -137,8 +137,6 @@
 								slider_voice.setThumbImage(v1.qmui_snapshotLayerImage(), for: .normal)
 								slider_voice.setThumbImage(v1.qmui_snapshotLayerImage(), for: .highlighted)
 								view_coutdown.isHidden = true
-
-								view_function.jq_gradientColor(colorArr: [UIColor.black.withAlphaComponent(0.35).cgColor,UIColor.clear.cgColor], cornerRadius: 0, startPoint: CGPoint(x: 0, y: 1), endPoint: CGPoint(x: 0, y: 0), bounds: nil, locations: nil)
 
 				}
 
@@ -300,6 +298,8 @@
 
 				override func viewDidLayoutSubviews() {
 								super.viewDidLayoutSubviews()
+        
+        view_function.jq_gradientColor(colorArr: [UIColor.black.withAlphaComponent(0.35).cgColor,UIColor.clear.cgColor], cornerRadius: 0, startPoint: CGPoint(x: 0, y: 1), endPoint: CGPoint(x: 0, y: 0), bounds: nil, locations: nil)
 				}
 
 
diff --git a/XQMuse/Root/Home/VC/HomeItemDetailVC.xib b/XQMuse/Root/Home/VC/HomeItemDetailVC.xib
index 1fe3298..4d608d1 100644
--- a/XQMuse/Root/Home/VC/HomeItemDetailVC.xib
+++ b/XQMuse/Root/Home/VC/HomeItemDetailVC.xib
@@ -123,7 +123,7 @@
                                 <action selector="commentAction:" destination="-1" eventType="touchUpInside" id="den-g3-cBv"/>
                             </connections>
                         </view>
-                        <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="--" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="3" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="xYv-9B-0fk">
+                        <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="--" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="8" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="xYv-9B-0fk">
                             <rect key="frame" x="22.666666666666657" y="73" width="348.33333333333337" height="17"/>
                             <fontDescription key="fontDescription" type="system" pointSize="14"/>
                             <color key="textColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
diff --git a/XQMuse/Root/Home/View/HomeTopMenuView.swift b/XQMuse/Root/Home/View/HomeTopMenuView.swift
index 45788b4..d01f565 100644
--- a/XQMuse/Root/Home/View/HomeTopMenuView.swift
+++ b/XQMuse/Root/Home/View/HomeTopMenuView.swift
@@ -48,7 +48,7 @@
 				}
 
 				func resetTopImage(){
-								if let imgUrl = UserDefaultSettingViewModel.getSetting()?.bgm?.imageUrl.jq_urlEncoded(){
+        if let imgUrl = UserDefaultSettingViewModel.getSetting()?.sceneMusicModel?.imageUrl.jq_urlEncoded(){
 												image_top.sd_setImage(with: URL(string: imgUrl))
 								}
 				}
diff --git a/XQMuse/Root/Me/VC/InviteVC.xib b/XQMuse/Root/Me/VC/InviteVC.xib
index 437b3c1..1ffba16 100644
--- a/XQMuse/Root/Me/VC/InviteVC.xib
+++ b/XQMuse/Root/Me/VC/InviteVC.xib
@@ -37,13 +37,13 @@
                         <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="fRO-Jr-RG3">
                             <rect key="frame" x="0.0" y="0.0" width="393" height="576.66666666666663"/>
                             <subviews>
-                                <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="邀好友赚分佣抽成" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="oFE-SE-88r">
+                                <label hidden="YES" opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="邀好友赚分佣抽成" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="oFE-SE-88r">
                                     <rect key="frame" x="45.333333333333343" y="74" width="302.66666666666663" height="48"/>
                                     <fontDescription key="fontDescription" type="system" pointSize="40"/>
                                     <color key="textColor" red="0.54117647058823526" green="0.68235294117647061" blue="0.396078431372549" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                                     <nil key="highlightedColor"/>
                                 </label>
-                                <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="INVITE FRIENDS TO EARN COMMISSION" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="lCK-Mw-vTJ">
+                                <label hidden="YES" opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="INVITE FRIENDS TO EARN COMMISSION" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="lCK-Mw-vTJ">
                                     <rect key="frame" x="116.66666666666667" y="131" width="159.66666666666663" height="9.6666666666666572"/>
                                     <fontDescription key="fontDescription" type="system" pointSize="8"/>
                                     <color key="textColor" red="0.54117647059999996" green="0.68235294120000001" blue="0.39607843139999999" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
diff --git a/XQMuse/Root/Me/VC/SettingVC.swift b/XQMuse/Root/Me/VC/SettingVC.swift
index d313b26..9d1214b 100644
--- a/XQMuse/Root/Me/VC/SettingVC.swift
+++ b/XQMuse/Root/Me/VC/SettingVC.swift
@@ -49,7 +49,7 @@
 
 				@IBAction func aboutUsAction(_ sender: TapBtn) {
 								let vc = WebVC(type: .aboutUs)
-								vc.title = "关于心泉"
+								vc.title = "关于泉"
 								push(vc: vc)
 				}
 				
diff --git a/XQMuse/Root/Me/VC/SettingVC.xib b/XQMuse/Root/Me/VC/SettingVC.xib
index 932809e..aae2ab6 100644
--- a/XQMuse/Root/Me/VC/SettingVC.xib
+++ b/XQMuse/Root/Me/VC/SettingVC.xib
@@ -99,8 +99,8 @@
                         <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="kId-7a-TaC" customClass="TapBtn" customModule="XQMuse" customModuleProvider="target">
                             <rect key="frame" x="0.0" y="96" width="382" height="48"/>
                             <subviews>
-                                <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="关于心泉" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="B6x-dn-wFm">
-                                    <rect key="frame" x="11.666666666666668" y="15" width="59.666666666666657" height="18"/>
+                                <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="关于泉" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="B6x-dn-wFm">
+                                    <rect key="frame" x="11.666666666666668" y="15" width="44.666666666666657" height="18"/>
                                     <fontDescription key="fontDescription" type="system" weight="medium" pointSize="15"/>
                                     <color key="textColor" red="0.20000000000000001" green="0.20000000000000001" blue="0.20000000000000001" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                                     <nil key="highlightedColor"/>
diff --git a/XQMuse/Root/Me/VC/WalletVC.xib b/XQMuse/Root/Me/VC/WalletVC.xib
index 3d949e2..4c45b13 100644
--- a/XQMuse/Root/Me/VC/WalletVC.xib
+++ b/XQMuse/Root/Me/VC/WalletVC.xib
@@ -195,8 +195,8 @@
                 <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="rlo-Ro-eiy" customClass="TapBtn" customModule="XQMuse" customModuleProvider="target">
                     <rect key="frame" x="14.666666666666657" y="460.66666666666669" width="364" height="66.333333333333314"/>
                     <subviews>
-                        <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="推荐心泉疗愈给好友" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="XgZ-h6-scF">
-                            <rect key="frame" x="9.3333333333333357" y="25.333333333333318" width="116.33333333333331" height="15.666666666666668"/>
+                        <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="推荐泉疗愈给好友" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="XgZ-h6-scF">
+                            <rect key="frame" x="9.3333333333333357" y="25.333333333333318" width="103.33333333333331" height="15.666666666666668"/>
                             <fontDescription key="fontDescription" type="system" pointSize="13"/>
                             <color key="textColor" red="0.20000000000000001" green="0.20000000000000001" blue="0.20000000000000001" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                             <nil key="highlightedColor"/>
diff --git a/XQMuse/Root/Network/Models.swift b/XQMuse/Root/Network/Models.swift
index c56cf55..918e17d 100644
--- a/XQMuse/Root/Network/Models.swift
+++ b/XQMuse/Root/Network/Models.swift
@@ -13,7 +13,7 @@
 				var id = 0
 				var volume:Double = 0.5
     var masterVolume:Double = 0.5
-				var bgm:BGMModel?
+				var sceneMusicModel:BGMModel?
 				var playModel:PlayMode = .line
 
 				var userFirstOpenTreeTask = true //第一次打开树苗
diff --git a/XQMuse/Root/Network/Services.swift b/XQMuse/Root/Network/Services.swift
index cc23846..4d5bd52 100644
--- a/XQMuse/Root/Network/Services.swift
+++ b/XQMuse/Root/Network/Services.swift
@@ -13,7 +13,7 @@
 import CoreLocation
 
 #if DEBUG
-let All_Url = "https://xq.xqzhihui.com/api"
+let All_Url = "http://192.168.110.64:9000"
 //let All_Url = "http://192.168.110.64:9000"
 //let All_Url = "https://mock.apipost.net/mock/31b303c60464000"
 #else
@@ -433,6 +433,20 @@
 
 ///用户相关
 extension Services{
+
+    class func quryUserSceneMusic()->Observable<BaseResponse<BGMModel>>{
+        let params = ParamsAppender.build(url: All_Url)
+        params.interface(url: "/meditation/client/meditation/home/getHomeBackgroundMusicByUserId")
+        return NetworkRequest.request(params: params, method: .get, progress: false,ignoreAlert: true)
+    }
+
+    class func saveUserSceneMusic(id:Int)->Observable<BaseResponse<SimpleModel>>{
+        let params = ParamsAppender.build(url: All_Url)
+        params.interface(url: "/meditation/client/meditation/home/saveUserHomeBackgroundMusic")
+        params.append(key: "id", value: id)
+        return NetworkRequest.request(params: params, method: .post, progress: true,ignoreAlert: true)
+    }
+
     class func searchUserByPhone(_ phone:String,ignoreAlert:Bool)->Observable<BaseResponse<UserInfoModel>>{
 								let params = ParamsAppender.build(url: All_Url)
 								params.interface(url: "/user/client/app-user/getUserByPhone")
diff --git a/XQMuse/Root/Other/View/ShareView.xib b/XQMuse/Root/Other/View/ShareView.xib
index 2577ce4..71daec0 100644
--- a/XQMuse/Root/Other/View/ShareView.xib
+++ b/XQMuse/Root/Other/View/ShareView.xib
@@ -34,7 +34,7 @@
                             <nil key="highlightedColor"/>
                         </label>
                         <stackView opaque="NO" contentMode="scaleToFill" spacing="92" translatesAutoresizingMaskIntoConstraints="NO" id="0PG-Ww-jQZ">
-                            <rect key="frame" x="28" y="66" width="337" height="75"/>
+                            <rect key="frame" x="99.666666666666686" y="66" width="194" height="75"/>
                             <subviews>
                                 <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="28f-zu-dkE" customClass="TapBtn" customModule="XQMuse" customModuleProvider="target">
                                     <rect key="frame" x="0.0" y="0.0" width="51" height="75"/>
@@ -43,7 +43,7 @@
                                             <rect key="frame" x="0.0" y="0.0" width="51" height="50"/>
                                         </imageView>
                                         <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="微信分享" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="KVQ-as-9PR">
-                                            <rect key="frame" x="1.6666666666666679" y="58.000000000000007" width="48" height="14.333333333333336"/>
+                                            <rect key="frame" x="1.3333333333333286" y="58.000000000000007" width="48" height="14.333333333333336"/>
                                             <fontDescription key="fontDescription" type="system" weight="medium" pointSize="12"/>
                                             <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="0.80000000000000004" colorSpace="custom" customColorSpace="sRGB"/>
                                             <nil key="highlightedColor"/>
@@ -70,7 +70,7 @@
                                             <rect key="frame" x="0.0" y="0.0" width="51" height="51"/>
                                         </imageView>
                                         <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="朋友圈" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="IIB-Ay-50b">
-                                            <rect key="frame" x="7.6666666666666572" y="59.000000000000007" width="36" height="14.333333333333336"/>
+                                            <rect key="frame" x="7.3333333333333428" y="59.000000000000007" width="36" height="14.333333333333336"/>
                                             <fontDescription key="fontDescription" type="system" weight="medium" pointSize="12"/>
                                             <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="0.80000000000000004" colorSpace="custom" customColorSpace="sRGB"/>
                                             <nil key="highlightedColor"/>
@@ -90,14 +90,14 @@
                                         <action selector="shareWechatFriAction:" destination="iN0-l3-epB" eventType="touchUpInside" id="dk4-ZD-bI7"/>
                                     </connections>
                                 </view>
-                                <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="YWd-mA-5l0" customClass="TapBtn" customModule="XQMuse" customModuleProvider="target">
-                                    <rect key="frame" x="286" y="0.0" width="51" height="75"/>
+                                <view hidden="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="YWd-mA-5l0" customClass="TapBtn" customModule="XQMuse" customModuleProvider="target">
+                                    <rect key="frame" x="194" y="0.0" width="51" height="75"/>
                                     <subviews>
                                         <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="btn_download" translatesAutoresizingMaskIntoConstraints="NO" id="TFY-Ai-5mf">
                                             <rect key="frame" x="0.0" y="0.0" width="51" height="51"/>
                                         </imageView>
                                         <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="保存至相册" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="wZG-si-wUc">
-                                            <rect key="frame" x="-4.3333333333333144" y="59.000000000000007" width="59.666666666666664" height="14.333333333333336"/>
+                                            <rect key="frame" x="-4.3333333333333712" y="59.000000000000007" width="59.666666666666664" height="14.333333333333336"/>
                                             <fontDescription key="fontDescription" type="system" weight="medium" pointSize="12"/>
                                             <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="0.80000000000000004" colorSpace="custom" customColorSpace="sRGB"/>
                                             <nil key="highlightedColor"/>
diff --git a/XQMuse/Root/PayMusicView/PayMusicVC.swift b/XQMuse/Root/PayMusicView/PayMusicVC.swift
index 492e570..3dde28a 100644
--- a/XQMuse/Root/PayMusicView/PayMusicVC.swift
+++ b/XQMuse/Root/PayMusicView/PayMusicVC.swift
@@ -274,8 +274,8 @@
                     }).disposed(by: weakSelf.disposeBag)
                 }
 
-                if UserDefaultSettingViewModel.getSetting()?.bgm != nil{
-                    AudioPlayer.getSharedInstance().playSceneAt(UserDefaultSettingViewModel.getSetting()!.bgm!.audioFile)
+                if UserDefaultSettingViewModel.getSetting()?.sceneMusicModel != nil{
+                    AudioPlayer.getSharedInstance().playSceneAt(UserDefaultSettingViewModel.getSetting()!.sceneMusicModel!.audioFile)
                 }
 
                 DispatchQueue.main.asyncAfter(delay: 0.4) {
@@ -540,8 +540,8 @@
 				}
 
 				func playScene(){
-        if UserDefaultSettingViewModel.getSetting()?.bgm != nil{
-            playSceneAt(UserDefaultSettingViewModel.getSetting()?.bgm?.audioFile ?? "")
+        if UserDefaultSettingViewModel.getSetting()?.sceneMusicModel != nil{
+            playSceneAt(UserDefaultSettingViewModel.getSetting()?.sceneMusicModel?.audioFile ?? "")
         }
 				}
 
diff --git a/XQMuse/Root/Plans/PlanGuideVC.swift b/XQMuse/Root/Plans/PlanGuideVC.swift
index 659d78c..cb3629d 100644
--- a/XQMuse/Root/Plans/PlanGuideVC.swift
+++ b/XQMuse/Root/Plans/PlanGuideVC.swift
@@ -88,8 +88,8 @@
             AudioPlayer.getSharedInstance().bgmPlayer?.play()
 //            AudioPlayer.getSharedInstance().masterPlayer?.play()
             PayMusicVC.updateStatus(.playing)
-        }else if UserDefaultSettingViewModel.getSetting()?.bgm != nil && !(JQ_currentNavigationController().viewControllers.first is PlanGuideVC){
-            AudioPlayer.getSharedInstance().playSceneAt(UserDefaultSettingViewModel.getSetting()!.bgm!.audioFile)
+        }else if UserDefaultSettingViewModel.getSetting()?.sceneMusicModel != nil && !(JQ_currentNavigationController().viewControllers.first is PlanGuideVC){
+            AudioPlayer.getSharedInstance().playSceneAt(UserDefaultSettingViewModel.getSetting()!.sceneMusicModel!.audioFile)
         }
 				}
 
diff --git a/XQMuse/Root/Plans/PlanGuide_3_VC.swift b/XQMuse/Root/Plans/PlanGuide_3_VC.swift
index 9ef8a43..a4fd9aa 100644
--- a/XQMuse/Root/Plans/PlanGuide_3_VC.swift
+++ b/XQMuse/Root/Plans/PlanGuide_3_VC.swift
@@ -56,8 +56,6 @@
 								btn_previous.titleLabel?.font = Def_SourceHanSerif_Medium(fontSize: 13)
 								btn_next.titleLabel?.font = Def_SourceHanSerif_Medium(fontSize: 13)
 
-								view_content.jq_gradientColor(colorArr: [UIColor(hexString: "#D2EDE4")!.cgColor,UIColor.white.withAlphaComponent(0.8).cgColor], cornerRadius: 20, startPoint: CGPoint(x: 0, y: 1), endPoint: CGPoint(x: 0, y: 0), bounds: nil, locations:nil)
-
 								collectionVIew.delegate = self
 								collectionVIew.dataSource = self
 								collectionVIew.backgroundColor = .clear
@@ -68,6 +66,11 @@
 								collectionVIew.collectionViewLayout = flowLayout
 				}
 
+    override func viewDidLayoutSubviews() {
+        super.viewDidLayoutSubviews()
+        view_content.jq_gradientColor(colorArr: [UIColor(hexString: "#D2EDE4")!.cgColor,UIColor.white.withAlphaComponent(0.8).cgColor], cornerRadius: 20, startPoint: CGPoint(x: 0, y: 1), endPoint: CGPoint(x: 0, y: 0), bounds: nil, locations:nil)
+    }
+
 				@IBAction func nextAction(_ sender: UIButton) {
         responseUserAnswerModel.tagIds = selectModels.map({"\($0.id)"}).joined(separator: ",")
 
diff --git a/XQMuse/Root/TreeGroup/View/TreeTeskFirstRuleView.xib b/XQMuse/Root/TreeGroup/View/TreeTeskFirstRuleView.xib
index 856f6dc..25407e0 100644
--- a/XQMuse/Root/TreeGroup/View/TreeTeskFirstRuleView.xib
+++ b/XQMuse/Root/TreeGroup/View/TreeTeskFirstRuleView.xib
@@ -20,8 +20,8 @@
                         <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="bg_task_f" translatesAutoresizingMaskIntoConstraints="NO" id="WfK-ob-Idw">
                             <rect key="frame" x="0.0" y="0.0" width="303" height="279.33333333333331"/>
                         </imageView>
-                        <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="心泉之树" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="FMr-RI-3OU">
-                            <rect key="frame" x="115.66666666666666" y="24" width="71.666666666666657" 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="FMr-RI-3OU">
+                            <rect key="frame" x="124.66666666666667" y="24" width="53.666666666666671" height="21"/>
                             <constraints>
                                 <constraint firstAttribute="height" constant="21" id="F4t-Os-4qR"/>
                             </constraints>

--
Gitblit v1.7.1