From 1cc03dff6006c235686f87fe0f80af2fde97abf4 Mon Sep 17 00:00:00 2001
From: 杨锴 <841720330@qq.com>
Date: 星期四, 14 十一月 2024 16:10:13 +0800
Subject: [PATCH] fix bug

---
 XQMuse/Root/Home/TCell/Home_Style_1_TCell.swift    |    7 +
 XQMuse/Root/Course/VC/CourseDetialOfflineVC.swift  |    2 
 XQMuse/Root/Me/TCell/MessageTCell.xib              |   12 +-
 XQMuse/Config/StoreKit/InPurchaseManager.swift     |  136 +++++++++++-----------
 XQMuse/Root/Course/View/CourseDetailHeaderView.xib |   13 +-
 XQMuse/Root/Course/VC/CourseMenuVC.swift           |   22 +++
 XQMuse/Root/TreeGroup/TreeTeskVC.swift             |    2 
 XQMuse/Root/Me/VC/BankWithdrawVC.swift             |    2 
 XQMuse/Root/.DS_Store                              |    0 
 XQMuse/Root/TreeGroup/mov/bg_movie.mov             |    0 
 XQMuse/Root/Course/VC/CourseDetialOfflineVC.xib    |    8 
 XQMuse/Root/Me/VC/StudyListVC.swift                |   34 ++++-
 XQMuse/Root/Me/VC/AddBankInfoVC.xib                |    8 +
 XQMuse/Root/Me/CCell/EmptyCCell.swift              |    3 
 XQMuse/Root/Me/VC/WalletRechargeVC.swift           |    2 
 XQMuse/SceneDelegate.swift                         |   14 +-
 XQMuse/Root/Me/VC/AddBankInfoVC.swift              |    1 
 /dev/null                                          |    0 
 XQMuse/Root/Home/HomeVC.swift                      |    8 +
 XQMuse/Root/Me/CCell/EmptyCCell.xib                |    4 
 XQMuse/Root/Other/View/VideoView.swift             |   13 -
 XQMuse/Root/Me/VC/BankWithdrawVC.xib               |    8 +
 XQMuse/Root/Me/VC/VIPCenterVC.swift                |    2 
 XQMuse/Root/Course/VC/CourseDetialVideoVC.swift    |    1 
 XQMuse/Root/Network/Services.swift                 |    8 +
 25 files changed, 194 insertions(+), 116 deletions(-)

diff --git a/XQMuse/Assets.xcassets/Icons/icon_empty.imageset/Contents.json b/XQMuse/Assets.xcassets/Icons/icon_empty.imageset/Contents.json
deleted file mode 100644
index c5fe248..0000000
--- a/XQMuse/Assets.xcassets/Icons/icon_empty.imageset/Contents.json
+++ /dev/null
@@ -1,21 +0,0 @@
-{
-  "images" : [
-    {
-      "idiom" : "universal",
-      "scale" : "1x"
-    },
-    {
-      "filename" : "icon_empty.png",
-      "idiom" : "universal",
-      "scale" : "2x"
-    },
-    {
-      "idiom" : "universal",
-      "scale" : "3x"
-    }
-  ],
-  "info" : {
-    "author" : "xcode",
-    "version" : 1
-  }
-}
diff --git a/XQMuse/Assets.xcassets/Icons/icon_empty.imageset/icon_empty.png b/XQMuse/Assets.xcassets/Icons/icon_empty.imageset/icon_empty.png
deleted file mode 100644
index e773985..0000000
--- a/XQMuse/Assets.xcassets/Icons/icon_empty.imageset/icon_empty.png
+++ /dev/null
Binary files differ
diff --git a/XQMuse/Config/StoreKit/InPurchaseManager.swift b/XQMuse/Config/StoreKit/InPurchaseManager.swift
index 84e42e8..440a321 100644
--- a/XQMuse/Config/StoreKit/InPurchaseManager.swift
+++ b/XQMuse/Config/StoreKit/InPurchaseManager.swift
@@ -110,26 +110,26 @@
         }
     }
 
-    func getIPAPrice(_ price:Int,clouse:@escaping (SKProduct)->Void){
-        var ipaId = ""
-        switch price {
-            case 98: ipaId = "com.jkfitness.a.price.1"
-            case 298:ipaId = "com.jkfitness.a.price.2"
-            case 488:ipaId = "com.jkfitness.a.price.3"
-            case 698:ipaId = "com.jkfitness.a.price.4"
-            case 998:ipaId = "com.jkfitness.a.price.5"
-            default:break
-        }
-
-        var productIds = Set<String>()
-        productIds.insert(ipaId)
-
-        InPurchaseManager.instance().setProductList(productIds) {products in
-            if let product = products.first{
-                clouse(product)
-            }
-        }
-    }
+//    func getIPAPrice(_ price:Int,clouse:@escaping (SKProduct)->Void){
+//        var ipaId = ""
+//        switch price {
+//            case 98: ipaId = "com.jkfitness.a.price.1"
+//            case 298:ipaId = "com.jkfitness.a.price.2"
+//            case 488:ipaId = "com.jkfitness.a.price.3"
+//            case 698:ipaId = "com.jkfitness.a.price.4"
+//            case 998:ipaId = "com.jkfitness.a.price.5"
+//            default:break
+//        }
+//
+//        var productIds = Set<String>()
+//        productIds.insert(ipaId)
+//
+//        InPurchaseManager.instance().setProductList(productIds) {products in
+//            if let product = products.first{
+//                clouse(product)
+//            }
+//        }
+//    }
 
 
     func dismiss(){
@@ -254,52 +254,52 @@
     }
 
     //获取APP 首次安装时间
