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 = 3; CURRENT_PROJECT_VERSION = 8; DEVELOPMENT_TEAM = ""; "DEVELOPMENT_TEAM[sdk=iphoneos*]" = M9T3KVL537; ENABLE_USER_SCRIPT_SANDBOXING = NO; @@ -2131,7 +2131,7 @@ CODE_SIGN_IDENTITY = "Apple Development"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution"; CODE_SIGN_STYLE = Manual; CURRENT_PROJECT_VERSION = 3; CURRENT_PROJECT_VERSION = 8; DEVELOPMENT_TEAM = ""; "DEVELOPMENT_TEAM[sdk=iphoneos*]" = M9T3KVL537; ENABLE_USER_SCRIPT_SANDBOXING = NO; XQMuse/AppDelegate.swift
@@ -15,6 +15,7 @@ func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { removeLaunchScreenCacheIfNeeded() WeChatTools.register(appid: WeChatAPPID, link: "https://app.xqzhihui.com/app/") return true } @@ -73,7 +74,18 @@ } func removeLaunchScreenCacheIfNeeded() { let filePath = NSHomeDirectory() + "/Library/SplashBoard" if FileManager.default.fileExists(atPath: filePath) { do { try FileManager.default.removeItem(atPath: filePath) print("清除LaunchScreen缓存成功") } catch { print("清除LaunchScreen缓存失败") } } } } XQMuse/Assets.xcassets/Placeholder/bg_pavilion_top.imageset/Contents.json
@@ -5,12 +5,12 @@ "scale" : "1x" }, { "filename" : "bg_pavilion_top@2x.png", "filename" : "头部@2x.png", "idiom" : "universal", "scale" : "2x" }, { "filename" : "bg_pavilion_top@3x.png", "filename" : "头部@3x.png", "idiom" : "universal", "scale" : "3x" } XQMuse/Assets.xcassets/Placeholder/bg_pavilion_top.imageset/bg_pavilion_top@2x.pngBinary files differ
XQMuse/Assets.xcassets/Placeholder/bg_pavilion_top.imageset/bg_pavilion_top@3x.pngBinary files differ
XQMuse/Assets.xcassets/Placeholder/bg_pavilion_top.imageset/头部@2x.png
XQMuse/Assets.xcassets/Placeholder/bg_pavilion_top.imageset/头部@3x.png
XQMuse/Assets.xcassets/Placeholder/login_top_bg.imageset/Contents.json
@@ -5,12 +5,12 @@ "scale" : "1x" }, { "filename" : "login_top_bg@2x.png", "filename" : "bg@2x.png", "idiom" : "universal", "scale" : "2x" }, { "filename" : "login_top_bg@3x.png", "filename" : "bg@3x.png", "idiom" : "universal", "scale" : "3x" } XQMuse/Assets.xcassets/Placeholder/login_top_bg.imageset/bg@2x.png
XQMuse/Assets.xcassets/Placeholder/login_top_bg.imageset/bg@3x.png
XQMuse/Assets.xcassets/Placeholder/login_top_bg.imageset/login_top_bg@2x.pngBinary files differ
XQMuse/Assets.xcassets/Placeholder/login_top_bg.imageset/login_top_bg@3x.pngBinary files differ
XQMuse/Assets.xcassets/launchScreen.imageset/1732878025264引导图(4).png
XQMuse/Assets.xcassets/launchScreen.imageset/Contents.json
@@ -5,7 +5,7 @@ "scale" : "1x" }, { "filename" : "launchScreen@2x.jpg", "filename" : "1732878025264引导图(4).png", "idiom" : "universal", "scale" : "2x" }, XQMuse/Assets.xcassets/launchScreen.imageset/launchScreen@2x.jpgBinary files differ
XQMuse/Config/Layouts/TestLeftRightCollectionViewFlowLayout.swift
@@ -56,7 +56,7 @@ //计算两个中心点的偏移(距离=cell中心点X值-偏移的colleciotnView中心点X值)取绝对值,这个值应该是一个百位数(iPhone6S的With=375Ppt,偏离量最多375,所以缩放因子设为0.001是适合的) let distance = abs(cell_centerX-centerX); //距离越大缩放比越小,距离小 缩放比越大,缩放比最大为1,即重合 let scale:CGFloat = 1/(1+distance * 0.001); let scale:CGFloat = 1/(1+distance * 0.0005); //缩放(基准点为中心点) //CATransform3DMakeScale (CGFloat sx, CGFloat sy, CGFloat sz) //sx:X轴缩放,代表一个缩放比例,一般都是0-1之间的数字。 XQMuse/Config/StoreKit/InPurchaseManager.swift
@@ -110,28 +110,6 @@ } } // 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(){ InPurchaseManager._sharedInstance = nil } @@ -252,54 +230,4 @@ } } } //获取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)") // } // } // } } XQMuse/Root/Course/CCell/CourseOfficalCommendTopCCell.swift
@@ -31,7 +31,7 @@ func setTitles(_ items:[TitleItem]){ titleItems = items cons_hei.constant = ceil(Double(items.count) / 4) * 103.75 cons_hei.constant = ceil(Double(items.count) / 4) * 93.75 collectionView.reloadData() } XQMuse/Root/Course/CCell/CourseOfficialItemCCell.xib
@@ -18,14 +18,14 @@ <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/> <subviews> <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="course_1" translatesAutoresizingMaskIntoConstraints="NO" id="D7q-iI-B0n"> <rect key="frame" x="39.666666666666664" y="29" width="34.999999999999993" height="31.666666666666671"/> <rect key="frame" x="39.666666666666664" y="24" width="34.999999999999993" height="35"/> <constraints> <constraint firstAttribute="width" relation="lessThanOrEqual" constant="43" id="A6U-Ns-BoS"/> <constraint firstAttribute="height" relation="lessThanOrEqual" constant="50" id="xu0-nX-9PR"/> <constraint firstAttribute="width" constant="35" id="A6U-Ns-BoS"/> <constraint firstAttribute="height" constant="35" id="xu0-nX-9PR"/> </constraints> </imageView> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="--" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="eyG-jG-ONh"> <rect key="frame" x="51.666666666666664" y="77" width="10.666666666666664" height="14.333333333333329"/> <rect key="frame" x="51.666666666666664" y="75" width="10.666666666666664" height="14.333333333333329"/> <fontDescription key="fontDescription" type="system" pointSize="11"/> <nil key="textColor"/> <nil key="highlightedColor"/> @@ -35,9 +35,9 @@ <viewLayoutGuide key="safeArea" id="ZTg-uK-7eu"/> <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <constraints> <constraint firstItem="eyG-jG-ONh" firstAttribute="top" secondItem="gTV-IL-0wX" secondAttribute="top" constant="77" id="0WR-EQ-L1f"/> <constraint firstItem="D7q-iI-B0n" firstAttribute="centerX" secondItem="ZTg-uK-7eu" secondAttribute="centerX" id="FBJ-g1-8N6"/> <constraint firstItem="D7q-iI-B0n" firstAttribute="top" secondItem="gTV-IL-0wX" secondAttribute="top" constant="29" id="IfT-we-B99"/> <constraint firstItem="eyG-jG-ONh" firstAttribute="top" secondItem="D7q-iI-B0n" secondAttribute="bottom" constant="16" id="IKi-5C-Yx4"/> <constraint firstItem="D7q-iI-B0n" firstAttribute="top" secondItem="gTV-IL-0wX" secondAttribute="top" constant="24" id="IfT-we-B99"/> <constraint firstItem="eyG-jG-ONh" firstAttribute="centerX" secondItem="D7q-iI-B0n" secondAttribute="centerX" id="VBt-Ee-fVM"/> </constraints> <size key="customSize" width="114" height="109"/> XQMuse/Root/Home/CCell/HomeRelaxBannerCCell.xib
@@ -26,7 +26,7 @@ <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="0.0" y="0.0" width="28.666666666666664" 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"/> @@ -46,17 +46,17 @@ <rect key="frame" x="10" y="15" width="50" height="18"/> </imageView> <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Emq-gn-QOX"> <rect key="frame" x="0.0" y="162.66666666666666" width="165" height="55.333333333333343"/> <rect key="frame" x="0.0" y="173" width="165" height="45"/> <subviews> <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="icon_play" translatesAutoresizingMaskIntoConstraints="NO" id="KBd-aZ-LFh"> <rect key="frame" x="119" y="13.333333333333343" width="29" height="29"/> <rect key="frame" x="119" y="8" width="29" height="29"/> <constraints> <constraint firstAttribute="width" constant="29" id="Wk0-Zg-gK2"/> <constraint firstAttribute="height" constant="29" id="ogD-HU-izV"/> </constraints> </imageView> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="--" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="fsN-0y-q8f"> <rect key="frame" x="20" y="16" width="94" height="10.666666666666664"/> <rect key="frame" x="20" y="10" width="94" height="10.666666666666664"/> <constraints> <constraint firstAttribute="height" constant="10.57" id="mJn-oc-6Gw"/> </constraints> @@ -65,20 +65,20 @@ <nil key="highlightedColor"/> </label> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="1000" verticalHuggingPriority="251" text="--" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="AYK-rI-cj9"> <rect key="frame" x="20" y="31.999999999999996" width="6.3333333333333321" height="7.3333333333333321"/> <rect key="frame" x="20" y="26" width="6.3333333333333321" height="7.3333333333333357"/> <fontDescription key="fontDescription" type="system" pointSize="6"/> <color key="textColor" red="0.94901960780000005" green="0.92549019610000005" blue="0.97254901959999995" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <nil key="highlightedColor"/> </label> <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="icon_use_small" translatesAutoresizingMaskIntoConstraints="NO" id="3TE-Zp-CLh"> <rect key="frame" x="34" y="32.666666666666686" width="6" height="6"/> <rect key="frame" x="34" y="26.666666666666657" width="6" height="6"/> <constraints> <constraint firstAttribute="height" constant="6" id="BJm-m4-3Q1"/> <constraint firstAttribute="width" constant="6" id="zT4-1f-9rs"/> </constraints> </imageView> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" horizontalCompressionResistancePriority="1000" text="0" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="ZK6-Lk-6Cs"> <rect key="frame" x="42" y="31.999999999999996" width="67" height="7.3333333333333321"/> <rect key="frame" x="42" y="26" width="67" height="7.3333333333333357"/> <fontDescription key="fontDescription" type="system" pointSize="6"/> <color key="textColor" red="1" green="1" blue="1" alpha="1" colorSpace="calibratedRGB"/> <nil key="highlightedColor"/> @@ -86,13 +86,13 @@ </subviews> <color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.55000000000000004" colorSpace="custom" customColorSpace="sRGB"/> <constraints> <constraint firstAttribute="height" constant="55.25" id="10l-1C-Vxq"/> <constraint firstAttribute="height" constant="45" id="10l-1C-Vxq"/> <constraint firstItem="KBd-aZ-LFh" firstAttribute="leading" secondItem="fsN-0y-q8f" secondAttribute="trailing" constant="5" id="2Ea-AQ-Tu0"/> <constraint firstItem="AYK-rI-cj9" firstAttribute="top" secondItem="fsN-0y-q8f" secondAttribute="bottom" constant="5.5" id="DEn-H7-L71"/> <constraint firstItem="3TE-Zp-CLh" firstAttribute="leading" secondItem="AYK-rI-cj9" secondAttribute="trailing" constant="7.5" id="Dgm-MY-Int"/> <constraint firstItem="ZK6-Lk-6Cs" firstAttribute="leading" secondItem="3TE-Zp-CLh" secondAttribute="trailing" constant="2" id="Ic6-HW-ORl"/> <constraint firstItem="AYK-rI-cj9" firstAttribute="leading" secondItem="fsN-0y-q8f" secondAttribute="leading" id="M3h-qb-5fd"/> <constraint firstItem="fsN-0y-q8f" firstAttribute="top" secondItem="Emq-gn-QOX" secondAttribute="top" constant="16" id="PfC-RB-Ljg"/> <constraint firstItem="fsN-0y-q8f" firstAttribute="top" secondItem="Emq-gn-QOX" secondAttribute="top" constant="10" id="PfC-RB-Ljg"/> <constraint firstItem="KBd-aZ-LFh" firstAttribute="centerY" secondItem="Emq-gn-QOX" secondAttribute="centerY" id="Vtg-Dw-LYO"/> <constraint firstItem="KBd-aZ-LFh" firstAttribute="leading" secondItem="ZK6-Lk-6Cs" secondAttribute="trailing" constant="10" id="YoN-ge-YLi"/> <constraint firstItem="3TE-Zp-CLh" firstAttribute="centerY" secondItem="AYK-rI-cj9" secondAttribute="centerY" id="Zcl-sX-hPV"/> XQMuse/Root/Home/HomeVC.swift
@@ -355,7 +355,7 @@ AudioPlayer.getSharedInstance().playSceneAt(userDefaultSettingModel.sceneMusicModel!.audioFile) } if let imageUrl = userDefaultSettingModel.sceneMusicModel?.imageUrl{ if let imageUrl = userDefaultSettingModel.sceneMusicModel?.imageUrl,imageUrl.isEmpty == false{ self.topMenuView.image_top.sd_setImage(with: URL(string: imageUrl.jq_urlEncoded())) } } XQMuse/Root/Home/View/HomeTopMenuView.swift
@@ -34,6 +34,7 @@ override func awakeFromNib() { super.awakeFromNib() image_top.image = UIImage(named: "home_top_bg") menu_height.constant = 119 menu_collectionView.delegate = self menu_collectionView.dataSource = self XQMuse/Root/Login/LoginVC.xib
@@ -182,14 +182,14 @@ </button> </subviews> </stackView> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="第三方登录" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="9Rg-d1-NE7"> <rect key="frame" x="166.66666666666666" y="441.66666666666663" width="59.666666666666657" height="14.333333333333314"/> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="第三方登录" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="9Rg-d1-NE7"> <rect key="frame" x="10" y="441.66666666666663" width="373" height="14.333333333333314"/> <fontDescription key="fontDescription" type="system" pointSize="12"/> <color key="textColor" red="0.5725490196078431" green="0.56862745098039214" blue="0.56862745098039214" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <nil key="highlightedColor"/> </label> <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="cUd-a4-RTn"> <rect key="frame" x="295" y="184.66666666666669" width="70" height="29"/> <rect key="frame" x="295" y="184.33333333333331" width="70" height="29"/> <fontDescription key="fontDescription" type="system" weight="medium" pointSize="14"/> <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/> <state key="normal" title="获取验证码"> @@ -213,13 +213,13 @@ </connections> </button> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="我已阅读并同意" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="esZ-HR-QwQ"> <rect key="frame" x="57.000000000000007" y="238" width="83.666666666666686" height="14.333333333333343"/> <rect key="frame" x="57.000000000000007" y="237.66666666666669" width="83.666666666666686" height="14.333333333333343"/> <fontDescription key="fontDescription" type="system" weight="medium" pointSize="12"/> <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="0.59999999999999998" colorSpace="custom" customColorSpace="sRGB"/> <nil key="highlightedColor"/> </label> <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="MNJ-Ag-zfE"> <rect key="frame" x="145.66666666666666" y="231.66666666666669" width="84" height="27"/> <rect key="frame" x="145.66666666666666" y="231.33333333333331" width="84" height="27"/> <fontDescription key="fontDescription" type="system" weight="medium" pointSize="12"/> <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/> <state key="normal" title="《用户注册协议》"> @@ -230,7 +230,7 @@ </connections> </button> <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="eq2-Wp-Yza"> <rect key="frame" x="237.66666666666663" y="231.66666666666669" width="84" height="27"/> <rect key="frame" x="237.66666666666663" y="231.33333333333331" width="84" height="27"/> <fontDescription key="fontDescription" type="system" weight="medium" pointSize="12"/> <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/> <state key="normal" title="《用户隐私协议》"> @@ -254,6 +254,7 @@ <constraint firstItem="esZ-HR-QwQ" firstAttribute="centerY" secondItem="6Xe-Xr-eHg" secondAttribute="centerY" constant="-2" id="3EO-Xv-RNw"/> <constraint firstItem="WEh-Dp-WMI" firstAttribute="trailing" secondItem="9rD-4T-K6b" secondAttribute="trailing" id="8SR-l5-rI9"/> <constraint firstItem="6Xe-Xr-eHg" firstAttribute="top" secondItem="Oyy-8c-eua" secondAttribute="bottom" constant="9" id="9SA-Os-bVk"/> <constraint firstItem="9Rg-d1-NE7" firstAttribute="top" secondItem="EBj-o7-Mca" secondAttribute="bottom" constant="57.670000000000002" id="Ag0-UN-5QS"/> <constraint firstItem="EBj-o7-Mca" firstAttribute="leading" secondItem="Cxv-rm-1Fq" secondAttribute="leading" constant="31" id="B4S-Om-agc"/> <constraint firstItem="k1h-gO-9vj" firstAttribute="centerY" secondItem="EBj-o7-Mca" secondAttribute="centerY" id="Bvm-1l-kEG"/> <constraint firstItem="MNJ-Ag-zfE" firstAttribute="leading" secondItem="esZ-HR-QwQ" secondAttribute="trailing" constant="5" id="C6j-4e-yc6"/> @@ -277,6 +278,7 @@ <constraint firstItem="9Rg-d1-NE7" firstAttribute="centerX" secondItem="Cxv-rm-1Fq" secondAttribute="centerX" id="Rex-9x-Wo6"/> <constraint firstAttribute="trailing" secondItem="WEh-Dp-WMI" secondAttribute="trailing" constant="31" id="TZ8-4n-Xna"/> <constraint firstItem="Oyy-8c-eua" firstAttribute="top" secondItem="8PR-dw-BH2" secondAttribute="bottom" constant="12" id="VlX-ey-VYY"/> <constraint firstItem="9Rg-d1-NE7" firstAttribute="leading" secondItem="Cxv-rm-1Fq" secondAttribute="leading" constant="10" id="Vp4-WN-6Hg"/> <constraint firstAttribute="trailing" secondItem="3sh-AF-8OT" secondAttribute="trailing" constant="31" id="Xhx-v4-0Qk"/> <constraint firstAttribute="bottomMargin" secondItem="KA3-yN-ocu" secondAttribute="bottom" constant="5" id="bSL-HU-hJd"/> <constraint firstItem="eKb-oX-1Uq" firstAttribute="top" secondItem="Oyy-8c-eua" secondAttribute="bottom" constant="71" id="ee0-52-J9n"/> @@ -294,6 +296,7 @@ <constraint firstAttribute="bottomMargin" secondItem="ZrE-T5-sl1" secondAttribute="bottom" constant="33" id="wOB-XA-cMQ"/> <constraint firstItem="x0Y-XG-Xsv" firstAttribute="centerY" secondItem="8PR-dw-BH2" secondAttribute="centerY" id="wjE-4Y-60n"/> <constraint firstAttribute="trailing" secondItem="cUd-a4-RTn" secondAttribute="trailing" constant="28" id="x6o-ii-ebK"/> <constraint firstAttribute="trailing" secondItem="9Rg-d1-NE7" secondAttribute="trailing" constant="10" id="zqV-2w-zAh"/> </constraints> </view> </subviews> @@ -305,7 +308,6 @@ <constraint firstAttribute="trailing" secondItem="Cxv-rm-1Fq" secondAttribute="trailing" id="DIG-8y-ixo"/> <constraint firstItem="CyS-nF-bm3" firstAttribute="leading" secondItem="i5M-Pr-FkT" secondAttribute="leading" id="kEl-bP-mav"/> <constraint firstItem="Cxv-rm-1Fq" firstAttribute="leading" secondItem="i5M-Pr-FkT" secondAttribute="leading" id="pS8-3R-qnI"/> <constraint firstItem="Cxv-rm-1Fq" firstAttribute="top" secondItem="i5M-Pr-FkT" secondAttribute="top" constant="248" id="zL8-i7-1hQ"/> </constraints> <point key="canvasLocation" x="95.419847328244273" y="20.422535211267608"/> </view> XQMuse/Root/Me/VC/LevelVC.xib
@@ -82,7 +82,7 @@ <constraint firstItem="7JM-Vh-SUj" firstAttribute="leading" secondItem="P4c-hh-W7E" secondAttribute="leading" constant="15" id="tha-dL-QzA"/> </constraints> </view> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="心泉・疗愈 升级规则" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="jLq-af-gey"> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="泉疗愈 升级规则" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="jLq-af-gey"> <rect key="frame" x="46.666666666666657" y="250.66666666666663" width="300" height="40"/> <color key="backgroundColor" red="0.54117647058823526" green="0.68235294117647061" blue="0.396078431372549" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <constraints> 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) } @@ -70,7 +70,15 @@ @IBAction func checkVersion(_ sender: TapBtn) { JQTool.checkVersion(appid: AppleID) { stat, model, url in if stat{ CommonAlertView.show(title: "版本更新", content: "发现新版本,是否更新?") { s in if let u = url, s == true{ UIApplication.shared.open(u) } } }else{ alert(msg: "当前已是最新版本") } } } 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="44.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.666666666666664" y="15" width="74.666666666666686" 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"/> XQMuse/Root/Me/VC/VIPCenterVC.swift
@@ -21,6 +21,7 @@ @IBOutlet weak var label_expirtTime: UILabel! @IBOutlet weak var webView: WKWebView! @IBOutlet weak var webViewHeiCons: NSLayoutConstraint! @IBOutlet weak var btn_open: UIButton! private var selectIndex = 0 private var productList = Set<String>() @@ -31,26 +32,30 @@ private var isShowMore:Bool = false private var orderId:String? //下单后的ID //测试内购账号:sandbox_muse@163.com / AB328820b1. override func viewDidLoad() { super.viewDidLoad() title = "会员中心" btn_open.isEnabled = false btn_open.backgroundColor = UIColor.gray productList.insert("com.XQmuse.Non.renewing.year.1") productList.insert("com.XQmuse.Non.renewing.half.year.1") productList.insert("com.XQmuse.Non.renewing.month.1") productList.insert("com.XQmuse.non.renewable.sub.year.1") productList.insert("com.XQmuse.non.renewable.sub.quarter.1") productList.insert("com.XQmuse.non.renewable.sub.month.1") Services.getTurn(progress: false).subscribe(onNext: {[weak self]data in guard let weakSelf = self else { return } if let m = data.data,m == true{ weakSelf.isShowMore = m Services.getVipPrice().subscribe(onNext: { data in if let m = data.data{ weakSelf.vipContentModel = m weakSelf.collectionView.reloadData() } }).disposed(by: weakSelf.disposeBag) } }).disposed(by: disposeBag) // Services.getTurn(progress: false).subscribe(onNext: {[weak self]data in // guard let weakSelf = self else { return } // if let m = data.data,m == true{ // weakSelf.isShowMore = m // Services.getVipPrice().subscribe(onNext: { data in // if let m = data.data{ // weakSelf.vipContentModel = m // weakSelf.collectionView.reloadData() // } // }).disposed(by: weakSelf.disposeBag) // } // }).disposed(by: disposeBag) collectionView.delegate = self @@ -59,12 +64,16 @@ collectionView.contentInset = UIEdgeInsets(top: 0, left: 15, bottom: 0, right: 15) collectionView.register(VipCenterCCell.self, forCellWithReuseIdentifier: "cell") showHUD() InPurchaseManager.instance().setProductList(productList) { products in self.products = Array(products) self.products.sort { p1, p2 in return p1.price.doubleValue < p2.price.doubleValue } self.btn_open.isEnabled = true self.btn_open.backgroundColor = UIColor(hexString: "#8AAE65") self.collectionView.reloadData() hiddenHUD() } @@ -178,7 +187,14 @@ guard let weakSelf = self else { return } if result.status == 0{ hiddenHUD() let transactionId = result.receipt?.in_app.first?.original_transaction_id ?? "" var purchaseResult:PurchaseInAPP? if (result.receipt?.in_app.count ?? 0) >= 2{ purchaseResult = result.receipt?.in_app.sorted(by: {$0.original_purchase_date_ms!.int! > $1.original_purchase_date_ms!.int!}).first }else{ purchaseResult = result.receipt?.in_app.first } let transactionId = purchaseResult?.transaction_id ?? "" showHUD("正在查询购买结果") Services.placeOrderApple(amount: product.price.doubleValue, balanceFlag: .no, orderFrom: 3, transactionIdentifier: transactionId, vipType: weakSelf.selectIndex + 1).subscribe(onNext: { data in @@ -186,7 +202,7 @@ let observable = Observable<Int>.interval(RxTimeInterval.seconds(5), scheduler: MainScheduler.instance) observable.subscribe { event in if event.element == 10{ alertError(msg: "订单异常") alertError(msg: "订单异常,请联系客服") weakSelf.timeLoopDisposeBag = DisposeBag() return } @@ -325,15 +341,20 @@ var priorDayPrice:Double = 0 switch product.productIdentifier { case "com.XQmuse.Non.renewing.year.1": // case "com.XQmuse.Non.renewing.year.1": case "com.XQmuse.non.renewable.sub.year.1": priorDayPrice = product.price.doubleValue / 365.0 case "com.XQmuse.Non.renewing.half.year.1": // case "com.XQmuse.Non.renewing.half.year.1": case "com.XQmuse.non.renewable.sub.quarter.1": priorDayPrice = product.price.doubleValue / 180.0 case "com.XQmuse.Non.renewing.month.1": // case "com.XQmuse.Non.renewing.month.1": case "com.XQmuse.non.renewable.sub.month.1": priorDayPrice = product.price.doubleValue / 30.0 default: priorDayPrice = product.price.doubleValue } //购买后即可享受一年的会员疗愈,畅听疗愈音频 //我的->点击"泉疗愈会员" XQMuse/Root/Me/VC/VIPCenterVC.xib
@@ -13,6 +13,7 @@ <connections> <outlet property="bg_vip" destination="w2X-DC-MsM" id="eUS-mm-b27"/> <outlet property="btn_isRead" destination="6ZY-8B-NMH" id="vPj-36-S58"/> <outlet property="btn_open" destination="s5h-cp-fKN" id="Jbm-OC-ltO"/> <outlet property="collectionView" destination="Ue5-Zy-CjC" id="lPV-ex-sdB"/> <outlet property="label_expirtTime" destination="9TG-o4-3iP" id="gfB-ZZ-lSf"/> <outlet property="label_vipHint" destination="teL-7U-G1S" id="PaY-O3-zF6"/> XQMuse/Root/Network/Services.swift
@@ -13,7 +13,8 @@ import CoreLocation #if DEBUG let All_Url = "http://192.168.110.64:9000" //let All_Url = "http://192.168.110.64:9000" let All_Url = "https://xq.xqzhihui.com/api" //let All_Url = "http://192.168.110.64:9000" //let All_Url = "https://mock.apipost.net/mock/31b303c60464000" #else XQMuse/Root/Plans/View/PlanGuidePromptView.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> @@ -21,7 +21,7 @@ <rect key="frame" x="0.0" y="0.0" width="313" height="419.66666666666669"/> </imageView> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="心泉之约" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="k1J-jo-vT3"> <rect key="frame" x="103.66666666666666" y="65.000000000000028" width="105.66666666666666" height="31.333333333333329"/> <rect key="frame" x="107" y="65.000000000000028" width="99.333333333333314" height="31.333333333333329"/> <fontDescription key="fontDescription" type="system" pointSize="26"/> <color key="textColor" red="0.20784313725490194" green="0.40000000000000002" blue="0.1764705882352941" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <nil key="highlightedColor"/> @@ -33,7 +33,7 @@ <nil key="highlightedColor"/> </label> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="(可以选择并跟随心境调整)" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Z1Y-Ly-LdG"> <rect key="frame" x="52.333333333333329" y="207.66666666666666" width="208.33333333333337" height="20.333333333333343"/> <rect key="frame" x="55.333333333333329" y="207.66666666666666" width="202.66666666666669" height="20.333333333333343"/> <fontDescription key="fontDescription" type="system" pointSize="17"/> <nil key="textColor"/> <nil key="highlightedColor"/>