XQMuse.xcodeproj/project.pbxproj
@@ -53,6 +53,8 @@ 1324A6492C80632500AA5098 /* SourceHanSerifCN-Regular.otf in Resources */ = {isa = PBXBuildFile; fileRef = 1324A6472C80632500AA5098 /* SourceHanSerifCN-Regular.otf */; }; 1324A64C2C80706700AA5098 /* PlanGuide_1_VC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1324A64A2C80706700AA5098 /* PlanGuide_1_VC.swift */; }; 1324A64D2C80706700AA5098 /* PlanGuide_1_VC.xib in Resources */ = {isa = PBXBuildFile; fileRef = 1324A64B2C80706700AA5098 /* PlanGuide_1_VC.xib */; }; 1325F8DF2CD2021B00907C04 /* InviteVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1325F8DD2CD2021B00907C04 /* InviteVC.swift */; }; 1325F8E02CD2021B00907C04 /* InviteVC.xib in Resources */ = {isa = PBXBuildFile; fileRef = 1325F8DE2CD2021B00907C04 /* InviteVC.xib */; }; 13271D852C75EF8200DE1328 /* AddBankInfoVC.xib in Resources */ = {isa = PBXBuildFile; fileRef = 13271D842C75EF8200DE1328 /* AddBankInfoVC.xib */; }; 13271D862C75EF8200DE1328 /* AddBankInfoVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 13271D832C75EF8200DE1328 /* AddBankInfoVC.swift */; }; 1327C67D2C81C288005DA44B /* PlanGuidePromptSupplyView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1327C67C2C81C288005DA44B /* PlanGuidePromptSupplyView.swift */; }; @@ -355,6 +357,8 @@ 1324A6472C80632500AA5098 /* SourceHanSerifCN-Regular.otf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "SourceHanSerifCN-Regular.otf"; sourceTree = "<group>"; }; 1324A64A2C80706700AA5098 /* PlanGuide_1_VC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PlanGuide_1_VC.swift; sourceTree = "<group>"; }; 1324A64B2C80706700AA5098 /* PlanGuide_1_VC.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = PlanGuide_1_VC.xib; sourceTree = "<group>"; }; 1325F8DD2CD2021B00907C04 /* InviteVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = InviteVC.swift; sourceTree = "<group>"; }; 1325F8DE2CD2021B00907C04 /* InviteVC.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = InviteVC.xib; sourceTree = "<group>"; }; 13271D832C75EF8200DE1328 /* AddBankInfoVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AddBankInfoVC.swift; sourceTree = "<group>"; }; 13271D842C75EF8200DE1328 /* AddBankInfoVC.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = AddBankInfoVC.xib; sourceTree = "<group>"; }; 1327C67C2C81C288005DA44B /* PlanGuidePromptSupplyView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PlanGuidePromptSupplyView.swift; sourceTree = "<group>"; }; @@ -681,6 +685,8 @@ 134803DB2C7707BA00F4FDDA /* ContactCustomerVC.xib */, 13649F9C2C770C9C00F4E0EE /* ContactCustomerDetailVC.swift */, 13649F9D2C770C9C00F4E0EE /* ContactCustomerDetailVC.xib */, 1325F8DD2CD2021B00907C04 /* InviteVC.swift */, 1325F8DE2CD2021B00907C04 /* InviteVC.xib */, ); path = VC; sourceTree = "<group>"; @@ -1474,6 +1480,7 @@ 13EFCDC22C6DD27A00B51AE6 /* PaymentOrderVC.xib in Resources */, 13A379FC2C75B7280038D5C8 /* BindAccountVC.xib in Resources */, 13F24E412C758DF100D2BA90 /* LogoutAccountVC.xib in Resources */, 1325F8E02CD2021B00907C04 /* InviteVC.xib in Resources */, 130AA4A82C72F71700F20944 /* CourseDetialVideoVC.xib in Resources */, 13BF65D82C80402500E20F0E /* bg_movie.mov in Resources */, 13FB6D7D2C6EE27100A0685D /* CourseOfficialItemCCell.xib in Resources */, @@ -1723,6 +1730,7 @@ 135C2A682C7F033300CC2A67 /* CLFullScreenRightController.swift in Sources */, 139C16632C6A108A00A924D9 /* HomeRelaxBannerCCell.swift in Sources */, 131E75C52C6B87C500E2C85D /* ForgotPasswordChangeVC.swift in Sources */, 1325F8DF2CD2021B00907C04 /* InviteVC.swift in Sources */, 13A6594F2C6F641100F731FA /* CourseDetail_2_Inner_TCell.swift in Sources */, 13334FD52C731C1B00914086 /* VideoView.swift in Sources */, 13FF0B452C75C820008E26CF /* WalletVC.swift in Sources */, XQMuse/.DS_StoreBinary files differ
XQMuse/Assets.xcassets/Placeholder/bg_guide_1.imageset/bg_guide_1@2x.pngXQMuse/Assets.xcassets/Placeholder/bg_guide_1.imageset/bg_guide_1@3x.pngXQMuse/Assets.xcassets/Placeholder/bg_guide_home.imageset/组 20@2x.pngXQMuse/Assets.xcassets/Placeholder/bg_guide_home.imageset/组 20@3x.pngXQMuse/Assets.xcassets/Placeholder/bg_invite.imageset/Contents.json
New file @@ -0,0 +1,22 @@ { "images" : [ { "idiom" : "universal", "scale" : "1x" }, { "filename" : "bg_invite@2x.png", "idiom" : "universal", "scale" : "2x" }, { "filename" : "bg_invite@3x.png", "idiom" : "universal", "scale" : "3x" } ], "info" : { "author" : "xcode", "version" : 1 } } XQMuse/Assets.xcassets/Placeholder/bg_invite.imageset/bg_invite@2x.png
XQMuse/Assets.xcassets/Placeholder/bg_invite.imageset/bg_invite@3x.png
XQMuse/Assets.xcassets/Placeholder/bg_pavilion_top.imageset/bg_pavilion_top@2x.pngXQMuse/Assets.xcassets/Placeholder/bg_pavilion_top.imageset/bg_pavilion_top@3x.pngXQMuse/Assets.xcassets/Placeholder/bg_prompt.imageset/bg_prompt@2x.pngXQMuse/Assets.xcassets/Placeholder/bg_prompt.imageset/bg_prompt@3x.pngXQMuse/Assets.xcassets/Placeholder/bg_vip.imageset/bg_vip@2x.pngXQMuse/Assets.xcassets/Placeholder/bg_vip.imageset/bg_vip@3x.pngXQMuse/Assets.xcassets/Placeholder/bg_voice_top.imageset/bg_voice_top@2x.pngXQMuse/Assets.xcassets/Placeholder/bg_voice_top.imageset/bg_voice_top@3x.pngXQMuse/Assets.xcassets/Placeholder/demo_bg.imageset/demo_bg@2x.jpgXQMuse/Assets.xcassets/Placeholder/demo_pg_1.imageset/demo_pg_1@2x.pngXQMuse/Assets.xcassets/Placeholder/demo_pg_1.imageset/demo_pg_1@3x.pngXQMuse/Assets.xcassets/Placeholder/home_top_bg.imageset/home_top_bg@2x.pngXQMuse/Assets.xcassets/Placeholder/home_top_bg.imageset/home_top_bg@3x.pngXQMuse/Assets.xcassets/Placeholder/login_top_bg.imageset/login_top_bg@2x.pngXQMuse/Assets.xcassets/Placeholder/login_top_bg.imageset/login_top_bg@3x.pngXQMuse/Info.plist
@@ -20,6 +20,10 @@ <string>weixin</string> <string>weixinULAPI</string> <string>weixinURLParamsAPI</string> <string>baidumap</string> <string>comgooglemaps</string> <string>qqmap</string> <string>iosamap</string> </array> <key>Localization native development region</key> <string>China</string> XQMuse/Root/Course/VC/CourseDetialVC.swift
@@ -149,7 +149,10 @@ if needPayment{ let attribute = AttributedStringbuilder.build().add(string: " 疗愈币", withFont: .systemFont(ofSize: 12,weight: .bold), withColor: UIColor(hexString: "#F6F6F6")!).add(string: "\(m.generalPrice.jq_formatFloat)", withFont: .systemFont(ofSize: 21.71, weight: .bold), withColor: UIColor(hexString: "#F6F6F6")!).add(string: " 立即购买 ", withFont: .systemFont(ofSize: 16, weight: .bold), withColor: UIColor(hexString: "#F6F6F6")!).mutableAttributedString self.studyBtn.setAttributedTitle(attribute, for: .normal) } }else{ let attribute = AttributedStringbuilder.build().add(string: " 立即学习 ", withFont: .systemFont(ofSize: 16, weight: .bold), withColor: UIColor(hexString: "#F6F6F6")!).mutableAttributedString self.studyBtn.setAttributedTitle(attribute, for: .normal) } if m.detailUrl.jq_isVideo{ self.style = .style1 @@ -239,7 +242,9 @@ } @objc func shareAction(){ ShareView.show() // xqzhihui.com/courseOnline 线上课程详情 // xqzhihui.com/courseOffOnline 线下课程详情 ShareView.show(URL(string: "xqzhihui.com/courseOffOnline")!) } @objc func handleAction(_ btn:QMUIButton){ XQMuse/Root/Home/HomeVC.swift
@@ -234,6 +234,14 @@ extension HomeVC:UITableViewDelegate & UITableViewDataSource{ func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { if indexPath.section == 0{ if let m = viewModel.todyModel{ let vc = HomeItemDetailVC(id: m.id) push(vc: vc) } } if indexPath.section == 2{ let vc = WebVC(type: .guide) vc.title = "心泉·疗愈" XQMuse/Root/Home/VC/HomeItemDetailVC.swift
@@ -233,7 +233,7 @@ } @objc func shareAction(){ ShareView.show() ShareView.show(URL(string:"xqzhihui.com/meditation")!) } override func viewDidLayoutSubviews() { XQMuse/Root/Me/MeVC.swift
@@ -224,7 +224,9 @@ ///分享 @IBAction func shareAction(_ sender: QMUIButton) { let vc = InviteVC() push(vc: vc) // ShareView.show(URL(string: "xqzhihui.com/commission")!) } } XQMuse/Root/Me/VC/InviteVC.swift
New file @@ -0,0 +1,46 @@ // // InviteVC.swift // XQMuse // // Created by 无故事王国 on 2024/10/30. // import UIKit import JQTools class InviteVC: BaseVC { @IBOutlet weak var label_title: UILabel! @IBOutlet weak var btn_share: UIButton! @IBOutlet weak var view_role: UIView! @IBOutlet weak var label_role: UILabel! @IBOutlet weak var img_qrCode: UIImageView! @IBOutlet weak var img_poster: UIImageView! override func viewDidLoad() { super.viewDidLoad() title = "推广活动" Services.getCommissionRule().subscribe(onNext: {data in if let m = data.data{ self.img_qrCode.sd_setImage(with: URL(string: m.qrCode)) self.img_poster.sd_setImage(with: URL(string: m.poster)) self.label_role.attributedText = NSAttributedString.convertHtml(m.rules) } }).disposed(by: disposeBag) } override func setUI() { label_title.font = Def_SourceHanSerif_Semibold(fontSize: 40) btn_share.jq_cornerRadius = 21.25 view_role.jq_gradientColor(colorArr: [UIColor(hexString: "#eafbeb")!.cgColor,UIColor.white.cgColor], cornerRadius: 20, startPoint: CGPoint(x: 0, y: 0), endPoint: CGPoint(x: 0, y: 1), bounds: nil, locations: nil) } @IBAction func shareAction(_ sender: UIButton) { ShareView.show("测试") } } XQMuse/Root/Me/VC/InviteVC.xib
New file @@ -0,0 +1,143 @@ <?xml version="1.0" encoding="UTF-8"?> <document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="23094" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES"> <device id="retina6_12" orientation="portrait" appearance="light"/> <dependencies> <deployment identifier="iOS"/> <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="23084"/> <capability name="Safe area layout guides" minToolsVersion="9.0"/> <capability name="System colors in document resources" minToolsVersion="11.0"/> <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/> </dependencies> <objects> <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="InviteVC" customModule="XQMuse" customModuleProvider="target"> <connections> <outlet property="btn_share" destination="XbP-tV-8pd" id="0YX-oc-VDx"/> <outlet property="img_poster" destination="IZY-Nj-jD0" id="hnL-OL-dhs"/> <outlet property="img_qrCode" destination="bff-wn-eyk" id="FV9-RT-3rK"/> <outlet property="label_role" destination="PXe-Ef-0Zn" id="E0d-R5-kBO"/> <outlet property="label_title" destination="oFE-SE-88r" id="C2L-3T-B60"/> <outlet property="view" destination="i5M-Pr-FkT" id="sfx-zR-JGt"/> <outlet property="view_role" destination="nfc-1h-yql" id="FWd-fZ-91R"/> </connections> </placeholder> <placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/> <view clearsContextBeforeDrawing="NO" contentMode="scaleToFill" id="i5M-Pr-FkT"> <rect key="frame" x="0.0" y="0.0" width="393" height="852"/> <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> <subviews> <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="bg_invite" translatesAutoresizingMaskIntoConstraints="NO" id="IZY-Nj-jD0"> <rect key="frame" x="0.0" y="0.0" width="393" height="483.66666666666669"/> </imageView> <scrollView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" showsHorizontalScrollIndicator="NO" showsVerticalScrollIndicator="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Kj8-pf-QQp"> <rect key="frame" x="0.0" y="59" width="393" height="759"/> <subviews> <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"> <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"> <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"/> <nil key="highlightedColor"/> </label> <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="bff-wn-eyk"> <rect key="frame" x="113.33333333333333" y="177.33333333333337" width="166.33333333333337" height="168"/> <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <constraints> <constraint firstAttribute="width" constant="166.5" id="BYS-EF-Iz8"/> <constraint firstAttribute="height" constant="168" id="QuI-vr-Li7"/> </constraints> </imageView> <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="XbP-tV-8pd"> <rect key="frame" x="53.666666666666657" y="375.66666666666669" width="286" height="42.666666666666686"/> <color key="backgroundColor" red="0.54117647059999996" green="0.68235294120000001" blue="0.39607843139999999" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <constraints> <constraint firstAttribute="height" constant="42.5" id="jad-bO-pIf"/> </constraints> <fontDescription key="fontDescription" type="system" weight="semibold" pointSize="15"/> <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/> <state key="normal" title="分享给好友赚佣金"/> <connections> <action selector="shareAction:" destination="-1" eventType="touchUpInside" id="Atz-SI-etO"/> </connections> </button> <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="nfc-1h-yql"> <rect key="frame" x="20" y="448.33333333333331" width="353" height="98.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="OEa-I3-lut"> <rect key="frame" x="132" y="20.000000000000057" width="89.333333333333314" height="18"/> <fontDescription key="fontDescription" type="system" weight="semibold" pointSize="15"/> <nil key="textColor"/> <nil key="highlightedColor"/> </label> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="PXe-Ef-0Zn"> <rect key="frame" x="20" y="58.000000000000064" width="313" height="20.333333333333336"/> <fontDescription key="fontDescription" type="system" pointSize="17"/> <nil key="textColor"/> <nil key="highlightedColor"/> </label> </subviews> <color key="backgroundColor" systemColor="systemBackgroundColor"/> <constraints> <constraint firstAttribute="trailing" secondItem="PXe-Ef-0Zn" secondAttribute="trailing" constant="20" id="50t-3i-mW2"/> <constraint firstAttribute="bottom" secondItem="PXe-Ef-0Zn" secondAttribute="bottom" constant="20" id="9Xa-Zo-T2i"/> <constraint firstItem="PXe-Ef-0Zn" firstAttribute="leading" secondItem="nfc-1h-yql" secondAttribute="leading" constant="20" id="G4Y-s1-lMi"/> <constraint firstItem="OEa-I3-lut" firstAttribute="centerX" secondItem="nfc-1h-yql" secondAttribute="centerX" id="ImF-Cc-ENZ"/> <constraint firstItem="PXe-Ef-0Zn" firstAttribute="top" secondItem="OEa-I3-lut" secondAttribute="bottom" constant="20" id="ZTS-aZ-hAQ"/> <constraint firstItem="OEa-I3-lut" firstAttribute="top" secondItem="nfc-1h-yql" secondAttribute="top" constant="20" id="tde-zX-zeD"/> </constraints> </view> </subviews> <constraints> <constraint firstItem="nfc-1h-yql" firstAttribute="top" secondItem="XbP-tV-8pd" secondAttribute="bottom" constant="30" id="04U-uD-YFh"/> <constraint firstItem="XbP-tV-8pd" firstAttribute="top" secondItem="bff-wn-eyk" secondAttribute="bottom" constant="30.5" id="0ND-qB-iY4"/> <constraint firstItem="oFE-SE-88r" firstAttribute="top" secondItem="fRO-Jr-RG3" secondAttribute="top" constant="74" id="3f7-Q1-n5C"/> <constraint firstItem="lCK-Mw-vTJ" firstAttribute="centerX" secondItem="oFE-SE-88r" secondAttribute="centerX" id="87n-J7-eVR"/> <constraint firstItem="oFE-SE-88r" firstAttribute="centerX" secondItem="fRO-Jr-RG3" secondAttribute="centerX" id="Alc-26-vLT"/> <constraint firstItem="lCK-Mw-vTJ" firstAttribute="top" secondItem="oFE-SE-88r" secondAttribute="bottom" constant="9" id="Fxq-TA-MMT"/> <constraint firstItem="XbP-tV-8pd" firstAttribute="leading" secondItem="fRO-Jr-RG3" secondAttribute="leading" constant="53.5" id="P23-ld-LdM"/> <constraint firstItem="bff-wn-eyk" firstAttribute="top" secondItem="lCK-Mw-vTJ" secondAttribute="bottom" constant="36.5" id="Uas-XO-jrk"/> <constraint firstItem="bff-wn-eyk" firstAttribute="centerX" secondItem="fRO-Jr-RG3" secondAttribute="centerX" id="V0p-rN-phX"/> <constraint firstAttribute="trailing" secondItem="nfc-1h-yql" secondAttribute="trailing" constant="20" id="WbI-U1-XLA"/> <constraint firstAttribute="trailing" secondItem="XbP-tV-8pd" secondAttribute="trailing" constant="53.5" id="duF-f1-FPy"/> <constraint firstAttribute="bottom" secondItem="nfc-1h-yql" secondAttribute="bottom" constant="30" id="lAH-v1-5Pu"/> <constraint firstItem="nfc-1h-yql" firstAttribute="leading" secondItem="fRO-Jr-RG3" secondAttribute="leading" constant="20" id="wsp-DZ-Vsl"/> </constraints> </view> </subviews> <constraints> <constraint firstItem="fRO-Jr-RG3" firstAttribute="top" secondItem="Kj8-pf-QQp" secondAttribute="top" id="5Pg-TF-Gb9"/> <constraint firstItem="fRO-Jr-RG3" firstAttribute="centerX" secondItem="Kj8-pf-QQp" secondAttribute="centerX" id="KVN-4X-zii"/> <constraint firstAttribute="bottom" secondItem="fRO-Jr-RG3" secondAttribute="bottom" id="Oam-1S-ImW"/> <constraint firstAttribute="trailing" secondItem="fRO-Jr-RG3" secondAttribute="trailing" id="QJe-O5-2zk"/> <constraint firstItem="fRO-Jr-RG3" firstAttribute="leading" secondItem="Kj8-pf-QQp" secondAttribute="leading" id="g3X-lW-OHt"/> </constraints> </scrollView> </subviews> <viewLayoutGuide key="safeArea" id="fnl-2z-Ty3"/> <color key="backgroundColor" systemColor="systemBackgroundColor"/> <constraints> <constraint firstItem="Kj8-pf-QQp" firstAttribute="top" secondItem="fnl-2z-Ty3" secondAttribute="top" id="IMW-r4-OkS"/> <constraint firstItem="IZY-Nj-jD0" firstAttribute="top" secondItem="i5M-Pr-FkT" secondAttribute="top" id="PQ2-Ha-kPM"/> <constraint firstItem="fnl-2z-Ty3" firstAttribute="bottom" secondItem="Kj8-pf-QQp" secondAttribute="bottom" id="TFq-oj-nHs"/> <constraint firstItem="IZY-Nj-jD0" firstAttribute="leading" secondItem="fnl-2z-Ty3" secondAttribute="leading" id="TH6-Zy-Z3J"/> <constraint firstItem="fnl-2z-Ty3" firstAttribute="trailing" secondItem="Kj8-pf-QQp" secondAttribute="trailing" id="YAi-5i-Bes"/> <constraint firstItem="fnl-2z-Ty3" firstAttribute="trailing" secondItem="IZY-Nj-jD0" secondAttribute="trailing" id="cef-7x-EhS"/> <constraint firstItem="Kj8-pf-QQp" firstAttribute="leading" secondItem="fnl-2z-Ty3" secondAttribute="leading" id="p90-x8-H82"/> </constraints> <point key="canvasLocation" x="139.69465648854961" y="20.422535211267608"/> </view> </objects> <resources> <image name="bg_invite" width="390" height="483.66665649414062"/> <systemColor name="systemBackgroundColor"> <color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> </systemColor> </resources> </document> XQMuse/Root/Me/VC/UserProfileVC.swift
@@ -49,7 +49,11 @@ title = "个人资料" image_placeholder.isHidden = !UserViewModel.getAvatarInfo().avatar.isEmpty image_user.sd_setImage(with: URL(string: UserViewModel.getAvatarInfo().avatar)!) if let url = URL(string: UserViewModel.getAvatarInfo().avatar){ image_user.sd_setImage(with: url) } tf_nickName.text = UserViewModel.getAvatarInfo().nickname tf_realName.text = UserViewModel.getAvatarInfo().realname tf_sign.text = UserViewModel.getAvatarInfo().signature @@ -90,10 +94,17 @@ || location != UserViewModel.getAvatarInfo().location || hometown != UserViewModel.getAvatarInfo().hometown || email != UserViewModel.getAvatarInfo().email{ Services.updateUserInfo(birthday: birthday, company: company, education: education, email: email, gender: gender, hometown: hometown, industry: industry, location: location, nickname: nickname, realname: realname, occupation: occupation, signature: signature).subscribe(onNext: {data in NotificationCenter.default.post(name: UpdateUserProfile_Noti, object: nil) weakSelf.navigationController?.popViewController(animated: true) }).disposed(by: weakSelf.disposeBag) CommonAlertView.show(title: "提示", content: "是否保存修改?",cancelStr: "不保存",completeStr: "保存") { state in if state{ Services.updateUserInfo(birthday: birthday, company: company, education: education, email: email, gender: gender, hometown: hometown, industry: industry, location: location, nickname: nickname, realname: realname, occupation: occupation, signature: signature).subscribe(onNext: {data in NotificationCenter.default.post(name: UpdateUserProfile_Noti, object: nil) weakSelf.navigationController?.popViewController(animated: true) }).disposed(by: weakSelf.disposeBag) }else{ weakSelf.navigationController?.popViewController(animated: true) } } }else{ weakSelf.navigationController?.popViewController(animated: true) } XQMuse/Root/Network/Models.swift
@@ -12,6 +12,7 @@ static let idKey = \UserDefaultSettingModel.id var id = 0 var volume:Double = 0.5 var masterVolume:Double = 0.5 var bgm:BGMModel? var playModel:PlayMode = .line @@ -148,9 +149,9 @@ var distance: Double = 0 var hallName: String = "" var id: Int = 0 var latitude: Int = 0 var latitude: Double = 0 var listingStatus: Int = 0 var longitude: Int = 0 var longitude: Double = 0 var sortNum: Int = 0 var updateBy: String = "" var updateTime: String = "" @@ -425,6 +426,15 @@ var updateTime: String = "" } struct CommonRuleModel:HandyJSON{ var id: Int = 0 var poster: String = "" var proportion: Int = 0 var qrCode: String = "" var rules: String = "" } class NoticeModel:HandyJSON{ var appUserId: Int = 0 var content: String = "" XQMuse/Root/Network/Services.swift
@@ -661,6 +661,12 @@ return NetworkRequest.request(params: params, method: .post,encoding: JSONEncoding(), progress: false) } class func getCommissionRule()->Observable<BaseResponse<CommonRuleModel>>{ let params = ParamsAppender.build(url: All_Url) .interface(url: "/system/system/common-question/getCommissionRule") return NetworkRequest.request(params: params, method: .post,encoding: JSONEncoding(), progress: false) } /// 问题列表 class func commonQuestion(page:Int,pageSize:Int = 20)->Observable<BaseResponse<BaseResponseList<CommonQuestionModel>>>{ let params = ParamsAppender.build(url: All_Url) @@ -716,8 +722,4 @@ .append(key: "apipost_id", value: "37771d0cf0e312") return NetworkRequest.request(params: params, method: .post, progress: false) } } XQMuse/Root/Other/View/PlaySettingView.swift
@@ -12,7 +12,8 @@ class PlaySettingView: UIView,JQNibView{ @IBOutlet weak var slider_voice: UISlider! @IBOutlet weak var cons_bottom: NSLayoutConstraint! private var setting = UserDefaultSettingViewModel.getSetting() override func awakeFromNib() { super.awakeFromNib() @@ -26,8 +27,11 @@ v1.jq_borderColor = .white v1.jq_cornerRadius = 8.5 slider_voice.value = Float(setting?.masterVolume ?? 0.5) slider_voice.setThumbImage(v1.qmui_snapshotLayerImage(), for: .normal) slider_voice.setThumbImage(v1.qmui_snapshotLayerImage(), for: .highlighted) slider_voice.addTarget(self, action: #selector(changeValues), for: .touchUpInside) layoutIfNeeded() } @@ -45,6 +49,14 @@ } } @objc private func changeValues(_ slider:UISlider){ if var setting = UserDefaultSettingViewModel.getSetting(){ setting.masterVolume = Double(slider.value) UserDefaultSettingViewModel.saveSetting(setting) NotificationCenter.default.post(name: ChangeMasterVoice_Noti, object: slider.value) } } @IBAction func hiddenAction(_ sender: UIButton) { self.cons_bottom.constant = -JQ_ScreenW UIView.animate(withDuration: 0.4) { XQMuse/Root/Other/View/PlaySettingView.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="System colors in document resources" minToolsVersion="11.0"/> <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/> @@ -26,13 +26,13 @@ <rect key="frame" x="18" y="553.66666666666663" width="357" height="199"/> <subviews> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="播放设置" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="HMw-v5-jl2"> <rect key="frame" x="141.66666666666666" y="34.333333333333371" width="73.666666666666657" height="21"/> <rect key="frame" x="142.66666666666666" y="34.333333333333371" width="71.666666666666657" height="21"/> <fontDescription key="fontDescription" type="system" weight="medium" pointSize="18"/> <nil key="textColor"/> <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="kfS-9J-5Vr"> <rect key="frame" x="152" y="75.333333333333371" width="53.333333333333343" height="15.666666666666671"/> <rect key="frame" x="152.66666666666666" y="75.333333333333371" width="51.666666666666657" height="15.666666666666671"/> <fontDescription key="fontDescription" type="system" pointSize="13"/> <color key="textColor" red="0.36078431372549019" green="0.36078431372549019" blue="0.36078431372549019" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <nil key="highlightedColor"/> @@ -40,7 +40,7 @@ <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="icon_voice" translatesAutoresizingMaskIntoConstraints="NO" id="Atb-Fs-uN7"> <rect key="frame" x="28.666666666666664" y="139.33333333333337" width="19.666666666666664" height="16"/> </imageView> <slider opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" minValue="0.0" maxValue="100" translatesAutoresizingMaskIntoConstraints="NO" id="w39-6X-xGI"> <slider opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" minValue="0.0" maxValue="1" translatesAutoresizingMaskIntoConstraints="NO" id="w39-6X-xGI"> <rect key="frame" x="58.666666666666686" y="132.33333333333337" width="273" height="31"/> <color key="minimumTrackTintColor" red="0.71764705880000002" green="0.86274509799999999" blue="0.56470588239999997" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <color key="maximumTrackTintColor" red="0.78431372549019607" green="0.78431372549019607" blue="0.78431372549019607" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> XQMuse/Root/Other/View/ShareView.swift
@@ -15,7 +15,9 @@ @IBOutlet weak var btn_wechat: TapBtn! @IBOutlet weak var btn_wechatFri: TapBtn! @IBOutlet weak var btn_save: TapBtn! private var shareContent:Any! private var scene:WXScene! override func awakeFromNib() { super.awakeFromNib() @@ -28,8 +30,9 @@ btn_save.isHidden = true } static func show(){ static func show(_ content:Any){ let shareView = ShareView.jq_loadNibView() shareView.shareContent = content sceneDelegate?.window?.addSubview(shareView) shareView.frame = sceneDelegate?.window?.frame ?? .zero shareView.cons_bottom.constant = 0 @@ -49,4 +52,24 @@ self.removeFromSuperview() } } @IBAction func shareWechatAction(_ sender: Any) { scene = WXSceneSession share() } @IBAction func shareWechatFriAction(_ sender: Any) { scene = WXSceneTimeline share() } private func share(){ if let text = shareContent as? String{ WeChatTools.shareText(text) } if let url = shareContent as? URL{ WeChatTools.shareUrl(url.absoluteString, title: "疗愈", desc: "测", thumb:UIImage()) } } } XQMuse/Root/Other/View/ShareView.xib
@@ -59,6 +59,9 @@ <constraint firstItem="KVQ-as-9PR" firstAttribute="top" secondItem="nQe-Qx-CrR" secondAttribute="bottom" constant="8" id="bi5-tH-n2s"/> <constraint firstAttribute="trailing" secondItem="nQe-Qx-CrR" secondAttribute="trailing" id="yYv-Hi-F8r"/> </constraints> <connections> <action selector="shareWechatAction:" destination="iN0-l3-epB" eventType="touchUpInside" id="4j3-nH-SUP"/> </connections> </view> <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="G6H-X1-86v" customClass="TapBtn" customModule="XQMuse" customModuleProvider="target"> <rect key="frame" x="143" y="0.0" width="51" height="75"/> @@ -83,6 +86,9 @@ <constraint firstItem="IIB-Ay-50b" firstAttribute="centerX" secondItem="A7Q-8p-loL" secondAttribute="centerX" id="etj-OK-c41"/> <constraint firstAttribute="trailing" secondItem="A7Q-8p-loL" secondAttribute="trailing" id="rs6-bc-8zr"/> </constraints> <connections> <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"/> @@ -109,6 +115,7 @@ </constraints> </view> </subviews> <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> <constraints> <constraint firstAttribute="height" constant="75" id="HHP-Ze-KYb"/> </constraints> XQMuse/Root/Pavilion/VC/PavilionDetailVC.swift
@@ -8,6 +8,7 @@ import UIKit import JQTools import WebKit import MapKit class PavilionDetailVC: BaseVC { @@ -21,6 +22,7 @@ @IBOutlet weak var cons_webHei: NSLayoutConstraint! private var id:Int! private var detailModel:PavilionDetailModel? override func viewWillAppear(_ animated: Bool) { super.viewWillAppear(animated) @@ -44,6 +46,7 @@ Services.getPavlilonDetail(id: id).subscribe(onNext: {data in if let m = data.data{ self.detailModel = m self.label_title.text = m.hallName self.label_phone.text = m.contactNumber self.label_address.text = m.addressDetail @@ -64,6 +67,77 @@ }).disposed(by: disposeBag) } @IBAction func gotoThereAction(_ sender: Any) { guard let model = detailModel else {return} let items = JQ_MapNavigationTool.mapList() var formatItems = items.map { type in switch type { case .BaiduMap:return "百度地图" //BD-09 case .Amap:return "高德地图" //GCJ-02 case .GoogleMap:return "谷歌地图" //GCJ-02 case .qqMap:return "腾讯地图" //GCJ-02 } } formatItems.insert("苹果地图", at: 0) CommonAlertSheetView.show(items: formatItems) { index in switch index{ case 0: let item = MKMapItem(placemark: MKPlacemark(coordinate: CLLocationCoordinate2D(latitude: CLLocationDegrees(model.latitude), longitude: CLLocationDegrees(model.longitude)))) item.name = model.hallName item.openInMaps(launchOptions: [MKLaunchOptionsDirectionsModeKey:MKLaunchOptionsDirectionsModeDriving]) case 1: var components = URLComponents() components.scheme = "iosamap" components.host = "path" components.queryItems = [URLQueryItem]() components.queryItems?.append(URLQueryItem(name: "sourceApplication", value: "疗愈")) components.queryItems?.append(URLQueryItem(name: "dlat", value: "\(model.latitude)")) components.queryItems?.append(URLQueryItem(name: "dlon", value: "\(model.longitude)")) components.queryItems?.append(URLQueryItem(name: "dname", value: model.hallName)) UIApplication.shared.open(components.url!) case 2: var components = URLComponents() components.scheme = "comgooglemaps" components.host = "" components.queryItems = [URLQueryItem]() components.queryItems?.append(URLQueryItem(name: "daddr", value: "\(model.latitude),\(model.longitude)")) components.queryItems?.append(URLQueryItem(name: "zoom", value: "14")) components.queryItems?.append(URLQueryItem(name: "views", value: "traffic")) components.queryItems?.append(URLQueryItem(name: "resume", value: "true")) UIApplication.shared.open(components.url!) case 3: var components = URLComponents() components.scheme = "baidumap" components.host = "map" components.path = "/direction" components.queryItems = [URLQueryItem]() components.queryItems?.append(URLQueryItem(name: "origin", value: "{{我的位置}}")) components.queryItems?.append(URLQueryItem(name: "destination", value: "latlng:\(model.latitude),\(model.longitude)|name:\(model.hallName)")) components.queryItems?.append(URLQueryItem(name: "coord_type", value: "gcj02")) components.queryItems?.append(URLQueryItem(name: "mode", value: "driving")) UIApplication.shared.open(components.url!) case 4: var components = URLComponents() components.scheme = "qqmap" components.host = "map" components.path = "/routeplan" components.queryItems = [URLQueryItem]() components.queryItems?.append(URLQueryItem(name: "fromcoord", value: "CurrentLocation")) components.queryItems?.append(URLQueryItem(name: "type", value: "drive")) components.queryItems?.append(URLQueryItem(name: "to", value: model.hallName)) components.queryItems?.append(URLQueryItem(name: "tocoord", value: "\(model.latitude),\(model.longitude)")) UIApplication.shared.open(components.url!) default:break } } } override func setRx() { webView.scrollView.rx.observe(CGSize.self, "contentSize").map { (size) -> CGFloat? in if let size = size{ XQMuse/Root/Pavilion/VC/PavilionDetailVC.xib
@@ -88,7 +88,7 @@ <constraint firstAttribute="trailing" secondItem="fDf-4X-hUI" secondAttribute="trailing" id="u9h-ka-MTH"/> </constraints> </view> <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Zw1-xu-iJP"> <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Zw1-xu-iJP" customClass="TapBtn" customModule="XQMuse" customModuleProvider="target"> <rect key="frame" x="0.0" y="18" width="240" height="11.666666666666664"/> <subviews> <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="icon_local" translatesAutoresizingMaskIntoConstraints="NO" id="9xu-m3-4Al"> @@ -113,6 +113,9 @@ <constraint firstItem="28i-aJ-cBs" firstAttribute="leading" secondItem="9xu-m3-4Al" secondAttribute="trailing" constant="6.5" id="phb-2w-5ig"/> <constraint firstAttribute="trailing" secondItem="28i-aJ-cBs" secondAttribute="trailing" id="u26-L7-Pbp"/> </constraints> <connections> <action selector="gotoThereAction:" destination="-1" eventType="touchUpInside" id="CU4-xp-Gel"/> </connections> </view> <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="D2P-HH-gTE"> <rect key="frame" x="0.0" y="36.333333333333314" width="240" height="11.333333333333336"/> XQMuse/Root/PayMusicView/PayMusicVC.swift
@@ -11,6 +11,9 @@ import MediaPlayer import RxRelay let ChangeMasterVoice_Noti = Notification.Name.init(rawValue: "ChangeMasterVoice_Noti") @objc enum PlayMusicState:Int{ case playing = 1 case paurse = 2 @@ -169,6 +172,7 @@ }else{ self.audioPlayer.bgmPlayer?.play() self.audioPlayer.masterPlayer?.play() self.audioPlayer.masterPlayer?.volume = Float(UserDefaultSettingViewModel.getSetting()?.masterVolume ?? 0.5) self.startRunloopAni() } } @@ -212,7 +216,15 @@ return instance } private init() {} // 私有化init方法 private init() { NotificationCenter.default.addObserver(forName: ChangeMasterVoice_Noti, object: nil, queue: .main) { noti in if let value = noti.object as? Float{ print("--->进入") self.masterPlayer?.volume = value } } } // 私有化init方法 //销毁单例对象 class func destroy() { @@ -233,14 +245,14 @@ self.meditationModel = model let urls = model.meditationMusicList.map { url in return URL(string: url)! return URL(string: url.jq_urlEncoded())! } if urls.count == 0{ alertError(msg: "数据获取失败");return } let masterUrl = URL(string: model.tutorAudioUrl) let masterUrl = URL(string: model.tutorAudioUrl.jq_urlEncoded()) autoreleasepool{[unowned self] () in for url in urls { @@ -254,6 +266,7 @@ if masterUrl != nil{ self.masterPlayer = AVPlayer(url: masterUrl!) self.masterPlayer?.volume = Float(UserDefaultSettingViewModel.getSetting()?.masterVolume ?? 0.5) self.masterPlayer?.play() } } @@ -354,20 +367,6 @@ bgmPlayer?.replaceCurrentItem(with: AVPlayerItem(url: urls[index])) bgmPlayer?.play() } // @objc private func playbackEnd(){ // if bgmPlayer?.actionAtItemEnd == AVPlayer.ActionAtItemEnd.pause && playIndex <= urls.count - 1{ // next() // self.delegate?.playState(.next) // }else{ // print("背景音乐播放完毕") // self.delegate?.playState(.end) // } // // if masterPlayer?.actionAtItemEnd == AVPlayer.ActionAtItemEnd.pause{ // print("导师播放完毕") // } // } @objc private func playBGMbackEnd(){ self.scenePlayer?.seek(to: CMTimeMake(value: 0, timescale: 1)) XQMuse/Root/TreeGroup/TreeTeskVC.swift
@@ -269,7 +269,9 @@ if treeInfoModel == nil {return} guard treeInfoModel!.energyValue != 0 else{ alert(msg: "已经没有能量值了,快去做任务吧");return alert(msg: "已经没有能量值了,快去做任务吧"); sender.isUserInteractionEnabled = true return } Services.watering().subscribe(onNext: {[weak self] data in