-    func test1(){
-
-        let queue = DispatchQueue(label: "inapppurchasequeue")
-        queue.async {
-            let receiptURL = Bundle.main.appStoreReceiptURL
-            guard receiptURL?.path != nil else { return }
-            do {
-                let receiptData = try Data(contentsOf: receiptURL!, options: .alwaysMapped)
-                let base64EncodedReceipt = receiptData.base64EncodedString(options: [])
-                var verifyReceipt:String = AppleReceiptValidator.VerifyReceiptURLType.sandbox.rawValue
-#if !DEBUG
-                verifyReceipt = AppleReceiptValidator.VerifyReceiptURLType.production.rawValue
-#endif
-                let purchaseURL = URL(string: verifyReceipt)!
-
-                var request = URLRequest(url: purchaseURL)
-                request.httpMethod = "POST"
-                request.setValue("application/json", forHTTPHeaderField: "Content-Type")
-
-                let jsonBody: [String: Any] = [
-                    "receipt-data": base64EncodedReceipt,
-                    "password": ShareAppleKey // 你的共享密钥
-                ]
-
-                let jsonData = try JSONSerialization.data(withJSONObject: jsonBody, options: [])
-                request.httpBody = jsonData
-
-                let session = URLSession.shared
-                let task = session.dataTask(with: request) { (data, response, error) in
-                    if let error = error {return}
-                    guard let data = data else { return }
-                    do {
-                        if let json = try JSONSerialization.jsonObject(with: data, options: []) as? [String: Any] {
-                            print(json)
-                            if let purchageModel = PurchaseModel.deserialize(from: json),purchageModel.status == 0{
-
-                            }
-                        }
-                    } catch {
-                        print("JSON processing failed: \(error)")
-                    }
-                }
-                task.resume()
-            } catch {
-                print("Error reading receipt data: \(error)")
-            }
-        }
-    }
+//    func test1(){
+//
+//        let queue = DispatchQueue(label: "inapppurchasequeue")
+//        queue.async {
+//            let receiptURL = Bundle.main.appStoreReceiptURL
+//            guard receiptURL?.path != nil else { return }
+//            do {
+//                let receiptData = try Data(contentsOf: receiptURL!, options: .alwaysMapped)
+//                let base64EncodedReceipt = receiptData.base64EncodedString(options: [])
+//                var verifyReceipt:String = AppleReceiptValidator.VerifyReceiptURLType.sandbox.rawValue
+//#if !DEBUG
+//                verifyReceipt = AppleReceiptValidator.VerifyReceiptURLType.production.rawValue
+//#endif
+//                let purchaseURL = URL(string: verifyReceipt)!
+//
+//                var request = URLRequest(url: purchaseURL)
+//                request.httpMethod = "POST"
+//                request.setValue("application/json", forHTTPHeaderField: "Content-Type")
+//
+//                let jsonBody: [String: Any] = [
+//                    "receipt-data": base64EncodedReceipt,
+//                    "password": ShareAppleKey // 你的共享密钥
+//                ]
+//
+//                let jsonData = try JSONSerialization.data(withJSONObject: jsonBody, options: [])
+//                request.httpBody = jsonData
+//
+//                let session = URLSession.shared
+//                let task = session.dataTask(with: request) { (data, response, error) in
+//                    if let error = error {return}
+//                    guard let data = data else { return }
+//                    do {
+//                        if let json = try JSONSerialization.jsonObject(with: data, options: []) as? [String: Any] {
+//                            print(json)
+//                            if let purchageModel = PurchaseModel.deserialize(from: json),purchageModel.status == 0{
+//
+//                            }
+//                        }
+//                    } catch {
+//                        print("JSON processing failed: \(error)")
+//                    }
+//                }
+//                task.resume()
+//            } catch {
+//                print("Error reading receipt data: \(error)")
+//            }
+//        }
+//    }
 }
diff --git a/XQMuse/Root/.DS_Store b/XQMuse/Root/.DS_Store
index 9a59d22..cb4c27d 100644
--- a/XQMuse/Root/.DS_Store
+++ b/XQMuse/Root/.DS_Store
Binary files differ
diff --git a/XQMuse/Root/Course/VC/CourseDetialOfflineVC.swift b/XQMuse/Root/Course/VC/CourseDetialOfflineVC.swift
index 0d64f42..eb47a37 100644
--- a/XQMuse/Root/Course/VC/CourseDetialOfflineVC.swift
+++ b/XQMuse/Root/Course/VC/CourseDetialOfflineVC.swift
@@ -111,7 +111,7 @@
                 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: true,needFirstImage: true, delegate: self!)
+                    weakSelf.videoView = VideoView(url: m.detailUrl,autoPlay: false,needFirstImage: true, delegate: self!)
                     weakSelf.view_video.isHidden = false
                     weakSelf.view_video.addSubview(weakSelf.videoView!)
                     weakSelf.videoView!.snp.makeConstraints { make in
diff --git a/XQMuse/Root/Course/VC/CourseDetialOfflineVC.xib b/XQMuse/Root/Course/VC/CourseDetialOfflineVC.xib
index 7e1f886..e27fb6a 100644
--- a/XQMuse/Root/Course/VC/CourseDetialOfflineVC.xib
+++ b/XQMuse/Root/Course/VC/CourseDetialOfflineVC.xib
@@ -56,14 +56,14 @@
                                         <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="itL-Yu-biN">
                                             <rect key="frame" x="0.0" y="314.33333333333331" width="393" height="99.666666666666686"/>
                                             <subviews>
-                                                <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="1000" verticalHuggingPriority="251" text="导师 --" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Rfd-fp-6pw">
-                                                    <rect key="frame" x="334" y="26.999999999999996" width="38.666666666666686" height="14.333333333333332"/>
+                                                <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="200" verticalHuggingPriority="251" horizontalCompressionResistancePriority="1000" text="导师 --" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Rfd-fp-6pw">
+                                                    <rect key="frame" x="109" y="26.999999999999996" width="263.66666666666669" height="14.333333333333332"/>
                                                     <fontDescription key="fontDescription" type="system" weight="medium" pointSize="12"/>
                                                     <color key="textColor" red="0.27058823529411763" green="0.27058823529411763" blue="0.27058823529411763" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                                                     <nil key="highlightedColor"/>
                                                 </label>
-                                                <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="QJB-dH-vTR">
-                                                    <rect key="frame" x="20.666666666666657" y="25" width="303.33333333333337" height="23"/>
+                                                <label opaque="NO" userInteractionEnabled="NO" contentMode="left" verticalHuggingPriority="251" text="---------" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="QJB-dH-vTR">
+                                                    <rect key="frame" x="20.666666666666664" y="25" width="78.333333333333343" height="23"/>
                                                     <fontDescription key="fontDescription" type="boldSystem" pointSize="19"/>
                                                     <nil key="textColor"/>
                                                     <nil key="highlightedColor"/>
diff --git a/XQMuse/Root/Course/VC/CourseDetialVideoVC.swift b/XQMuse/Root/Course/VC/CourseDetialVideoVC.swift
index 3c48b96..033e931 100644
--- a/XQMuse/Root/Course/VC/CourseDetialVideoVC.swift
+++ b/XQMuse/Root/Course/VC/CourseDetialVideoVC.swift
@@ -51,6 +51,7 @@
         super.viewDidLoad()
 								title = "课程详情"
 
+//        VideoView(url: items[selectIndex.row].videoUrl.jq_urlEncoded(), autoPlay: false, placeHoderImageUrl: items[selectIndex.row].c, needFirstImage: false, delegate: self)
         videoView = VideoView(url: items[selectIndex.row].videoUrl.jq_urlEncoded(),autoPlay: true,delegate: self)
         view_bg_video.addSubview(videoView!)
         videoView!.snp.makeConstraints { make in
diff --git a/XQMuse/Root/Course/VC/CourseMenuVC.swift b/XQMuse/Root/Course/VC/CourseMenuVC.swift
index 66afe84..3c06e1e 100644
--- a/XQMuse/Root/Course/VC/CourseMenuVC.swift
+++ b/XQMuse/Root/Course/VC/CourseMenuVC.swift
@@ -66,11 +66,27 @@
 
 
             }else{
-                let v1 = EmptyCCell.jq_loadNibView()
+                let v1 = UIView()
                 v1.tag = 10010
-                v1.bounds = CGRect(x: 0, y: 0, width: 265, height: 300)
-                v1.center = CGPoint(x: v.center.x, y: v.center.y - 100)
+                v1.bounds = CGRect(x: 0, y: 0, width: 100, height: 100)
+                v1.center = CGPoint(x: v.center.x - 20, y: v.center.y - 150)
                 v.addSubview(v1)
+
+                let image = UIImageView(image: UIImage(named: "bg_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)
+                }
             }
         }
 				}
diff --git a/XQMuse/Root/Course/View/CourseDetailHeaderView.xib b/XQMuse/Root/Course/View/CourseDetailHeaderView.xib
index e58cb6f..b89fa33 100644
--- a/XQMuse/Root/Course/View/CourseDetailHeaderView.xib
+++ b/XQMuse/Root/Course/View/CourseDetailHeaderView.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>
@@ -23,14 +23,14 @@
                 <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="AMf-zP-hoy">
                     <rect key="frame" x="0.0" y="291.33333333333331" width="364" height="99.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="CgZ-Jh-uGm">
+                        <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="1000" verticalHuggingPriority="251" horizontalCompressionResistancePriority="250" text="--" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="CgZ-Jh-uGm">
                             <rect key="frame" x="20.666666666666664" y="20" width="17.666666666666664" height="23"/>
                             <fontDescription key="fontDescription" type="boldSystem" pointSize="19"/>
                             <color key="textColor" red="0.15686274509803921" green="0.15686274509803921" blue="0.15686274509803921" 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="DbG-SW-sik">
-                            <rect key="frame" x="304.33333333333331" y="24.333333333333371" width="39.333333333333314" height="14.333333333333336"/>
+                        <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="导师 --" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="DbG-SW-sik">
+                            <rect key="frame" x="48.333333333333343" y="24.333333333333371" width="295.33333333333326" height="14.333333333333336"/>
                             <fontDescription key="fontDescription" type="system" pointSize="12"/>
                             <color key="textColor" red="0.27058823529411763" green="0.27058823529411763" blue="0.27058823529411763" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                             <nil key="highlightedColor"/>
@@ -43,7 +43,7 @@
                             </constraints>
                         </imageView>
                         <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="0人已加入学习" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="0I9-CV-ojJ">
-                            <rect key="frame" x="35.666666666666657" y="62.666666666666686" width="69" height="12"/>
+                            <rect key="frame" x="35.666666666666664" y="62.666666666666686" width="67.333333333333343" height="12"/>
                             <fontDescription key="fontDescription" type="system" pointSize="10"/>
                             <color key="textColor" red="0.80392156862745101" green="0.80392156862745101" blue="0.80392156862745101" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                             <nil key="highlightedColor"/>
@@ -53,6 +53,7 @@
                     <constraints>
                         <constraint firstItem="QZb-OD-zkm" firstAttribute="leading" secondItem="CgZ-Jh-uGm" secondAttribute="leading" id="9m2-IA-FFN"/>
                         <constraint firstAttribute="height" constant="99.5" id="LcG-qp-bba"/>
+                        <constraint firstItem="DbG-SW-sik" firstAttribute="leading" secondItem="CgZ-Jh-uGm" secondAttribute="trailing" constant="10" id="UAT-ii-Q8y"/>
                         <constraint firstAttribute="trailing" secondItem="DbG-SW-sik" secondAttribute="trailing" constant="20.5" id="dRM-2S-Gf9"/>
                         <constraint firstItem="0I9-CV-ojJ" firstAttribute="leading" secondItem="QZb-OD-zkm" secondAttribute="trailing" constant="5" id="e2U-HD-qip"/>
                         <constraint firstItem="CgZ-Jh-uGm" firstAttribute="top" secondItem="AMf-zP-hoy" secondAttribute="top" constant="20" id="f9p-jH-KwJ"/>
diff --git a/XQMuse/Root/Home/HomeVC.swift b/XQMuse/Root/Home/HomeVC.swift
index 7192b4d..4d0b98a 100644
--- a/XQMuse/Root/Home/HomeVC.swift
+++ b/XQMuse/Root/Home/HomeVC.swift
@@ -68,6 +68,14 @@
             needPopToTree = false
         }
 
+
+        if AudioPlayer.getSharedInstance().bgmPlayer != nil &&  AudioPlayer.getSharedInstance().masterPlayer != nil{
+            AudioPlayer.getSharedInstance().bgmPlayer?.play()
+            AudioPlayer.getSharedInstance().masterPlayer?.play()
+            return
+        }
+
+
         if AudioPlayer.getSharedInstance().scenePlayer?.timeControlStatus == .paused && UserDefaultSettingViewModel.getSetting()?.bgm != nil{
             AudioPlayer.getSharedInstance().playSceneAt(UserDefaultSettingViewModel.getSetting()!.bgm!.audioFile)
         }
diff --git a/XQMuse/Root/Home/TCell/Home_Style_1_TCell.swift b/XQMuse/Root/Home/TCell/Home_Style_1_TCell.swift
index 4822a51..d52180f 100644
--- a/XQMuse/Root/Home/TCell/Home_Style_1_TCell.swift
+++ b/XQMuse/Root/Home/TCell/Home_Style_1_TCell.swift
@@ -43,7 +43,12 @@
     }
 
     func setplaying(){
-        img_play.image = AudioPlayer.getSharedInstance().bgmPlayer?.timeControlStatus == .playing ? UIImage(named: "btn_pause"):UIImage(named: "icon_play")
+
+        if model?.meditationId == AudioPlayer.getSharedInstance().meditationModel?.id{
+            img_play.image = AudioPlayer.getSharedInstance().bgmPlayer?.timeControlStatus == .playing ? UIImage(named: "btn_pause"):UIImage(named: "icon_play")
+        }else{
+            img_play.image = UIImage(named: "icon_play")
+        }
     }
 
 }
diff --git a/XQMuse/Root/Me/CCell/EmptyCCell.swift b/XQMuse/Root/Me/CCell/EmptyCCell.swift
index 02c5a50..8124605 100644
--- a/XQMuse/Root/Me/CCell/EmptyCCell.swift
+++ b/XQMuse/Root/Me/CCell/EmptyCCell.swift
@@ -10,6 +10,9 @@
 
 class EmptyCCell: UICollectionViewCell,JQNibView{
 
+    @IBOutlet weak var label_hint: UILabel!
+    @IBOutlet weak var btn_call: UIButton!
+    
     override func awakeFromNib() {
         super.awakeFromNib()
         // Initialization code
diff --git a/XQMuse/Root/Me/CCell/EmptyCCell.xib b/XQMuse/Root/Me/CCell/EmptyCCell.xib
index b501c4c..df72176 100644
--- a/XQMuse/Root/Me/CCell/EmptyCCell.xib
+++ b/XQMuse/Root/Me/CCell/EmptyCCell.xib
@@ -61,6 +61,10 @@
                 <constraint firstAttribute="trailing" secondItem="Xpd-vb-LhG" secondAttribute="trailing" constant="52" id="xok-W2-twP"/>
             </constraints>
             <size key="customSize" width="264" height="301"/>
+            <connections>
+                <outlet property="btn_call" destination="Xpd-vb-LhG" id="LE2-tO-7Jx"/>
+                <outlet property="label_hint" destination="eBW-Bc-yAN" id="xxm-YO-GPF"/>
+            </connections>
             <point key="canvasLocation" x="196.94656488549617" y="21.47887323943662"/>
         </collectionViewCell>
     </objects>
diff --git a/XQMuse/Root/Me/TCell/MessageTCell.xib b/XQMuse/Root/Me/TCell/MessageTCell.xib
index 29a5801..8c8eb9e 100644
--- a/XQMuse/Root/Me/TCell/MessageTCell.xib
+++ b/XQMuse/Root/Me/TCell/MessageTCell.xib
@@ -27,14 +27,14 @@
                                     <constraint firstAttribute="width" constant="47" id="aWb-4v-Kei"/>
                                 </constraints>
                             </imageView>
-                            <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" horizontalCompressionResistancePriority="1000" text="---" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="cob-eJ-7In">
-                                <rect key="frame" x="74.666666666666686" y="27.333333333333329" width="237" height="18"/>
+                            <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" horizontalCompressionResistancePriority="749" text="--------------------------------------------------------------------------------------------------" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="cob-eJ-7In">
+                                <rect key="frame" x="74.666666666666671" y="27.333333333333329" width="232.66666666666663" 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"/>
                             </label>
                             <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="TdQ-J6-aEO">
-                                <rect key="frame" x="318.66666666666669" y="32.666666666666671" width="7.3333333333333144" height="7.3333333333333357"/>
+                                <rect key="frame" x="314.33333333333331" y="32.666666666666671" width="7.3333333333333144" height="7.3333333333333357"/>
                                 <color key="backgroundColor" red="1" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                                 <constraints>
                                     <constraint firstAttribute="width" constant="7.5" id="WzQ-9I-rrI"/>
@@ -53,10 +53,10 @@
                                 <color key="textColor" red="0.41960784313725491" green="0.41960784313725491" blue="0.41960784313725491" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                                 <nil key="highlightedColor"/>
                             </label>
-                            <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="1000" text="00:00" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Tsl-3O-mZM">
-                                <rect key="frame" x="336" y="29.333333333333332" width="70" height="14.333333333333332"/>
+                            <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="1000" text="9999-99-99" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Tsl-3O-mZM">
+                                <rect key="frame" x="331.66666666666669" y="29.333333333333332" width="74.333333333333314" height="14.333333333333332"/>
                                 <constraints>
-                                    <constraint firstAttribute="width" constant="70" id="BSL-fx-Idb"/>
+                                    <constraint firstAttribute="width" relation="lessThanOrEqual" constant="150" id="fLv-IF-4da"/>
                                 </constraints>
                                 <fontDescription key="fontDescription" type="system" weight="medium" pointSize="12"/>
                                 <color key="textColor" red="0.20000000000000001" green="0.20000000000000001" blue="0.20000000000000001" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
diff --git a/XQMuse/Root/Me/VC/AddBankInfoVC.swift b/XQMuse/Root/Me/VC/AddBankInfoVC.swift
index b22d47f..20eb98c 100644
--- a/XQMuse/Root/Me/VC/AddBankInfoVC.swift
+++ b/XQMuse/Root/Me/VC/AddBankInfoVC.swift
@@ -95,7 +95,6 @@
 				}
 
 				override func setUI() {
-								view.backgroundColor = UIColor(hexString: "f6f6f6")
 
         btn_add.localGradientColor(cornerRadius: 20,bounds: CGRect(x: 0, y: 0, width: JQ_ScreenW - 45 * 2, height: 40))
 				}
diff --git a/XQMuse/Root/Me/VC/AddBankInfoVC.xib b/XQMuse/Root/Me/VC/AddBankInfoVC.xib
index 0d7df4c..c4418a1 100644
--- a/XQMuse/Root/Me/VC/AddBankInfoVC.xib
+++ b/XQMuse/Root/Me/VC/AddBankInfoVC.xib
@@ -26,6 +26,10 @@
             <rect key="frame" x="0.0" y="0.0" width="393" height="852"/>
             <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
             <subviews>
+                <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="B3b-7E-5Ok">
+                    <rect key="frame" x="0.0" y="59" width="393" height="793"/>
+                    <color key="backgroundColor" red="0.96470588239999999" green="0.96470588239999999" blue="0.96470588239999999" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+                </view>
                 <stackView opaque="NO" contentMode="scaleToFill" axis="vertical" translatesAutoresizingMaskIntoConstraints="NO" id="fwC-BB-rdM">
                     <rect key="frame" x="14" y="69" width="365" height="100"/>
                     <subviews>
@@ -292,14 +296,18 @@
             <color key="backgroundColor" systemColor="systemBackgroundColor"/>
             <constraints>
                 <constraint firstItem="Flq-AM-akx" firstAttribute="leading" secondItem="fnl-2z-Ty3" secondAttribute="leading" constant="45" id="0pF-4v-xLY"/>
+                <constraint firstAttribute="bottom" secondItem="B3b-7E-5Ok" secondAttribute="bottom" id="3ot-Wl-QZz"/>
                 <constraint firstItem="fnl-2z-Ty3" firstAttribute="trailing" secondItem="fwC-BB-rdM" secondAttribute="trailing" constant="14" id="6qT-VQ-gTL"/>
+                <constraint firstItem="fnl-2z-Ty3" firstAttribute="trailing" secondItem="B3b-7E-5Ok" secondAttribute="trailing" id="ByL-iH-Y91"/>
                 <constraint firstItem="07i-g0-s3b" firstAttribute="leading" secondItem="fnl-2z-Ty3" secondAttribute="leading" constant="14" id="IvV-YG-68g"/>
                 <constraint firstItem="fnl-2z-Ty3" firstAttribute="trailing" secondItem="07i-g0-s3b" secondAttribute="trailing" constant="14" id="JIg-m3-xhd"/>
                 <constraint firstItem="07i-g0-s3b" firstAttribute="top" secondItem="fwC-BB-rdM" secondAttribute="bottom" constant="10" id="Yj2-X6-sib"/>
                 <constraint firstItem="fwC-BB-rdM" firstAttribute="leading" secondItem="fnl-2z-Ty3" secondAttribute="leading" constant="14" id="ajJ-yi-V9w"/>
                 <constraint firstItem="fnl-2z-Ty3" firstAttribute="trailing" secondItem="Flq-AM-akx" secondAttribute="trailing" constant="45" id="bTt-f6-iGj"/>
                 <constraint firstItem="Flq-AM-akx" firstAttribute="top" secondItem="07i-g0-s3b" secondAttribute="bottom" constant="59" id="dZF-EA-as7"/>
+                <constraint firstItem="B3b-7E-5Ok" firstAttribute="top" secondItem="i5M-Pr-FkT" secondAttribute="topMargin" id="p9l-du-LDJ"/>
                 <constraint firstItem="fwC-BB-rdM" firstAttribute="top" secondItem="fnl-2z-Ty3" secondAttribute="top" constant="10" id="y0n-oJ-ZZd"/>
+                <constraint firstItem="B3b-7E-5Ok" firstAttribute="leading" secondItem="fnl-2z-Ty3" secondAttribute="leading" id="yEU-if-oxK"/>
             </constraints>
             <point key="canvasLocation" x="58.778625954198468" y="20.422535211267608"/>
         </view>
diff --git a/XQMuse/Root/Me/VC/BankWithdrawVC.swift b/XQMuse/Root/Me/VC/BankWithdrawVC.swift
index a6f8b10..0e1f902 100644
--- a/XQMuse/Root/Me/VC/BankWithdrawVC.swift
+++ b/XQMuse/Root/Me/VC/BankWithdrawVC.swift
@@ -44,7 +44,7 @@
     }
 
 				override func setUI() {
-								view.backgroundColor = UIColor(hexString: "f6f6f6")
+//								view.backgroundColor = UIColor(hexString: "f6f6f6")
 								tableView.delegate = self
 								tableView.dataSource = self
 								tableView.separatorStyle = .none
diff --git a/XQMuse/Root/Me/VC/BankWithdrawVC.xib b/XQMuse/Root/Me/VC/BankWithdrawVC.xib
index 13e589f..fe1ea11 100644
--- a/XQMuse/Root/Me/VC/BankWithdrawVC.xib
+++ b/XQMuse/Root/Me/VC/BankWithdrawVC.xib
@@ -24,6 +24,10 @@
             <rect key="frame" x="0.0" y="0.0" width="393" height="852"/>
             <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
             <subviews>
+                <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="60M-uE-dIv">
+                    <rect key="frame" x="0.0" y="59" width="393" height="793"/>
+                    <color key="backgroundColor" red="0.96470588235294119" green="0.96470588235294119" blue="0.96470588235294119" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+                </view>
                 <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="5CF-zo-zBJ">
                     <rect key="frame" x="14" y="69" width="365" height="40"/>
                     <subviews>
@@ -230,10 +234,14 @@
             <viewLayoutGuide key="safeArea" id="fnl-2z-Ty3"/>
             <color key="backgroundColor" systemColor="systemBackgroundColor"/>
             <constraints>
+                <constraint firstAttribute="trailing" secondItem="60M-uE-dIv" secondAttribute="trailing" id="1HS-0x-yA3"/>
+                <constraint firstAttribute="bottom" secondItem="60M-uE-dIv" secondAttribute="bottom" id="2GK-uo-JMD"/>
                 <constraint firstItem="9BP-hx-1CV" firstAttribute="leading" secondItem="fnl-2z-Ty3" secondAttribute="leading" id="5ZU-jQ-JWI"/>
                 <constraint firstItem="fnl-2z-Ty3" firstAttribute="trailing" secondItem="9BP-hx-1CV" secondAttribute="trailing" id="9vx-XO-21l"/>
                 <constraint firstItem="fnl-2z-Ty3" firstAttribute="bottom" secondItem="9BP-hx-1CV" secondAttribute="bottom" id="E2O-eV-Ebm"/>
+                <constraint firstItem="60M-uE-dIv" firstAttribute="leading" secondItem="i5M-Pr-FkT" secondAttribute="leading" id="LlX-lj-bzR"/>
                 <constraint firstItem="fnl-2z-Ty3" firstAttribute="trailing" secondItem="5CF-zo-zBJ" secondAttribute="trailing" constant="14" id="MLb-VY-urZ"/>
+                <constraint firstItem="60M-uE-dIv" firstAttribute="top" secondItem="i5M-Pr-FkT" secondAttribute="topMargin" id="PIj-E6-69C"/>
                 <constraint firstItem="9BP-hx-1CV" firstAttribute="top" secondItem="5CF-zo-zBJ" secondAttribute="bottom" constant="10" id="XBP-qs-NOm"/>
                 <constraint firstItem="5CF-zo-zBJ" firstAttribute="leading" secondItem="fnl-2z-Ty3" secondAttribute="leading" constant="14" id="kFM-oK-FLh"/>
                 <constraint firstItem="5CF-zo-zBJ" firstAttribute="top" secondItem="fnl-2z-Ty3" secondAttribute="top" constant="10" id="vkh-k2-3K9"/>
diff --git a/XQMuse/Root/Me/VC/StudyListVC.swift b/XQMuse/Root/Me/VC/StudyListVC.swift
index ad7fa1d..351d3d2 100644
--- a/XQMuse/Root/Me/VC/StudyListVC.swift
+++ b/XQMuse/Root/Me/VC/StudyListVC.swift
@@ -92,6 +92,8 @@
 												let count = datas?.courseList.count ?? 0
 												if count == 0{
 																let cell	= collectionView.dequeueReusableCell(withReuseIdentifier: "_EmptyCCell", for: indexPath) as! EmptyCCell
+                cell.btn_call.isHidden = false
+                cell.label_hint.text = "你还没有购买课程"
 																return cell
 												}else{
 																let cell = collectionView.dequeueReusableCell(withReuseIdentifier: "_HomeRelaxBanner_2_1_CCell", for: indexPath) as! HomeRelaxBanner_2_1_CCell
@@ -103,6 +105,14 @@
 																return cell
 												}
 								}else{
+             let count = datas?.freeCourseList.count ?? 0
+            if count == 0{
+                let cell = collectionView.dequeueReusableCell(withReuseIdentifier: "_EmptyCCell", for: indexPath) as! EmptyCCell
+                cell.btn_call.isHidden = true
+                cell.label_hint.text = "暂无推荐"
+                return cell
+            }
+
 												let cell = collectionView.dequeueReusableCell(withReuseIdentifier: "_HomeRelaxBanner_2_1_CCell", for: indexPath) as! HomeRelaxBanner_2_1_CCell
 												cell.setCourseModel(datas!.freeCourseList[indexPath.row])
             cell.view_price.isHidden = true
@@ -114,12 +124,15 @@
 				}
 
 				func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int {
+
 								if section == 0{
 												let count = datas?.courseList.count ?? 0
 												if count > 0{return count}
 												return 1
 								}else {
-												return datas?.freeCourseList.count ?? 0
+            let count = datas?.freeCourseList.count ?? 0
+            if count > 0{return count}
+												return 1
 								}
 				}
 }
@@ -153,14 +166,21 @@
 
 				func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, sizeForItemAt indexPath: IndexPath) -> CGSize {
 
-								let count = datas?.courseList.count ?? 0
 
-								if indexPath.section == 0 && count == 0{
-												return CGSize(width: JQ_ScreenW, height: 279)
-								}
+        var count = 0
+        if indexPath.section == 0{
+            count = datas?.courseList.count ?? 0
+        }else{
+            count = datas?.freeCourseList.count ?? 0
+        }
 
-								let w = (JQ_ScreenW - 18 * 3) / 2
-								return CGSize(width: w, height: w * 1.319)
+
+        if count == 0{
+            return CGSize(width: JQ_ScreenW, height: 279)
+        }else{
+            let w = (JQ_ScreenW - 18 * 3) / 2
+            return CGSize(width: w, height: w * 1.319)
+        }
 				}
 }
 
diff --git a/XQMuse/Root/Me/VC/VIPCenterVC.swift b/XQMuse/Root/Me/VC/VIPCenterVC.swift
index 240b1b2..d2c4233 100644
--- a/XQMuse/Root/Me/VC/VIPCenterVC.swift
+++ b/XQMuse/Root/Me/VC/VIPCenterVC.swift
@@ -123,7 +123,7 @@
                 }).disposed(by: weakSelf.disposeBag)
             }
         } errorClouse: { error in
-            alertError(msg: error.localizedDescription)
+            alertError(msg: "支付失败")
         }
     }
     
diff --git a/XQMuse/Root/Me/VC/WalletRechargeVC.swift b/XQMuse/Root/Me/VC/WalletRechargeVC.swift
index e434cd5..77e915e 100644
--- a/XQMuse/Root/Me/VC/WalletRechargeVC.swift
+++ b/XQMuse/Root/Me/VC/WalletRechargeVC.swift
@@ -104,7 +104,7 @@
                 }).disposed(by: weakSelf.disposeBag)
             }
         } errorClouse: { error in
-            alertError(msg: error.localizedDescription)
+            alertError(msg: "支付失败")
         }
     }
 }
diff --git a/XQMuse/Root/Network/Services.swift b/XQMuse/Root/Network/Services.swift
index 1b70ac2..ef102bb 100644
--- a/XQMuse/Root/Network/Services.swift
+++ b/XQMuse/Root/Network/Services.swift
@@ -703,6 +703,14 @@
 												.append(key: "pageSize", value: pageSize)
 								return NetworkRequest.request(params: params, method: .post, progress: false)
 				}
+
+    class func bindVx(openId:String,wxName:String)->Observable<BaseResponse<SimpleModel>>{
+        let params = ParamsAppender.build(url: All_Url)
+        params.interface(url: "/user/client/app-user/bindVx")
+            .append(key: "openId", value: openId)
+            .append(key: "wxName", value: wxName)
+        return NetworkRequest.request(params: params, method: .post, progress: true)
+    }
 }
 
 extension Services{
diff --git a/XQMuse/Root/Other/View/VideoView.swift b/XQMuse/Root/Other/View/VideoView.swift
index 8989806..e477d93 100644
--- a/XQMuse/Root/Other/View/VideoView.swift
+++ b/XQMuse/Root/Other/View/VideoView.swift
@@ -52,13 +52,6 @@
                 if let imageV = Url.jq_getVideoThumbnail(){
                     self.addPlaceHoderView(firstFPSImage:imageV)
                 }
-//                URL.jq_splitVideoFileUrlFps(splitFileUrl: Url, fps: 1) {[weak self] state, images in
-//                    if let first = images.first{
-//                        DispatchQueue.main.async {
-//                            self?.addPlaceHoderView(firstFPSImage: first)
-//                        }
-//                    }
-//                }
             }
 
 												if autoPlay{
@@ -100,7 +93,7 @@
 
         imageView.contentMode = .scaleAspectFit
 								placeV.addSubview(imageView)
-								imageView.frame = player.frame
+
 
 								let btn_placeholder = UIButton(type: .custom)
 								btn_placeholder.setImage(UIImage(named: "icon_play"), for: .normal)
@@ -110,6 +103,10 @@
 												make.center.equalToSuperview()
 								}
 
+        imageView.snp.makeConstraints { make in
+            make.edges.equalToSuperview()
+        }
+
 								player.placeholder = placeV
 				}
 
diff --git a/XQMuse/Root/TreeGroup/TreeTeskVC.swift b/XQMuse/Root/TreeGroup/TreeTeskVC.swift
index b9a237d..c8d9a77 100644
--- a/XQMuse/Root/TreeGroup/TreeTeskVC.swift
+++ b/XQMuse/Root/TreeGroup/TreeTeskVC.swift
@@ -99,7 +99,7 @@
 								btn_seedingAgain.isHidden = true
 
 								if settingModel!.userFirstOpenTreeTask{
-												DispatchQueue.main.asyncAfter(delay: 2.0) {
+            DispatchQueue.main.asyncAfter(delay: 0.5) {
 																let h = (JQ_ScreenW - 90) * 0.8766
 																TreeTeskFirstRuleView.show(title: "心泉之树", content:"亲爱的家人,感谢您用心的交流。\n现在,您心灵之树的种子已经植入这片沃土,请以农夫的心态用心浇灌,不久的将来,将会长成苍天大树,结出丰硕的果实。加油哦!",textAlignment: .left,height: h,textTopOffset: 22)
                 self.voicePlayer.replaceCurrentItem(with: AVPlayerItem(url: URL(string: TreeLevel.level_1.sound)!))
diff --git a/XQMuse/Root/TreeGroup/mov/bg_movie.mov b/XQMuse/Root/TreeGroup/mov/bg_movie.mov
index de660cf..178b17a 100644
--- a/XQMuse/Root/TreeGroup/mov/bg_movie.mov
+++ b/XQMuse/Root/TreeGroup/mov/bg_movie.mov
Binary files differ
diff --git a/XQMuse/SceneDelegate.swift b/XQMuse/SceneDelegate.swift
index 768b1e3..e8e2070 100644
--- a/XQMuse/SceneDelegate.swift
+++ b/XQMuse/SceneDelegate.swift
@@ -102,7 +102,7 @@
                         if let m = model{
                             WeChatTools.getUserInfo(access_token: m.access_token, openId: m.openid) { userInfoModel in
                                 if let u = userInfoModel{
-                                    if UserViewModel.getToken()?.isEmpty ?? true{
+                                    if UserViewModel.getAvatarInfo().wxOpenId.isEmpty{
                                         Services.loginByWechat(headImgUrl: u.headimgurl, nickname: u.nickname, sex: u.sex, wxOpenId: u.openid).subscribe(onNext: {data in
                                             if let model = data.data{
                                                 sceneDelegate?.loginSuccess()
@@ -117,12 +117,12 @@
                                             }
                                         }).disposed(by: JQ_disposeBag)
                                     }else{
-
-
-//                                        NotificationCenter.default.post(name: BindWechat_Noti, object: nil)
-//                                        let v = UserViewModel.getAvatarInfo()
-//                                        v.wxOpenId = u.openid
-//                                        UserViewModel.saveAvatarInfo(v)
+                                        Services.bindVx(openId: u.openid, wxName: u.nickname).subscribe(onNext: {_ in
+                                            NotificationCenter.default.post(name: BindWechat_Noti, object: nil)
+                                            var v = UserViewModel.getAvatarInfo()
+                                            v.wxOpenId = u.openid
+                                            UserViewModel.saveAvatarInfo(v)
+                                        }).disposed(by: JQ_disposeBag)
                                     }
                                 }else{
                                     alertError(msg: "获取信息失败")

--
Gitblit v1.7.1