| | |
| | | 13391E022C73334000B9513F /* PavilionDetailVC.xib in Resources */ = {isa = PBXBuildFile; fileRef = 13391E012C73334000B9513F /* PavilionDetailVC.xib */; }; |
| | | 13391E032C73334000B9513F /* PavilionDetailVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 13391E002C73334000B9513F /* PavilionDetailVC.swift */; }; |
| | | 1341970B2CD9CDE800D324B7 /* LaunchImageHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1341970A2CD9CDE800D324B7 /* LaunchImageHelper.swift */; }; |
| | | 13463E9E2CDE2D1E00DD0C53 /* VIPAgreementVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 13463E9C2CDE2D1E00DD0C53 /* VIPAgreementVC.swift */; }; |
| | | 13463E9F2CDE2D1E00DD0C53 /* VIPAgreementVC.xib in Resources */ = {isa = PBXBuildFile; fileRef = 13463E9D2CDE2D1E00DD0C53 /* VIPAgreementVC.xib */; }; |
| | | 134783CF2C6C86EC0096C736 /* PlaySettingView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 134783CE2C6C86EC0096C736 /* PlaySettingView.swift */; }; |
| | | 134783D12C6C86F40096C736 /* PlaySettingView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 134783D02C6C86F40096C736 /* PlaySettingView.xib */; }; |
| | | 134803D32C76E29E00F4FDDA /* MyCommentListVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 134803D22C76E29E00F4FDDA /* MyCommentListVC.swift */; }; |
| | |
| | | 13391E002C73334000B9513F /* PavilionDetailVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PavilionDetailVC.swift; sourceTree = "<group>"; }; |
| | | 13391E012C73334000B9513F /* PavilionDetailVC.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = PavilionDetailVC.xib; sourceTree = "<group>"; }; |
| | | 1341970A2CD9CDE800D324B7 /* LaunchImageHelper.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LaunchImageHelper.swift; sourceTree = "<group>"; }; |
| | | 13463E9C2CDE2D1E00DD0C53 /* VIPAgreementVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = VIPAgreementVC.swift; sourceTree = "<group>"; }; |
| | | 13463E9D2CDE2D1E00DD0C53 /* VIPAgreementVC.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = VIPAgreementVC.xib; sourceTree = "<group>"; }; |
| | | 134783CE2C6C86EC0096C736 /* PlaySettingView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PlaySettingView.swift; sourceTree = "<group>"; }; |
| | | 134783D02C6C86F40096C736 /* PlaySettingView.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = PlaySettingView.xib; sourceTree = "<group>"; }; |
| | | 134803D22C76E29E00F4FDDA /* MyCommentListVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MyCommentListVC.swift; sourceTree = "<group>"; }; |
| | |
| | | 13649F9D2C770C9C00F4E0EE /* ContactCustomerDetailVC.xib */, |
| | | 1325F8DD2CD2021B00907C04 /* InviteVC.swift */, |
| | | 1325F8DE2CD2021B00907C04 /* InviteVC.xib */, |
| | | 13463E9C2CDE2D1E00DD0C53 /* VIPAgreementVC.swift */, |
| | | 13463E9D2CDE2D1E00DD0C53 /* VIPAgreementVC.xib */, |
| | | ); |
| | | path = VC; |
| | | sourceTree = "<group>"; |
| | |
| | | 13334FDA2C7321BE00914086 /* PavilionItemCell.xib */, |
| | | ); |
| | | path = CCell; |
| | | sourceTree = "<group>"; |
| | | }; |
| | | 13463E9B2CDE2CD500DD0C53 /* View */ = { |
| | | isa = PBXGroup; |
| | | children = ( |
| | | ); |
| | | path = View; |
| | | sourceTree = "<group>"; |
| | | }; |
| | | 134A452F2C6E0D3800538D78 /* VC */ = { |
| | |
| | | 13985DCA2C69E9C10046B6DC /* Me */ = { |
| | | isa = PBXGroup; |
| | | children = ( |
| | | 13463E9B2CDE2CD500DD0C53 /* View */, |
| | | 13EC08922C74990F00E00128 /* CCell */, |
| | | 13A0A8AB2C74755C00DF08B6 /* TCell */, |
| | | 1300BD382C6DFB0A000BCA5E /* VC */, |
| | |
| | | 13FAD54E2C901D6300566998 /* SearchContentVC.xib in Resources */, |
| | | 137776932C6AFE69004FF994 /* SearchVC.xib in Resources */, |
| | | 132DB8FF2C74826D00EF33A7 /* SettingVC.xib in Resources */, |
| | | 13463E9F2CDE2D1E00DD0C53 /* VIPAgreementVC.xib in Resources */, |
| | | 13985DBF2C69DDF90046B6DC /* HomeTopMenuView.xib in Resources */, |
| | | 13C5838E2C86A4F90071BCBE /* apngb-animated-level-5.png in Resources */, |
| | | 1385E00B2C6C57A900AADB1F /* HomeItemDetailVC.xib in Resources */, |
| | |
| | | 13A659472C6F4B9E00F731FA /* CourseDetail_1_TCell.swift in Sources */, |
| | | 130ED7EE2C6AF05C00D0736E /* Home_Style_4_Inner_CCell.swift in Sources */, |
| | | 139C165D2C6A0AC600A924D9 /* Home_Style_3_TCell.swift in Sources */, |
| | | 13463E9E2CDE2D1E00DD0C53 /* VIPAgreementVC.swift in Sources */, |
| | | 13A0A8A22C746AE600DF08B6 /* Enums.swift in Sources */, |
| | | 1377B40F2C6D93FA00CF7CA5 /* CommentCommentHeaderView.swift in Sources */, |
| | | 1377B40C2C6D936A00CF7CA5 /* CommentUserInputContentTCell.swift in Sources */, |
| | |
| | | let vc = VIPCenterVC() |
| | | JQ_currentViewController().jq_push(vc: vc) |
| | | }else{ |
| | | let vc = PaymentOrderVC(courseItemModel: m,type: .course,giftToOther: true) |
| | | let vc = PaymentOrderVC(courseItemModel: m,type: .course,giftToOther: true,showType: .horizontal) |
| | | JQ_currentViewController().jq_push(vc:vc) |
| | | } |
| | | } |
| | |
| | | } |
| | | |
| | | override func setUI() { |
| | | view_video.isHidden = true |
| | | scrollView.delegate = self |
| | | collect_bitem = UIBarButtonItem(image: UIImage(named: "btn_collect"), style: .plain, target: self, action: #selector(collectionAction)) |
| | | collect_bitem.tintColor = .white |
| | |
| | | customerBtn.addTarget(self, action: #selector(showCustomerAction), for: .touchUpInside) |
| | | view.addSubview(customerBtn) |
| | | customerBtn.snp.makeConstraints { make in |
| | | make.right.equalToSuperview() |
| | | make.right.equalToSuperview().offset(20) |
| | | make.centerY.equalToSuperview() |
| | | } |
| | | } |
| | |
| | | weakSelf.img_cusomter.sd_setImage(with: URL(string: m.wxQrCode)) |
| | | |
| | | if m.detailUrl.jq_isVideo{ |
| | | weakSelf.videoView = VideoView(url: m.detailUrl.jq_urlEncoded(),autoPlay: false, placeHoderImageUrl: m.coverUrl.jq_urlEncoded(), delegate: self!) |
| | | weakSelf.videoView = VideoView(url: m.detailUrl.jq_urlEncoded(),autoPlay: false,needFirstImage: true, delegate: self!) |
| | | // weakSelf.videoView!.player.play() |
| | | weakSelf.view_video.isHidden = false |
| | | weakSelf.view_video.addSubview(weakSelf.videoView!) |
| | | weakSelf.videoView!.snp.makeConstraints { make in |
| | | make.edges.equalToSuperview() |
| | | } |
| | | }else{ |
| | | weakSelf.scrollView.contentInset = UIEdgeInsets(top: JQ_NavBarHeight, left: 0, bottom: 0, right: 0) |
| | | weakSelf.navigationController?.navigationBar.standardAppearance.backgroundColor = .white |
| | | weakSelf.navigationController?.navigationBar.titleTextAttributes = [.foregroundColor:Def_NavFontColor,.font:Def_NavFont] |
| | | weakSelf.barStyle = .darkContent |
| | | weakSelf.setNeedsStatusBarAppearanceUpdate() |
| | | weakSelf.collect_bitem.tintColor = .black |
| | | weakSelf.share_bitem.tintColor = .black |
| | | weakSelf.scrollView.contentInsetAdjustmentBehavior = .always |
| | | (weakSelf.navigationItem.leftBarButtonItem?.customView as? UIButton)?.setImage(UIImage(named: "btn_back")?.withTintColor(.black), for: .normal) |
| | | } |
| | | } |
| | | }).disposed(by: disposeBag) |
| | |
| | | |
| | | func scrollViewDidScroll(_ scrollView: UIScrollView) { |
| | | |
| | | let v = min(scrollView.contentOffset.y / JQ_NavBarHeight, 1) |
| | | var v = min(scrollView.contentOffset.y / JQ_NavBarHeight, 1) |
| | | if view_video.isHidden{v = 1.0;return} |
| | | |
| | | |
| | | navigationController?.navigationBar.standardAppearance.backgroundColor = .white.withAlphaComponent(v) |
| | | |
| | | print("--->\(v)") |
| | | |
| | | if v > 0{ |
| | | (navigationItem.leftBarButtonItem?.customView as? UIButton)?.setImage(UIImage(named: "btn_back")?.withTintColor(.black.withAlphaComponent(v)), for: .normal) |
| | | |
| | |
| | | <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="lz1-9S-TY8"> |
| | | <rect key="frame" x="0.0" y="0.0" width="393" height="805"/> |
| | | <subviews> |
| | | <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="hDw-D7-a6I"> |
| | | <rect key="frame" x="0.0" y="0.0" width="393" height="314.33333333333331"/> |
| | | <stackView opaque="NO" contentMode="scaleToFill" axis="vertical" translatesAutoresizingMaskIntoConstraints="NO" id="T9q-i3-qB2"> |
| | | <rect key="frame" x="0.0" y="0.0" width="393" height="414"/> |
| | | <subviews> |
| | | <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="UEf-YH-aLK"> |
| | | <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="hDw-D7-a6I"> |
| | | <rect key="frame" x="0.0" y="0.0" width="393" height="314.33333333333331"/> |
| | | </imageView> |
| | | </subviews> |
| | | <color key="backgroundColor" systemColor="systemBackgroundColor"/> |
| | | <constraints> |
| | | <constraint firstItem="UEf-YH-aLK" firstAttribute="leading" secondItem="hDw-D7-a6I" secondAttribute="leading" id="3Zx-Uu-0ja"/> |
| | | <constraint firstAttribute="trailing" secondItem="UEf-YH-aLK" secondAttribute="trailing" id="69R-e0-330"/> |
| | | <constraint firstAttribute="bottom" secondItem="UEf-YH-aLK" secondAttribute="bottom" id="GaK-gZ-9ly"/> |
| | | <constraint firstItem="UEf-YH-aLK" firstAttribute="top" secondItem="hDw-D7-a6I" secondAttribute="top" id="Hpq-h5-YmU"/> |
| | | <constraint firstAttribute="width" secondItem="hDw-D7-a6I" secondAttribute="height" multiplier="1:0.8" id="NJP-Xx-lgz"/> |
| | | </constraints> |
| | | </view> |
| | | <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"/> |
| | | <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"/> |
| | | <fontDescription key="fontDescription" type="boldSystem" pointSize="19"/> |
| | | <nil key="textColor"/> |
| | | <nil key="highlightedColor"/> |
| | | </label> |
| | | <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="icon_local_1" translatesAutoresizingMaskIntoConstraints="NO" id="hGs-kS-EWt"> |
| | | <rect key="frame" x="20.666666666666668" y="69" width="9.6666666666666679" height="12"/> |
| | | <subviews> |
| | | <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="UEf-YH-aLK"> |
| | | <rect key="frame" x="0.0" y="0.0" width="393" height="314.33333333333331"/> |
| | | </imageView> |
| | | </subviews> |
| | | <color key="backgroundColor" systemColor="systemBackgroundColor"/> |
| | | <constraints> |
| | | <constraint firstAttribute="height" constant="12" id="aKR-KK-x9Z"/> |
| | | <constraint firstAttribute="width" constant="9.6699999999999999" id="mVa-VF-gle"/> |
| | | <constraint firstItem="UEf-YH-aLK" firstAttribute="leading" secondItem="hDw-D7-a6I" secondAttribute="leading" id="3Zx-Uu-0ja"/> |
| | | <constraint firstAttribute="trailing" secondItem="UEf-YH-aLK" secondAttribute="trailing" id="69R-e0-330"/> |
| | | <constraint firstAttribute="bottom" secondItem="UEf-YH-aLK" secondAttribute="bottom" id="GaK-gZ-9ly"/> |
| | | <constraint firstItem="UEf-YH-aLK" firstAttribute="top" secondItem="hDw-D7-a6I" secondAttribute="top" id="Hpq-h5-YmU"/> |
| | | <constraint firstAttribute="width" secondItem="hDw-D7-a6I" secondAttribute="height" multiplier="1:0.8" id="NJP-Xx-lgz"/> |
| | | </constraints> |
| | | </imageView> |
| | | <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="--" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="2" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="C98-ml-jRI"> |
| | | <rect key="frame" x="36.333333333333343" y="69" width="350.66666666666663" height="12"/> |
| | | <fontDescription key="fontDescription" type="system" weight="medium" pointSize="10"/> |
| | | <color key="textColor" red="0.80392156862745101" green="0.80392156862745101" blue="0.80392156862745101" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> |
| | | <nil key="highlightedColor"/> |
| | | </label> |
| | | </view> |
| | | <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"/> |
| | | <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"/> |
| | | <fontDescription key="fontDescription" type="boldSystem" pointSize="19"/> |
| | | <nil key="textColor"/> |
| | | <nil key="highlightedColor"/> |
| | | </label> |
| | | <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="icon_local_1" translatesAutoresizingMaskIntoConstraints="NO" id="hGs-kS-EWt"> |
| | | <rect key="frame" x="20.666666666666668" y="69" width="9.6666666666666679" height="12"/> |
| | | <constraints> |
| | | <constraint firstAttribute="height" constant="12" id="aKR-KK-x9Z"/> |
| | | <constraint firstAttribute="width" constant="9.6699999999999999" id="mVa-VF-gle"/> |
| | | </constraints> |
| | | </imageView> |
| | | <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="--" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="2" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="C98-ml-jRI"> |
| | | <rect key="frame" x="36.333333333333343" y="69" width="350.66666666666663" height="12"/> |
| | | <fontDescription key="fontDescription" type="system" weight="medium" pointSize="10"/> |
| | | <color key="textColor" red="0.80392156862745101" green="0.80392156862745101" blue="0.80392156862745101" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> |
| | | <nil key="highlightedColor"/> |
| | | </label> |
| | | </subviews> |
| | | <color key="backgroundColor" systemColor="systemBackgroundColor"/> |
| | | <constraints> |
| | | <constraint firstItem="hGs-kS-EWt" firstAttribute="top" secondItem="QJB-dH-vTR" secondAttribute="bottom" constant="21" id="1te-rE-wb5"/> |
| | | <constraint firstAttribute="trailing" secondItem="C98-ml-jRI" secondAttribute="trailing" constant="6" id="4Hx-aZ-Nva"/> |
| | | <constraint firstItem="hGs-kS-EWt" firstAttribute="leading" secondItem="QJB-dH-vTR" secondAttribute="leading" id="6Db-id-Dyt"/> |
| | | <constraint firstItem="Rfd-fp-6pw" firstAttribute="top" secondItem="itL-Yu-biN" secondAttribute="top" constant="27" id="8IL-fr-X8t"/> |
| | | <constraint firstAttribute="height" constant="99.5" id="CJ9-R7-jch"/> |
| | | <constraint firstItem="C98-ml-jRI" firstAttribute="leading" secondItem="hGs-kS-EWt" secondAttribute="trailing" constant="6" id="JO5-t8-awj"/> |
| | | <constraint firstItem="C98-ml-jRI" firstAttribute="centerY" secondItem="hGs-kS-EWt" secondAttribute="centerY" id="KEh-Pn-Qbh"/> |
| | | <constraint firstItem="QJB-dH-vTR" firstAttribute="leading" secondItem="itL-Yu-biN" secondAttribute="leading" constant="20.5" id="Nbs-UY-vlZ"/> |
| | | <constraint firstItem="QJB-dH-vTR" firstAttribute="top" secondItem="itL-Yu-biN" secondAttribute="top" constant="25" id="ZtU-Nw-puN"/> |
| | | <constraint firstAttribute="trailing" secondItem="Rfd-fp-6pw" secondAttribute="trailing" constant="20.5" id="me8-5a-oym"/> |
| | | <constraint firstItem="Rfd-fp-6pw" firstAttribute="leading" secondItem="QJB-dH-vTR" secondAttribute="trailing" constant="10" id="t31-5e-UUE"/> |
| | | </constraints> |
| | | </view> |
| | | </subviews> |
| | | <color key="backgroundColor" systemColor="systemBackgroundColor"/> |
| | | <constraints> |
| | | <constraint firstItem="hGs-kS-EWt" firstAttribute="top" secondItem="QJB-dH-vTR" secondAttribute="bottom" constant="21" id="1te-rE-wb5"/> |
| | | <constraint firstAttribute="trailing" secondItem="C98-ml-jRI" secondAttribute="trailing" constant="6" id="4Hx-aZ-Nva"/> |
| | | <constraint firstItem="hGs-kS-EWt" firstAttribute="leading" secondItem="QJB-dH-vTR" secondAttribute="leading" id="6Db-id-Dyt"/> |
| | | <constraint firstItem="Rfd-fp-6pw" firstAttribute="top" secondItem="itL-Yu-biN" secondAttribute="top" constant="27" id="8IL-fr-X8t"/> |
| | | <constraint firstAttribute="height" constant="99.5" id="CJ9-R7-jch"/> |
| | | <constraint firstItem="C98-ml-jRI" firstAttribute="leading" secondItem="hGs-kS-EWt" secondAttribute="trailing" constant="6" id="JO5-t8-awj"/> |
| | | <constraint firstItem="C98-ml-jRI" firstAttribute="centerY" secondItem="hGs-kS-EWt" secondAttribute="centerY" id="KEh-Pn-Qbh"/> |
| | | <constraint firstItem="QJB-dH-vTR" firstAttribute="leading" secondItem="itL-Yu-biN" secondAttribute="leading" constant="20.5" id="Nbs-UY-vlZ"/> |
| | | <constraint firstItem="QJB-dH-vTR" firstAttribute="top" secondItem="itL-Yu-biN" secondAttribute="top" constant="25" id="ZtU-Nw-puN"/> |
| | | <constraint firstAttribute="trailing" secondItem="Rfd-fp-6pw" secondAttribute="trailing" constant="20.5" id="me8-5a-oym"/> |
| | | <constraint firstItem="Rfd-fp-6pw" firstAttribute="leading" secondItem="QJB-dH-vTR" secondAttribute="trailing" constant="10" id="t31-5e-UUE"/> |
| | | </constraints> |
| | | </view> |
| | | </stackView> |
| | | <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="SHG-A0-P8Y"> |
| | | <rect key="frame" x="0.0" y="414" width="393" height="391"/> |
| | | <subviews> |
| | |
| | | </subviews> |
| | | <color key="backgroundColor" systemColor="systemBackgroundColor"/> |
| | | <constraints> |
| | | <constraint firstItem="hDw-D7-a6I" firstAttribute="leading" secondItem="lz1-9S-TY8" secondAttribute="leading" id="0mN-Fo-mZK"/> |
| | | <constraint firstAttribute="bottom" secondItem="SHG-A0-P8Y" secondAttribute="bottom" id="1Rg-BU-RUg"/> |
| | | <constraint firstItem="SHG-A0-P8Y" firstAttribute="top" secondItem="itL-Yu-biN" secondAttribute="bottom" id="6Vj-YI-r8v"/> |
| | | <constraint firstItem="itL-Yu-biN" firstAttribute="top" secondItem="hDw-D7-a6I" secondAttribute="bottom" id="8Kp-ew-YkB"/> |
| | | <constraint firstItem="T9q-i3-qB2" firstAttribute="top" secondItem="lz1-9S-TY8" secondAttribute="top" id="7Ua-mJ-cZ5"/> |
| | | <constraint firstAttribute="trailing" secondItem="T9q-i3-qB2" secondAttribute="trailing" id="865-ET-xSc"/> |
| | | <constraint firstAttribute="trailing" secondItem="SHG-A0-P8Y" secondAttribute="trailing" id="H2A-Ro-NAo"/> |
| | | <constraint firstAttribute="trailing" secondItem="itL-Yu-biN" secondAttribute="trailing" id="Pid-wb-6gd"/> |
| | | <constraint firstAttribute="trailing" secondItem="hDw-D7-a6I" secondAttribute="trailing" id="Utc-n1-bfU"/> |
| | | <constraint firstItem="itL-Yu-biN" firstAttribute="leading" secondItem="lz1-9S-TY8" secondAttribute="leading" id="V4t-oq-1Ah"/> |
| | | <constraint firstItem="hDw-D7-a6I" firstAttribute="top" secondItem="lz1-9S-TY8" secondAttribute="top" id="t0r-Ir-cV2"/> |
| | | <constraint firstItem="T9q-i3-qB2" firstAttribute="leading" secondItem="lz1-9S-TY8" secondAttribute="leading" id="jGU-Nh-iv8"/> |
| | | <constraint firstItem="SHG-A0-P8Y" firstAttribute="leading" secondItem="lz1-9S-TY8" secondAttribute="leading" id="xFo-88-xVp"/> |
| | | <constraint firstItem="SHG-A0-P8Y" firstAttribute="top" secondItem="T9q-i3-qB2" secondAttribute="bottom" id="zgv-hr-tMV"/> |
| | | </constraints> |
| | | </view> |
| | | </subviews> |
| | |
| | | push(vc: vc);return |
| | | } |
| | | |
| | | let vc = PaymentOrderVC(courseItemModel: m, type: .course) |
| | | let vc = PaymentOrderVC(courseItemModel: m, type: .course,showType:.horizontal) |
| | | push(vc: vc) |
| | | } |
| | | } |
| | |
| | | @objc func sendGift(_ btn:QMUIButton){ |
| | | if let price = courseDetailModel?.iosPrice{ |
| | | CourseSendGiftView.show(price:price) { |
| | | let vc = PaymentOrderVC(courseItemModel: self.courseDetailModel!,type: .course,giftToOther: true) |
| | | let vc = PaymentOrderVC(courseItemModel: self.courseDetailModel!,type: .course,giftToOther: true, showType: .horizontal) |
| | | self.push(vc: vc) |
| | | } |
| | | } |
| | |
| | | if selectIndex == indexPath{return} |
| | | |
| | | selectIndex = indexPath |
| | | videoView?.updateVideoUrl(items[indexPath.row].videoUrl.jq_urlEncoded()) |
| | | videoView?.updateVideoUrl(items[indexPath.row].videoUrl.jq_urlEncoded(),autoPlay: true) |
| | | tableView.reloadData() |
| | | } |
| | | } |
| | |
| | | |
| | | collectionView.emptyDataSetSource = self |
| | | collectionView.emptyDataSetDelegate = self |
| | | // collectionView.emptyDataSetView { v in |
| | | // let v = UIView() |
| | | // v.backgroundColor = .red |
| | | // |
| | | // return |
| | | // } |
| | | collectionView.emptyDataSetView { v in |
| | | |
| | | if let sub = v.viewWithTag(10010){ |
| | | |
| | | |
| | | }else{ |
| | | let v1 = UIView() |
| | | v1.tag = 10010 |
| | | v1.bounds = CGRect(x: 0, y: 0, width: 100, height: 100) |
| | | v1.center = CGPoint(x: v.center.x - 20, y: v.center.y - 150) |
| | | v.addSubview(v1) |
| | | |
| | | let image = UIImageView(image: UIImage(named: "icon_empty")) |
| | | image.contentMode = .scaleAspectFill |
| | | v1.addSubview(image) |
| | | image.snp.makeConstraints { make in |
| | | make.top.left.right.equalToSuperview() |
| | | } |
| | | |
| | | let label = UILabel(text: "暂未找到相关内容哦~") |
| | | label.font = .systemFont(ofSize: 14, weight: .medium) |
| | | label.textColor = .gray |
| | | v1.addSubview(label) |
| | | label.snp.makeConstraints { make in |
| | | make.centerX.equalTo(image) |
| | | make.top.equalTo(image.snp.bottom).offset(8) |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | func setTitleItem(_ items:[TitleItem],defaultSelectIndex:Int = 0){ |
| | |
| | | } |
| | | |
| | | extension CourseMenuVC:EmptyDataSetSource{ |
| | | func image(forEmptyDataSet scrollView: UIScrollView) -> UIImage? { |
| | | return UIImage(named: "icon_empty") |
| | | } |
| | | |
| | | func title(forEmptyDataSet scrollView: UIScrollView) -> NSAttributedString? { |
| | | return AttributedStringbuilder.build().add(string: "暂无数据", withFont: .systemFont(ofSize: 12, weight: .medium), withColor: .gray).mutableAttributedString |
| | | } |
| | | |
| | | func verticalOffset(forEmptyDataSet scrollView: UIScrollView) -> CGFloat { |
| | | return 300 |
| | | } |
| | | |
| | | func spaceHeight(forEmptyDataSet scrollView: UIScrollView) -> CGFloat { |
| | | return 200 |
| | | } |
| | | //// func image(forEmptyDataSet scrollView: UIScrollView) -> UIImage? { |
| | | //// return UIImage(named: "icon_empty") |
| | | //// } |
| | | // |
| | | // func buttonBackgroundImage(forEmptyDataSet scrollView: UIScrollView, for state: UIControl.State) -> UIImage? { |
| | | // return UIImage(named: "icon_empty") |
| | | // } |
| | | // |
| | | // func title(forEmptyDataSet scrollView: UIScrollView) -> NSAttributedString? { |
| | | // return AttributedStringbuilder.build().add(string: "暂无数据", withFont: .systemFont(ofSize: 12, weight: .medium), withColor: .gray).mutableAttributedString |
| | | // } |
| | | // |
| | | // func verticalOffset(forEmptyDataSet scrollView: UIScrollView) -> CGFloat { |
| | | // return 0 |
| | | // } |
| | | // |
| | | // func spaceHeight(forEmptyDataSet scrollView: UIScrollView) -> CGFloat { |
| | | // return 0 |
| | | // } |
| | | } |
| | | |
| | | extension CourseMenuVC:EmptyDataSetDelegate{ |
| | |
| | | } |
| | | } |
| | | |
| | | let CourseOfficalComment_Noti = Notification.Name.init("CourseOfficalComment_Noti") |
| | | |
| | | class CourseVCOfficalCommentVC: BaseVC { |
| | | |
| | | private var collectionView:UICollectionView! |
| | |
| | | } |
| | | } |
| | | |
| | | override func setRx() { |
| | | NotificationCenter.default.rx.notification(CourseOfficalComment_Noti).take(until: self.rx.deallocated).subscribe(onNext: {[weak self] _ in |
| | | self?.viewModel.beginRefresh() |
| | | }).disposed(by: disposeBag) |
| | | } |
| | | |
| | | override var shouldAutorotate: Bool{ |
| | | return false |
| | | } |
| | |
| | | <?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"/> |
| | |
| | | </constraints> |
| | | </view> |
| | | <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="订单金额:" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="50e-Zj-0x8"> |
| | | <rect key="frame" x="14" y="78.666666666666629" width="64.666666666666671" height="20"/> |
| | | <rect key="frame" x="13.999999999999996" y="78.666666666666629" width="62.666666666666657" height="20"/> |
| | | <constraints> |
| | | <constraint firstAttribute="height" constant="20" id="G5z-ZX-Ecd"/> |
| | | </constraints> |
| | |
| | | <color key="textColor" red="0.9882352941176471" green="0.64313725490196072" blue="0.19607843137254902" 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="gZz-Co-je4"> |
| | | <rect key="frame" x="164.66666666666666" y="14.999999999999998" width="63.666666666666657" height="19.333333333333329"/> |
| | | <fontDescription key="fontDescription" type="system" weight="semibold" pointSize="16"/> |
| | | <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="0.80000000000000004" colorSpace="custom" customColorSpace="sRGB"/> |
| | | <nil key="highlightedColor"/> |
| | | </label> |
| | | </subviews> |
| | | <color key="backgroundColor" systemColor="systemBackgroundColor"/> |
| | | <constraints> |
| | |
| | | <constraint firstAttribute="trailing" secondItem="WjL-9e-RTJ" secondAttribute="trailing" id="Rfg-tw-AYT"/> |
| | | <constraint firstAttribute="bottomMargin" secondItem="Sfd-UT-Jfh" secondAttribute="bottom" id="RyI-07-ePU"/> |
| | | <constraint firstAttribute="trailing" secondItem="Sfd-UT-Jfh" secondAttribute="trailing" constant="46" id="U4s-iM-S4p"/> |
| | | <constraint firstItem="gZz-Co-je4" firstAttribute="centerX" secondItem="LSz-KU-Ren" secondAttribute="centerX" id="hlX-VC-6l3"/> |
| | | <constraint firstAttribute="height" constant="225" id="hnP-qJ-dUE"/> |
| | | <constraint firstItem="gZz-Co-je4" firstAttribute="top" secondItem="LSz-KU-Ren" secondAttribute="top" constant="15" id="lu8-fG-B4c"/> |
| | | <constraint firstAttribute="trailing" secondItem="Nxc-CP-MV1" secondAttribute="trailing" constant="14" id="yj2-7F-xFu"/> |
| | | <constraint firstItem="Sfd-UT-Jfh" firstAttribute="leading" secondItem="LSz-KU-Ren" secondAttribute="leading" constant="46" id="z5v-ab-pXi"/> |
| | | <constraint firstItem="WjL-9e-RTJ" firstAttribute="top" secondItem="50e-Zj-0x8" secondAttribute="bottom" constant="25" id="zqO-9k-JpZ"/> |
| | |
| | | @IBOutlet weak var label_price: UILabel! |
| | | @IBOutlet weak var img_vip: UIImageView! |
| | | @IBOutlet weak var img_offline: UIImageView! |
| | | @IBOutlet weak var view_waitPay: UIView! |
| | | @IBOutlet weak var label_waitPrice: UILabel! |
| | | |
| | | override func awakeFromNib() { |
| | | super.awakeFromNib() |
| | | // Initialization code |
| | | |
| | | |
| | | view_waitPay.isHidden = true |
| | | view_waitPay.jq_cornerRadius = 9.75 |
| | | jq_cornerRadius = 15 |
| | | view_price.jq_cornerRadius = 12.55 |
| | | let blurEffect = UIBlurEffect(style: .light) |
| | |
| | | view_price.isHidden = true |
| | | image_free.isHidden = true |
| | | } |
| | | |
| | | view_waitPay.isHidden = model.paymentStatus == .no |
| | | label_price.attributedText = AttributedStringbuilder.build().add(string: "¥", withFont: .systemFont(ofSize: 7.2, weight: .bold), withColor: .white).add(string: model.generalPrice.jq_formatFloat, withFont: .systemFont(ofSize: 11.62), withColor: .white).mutableAttributedString |
| | | } |
| | | |
| | | func setMeditationModel(_ model:MeditationModel){ |
| | |
| | | |
| | | img_offline.isHidden = true |
| | | setChargePrice(model.chargeType, price: model.iosPrice) |
| | | |
| | | view_waitPay.isHidden = model.paymentStatus == .no |
| | | label_price.attributedText = AttributedStringbuilder.build().add(string: "¥", withFont: .systemFont(ofSize: 7.2, weight: .bold), withColor: .white).add(string: model.generalPrice.jq_formatFloat, withFont: .systemFont(ofSize: 11.62), withColor: .white).mutableAttributedString |
| | | } |
| | | |
| | | private func setChargePrice(_ type:ChargeType,price:Double){ |
| | |
| | | <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> |
| | |
| | | <rect key="frame" x="0.0" y="0.0" width="160" height="196"/> |
| | | </imageView> |
| | | <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="icon_vip" translatesAutoresizingMaskIntoConstraints="NO" id="MDc-Db-v12"> |
| | | <rect key="frame" x="11.000000000000002" y="8.6666666666666661" width="21.666666666666671" height="21.666666666666671"/> |
| | | <rect key="frame" x="11.000000000000002" y="8.6666666666666661" width="25.666666666666671" height="25.666666666666671"/> |
| | | </imageView> |
| | | <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="tNS-EM-X8Z"> |
| | | <rect key="frame" x="7" y="5" width="38.666666666666664" height="25"/> |
| | |
| | | <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="icon_offline" translatesAutoresizingMaskIntoConstraints="NO" id="988-87-RLf"> |
| | | <rect key="frame" x="8" y="7" width="34" height="18"/> |
| | | </imageView> |
| | | <view hidden="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="YMY-eC-fwJ"> |
| | | <rect key="frame" x="7" y="6" width="72" height="19.666666666666668"/> |
| | | <subviews> |
| | | <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="kBI-mA-VCH"> |
| | | <rect key="frame" x="47" y="1.9999999999999991" width="1" height="14.666666666666664"/> |
| | | <color key="backgroundColor" systemColor="systemBackgroundColor"/> |
| | | <constraints> |
| | | <constraint firstAttribute="width" constant="1" id="u0p-Di-Lfe"/> |
| | | </constraints> |
| | | </view> |
| | | <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="待支付" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="y3v-m1-NFl"> |
| | | <rect key="frame" x="12" y="3.6666666666666661" width="30" height="12"/> |
| | | <constraints> |
| | | <constraint firstAttribute="width" constant="30" id="fw1-fA-fkr"/> |
| | | </constraints> |
| | | <fontDescription key="fontDescription" type="system" pointSize="10"/> |
| | | <color key="textColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> |
| | | <nil key="highlightedColor"/> |
| | | </label> |
| | | <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="0" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="PHh-bn-ZWL"> |
| | | <rect key="frame" x="54.666666666666664" y="0.0" width="10.333333333333336" height="19.666666666666668"/> |
| | | <fontDescription key="fontDescription" type="system" pointSize="17"/> |
| | | <color key="textColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> |
| | | <nil key="highlightedColor"/> |
| | | </label> |
| | | </subviews> |
| | | <color key="backgroundColor" red="0.8901960784313725" green="0.70196078431372544" blue="0.36862745098039218" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> |
| | | <constraints> |
| | | <constraint firstAttribute="height" constant="19.5" id="6DB-9g-xbb"/> |
| | | <constraint firstItem="y3v-m1-NFl" firstAttribute="leading" secondItem="YMY-eC-fwJ" secondAttribute="leading" constant="12" id="Dtt-NR-dBw"/> |
| | | <constraint firstAttribute="trailing" secondItem="PHh-bn-ZWL" secondAttribute="trailing" constant="7" id="HAa-Du-CzN"/> |
| | | <constraint firstItem="PHh-bn-ZWL" firstAttribute="top" secondItem="YMY-eC-fwJ" secondAttribute="top" id="L41-FV-9iR"/> |
| | | <constraint firstItem="y3v-m1-NFl" firstAttribute="centerY" secondItem="YMY-eC-fwJ" secondAttribute="centerY" id="LCS-Qy-brQ"/> |
| | | <constraint firstItem="PHh-bn-ZWL" firstAttribute="leading" secondItem="kBI-mA-VCH" secondAttribute="trailing" constant="6.5" id="VS2-Fy-SHm"/> |
| | | <constraint firstAttribute="bottom" secondItem="kBI-mA-VCH" secondAttribute="bottom" constant="3" id="r3F-1o-hcV"/> |
| | | <constraint firstItem="kBI-mA-VCH" firstAttribute="leading" secondItem="y3v-m1-NFl" secondAttribute="trailing" constant="5" id="sPV-Eu-s1T"/> |
| | | <constraint firstAttribute="bottom" secondItem="PHh-bn-ZWL" secondAttribute="bottom" id="tqb-zF-2Uz"/> |
| | | <constraint firstItem="kBI-mA-VCH" firstAttribute="top" secondItem="YMY-eC-fwJ" secondAttribute="top" constant="2" id="xBk-yf-Y9j"/> |
| | | </constraints> |
| | | </view> |
| | | </subviews> |
| | | </view> |
| | | <viewLayoutGuide key="safeArea" id="ZTg-uK-7eu"/> |
| | |
| | | <constraint firstItem="MDc-Db-v12" firstAttribute="top" secondItem="gTV-IL-0wX" secondAttribute="top" constant="8.5" id="TAz-42-XQP"/> |
| | | <constraint firstAttribute="trailing" secondItem="VwD-36-ent" secondAttribute="trailing" id="eMF-Er-Mtm"/> |
| | | <constraint firstItem="VwD-36-ent" firstAttribute="leading" secondItem="gTV-IL-0wX" secondAttribute="leading" id="gba-Nk-kGk"/> |
| | | <constraint firstItem="YMY-eC-fwJ" firstAttribute="leading" secondItem="gTV-IL-0wX" secondAttribute="leading" constant="7" id="ihg-JM-e36"/> |
| | | <constraint firstItem="tNS-EM-X8Z" firstAttribute="leading" secondItem="gTV-IL-0wX" secondAttribute="leading" constant="7" id="j3U-db-f7D"/> |
| | | <constraint firstItem="MDc-Db-v12" firstAttribute="leading" secondItem="gTV-IL-0wX" secondAttribute="leading" constant="11" id="jP0-pB-RmD"/> |
| | | <constraint firstItem="988-87-RLf" firstAttribute="leading" secondItem="gTV-IL-0wX" secondAttribute="leading" constant="8" id="lIk-og-l06"/> |
| | | <constraint firstAttribute="trailing" secondItem="nyj-tV-0t4" secondAttribute="trailing" id="oZN-uZ-l0V"/> |
| | | <constraint firstAttribute="bottom" secondItem="VwD-36-ent" secondAttribute="bottom" id="p7n-UX-5N7"/> |
| | | <constraint firstItem="YMY-eC-fwJ" firstAttribute="top" secondItem="gTV-IL-0wX" secondAttribute="top" constant="6" id="qK5-n4-Tp6"/> |
| | | </constraints> |
| | | <size key="customSize" width="160" height="196"/> |
| | | <connections> |
| | |
| | | <outlet property="label_price" destination="KaS-j6-dko" id="T7A-UW-g49"/> |
| | | <outlet property="label_subTitle" destination="EeQ-hi-VEz" id="U39-7s-GGD"/> |
| | | <outlet property="label_title" destination="6md-5M-Pce" id="j50-e3-otB"/> |
| | | <outlet property="label_waitPrice" destination="PHh-bn-ZWL" id="gnu-3i-fpa"/> |
| | | <outlet property="view_price" destination="tNS-EM-X8Z" id="POp-Nu-BIU"/> |
| | | <outlet property="view_text_bg" destination="nyj-tV-0t4" id="Lef-w5-fi6"/> |
| | | <outlet property="view_waitPay" destination="YMY-eC-fwJ" id="lnd-0v-TL4"/> |
| | | </connections> |
| | | <point key="canvasLocation" x="164.8854961832061" y="71.83098591549296"/> |
| | | </collectionViewCell> |
| | |
| | | <image name="icon_freee" width="50" height="18"/> |
| | | <image name="icon_offline" width="34" height="18"/> |
| | | <image name="icon_use_small_s" width="9" height="9"/> |
| | | <image name="icon_vip" width="21.666666030883789" height="21.666666030883789"/> |
| | | <image name="icon_vip" width="25.666666030883789" height="25.666666030883789"/> |
| | | <systemColor name="systemBackgroundColor"> |
| | | <color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> |
| | | </systemColor> |
| | | </resources> |
| | | </document> |
| | |
| | | import MediaPlayer |
| | | import MJRefresh |
| | | import SDWebImage |
| | | import CoreTelephony |
| | | |
| | | let SetBGMSuccess_Noti = Notification.Name.init("SetBGMSuccess_Noti") |
| | | |
| | |
| | | private var titleItems = [TitleItem]() |
| | | private var viewModel = HomeViewModel() |
| | | |
| | | private var cellularData:CTCellularData! |
| | | |
| | | override func viewDidAppear(_ animated: Bool) { |
| | | super.viewDidAppear(animated) |
| | | |
| | | //获取用户信息 |
| | | if !(UserViewModel.getLoginInfo()?.accessToken.isEmpty ?? true){ |
| | | Services.getUserDetail().subscribe(onNext: {data in |
| | | if let m = data.data{UserViewModel.saveAvatarInfo(m)} |
| | | }).disposed(by: disposeBag) |
| | | } |
| | | } |
| | | |
| | | override func viewDidLoad() { |
| | | super.viewDidLoad() |
| | | |
| | |
| | | } |
| | | |
| | | getData() |
| | | |
| | | cellularData = CTCellularData() |
| | | cellularData.cellularDataRestrictionDidUpdateNotifier = {[weak self] state in |
| | | |
| | | switch state{ |
| | | case .notRestricted: |
| | | if UserDefaultSettingViewModel.getSetting()?.userFirstLaunch ?? true{ |
| | | DispatchQueue.main.async {[weak self] in |
| | | guard let weakSelf = self else { return } |
| | | let vc = LoginTreatyVC() |
| | | vc.topIndex = 0 |
| | | vc.clickHandle { state in |
| | | if !state{ |
| | | exit(0) |
| | | }else{ |
| | | //跳转计划引导 |
| | | let nav = BaseNav(rootViewController: PlanGuideVC()) |
| | | nav.modalPresentationStyle = .fullScreen |
| | | weakSelf.present(nav, animated: true) |
| | | } |
| | | } |
| | | vc.modalPresentationStyle = .custom |
| | | weakSelf.present(vc, animated: true) |
| | | } |
| | | } |
| | | default:break |
| | | } |
| | | } |
| | | } |
| | | |
| | | override func setUI() { |
| | |
| | | self.topMenuView.resetTopImage() |
| | | }).disposed(by: disposeBag) |
| | | |
| | | NotificationCenter.default.rx.notification(PlantGuideQuit_Noti).take(until: self.rx.deallocated).subscribe(onNext: {data in |
| | | self.getData() |
| | | if UserDefaultSettingViewModel.getSetting()?.userFirstOpenTreeTask ?? true{ |
| | | self.navigationController?.tabBarController?.selectedIndex = 2 |
| | | } |
| | | NotificationCenter.default.rx.notification(PlantGuideQuit_Noti).take(until: self.rx.deallocated).subscribe(onNext: {[weak self]data in |
| | | guard let weakSelf = self else { return } |
| | | weakSelf.getData() |
| | | |
| | | Services.isFirst().subscribe(onNext: {data in |
| | | if data.data == true{ |
| | | weakSelf.navigationController?.tabBarController?.selectedIndex = 2 |
| | | var viewModel = UserDefaultSettingViewModel.getSetting() |
| | | viewModel?.userFirstOpenTreeTask = false |
| | | UserDefaultSettingViewModel.saveSetting(viewModel!) |
| | | } |
| | | }).disposed(by: weakSelf.disposeBag) |
| | | |
| | | }).disposed(by: disposeBag) |
| | | |
| | | NotificationCenter.default.rx.notification(LoginSuccess_Noti).take(until: self.rx.deallocated).subscribe(onNext: {data in |
| | |
| | | } |
| | | |
| | | }).disposed(by: disposeBag) |
| | | |
| | | if !(UserViewModel.getLoginInfo()?.accessToken.isEmpty ?? true){ |
| | | Services.getUserDetail().subscribe(onNext: {data in |
| | | if let m = data.data{UserViewModel.saveAvatarInfo(m)} |
| | | }).disposed(by: disposeBag) |
| | | } |
| | | } |
| | | |
| | | @objc func searchAction(){ |
| | |
| | | let topTitle = titleItems[sender.tag - 200].title |
| | | let m = viewModel.meditationList[sender.tag - 200 - 3] |
| | | if let id = m.clientMeditationCategoryVO?.id{ |
| | | let vc = HomeItemListVC(topTitle: topTitle, id: id,showType: m.clientMeditationCategoryVO!.showType) |
| | | let vc = HomeItemListVC(topTitle: topTitle, id: id,showType: .vertical) |
| | | push(vc: vc) |
| | | } |
| | | } |
| | |
| | | var model:MeditationModel?{ |
| | | didSet{ |
| | | if let m = model{ |
| | | img_cover.sd_setImage(with: URL(string: m.backgroundUrl)) |
| | | label_title.text = "\(m.meditationTitle) | 00:00" |
| | | label_joinNum.text = "\(m.realLearnedNum + m.virtualLearnedNum)人已参加学习" |
| | | |
| | | if m.id == 0{ |
| | | img_cover.image = UIImage(named: "bt_private") |
| | | view_data.isHidden = true |
| | | }else{ |
| | | view_data.isHidden = false |
| | | img_cover.sd_setImage(with: URL(string: m.backgroundUrl)) |
| | | label_title.text = "\(m.meditationTitle) | 00:00" |
| | | label_joinNum.text = "\(m.realLearnedNum + m.virtualLearnedNum)人已参加学习" |
| | | } |
| | | } |
| | | } |
| | | } |
| | |
| | | } |
| | | |
| | | if m.chargeType == .payment && m.isBuy == .no{ |
| | | let vc = PaymentOrderVC(museItemModel: m,type: .muse) |
| | | let vc = PaymentOrderVC(museItemModel: m,type: .muse,showType: showType) |
| | | JQ_currentViewController().jq_push(vc: vc) |
| | | return |
| | | } |
| | |
| | | let vc = VIPCenterVC() |
| | | JQ_currentViewController().jq_push(vc: vc) |
| | | }else{ |
| | | let vc = PaymentOrderVC(museItemModel: m,type: .muse) |
| | | let vc = PaymentOrderVC(museItemModel: m,type: .muse,showType: .horizontal) |
| | | JQ_currentViewController().jq_push(vc:vc) |
| | | } |
| | | } |
| | |
| | | let model = items[indexPath.row] |
| | | collectionView.scrollToItem(at: indexPath, at: .centeredHorizontally, animated: true) |
| | | |
| | | guard let URL = URL(string: model.audioFile) else { return } |
| | | guard let URL = URL(string: model.audioFile.jq_urlEncoded()) else { return } |
| | | |
| | | tempPlayer = AVPlayer(url: URL) |
| | | tempPlayer?.volume = slider_voice.value |
| | |
| | | let vc = VIPCenterVC() |
| | | jq_push(vc: vc) |
| | | }else{ |
| | | let vc = PaymentOrderVC(museItemModel: m,type: .muse) |
| | | let vc = PaymentOrderVC(museItemModel: m,type: .muse,showType: showType) |
| | | jq_push(vc: vc) |
| | | } |
| | | } |
| | |
| | | private var museModel:MeditationModel? |
| | | private var balance:Double = 0 |
| | | private var type:PaymentOrderType! |
| | | private var showType:DisplayType! |
| | | |
| | | init(museItemModel:MeditationModel? = nil,courseItemModel:CourseModel? = nil,type:PaymentOrderType,giftToOther:Bool = false) { |
| | | init(museItemModel:MeditationModel? = nil,courseItemModel:CourseModel? = nil,type:PaymentOrderType,giftToOther:Bool = false,showType:DisplayType!) { |
| | | super.init(nibName: nil, bundle: nil) |
| | | self.museItemModel = museItemModel |
| | | self.courseItemModel = courseItemModel |
| | | self.giftToOther = giftToOther |
| | | self.type = type |
| | | self.showType = showType |
| | | } |
| | | |
| | | required init?(coder: NSCoder) { |
| | |
| | | Services.getCourseDetail(courseId: courseItemModel!.id).subscribe(onNext: {data in |
| | | if let m = data.data{ |
| | | self.courseModel = m |
| | | self.image_cover.sd_setImage(with: URL(string: m.coverUrl.jq_urlEncoded())) |
| | | self.image_cover.sd_setImage(with: URL(string: m.coverUrl.components(separatedBy: ",").first?.jq_urlEncoded())) |
| | | self.label_courseName.text = m.courseTitle |
| | | self.label_price.text = "愈疗币\(m.iosPrice.jq_formatFloat)" |
| | | self.label_teacher.text = "导师 \(m.tutor)" |
| | |
| | | Services.getMeditationDetail(id: museItemModel!.id).subscribe(onNext: {data in |
| | | if let m = data.data{ |
| | | self.museModel = m |
| | | self.image_cover.sd_setImage(with: URL(string: m.coverUrl.jq_urlEncoded())) |
| | | self.image_cover.sd_setImage(with: URL(string: m.coverUrl.components(separatedBy: ",").first?.jq_urlEncoded())) |
| | | self.label_courseName.text = m.meditationTitle |
| | | self.label_price.text = "愈疗币\(m.iosPrice.jq_formatFloat)" |
| | | self.label_teacher.text = "" |
| | |
| | | <?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"/> |
| | |
| | | <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="y7d-Qe-XsO"> |
| | | <rect key="frame" x="120.33333333333333" y="78" width="39.333333333333329" height="14.333333333333329"/> |
| | | <rect key="frame" x="120.33333333333336" y="78" width="38.666666666666671" height="14.333333333333329"/> |
| | | <fontDescription key="fontDescription" type="boldSystem" pointSize="12"/> |
| | | <color key="textColor" red="0.47058823529411764" green="0.47058823529411764" blue="0.47058823529411764" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> |
| | | <nil key="highlightedColor"/> |
| | |
| | | </constraints> |
| | | </view> |
| | | <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="订单金额" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="g8H-Sg-oWt"> |
| | | <rect key="frame" x="15.000000000000004" y="123.33333333333336" width="57.333333333333343" height="60.666666666666671"/> |
| | | <rect key="frame" x="14.999999999999996" y="123.33333333333336" width="55.666666666666657" height="60.666666666666671"/> |
| | | <fontDescription key="fontDescription" type="boldSystem" pointSize="14"/> |
| | | <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="疗愈币0" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="s0D-hY-lov"> |
| | | <rect key="frame" x="318.66666666666669" y="146.66666666666666" width="47" height="14.333333333333343"/> |
| | | <rect key="frame" x="319.66666666666669" y="146.66666666666666" width="46" height="14.333333333333343"/> |
| | | <fontDescription key="fontDescription" type="system" weight="heavy" pointSize="12"/> |
| | | <color key="textColor" red="0.15686274509803921" green="0.15686274509803921" blue="0.15686274509803921" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> |
| | | <nil key="highlightedColor"/> |
| | |
| | | </constraints> |
| | | </view> |
| | | <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="好友账号" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="C5w-jL-Klr"> |
| | | <rect key="frame" x="15.000000000000004" y="32.666666666666686" width="57.333333333333343" height="13.333333333333336"/> |
| | | <rect key="frame" x="14.999999999999996" y="32.666666666666686" width="55.666666666666657" height="13.333333333333336"/> |
| | | <constraints> |
| | | <constraint firstAttribute="height" constant="13.5" id="vK6-2b-dMV"/> |
| | | </constraints> |
| | |
| | | <nil key="highlightedColor"/> |
| | | </label> |
| | | <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="6I2-HS-Bee"> |
| | | <rect key="frame" x="98.333333333333343" y="20.666666666666689" width="264.66666666666663" height="37.333333333333343"/> |
| | | <rect key="frame" x="96.666666666666657" y="20.666666666666689" width="266.33333333333337" height="37.333333333333343"/> |
| | | <subviews> |
| | | <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="4Lf-NY-aGs"> |
| | | <rect key="frame" x="186.33333333333337" y="3.6666666666666288" width="62" height="30"/> |
| | | <rect key="frame" x="190" y="3.6666666666666288" width="60" height="30"/> |
| | | <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> |
| | | </button> |
| | | <textField opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="248" contentHorizontalAlignment="left" contentVerticalAlignment="center" placeholder="请输入好友手机号" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="W3K-U0-zHA" customClass="QMUITextField"> |
| | | <rect key="frame" x="22.000000000000014" y="0.0" width="142.33333333333337" height="37.333333333333336"/> |
| | | <rect key="frame" x="22" y="0.0" width="146" height="37.333333333333336"/> |
| | | <fontDescription key="fontDescription" type="system" weight="medium" pointSize="12"/> |
| | | <textInputTraits key="textInputTraits" keyboardType="numberPad"/> |
| | | <userDefinedRuntimeAttributes> |
| | |
| | | <nil key="highlightedColor"/> |
| | | </label> |
| | | <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" usesAttributedText="YES" lineBreakMode="tailTruncation" numberOfLines="3" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="jVb-Rt-nvY"> |
| | | <rect key="frame" x="102.66666666666667" y="0.0" width="171.66666666666663" height="40.333333333333336"/> |
| | | <rect key="frame" x="105.00000000000001" y="0.0" width="167.33333333333337" height="40.333333333333336"/> |
| | | <attributedString key="attributedText"> |
| | | <fragment content="未查询到账户信息"> |
| | | <attributes> |
| | |
| | | <nil key="highlightedColor"/> |
| | | </label> |
| | | <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="3oo-WM-iPM"> |
| | | <rect key="frame" x="304.66666666666669" y="48.666666666666686" width="57" height="11.666666666666664"/> |
| | | <rect key="frame" x="305.66666666666669" y="48.666666666666686" width="56" height="11.666666666666664"/> |
| | | <constraints> |
| | | <constraint firstAttribute="height" constant="11.5" id="VZq-Ht-vK3"/> |
| | | </constraints> |
| | |
| | | <rect key="frame" x="13.000000000000002" y="17.666666666666686" width="21.666666666666671" height="21.666666666666671"/> |
| | | </imageView> |
| | | <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="余额抵扣" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="TAm-8d-ISp"> |
| | | <rect key="frame" x="42.333333333333329" y="20" width="57.333333333333329" height="17"/> |
| | | <rect key="frame" x="42.333333333333343" y="20" width="55.666666666666657" height="17"/> |
| | | <fontDescription key="fontDescription" type="boldSystem" pointSize="14"/> |
| | | <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="当前可用 ¥0.00" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="W3z-Hl-09j"> |
| | | <rect key="frame" x="111" y="21.666666666666686" width="78.666666666666686" height="13.333333333333336"/> |
| | | <rect key="frame" x="109.33333333333331" y="21.666666666666686" width="77.666666666666686" height="13.333333333333336"/> |
| | | <fontDescription key="fontDescription" type="system" pointSize="11"/> |
| | | <color key="textColor" red="0.55686274509803924" green="0.55686274509803924" blue="0.55686274509803924" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> |
| | | <nil key="highlightedColor"/> |
| | |
| | | </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="JBC-49-la1"> |
| | | <rect key="frame" x="19.666666666666664" y="30" width="28.666666666666664" height="17"/> |
| | | <rect key="frame" x="19.666666666666671" y="30" width="28" height="17"/> |
| | | <fontDescription key="fontDescription" type="boldSystem" pointSize="14"/> |
| | | <nil key="textColor"/> |
| | | <nil key="highlightedColor"/> |
| | | </label> |
| | | <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="疗愈币0" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="M0e-rH-WtI"> |
| | | <rect key="frame" x="53.333333333333343" y="31.333333333333368" width="47" height="14.333333333333332"/> |
| | | <rect key="frame" x="52.666666666666657" y="31.333333333333368" width="46" height="14.333333333333332"/> |
| | | <fontDescription key="fontDescription" type="system" weight="heavy" pointSize="12"/> |
| | | <color key="textColor" red="0.54117647058823526" green="0.68235294117647061" blue="0.396078431372549" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> |
| | | <nil key="highlightedColor"/> |
| | |
| | | </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="jye-SN-JpG"> |
| | | <rect key="frame" x="38.666666666666657" y="39.333333333333371" width="93" height="15.666666666666664"/> |
| | | <rect key="frame" x="38.666666666666664" y="39.333333333333371" width="90.333333333333343" height="15.666666666666664"/> |
| | | <fontDescription key="fontDescription" type="system" pointSize="13"/> |
| | | <color key="textColor" red="0.49803921568627452" green="0.49803921568627452" blue="0.49803921568627452" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> |
| | | <nil key="highlightedColor"/> |
| | | </label> |
| | | <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="5Pu-d3-I9P"> |
| | | <rect key="frame" x="136.66666666666666" y="33" width="153.99999999999997" height="28"/> |
| | | <rect key="frame" x="134" y="33" width="150" height="28"/> |
| | | <fontDescription key="fontDescription" type="system" pointSize="13"/> |
| | | <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/> |
| | | <state key="normal" title="《课程/疗愈音频购买协议》"> |
| | |
| | | </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="A9Y-9h-ygH"> |
| | | <rect key="frame" x="295.66666666666669" y="39.333333333333371" width="26.666666666666686" height="15.666666666666664"/> |
| | | <rect key="frame" x="289" y="39.333333333333371" width="26" height="15.666666666666664"/> |
| | | <fontDescription key="fontDescription" type="system" pointSize="13"/> |
| | | <color key="textColor" red="0.49803921569999998" green="0.49803921569999998" blue="0.49803921569999998" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> |
| | | <nil key="highlightedColor"/> |
| | |
| | | let vc = VIPCenterVC() |
| | | JQ_currentViewController().jq_push(vc: vc) |
| | | }else{ |
| | | let vc = PaymentOrderVC(courseItemModel: m,type: .course,giftToOther: true) |
| | | let vc = PaymentOrderVC(courseItemModel: m,type: .course,giftToOther: true, showType: .horizontal) |
| | | JQ_currentViewController().jq_push(vc:vc) |
| | | } |
| | | } |
| | |
| | | let vc = VIPCenterVC() |
| | | JQ_currentViewController().jq_push(vc: vc) |
| | | }else{ |
| | | let vc = PaymentOrderVC(museItemModel: m,type: .muse) |
| | | let vc = PaymentOrderVC(museItemModel: m,type: .muse, showType: .vertical) |
| | | JQ_currentViewController().jq_push(vc:vc) |
| | | } |
| | | } |
| | |
| | | import RxRelay |
| | | import QMUIKit |
| | | import AuthenticationServices |
| | | import CoreTelephony |
| | | |
| | | |
| | | let LoginSuccess_Noti = Notification.Name.init("LoginSuccess_Noti") |
| | |
| | | @IBOutlet weak var btn_wechat: UIButton! |
| | | @IBOutlet weak var image_security: UIImageView! |
| | | |
| | | private var cellularData:CTCellularData! |
| | | |
| | | |
| | | private var viewModel = LoginViewModel() |
| | | |
| | |
| | | |
| | | override func viewDidLoad() { |
| | | super.viewDidLoad() |
| | | |
| | | cellularData = CTCellularData() |
| | | cellularData.cellularDataRestrictionDidUpdateNotifier = {[weak self] state in |
| | | guard let weakSelf = self else { return } |
| | | |
| | | switch state{ |
| | | case .notRestricted: |
| | | if UserDefaultSettingViewModel.getSetting()?.userFirstLaunch ?? true{ |
| | | DispatchQueue.main.async { |
| | | let vc = LoginTreatyVC() |
| | | vc.topIndex = 0 |
| | | vc.clickHandle { state in |
| | | if !state{ |
| | | exit(0) |
| | | }else{ |
| | | if var m = UserDefaultSettingViewModel.getSetting(){ |
| | | m.userFirstLaunch = false |
| | | UserDefaultSettingViewModel.saveSetting(m) |
| | | } |
| | | } |
| | | } |
| | | vc.modalPresentationStyle = .custom |
| | | weakSelf.present(vc, animated: true) |
| | | } |
| | | } |
| | | default:break |
| | | } |
| | | |
| | | } |
| | | } |
| | | |
| | | override func setRx() { |
| | |
| | | |
| | | @IBAction func userRegisterTreatyAction(_ sender: UIButton) { |
| | | |
| | | let vc = WebVC(type: .user) |
| | | vc.title = "用户注册协议" |
| | | push(vc: vc) |
| | | // let vc = WebVC(type: .user) |
| | | // vc.title = "用户注册协议" |
| | | // push(vc: vc) |
| | | |
| | | // let vc = LoginTreatyVC() |
| | | // vc.topIndex = 0 |
| | | // vc.clickHandle {[unowned self] state in |
| | | // self.btn_isRead.isSelected = state |
| | | // } |
| | | // vc.modalPresentationStyle = .custom |
| | | // present(vc, animated: true) |
| | | let vc = LoginTreatyVC() |
| | | vc.topIndex = 0 |
| | | vc.clickHandle {[unowned self] state in |
| | | self.btn_isRead.isSelected = state |
| | | } |
| | | vc.modalPresentationStyle = .custom |
| | | present(vc, animated: true) |
| | | } |
| | | |
| | | @IBAction func userPrivateTreatyAction(_ sender: UIButton) { |
| | | // let vc = LoginTreatyVC() |
| | | // vc.topIndex = 1 |
| | | // vc.clickHandle {[unowned self] state in |
| | | // self.btn_isRead.isSelected = state |
| | | // } |
| | | // vc.modalPresentationStyle = .custom |
| | | // present(vc, animated: true) |
| | | let vc = WebVC(type: .privacy) |
| | | vc.title = "用户隐私协议" |
| | | push(vc: vc) |
| | | let vc = LoginTreatyVC() |
| | | vc.topIndex = 1 |
| | | vc.clickHandle {[unowned self] state in |
| | | self.btn_isRead.isSelected = state |
| | | } |
| | | vc.modalPresentationStyle = .custom |
| | | present(vc, animated: true) |
| | | // let vc = WebVC(type: .privacy) |
| | | // vc.title = "用户隐私协议" |
| | | // push(vc: vc) |
| | | } |
| | | |
| | | @IBAction func registerAction(_ sender: UIButton) { |
| | |
| | | <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="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="login_top_bg" translatesAutoresizingMaskIntoConstraints="NO" id="CyS-nF-bm3"> |
| | | <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="login_top_bg" translatesAutoresizingMaskIntoConstraints="NO" id="CyS-nF-bm3"> |
| | | <rect key="frame" x="0.0" y="0.0" width="393" height="297"/> |
| | | </imageView> |
| | | <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Cxv-rm-1Fq"> |
| | |
| | | </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="240" width="83.666666666666686" height="14.333333333333343"/> |
| | | <rect key="frame" x="57.000000000000007" y="238" 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="233.66666666666669" width="84" height="27"/> |
| | | <rect key="frame" x="145.66666666666666" y="231.66666666666669" 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="《用户注册协议》"> |
| | |
| | | </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="233.66666666666669" width="84" height="27"/> |
| | | <rect key="frame" x="237.66666666666663" y="231.66666666666669" 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="《用户隐私协议》"> |
| | |
| | | </subviews> |
| | | <color key="backgroundColor" systemColor="systemBackgroundColor"/> |
| | | <constraints> |
| | | <constraint firstItem="eq2-Wp-Yza" firstAttribute="centerY" secondItem="6Xe-Xr-eHg" secondAttribute="centerY" id="083-Vl-7Nc"/> |
| | | <constraint firstItem="eq2-Wp-Yza" firstAttribute="centerY" secondItem="6Xe-Xr-eHg" secondAttribute="centerY" constant="-2" id="083-Vl-7Nc"/> |
| | | <constraint firstItem="Ec8-sg-6R6" firstAttribute="top" secondItem="Cxv-rm-1Fq" secondAttribute="top" constant="22" id="1A0-PI-Pgu"/> |
| | | <constraint firstItem="esZ-HR-QwQ" firstAttribute="centerY" secondItem="6Xe-Xr-eHg" secondAttribute="centerY" id="3EO-Xv-RNw"/> |
| | | <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="EBj-o7-Mca" firstAttribute="leading" secondItem="Cxv-rm-1Fq" secondAttribute="leading" constant="31" id="B4S-Om-agc"/> |
| | |
| | | <constraint firstItem="cUd-a4-RTn" firstAttribute="leading" secondItem="x0Y-XG-Xsv" secondAttribute="trailing" constant="10" id="Duu-fF-i6C"/> |
| | | <constraint firstItem="8PR-dw-BH2" firstAttribute="leading" secondItem="Cxv-rm-1Fq" secondAttribute="leading" constant="31" id="EJX-7K-0Sx"/> |
| | | <constraint firstItem="cUd-a4-RTn" firstAttribute="centerY" secondItem="8PR-dw-BH2" secondAttribute="centerY" id="HU9-kD-mb5"/> |
| | | <constraint firstItem="MNJ-Ag-zfE" firstAttribute="centerY" secondItem="6Xe-Xr-eHg" secondAttribute="centerY" id="HWY-A4-Ukq"/> |
| | | <constraint firstItem="MNJ-Ag-zfE" firstAttribute="centerY" secondItem="6Xe-Xr-eHg" secondAttribute="centerY" constant="-2" id="HWY-A4-Ukq"/> |
| | | <constraint firstItem="6Xe-Xr-eHg" firstAttribute="leading" secondItem="Cxv-rm-1Fq" secondAttribute="leading" constant="27" id="JBm-Tk-D0z"/> |
| | | <constraint firstItem="ZrE-T5-sl1" firstAttribute="top" secondItem="9Rg-d1-NE7" secondAttribute="bottom" constant="29" id="K16-mL-PKc"/> |
| | | <constraint firstAttribute="trailing" secondItem="k1h-gO-9vj" secondAttribute="trailing" constant="31" id="L30-Cz-ffu"/> |
| | |
| | | required init?(coder: NSCoder) { |
| | | fatalError("init(coder:) has not been implemented") |
| | | } |
| | | |
| | | |
| | | override func viewDidAppear(_ animated: Bool) { |
| | | super.viewDidAppear(animated) |
| | | navigationController?.interactivePopGestureRecognizer?.isEnabled = false |
| | | } |
| | | |
| | | |
| | | override func viewDidLoad() { |
| | | super.viewDidLoad() |
| | | title = "修改密码" |
| | |
| | | title = "修改密码" |
| | | } |
| | | |
| | | override func viewDidAppear(_ animated: Bool) { |
| | | super.viewDidAppear(animated) |
| | | navigationController?.interactivePopGestureRecognizer?.isEnabled = true |
| | | } |
| | | |
| | | override func setUI() { |
| | | view.addSubview(shadowView) |
| | | shadowView.backgroundColor = .white |
| | |
| | | <?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"/> |
| | |
| | | <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> |
| | | <subviews> |
| | | <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="注册账户" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Xoe-b5-ZyL"> |
| | | <rect key="frame" x="30.999999999999993" y="90" width="89.333333333333314" height="26"/> |
| | | <rect key="frame" x="31" y="90" width="84" height="26"/> |
| | | <constraints> |
| | | <constraint firstAttribute="height" constant="26" id="utb-gp-vHQ"/> |
| | | </constraints> |
| | |
| | | <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="tZs-nq-vT4"> |
| | | <rect key="frame" x="31" y="131" width="86" height="14"/> |
| | | <rect key="frame" x="31.000000000000007" y="131" width="83.666666666666686" height="14"/> |
| | | <constraints> |
| | | <constraint firstAttribute="height" constant="14" id="2Qt-vU-Szl"/> |
| | | </constraints> |
| | |
| | | </userDefinedRuntimeAttributes> |
| | | </textField> |
| | | <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="X24-Jo-NJp"> |
| | | <rect key="frame" x="257" y="16.666666666666657" width="72" height="29"/> |
| | | <rect key="frame" x="259" y="16.666666666666657" 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="获取验证码"> |
| | |
| | | </subviews> |
| | | </stackView> |
| | | <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="le0-wV-iiB"> |
| | | <rect key="frame" x="148" y="429.66666666666669" width="87" height="27"/> |
| | | <rect key="frame" x="145.66666666666666" y="427.66666666666669" 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="《用户注册协议》"> |
| | |
| | | </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="ioV-dr-25D"> |
| | | <rect key="frame" x="57" y="436" width="86" height="14.333333333333314"/> |
| | | <rect key="frame" x="57.000000000000007" y="434" width="83.666666666666686" height="14.333333333333314"/> |
| | | <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="Q21-BZ-Fwn"> |
| | | <rect key="frame" x="243" y="429.66666666666669" width="87" height="27"/> |
| | | <rect key="frame" x="237.66666666666663" y="427.66666666666669" 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="《用户隐私协议》"> |
| | |
| | | </connections> |
| | | </button> |
| | | <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="PqN-MA-u63"> |
| | | <rect key="frame" x="31" y="507.33333333333326" width="331" height="40"/> |
| | | <rect key="frame" x="31" y="505.33333333333326" width="331" height="40"/> |
| | | <color key="backgroundColor" red="0.68627450980392157" green="0.792156862745098" blue="0.59607843137254901" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> |
| | | <constraints> |
| | | <constraint firstAttribute="height" constant="40" id="9RE-eR-crf"/> |
| | |
| | | <constraints> |
| | | <constraint firstItem="tZs-nq-vT4" firstAttribute="leading" secondItem="fnl-2z-Ty3" secondAttribute="leading" constant="31" id="0le-Ql-nG8"/> |
| | | <constraint firstItem="le0-wV-iiB" firstAttribute="leading" secondItem="ioV-dr-25D" secondAttribute="trailing" constant="5" id="61b-F4-156"/> |
| | | <constraint firstItem="le0-wV-iiB" firstAttribute="centerY" secondItem="iO1-Hp-lde" secondAttribute="centerY" id="6gH-gM-9II"/> |
| | | <constraint firstItem="le0-wV-iiB" firstAttribute="centerY" secondItem="iO1-Hp-lde" secondAttribute="centerY" constant="-2" id="6gH-gM-9II"/> |
| | | <constraint firstItem="iO1-Hp-lde" firstAttribute="leading" secondItem="i5M-Pr-FkT" secondAttribute="leading" constant="27" id="8JS-Uf-Cb6"/> |
| | | <constraint firstItem="tZs-nq-vT4" firstAttribute="top" secondItem="Xoe-b5-ZyL" secondAttribute="bottom" constant="15" id="9Pm-dv-dNw"/> |
| | | <constraint firstItem="Pnz-Lz-6VA" firstAttribute="leading" secondItem="fnl-2z-Ty3" secondAttribute="leading" constant="32" id="BSp-Qc-eul"/> |
| | |
| | | <constraint firstItem="ioV-dr-25D" firstAttribute="leading" secondItem="iO1-Hp-lde" secondAttribute="trailing" constant="2" id="lMt-R5-saY"/> |
| | | <constraint firstItem="Xoe-b5-ZyL" firstAttribute="leading" secondItem="fnl-2z-Ty3" secondAttribute="leading" constant="31" id="lu4-ZX-Co4"/> |
| | | <constraint firstItem="PqN-MA-u63" firstAttribute="top" secondItem="ioV-dr-25D" secondAttribute="bottom" constant="57" id="o9P-Ef-tNl"/> |
| | | <constraint firstItem="ioV-dr-25D" firstAttribute="centerY" secondItem="iO1-Hp-lde" secondAttribute="centerY" id="t3f-Ua-Q4k"/> |
| | | <constraint firstItem="Q21-BZ-Fwn" firstAttribute="centerY" secondItem="iO1-Hp-lde" secondAttribute="centerY" id="vdw-cx-lKj"/> |
| | | <constraint firstItem="ioV-dr-25D" firstAttribute="centerY" secondItem="iO1-Hp-lde" secondAttribute="centerY" constant="-2" id="t3f-Ua-Q4k"/> |
| | | <constraint firstItem="Q21-BZ-Fwn" firstAttribute="centerY" secondItem="iO1-Hp-lde" secondAttribute="centerY" constant="-2" id="vdw-cx-lKj"/> |
| | | </constraints> |
| | | <point key="canvasLocation" x="140" y="21"/> |
| | | </view> |
| | |
| | | </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="38g-LO-yZD"> |
| | | <rect key="frame" x="57.000000000000007" y="350" width="83.666666666666686" height="14.333333333333314"/> |
| | | <rect key="frame" x="57.000000000000007" y="348" width="83.666666666666686" height="14.333333333333314"/> |
| | | <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="U8y-71-Mhb"> |
| | | <rect key="frame" x="237.66666666666663" y="343.66666666666669" width="84" height="27"/> |
| | | <rect key="frame" x="237.66666666666663" y="341.66666666666669" 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="《用户隐私协议》"> |
| | |
| | | </connections> |
| | | </button> |
| | | <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="ztb-yJ-wp8"> |
| | | <rect key="frame" x="145.66666666666666" y="343.66666666666669" width="84" height="27"/> |
| | | <rect key="frame" x="145.66666666666666" y="341.66666666666669" 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="《用户注册协议》"> |
| | |
| | | <color key="backgroundColor" systemColor="systemBackgroundColor"/> |
| | | <constraints> |
| | | <constraint firstItem="ztb-yJ-wp8" firstAttribute="leading" secondItem="38g-LO-yZD" secondAttribute="trailing" constant="5" id="2ZX-Hp-Y7v"/> |
| | | <constraint firstItem="38g-LO-yZD" firstAttribute="centerY" secondItem="hpl-B3-jCO" secondAttribute="centerY" id="4oH-ow-j6Z"/> |
| | | <constraint firstItem="38g-LO-yZD" firstAttribute="centerY" secondItem="hpl-B3-jCO" secondAttribute="centerY" constant="-2" id="4oH-ow-j6Z"/> |
| | | <constraint firstItem="fnl-2z-Ty3" firstAttribute="trailing" secondItem="1ak-lr-vQd" secondAttribute="trailing" constant="31" id="7B5-oN-aYU"/> |
| | | <constraint firstItem="38g-LO-yZD" firstAttribute="leading" secondItem="hpl-B3-jCO" secondAttribute="trailing" constant="2" id="7vw-uE-HtX"/> |
| | | <constraint firstItem="zN9-OK-XPQ" firstAttribute="leading" secondItem="fnl-2z-Ty3" secondAttribute="leading" constant="31" id="COW-fU-vrj"/> |
| | | <constraint firstItem="U8y-71-Mhb" firstAttribute="centerY" secondItem="hpl-B3-jCO" secondAttribute="centerY" id="OlE-KZ-oFR"/> |
| | | <constraint firstItem="ztb-yJ-wp8" firstAttribute="centerY" secondItem="hpl-B3-jCO" secondAttribute="centerY" id="TIC-IN-cVA"/> |
| | | <constraint firstItem="U8y-71-Mhb" firstAttribute="centerY" secondItem="hpl-B3-jCO" secondAttribute="centerY" constant="-2" id="OlE-KZ-oFR"/> |
| | | <constraint firstItem="ztb-yJ-wp8" firstAttribute="centerY" secondItem="hpl-B3-jCO" secondAttribute="centerY" constant="-2" id="TIC-IN-cVA"/> |
| | | <constraint firstItem="1ak-lr-vQd" firstAttribute="leading" secondItem="fnl-2z-Ty3" secondAttribute="leading" constant="31" id="U5C-30-whR"/> |
| | | <constraint firstItem="hpl-B3-jCO" firstAttribute="leading" secondItem="fnl-2z-Ty3" secondAttribute="leading" constant="27" id="UMG-EF-YuL"/> |
| | | <constraint firstItem="g5y-td-c0h" firstAttribute="leading" secondItem="b9O-q9-hJ2" secondAttribute="leading" id="dgU-CS-QVR"/> |
| | |
| | | |
| | | @IBAction func needPaymentCourseAction(_ sender: UIButton) { |
| | | JQ_currentNavigationController().popToRootViewController(animated: true) |
| | | DispatchQueue.main.asyncAfter(delay: 0.5) { |
| | | JQ_currentViewController().tabBarController?.selectedIndex = 1 |
| | | NotificationCenter.default.post(name: CourseOfficalComment_Noti, object: nil, userInfo: nil) |
| | | } |
| | | } |
| | | } |
| | |
| | | <?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> |
| | |
| | | <rect key="frame" x="121.66666666666669" y="34.666666666666657" width="111" height="120"/> |
| | | </imageView> |
| | | <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="你还没有购买课程" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="eBW-Bc-yAN"> |
| | | <rect key="frame" x="128" y="176" width="98.333333333333314" height="12.666666666666657"/> |
| | | <rect key="frame" x="129" y="176" width="96" height="12.666666666666657"/> |
| | | <constraints> |
| | | <constraint firstAttribute="height" constant="12.5" id="cPC-co-C2P"/> |
| | | </constraints> |
| | | <fontDescription key="fontDescription" type="system" pointSize="12"/> |
| | | <nil key="textColor"/> |
| | | <fontDescription key="fontDescription" type="system" weight="medium" pointSize="12"/> |
| | | <color key="textColor" red="0.35686274509803922" green="0.35686274509803922" blue="0.35686274509803922" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> |
| | | <nil key="highlightedColor"/> |
| | | </label> |
| | | <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Xpd-vb-LhG"> |
| | |
| | | @IBAction func shareAction(_ sender: UIButton) { |
| | | |
| | | let string = String(format: "%@%@?userId=%ld", ShareUrl,"/poster/poster",UserViewModel.getAvatarInfo().id) |
| | | ShareView.show(URL(string: string)!, title: "心泉·疗愈", desc: "心泉疗愈1",hasSave: true) {[weak self] in |
| | | ShareView.show(URL(string: string)!, title: "心泉疗愈", desc: "心泉疗愈1",hasSave: true) {[weak self] in |
| | | self?.scrollView.jq_captureAsLongImage(saveToAlbum: true) |
| | | alertSuccess(msg: "已保存至相册") |
| | | } |
| | |
| | | |
| | | Services.userHeadingLevel().subscribe(onNext: {data in |
| | | if let m = data.data{ |
| | | |
| | | let progress = Double(m.growthValue) / Double(m.nextLevel) |
| | | DispatchQueue.main.asyncAfter(delay: 0.5) { |
| | | self.progressView.setProgress(Float(progress), animated: true) |
| | |
| | | |
| | | import UIKit |
| | | import JQTools |
| | | import WebKit |
| | | |
| | | class LogoutAccountVC: BaseVC { |
| | | |
| | | @IBOutlet weak var btn_logout: UIButton! |
| | | @IBOutlet weak var btn_logout: UIButton! |
| | | @IBOutlet weak var webView: WKWebView! |
| | | |
| | | override func viewDidLoad() { |
| | | override func viewDidLoad() { |
| | | super.viewDidLoad() |
| | | title = "注销账号" |
| | | title = "注销账号" |
| | | |
| | | let htmlText = """ |
| | | <h4>请认真阅读并理解,注销账号将产生以下后果:</h4> |
| | | <br/> |
| | | <p>1、账号信息、第三方授权、认证身份将被清空和取消;</p> |
| | | <p>2、所有使用、收藏、关注列表和购买记录将被清空;</p> |
| | | <p>3、账户中所有的余额将被清空;</p> |
| | | <p>4、账户对应的会员身份与权益将被取消;</p> |
| | | <p>5、您在平台发布的内容将做匿名处理。</p> |
| | | <br/> |
| | | <p>一经确认,以上内容将无法恢复,请谨慎考虑后决定。</p> |
| | | <br/> |
| | | <p>根据相关法律法规,注销心泉·疗愈账号并不代表注销前的账号行为和相关责任得到豁免或减轻。</p> |
| | | <br/> |
| | | <p>提交注销申请后的15日内,后台将进行审核工作,如无问题即可注销成功。在此期间如您登录,则视为取消注销申请</p> |
| | | """ |
| | | |
| | | webView.loadHTMLString(htmlText.jq_wrapHtml(edge: UIEdgeInsets(top: 0, left: 5, bottom: 0, right: 5)), baseURL: nil) |
| | | |
| | | } |
| | | @IBAction func completeAction(_ sender: UIButton) { |
| | | Services.deleteUser().subscribe(onNext: {data in |
| | | CommonAlertView.show(title: "提示", content: "注销成功", cancelStr: nil, completeStr: "确定", isSingle: true) { _ in |
| | | sceneDelegate?.needLogin() |
| | | @IBAction func completeAction(_ sender: UIButton) { |
| | | Services.deleteUser().subscribe(onNext: {data in |
| | | CommonAlertView.show(title: "提示", content: "注销成功", cancelStr: nil, completeStr: "确定", isSingle: true) { _ in |
| | | sceneDelegate?.needLogin() |
| | | self.navigationController?.popToRootViewController(animated: false) |
| | | DispatchQueue.main.asyncAfter(delay: 0.5) { |
| | | self.navigationController?.tabBarController?.selectedIndex = 0 |
| | | } |
| | | } |
| | | }).disposed(by: disposeBag) |
| | | } |
| | | } |
| | | }).disposed(by: disposeBag) |
| | | } |
| | | |
| | | @IBAction func quitAction(_ sender: UIButton) { |
| | | self.navigationController?.popViewController() |
| | | } |
| | | |
| | | |
| | | override func viewDidLayoutSubviews() { |
| | | super.viewDidLayoutSubviews() |
| | | btn_logout.jq_gradientNibColor(colorArr: [UIColor(hexStr: "#8EA47A").cgColor,UIColor(hexStr: "#AFCA98").cgColor], cornerRadius: 20) |
| | | } |
| | | |
| | | override func viewDidLayoutSubviews() { |
| | | super.viewDidLayoutSubviews() |
| | | btn_logout.jq_gradientNibColor(colorArr: [UIColor(hexStr: "#8EA47A").cgColor,UIColor(hexStr: "#AFCA98").cgColor], cornerRadius: 20) |
| | | } |
| | | } |
| | |
| | | <connections> |
| | | <outlet property="btn_logout" destination="4Xo-o1-mrz" id="DZ9-rg-p9P"/> |
| | | <outlet property="view" destination="i5M-Pr-FkT" id="sfx-zR-JGt"/> |
| | | <outlet property="webView" destination="d3j-kz-WXp" id="CEY-be-K58"/> |
| | | </connections> |
| | | </placeholder> |
| | | <placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/> |
| | |
| | | collectionView.backgroundColor = UIColor(hexString: "#F6F6F6") |
| | | collectionView.register(UINib(nibName: "EmptyCCell", bundle: nil), forCellWithReuseIdentifier: "_EmptyCCell") |
| | | collectionView.register(UINib(nibName: "HomeRelaxBanner_2_1_CCell", bundle: nil), forCellWithReuseIdentifier: "_HomeRelaxBanner_2_1_CCell") |
| | | collectionView.contentInset = UIEdgeInsets(top: 0, left: 18, bottom: 0, right: 18) |
| | | collectionView.contentInset = UIEdgeInsets(top: 0, left: 18, bottom: 20, right: 18) |
| | | collectionView.register(StudyListHeaderView.self, forSupplementaryViewOfKind: UICollectionView.elementKindSectionHeader, withReuseIdentifier: "header") |
| | | } |
| | | |
| | |
| | | extension StudyListVC:UICollectionViewDelegate & UICollectionViewDataSource{ |
| | | |
| | | func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) { |
| | | |
| | | |
| | | |
| | | var modelId:Int? |
| | | if indexPath.section == 0{ |
| | | guard datas?.courseList.count != 0 else{return} |
| | |
| | | |
| | | private func setUI(){ |
| | | backgroundColor = UIColor(hexString: "#F6F6F6") |
| | | lineLabel.font = .systemFont(ofSize: 15, weight: .medium) |
| | | lineLabel.font = .systemFont(ofSize: 15, weight: .bold) |
| | | lineLabel.textColor = UIColor(hexString: "#282828") |
| | | addSubview(lineLabel) |
| | | lineLabel.snp.makeConstraints { make in |
| | | make.left.equalTo(0) |
| | | make.left.equalTo(5) |
| | | make.centerY.equalToSuperview() |
| | | make.width.equalTo(71) |
| | | make.height.equalTo(20) |
| | |
| | | } |
| | | |
| | | @objc func selectUserProfile(){ |
| | | CommonAlertSheetView.show(items: ["从相册选择"]) {[unowned self] index in |
| | | CommonAlertSheetView.show(title:"更换头像",items: ["从相册选择"]) {[unowned self] index in |
| | | if index == 0{ |
| | | |
| | | let p = TZImagePickerController(maxImagesCount: 1, columnNumber: 3, delegate: self) |
| | |
| | | |
| | | if textField == tf_gender{ |
| | | let items = ["男","女","保密"] |
| | | CommonAlertSheetView.show(items: items,hiddenTitle: true) { index in |
| | | CommonAlertSheetView.show(title:"",items: items,hiddenTitle: true) { index in |
| | | guard textField.text != items[index] else {return} |
| | | if items[index] == "保密"{ |
| | | textField.text = "" |
| | |
| | | |
| | | let date = tf_birthday.text?.date(withFormat: "yyyy-MM-dd") //默认回填 |
| | | |
| | | BitrhdayPickerView.show(title: "", type: .YMD,defaultYear: date?.year,defaultMonth: date?.month,defaultDay: date?.day) {[weak self] date in |
| | | |
| | | |
| | | BitrhdayPickerView.show(title: "", type: .YMD,defaultYear: date?.year ?? Date().jq_nowYear(),defaultMonth: date?.month ?? Date().jq_nowMonth(),defaultDay: date?.day ?? Date().jq_nowDay()) {[weak self] date in |
| | | self?.tf_birthday.text = date.jq_format("yyyy-MM-dd") |
| | | } |
| | | return false |
| | |
| | | <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="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="bg_voice_top" translatesAutoresizingMaskIntoConstraints="NO" id="XVq-PF-coR"> |
| | | <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="bg_voice_top" translatesAutoresizingMaskIntoConstraints="NO" id="XVq-PF-coR"> |
| | | <rect key="frame" x="0.0" y="0.0" width="393" height="297"/> |
| | | </imageView> |
| | | <scrollView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" showsHorizontalScrollIndicator="NO" showsVerticalScrollIndicator="NO" translatesAutoresizingMaskIntoConstraints="NO" id="QFv-GO-e0l"> |
New file |
| | |
| | | // |
| | | // VIPAgreementVC.swift |
| | | // XQMuse |
| | | // |
| | | // Created by 无故事王国 on 2024/11/8. |
| | | // |
| | | |
| | | import UIKit |
| | | import WebKit |
| | | |
| | | class VIPAgreementVC: BaseVC { |
| | | |
| | | @IBOutlet weak var label_title: UILabel! |
| | | @IBOutlet weak var webView: WKWebView! |
| | | @IBOutlet weak var view_container: UIView! |
| | | @IBOutlet weak var btn_reject: UIButton! |
| | | @IBOutlet weak var btn_agreement: UIButton! |
| | | |
| | | private var textTitle = "" |
| | | private var content:String = "" |
| | | private var clouse:(()->Void)? |
| | | |
| | | init(title:String,content:String,clouse:@escaping ()->Void) { |
| | | super.init(nibName: nil, bundle: nil) |
| | | self.textTitle = title |
| | | self.content = content |
| | | self.clouse = clouse |
| | | } |
| | | |
| | | required init?(coder: NSCoder) { |
| | | fatalError("init(coder:) has not been implemented") |
| | | } |
| | | |
| | | override func viewDidLoad() { |
| | | super.viewDidLoad() |
| | | |
| | | view.alpha = 0 |
| | | view.backgroundColor = .black.withAlphaComponent(0.7) |
| | | label_title.text = textTitle |
| | | |
| | | btn_reject.jq_borderColor = UIColor(hexString: "#8AAE65") |
| | | btn_reject.jq_borderWidth = 1 |
| | | |
| | | view_container.jq_cornerRadius = 10 |
| | | btn_reject.jq_cornerRadius = 22 |
| | | btn_agreement.jq_cornerRadius = 22 |
| | | |
| | | webView.loadHTMLString(content.jq_wrapHtml(edge: UIEdgeInsets(top: 0, left: 5, bottom: 0, right: 5)), baseURL: nil) |
| | | |
| | | UIView.animate(withDuration: 0.5) { |
| | | self.view.alpha = 1.0 |
| | | } |
| | | } |
| | | |
| | | |
| | | override func viewDidLayoutSubviews() { |
| | | super.viewDidLayoutSubviews() |
| | | btn_agreement.localGradientColor(cornerRadius: 22) |
| | | } |
| | | |
| | | @IBAction func rejectAction(_ sender: UIButton) { |
| | | UIView.animate(withDuration: 0.5) { |
| | | self.view.alpha = 0 |
| | | } completion: { _ in |
| | | self.dismiss(animated: true) |
| | | } |
| | | } |
| | | |
| | | @IBAction func agreementAction(_ sender: UIButton) { |
| | | UIView.animate(withDuration: 0.5) { |
| | | self.view.alpha = 0 |
| | | } completion: { _ in |
| | | self.dismiss(animated: true) |
| | | self.clouse?() |
| | | } |
| | | } |
| | | } |
New file |
| | |
| | | <?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="VIPAgreementVC" customModule="XQMuse" customModuleProvider="target"> |
| | | <connections> |
| | | <outlet property="btn_agreement" destination="Rjo-0f-iSd" id="fkK-d7-8w6"/> |
| | | <outlet property="btn_reject" destination="xco-fG-jdj" id="lf9-3a-nmZ"/> |
| | | <outlet property="label_title" destination="qoW-WY-Ihe" id="agC-2g-bhA"/> |
| | | <outlet property="view" destination="i5M-Pr-FkT" id="sfx-zR-JGt"/> |
| | | <outlet property="view_container" destination="AnX-KS-3cU" id="snA-fT-ZG6"/> |
| | | <outlet property="webView" destination="2TR-sg-l6t" id="yl4-Dd-Htd"/> |
| | | </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> |
| | | <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="AnX-KS-3cU"> |
| | | <rect key="frame" x="45" y="202" width="303" height="473"/> |
| | | <subviews> |
| | | <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="qoW-WY-Ihe"> |
| | | <rect key="frame" x="133.66666666666666" y="20" width="36" height="20"/> |
| | | <constraints> |
| | | <constraint firstAttribute="height" constant="20" id="rxU-IW-0Ad"/> |
| | | </constraints> |
| | | <fontDescription key="fontDescription" type="system" weight="medium" pointSize="14"/> |
| | | <color key="textColor" red="0.57647058823529407" green="0.66666666666666663" blue="0.49803921568627452" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> |
| | | <nil key="highlightedColor"/> |
| | | </label> |
| | | <wkWebView contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="2TR-sg-l6t"> |
| | | <rect key="frame" x="0.0" y="67" width="303" height="340"/> |
| | | <wkWebViewConfiguration key="configuration"> |
| | | <audiovisualMediaTypes key="mediaTypesRequiringUserActionForPlayback" none="YES"/> |
| | | <wkPreferences key="preferences"/> |
| | | </wkWebViewConfiguration> |
| | | </wkWebView> |
| | | <stackView opaque="NO" contentMode="scaleToFill" spacing="39" translatesAutoresizingMaskIntoConstraints="NO" id="WJO-cd-ayp"> |
| | | <rect key="frame" x="34" y="417" width="235" height="40"/> |
| | | <subviews> |
| | | <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="xco-fG-jdj"> |
| | | <rect key="frame" x="0.0" y="0.0" width="98" height="40"/> |
| | | <constraints> |
| | | <constraint firstAttribute="width" constant="98" id="Ela-Hm-Q8b"/> |
| | | </constraints> |
| | | <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="拒绝"> |
| | | <color key="titleColor" red="0.57647058819999997" green="0.66666666669999997" blue="0.49803921569999998" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> |
| | | </state> |
| | | <connections> |
| | | <action selector="rejectAction:" destination="-1" eventType="touchUpInside" id="gjP-WR-93F"/> |
| | | </connections> |
| | | </button> |
| | | <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Rjo-0f-iSd"> |
| | | <rect key="frame" x="137" y="0.0" width="98" height="40"/> |
| | | <color key="backgroundColor" red="0.57647058819999997" green="0.66666666669999997" blue="0.49803921569999998" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> |
| | | <constraints> |
| | | <constraint firstAttribute="width" constant="98" id="KgB-K0-wQm"/> |
| | | </constraints> |
| | | <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="同意"> |
| | | <color key="titleColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> |
| | | </state> |
| | | <connections> |
| | | <action selector="agreementAction:" destination="-1" eventType="touchUpInside" id="cf5-vP-ePN"/> |
| | | </connections> |
| | | </button> |
| | | </subviews> |
| | | <constraints> |
| | | <constraint firstAttribute="height" constant="40" id="ikX-1C-Pz2"/> |
| | | </constraints> |
| | | </stackView> |
| | | </subviews> |
| | | <color key="backgroundColor" systemColor="systemBackgroundColor"/> |
| | | <constraints> |
| | | <constraint firstAttribute="trailing" secondItem="2TR-sg-l6t" secondAttribute="trailing" id="DMF-sl-hAC"/> |
| | | <constraint firstItem="qoW-WY-Ihe" firstAttribute="centerX" secondItem="AnX-KS-3cU" secondAttribute="centerX" id="FPH-oU-PjA"/> |
| | | <constraint firstItem="WJO-cd-ayp" firstAttribute="top" secondItem="2TR-sg-l6t" secondAttribute="bottom" constant="10" id="IbN-HZ-UV8"/> |
| | | <constraint firstItem="qoW-WY-Ihe" firstAttribute="top" secondItem="AnX-KS-3cU" secondAttribute="top" constant="20" id="Mtn-gt-DPT"/> |
| | | <constraint firstItem="2TR-sg-l6t" firstAttribute="leading" secondItem="AnX-KS-3cU" secondAttribute="leading" id="Wjo-E4-zzl"/> |
| | | <constraint firstAttribute="bottom" secondItem="WJO-cd-ayp" secondAttribute="bottom" constant="16" id="gpP-KD-Mn6"/> |
| | | <constraint firstItem="2TR-sg-l6t" firstAttribute="top" secondItem="qoW-WY-Ihe" secondAttribute="bottom" constant="27" id="weP-0B-0DR"/> |
| | | <constraint firstItem="WJO-cd-ayp" firstAttribute="centerX" secondItem="AnX-KS-3cU" secondAttribute="centerX" id="yk1-6H-Ggd"/> |
| | | </constraints> |
| | | </view> |
| | | </subviews> |
| | | <viewLayoutGuide key="safeArea" id="fnl-2z-Ty3"/> |
| | | <color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.69999999999999996" colorSpace="custom" customColorSpace="sRGB"/> |
| | | <constraints> |
| | | <constraint firstItem="fnl-2z-Ty3" firstAttribute="bottom" secondItem="AnX-KS-3cU" secondAttribute="bottom" constant="143" id="5qL-gf-pPC"/> |
| | | <constraint firstItem="fnl-2z-Ty3" firstAttribute="trailing" secondItem="AnX-KS-3cU" secondAttribute="trailing" constant="45" id="DW3-Yu-ivz"/> |
| | | <constraint firstItem="AnX-KS-3cU" firstAttribute="top" secondItem="fnl-2z-Ty3" secondAttribute="top" constant="143" id="HtO-g9-F4r"/> |
| | | <constraint firstItem="AnX-KS-3cU" firstAttribute="centerX" secondItem="fnl-2z-Ty3" secondAttribute="centerX" id="bgq-KK-mAd"/> |
| | | <constraint firstItem="AnX-KS-3cU" firstAttribute="leading" secondItem="fnl-2z-Ty3" secondAttribute="leading" constant="45" id="xBY-xB-mb0"/> |
| | | </constraints> |
| | | <point key="canvasLocation" x="139.69465648854961" y="20.422535211267608"/> |
| | | </view> |
| | | </objects> |
| | | <resources> |
| | | <systemColor name="systemBackgroundColor"> |
| | | <color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> |
| | | </systemColor> |
| | | </resources> |
| | | </document> |
| | |
| | | } |
| | | |
| | | @IBAction func agreementAction(_ sender: UIButton) { |
| | | let vc = WebVC(type: .user) |
| | | push(vc: vc) |
| | | |
| | | Services.getVipContent(type: 2).subscribe(onNext: { [weak self] data in |
| | | if let str = data.data{ |
| | | let vc = VIPAgreementVC(title: "会员用户协议", content: str) { |
| | | self?.btn_isRead.isSelected = true |
| | | } |
| | | vc.modalPresentationStyle = .custom |
| | | self?.present(vc, animated: true) |
| | | } |
| | | }).disposed(by: disposeBag) |
| | | } |
| | | } |
| | | |
| | |
| | | func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) { |
| | | |
| | | let m = viewModel.dataSource.value[indexPath.row] |
| | | |
| | | if m.paymentStatus == .yes{ |
| | | //todo |
| | | |
| | | return |
| | | } |
| | | |
| | | |
| | | if viewModel.state.value == 1{ |
| | | let vc = HomeItemDetailVC(id: m.businessId) |
| | | JQ_currentViewController().jq_push(vc: vc) |
| | |
| | | var bgm:BGMModel? |
| | | var playModel:PlayMode = .line |
| | | |
| | | var userFirstOpenTreeTask = true //第一次打开树苗 |
| | | var userFirstOpenTreeTask = false //第一次打开树苗 |
| | | var userFirstLaunch = true //第一次启动 |
| | | } |
| | | |
| | |
| | | var tutor:String = "" |
| | | var meditationMusicList = [String]() |
| | | var meditationSecondList = [Int]() //时长 |
| | | var paymentStatus:ConditionType = .no //支付状态 1待支付 2已支付 |
| | | |
| | | required init(){} |
| | | } |
| | |
| | | var tutor:String = "" |
| | | var wxQrCode:String = "" |
| | | var isCollect:ConditionType = .no // 是否收藏:1:是 2:否 |
| | | var paymentStatus:ConditionType = .no //支付状态 1待支付 2已支付 |
| | | |
| | | var list2 = [CourseModel]() |
| | | var list = [CourseItemModel]() |
| | |
| | | var nextLevel = 0 |
| | | var isNext = false |
| | | var status = 0 //是否枯萎 1是2否(暂时不用) |
| | | var treeLevelType:TreeLevel = .level_1 |
| | | } |
| | | |
| | | struct EnergyExchangeGiftModel:HandyJSON{ |
| | |
| | | |
| | | extension Services{ |
| | | |
| | | //是否首次 |
| | | class func isFirst()->Observable<BaseResponse<Bool>>{ |
| | | let params = ParamsAppender.build(url: All_Url) |
| | | .interface(url: "/user/client/app-user-tree/isFirst") |
| | | return NetworkRequest.request(params: params, method: .post,encoding: JSONEncoding(), progress: false) |
| | | } |
| | | |
| | | class func getPlan()->Observable<BaseResponse<String>>{ |
| | | let params = ParamsAppender.build(url: All_Url) |
| | | .interface(url: "/system/system/page/getPlan") |
| | |
| | | @IBOutlet weak var cons_viewBottom: NSLayoutConstraint! |
| | | @IBOutlet weak var cons_titleH: NSLayoutConstraint! |
| | | @IBOutlet weak var view_title: UIView! |
| | | @IBOutlet weak var label_title: UILabel! |
| | | |
| | | private var items = [String]() |
| | | private var clouse:((Int)->Void)! |
| | |
| | | tableView.register(CommonAlertSheetTCell.self, forCellReuseIdentifier: "TCell") |
| | | } |
| | | |
| | | static func show(items:[String],hiddenTitle:Bool = false,clouse:@escaping (Int)->Void){ |
| | | static func show(title:String,items:[String],hiddenTitle:Bool = false,clouse:@escaping (Int)->Void){ |
| | | let alertView = CommonAlertSheetView.jq_loadNibView() |
| | | alertView.hiddenTitle = hiddenTitle |
| | | alertView.label_title.text = title |
| | | alertView.cons_titleH.constant = hiddenTitle ? 0:56 |
| | | alertView.view_title.isHidden = hiddenTitle |
| | | |
| | |
| | | <outlet property="cons_tableHei" destination="g8g-XN-qDa" id="dhx-xA-6hC"/> |
| | | <outlet property="cons_titleH" destination="Erd-6b-f1H" id="Db7-Kk-iDQ"/> |
| | | <outlet property="cons_viewBottom" destination="0uK-bT-T9v" id="Dcm-l0-a8b"/> |
| | | <outlet property="label_title" destination="Z6W-qo-71h" id="kdv-l9-h3T"/> |
| | | <outlet property="tableView" destination="G6i-xu-rUK" id="afR-iG-9IN"/> |
| | | <outlet property="view_container" destination="ZCi-js-xyb" id="Mk8-7J-xes"/> |
| | | <outlet property="view_title" destination="hTf-8X-Zlq" id="8or-uu-f3F"/> |
| | |
| | | private var clouse:((CountDownStatus)->Void)? |
| | | private var status:CountDownStatus = .close |
| | | |
| | | var numberMinutes = 1 |
| | | var numberMinutes = 5 |
| | | |
| | | override func awakeFromNib() { |
| | | super.awakeFromNib() |
| | | tf_input.text = numberMinutes.string |
| | | tf_input.tintColor = UIColor(hexString: "#8AAE65") |
| | | |
| | | view_content.jq_addCorners(corner: [.topLeft,.topRight], radius: 20) |
| | | alpha = 0 |
| | | cons_bottom.constant = -JQ_ScreenH |
| | | layoutIfNeeded() |
| | |
| | | |
| | | override func layoutSubviews() { |
| | | super.layoutSubviews() |
| | | view_content.jq_addCorners(corner: [.topLeft,.topRight], radius: 20) |
| | | // btn_cancel.jq_gradientNibColor(colorArr: [UIColor(hexStr: "#8EA47A").cgColor,UIColor(hexStr: "#AFCA98").cgColor], cornerRadius: 18.5) |
| | | |
| | | btn_cancel.jq_gradientNibColor(colorArr: [UIColor(hexStr: "#8EA47A").cgColor,UIColor(hexStr: "#AFCA98").cgColor], cornerRadius: 18.5) |
| | | btn_cancel.jq_gradientColor(colorArr: [UIColor(hexStr: "#8EA47A").cgColor,UIColor(hexStr: "#AFCA98").cgColor],bounds: CGRect(x: 0, y: 0, width: JQ_ScreenW - 47.5 * 2, height: 37.5)) |
| | | } |
| | | |
| | | private func closeAni(){ |
| | |
| | | <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> |
| | |
| | | <rect key="frame" x="0.0" y="0.0" width="393" height="852"/> |
| | | <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> |
| | | <subviews> |
| | | <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="RIb-w0-AAo"> |
| | | <rect key="frame" x="0.0" y="0.0" width="393" height="852"/> |
| | | <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/> |
| | | <connections> |
| | | <action selector="closeAction:" destination="iN0-l3-epB" eventType="touchUpInside" id="sJU-dJ-ta7"/> |
| | | </connections> |
| | | </button> |
| | | <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="USh-pc-rFX"> |
| | | <rect key="frame" x="0.0" y="225.66666666666669" width="393" height="626.33333333333326"/> |
| | | <subviews> |
| | |
| | | <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="5分钟" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="R6N-pc-KFT"> |
| | | <rect key="frame" x="0.0" y="20.333333333333343" width="43.666666666666664" height="19.333333333333329"/> |
| | | <fontDescription key="fontDescription" type="system" weight="medium" pointSize="16"/> |
| | | <color key="textColor" red="0.36078431370000003" green="0.36078431370000003" blue="0.36078431370000003" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> |
| | | <color key="textColor" red="0.57647058819999997" green="0.66666666669999997" blue="0.49803921569999998" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> |
| | | <nil key="highlightedColor"/> |
| | | </label> |
| | | <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="icon_choose_small" translatesAutoresizingMaskIntoConstraints="NO" id="WKB-34-lB6"> |
| | | <rect key="frame" x="322.33333333333331" y="22.000000000000028" width="15.666666666666686" height="15.666666666666664"/> |
| | | <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="icon_choose_small_s" translatesAutoresizingMaskIntoConstraints="NO" id="WKB-34-lB6"> |
| | | <rect key="frame" x="322.33333333333331" y="22.000000000000028" width="15.666666666666686" height="16"/> |
| | | </imageView> |
| | | </subviews> |
| | | <color key="backgroundColor" systemColor="systemBackgroundColor"/> |
| | |
| | | </connections> |
| | | </view> |
| | | </subviews> |
| | | <constraints> |
| | | <constraint firstAttribute="height" constant="480" id="kcw-6n-XTG"/> |
| | | </constraints> |
| | | </stackView> |
| | | </subviews> |
| | | <color key="backgroundColor" systemColor="systemBackgroundColor"/> |
| | |
| | | <constraint firstAttribute="trailing" secondItem="Frj-KE-ITo" secondAttribute="trailing" constant="47.5" id="bYf-d0-Klo"/> |
| | | </constraints> |
| | | </view> |
| | | <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="RIb-w0-AAo"> |
| | | <rect key="frame" x="0.0" y="58.999999999999986" width="393" height="166.66666666666663"/> |
| | | <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/> |
| | | <connections> |
| | | <action selector="closeAction:" destination="iN0-l3-epB" eventType="touchUpInside" id="sJU-dJ-ta7"/> |
| | | </connections> |
| | | </button> |
| | | </subviews> |
| | | <viewLayoutGuide key="safeArea" id="vUN-kp-3ea"/> |
| | | <color key="backgroundColor" red="0.36078431370000003" green="0.36078431370000003" blue="0.36078431370000003" alpha="0.14999999999999999" colorSpace="custom" customColorSpace="sRGB"/> |
| | | <constraints> |
| | | <constraint firstItem="RIb-w0-AAo" firstAttribute="top" secondItem="vUN-kp-3ea" secondAttribute="top" id="5p4-ej-zMc"/> |
| | | <constraint firstItem="USh-pc-rFX" firstAttribute="top" secondItem="RIb-w0-AAo" secondAttribute="bottom" id="EO7-Qd-AWU"/> |
| | | <constraint firstItem="USh-pc-rFX" firstAttribute="leading" secondItem="vUN-kp-3ea" secondAttribute="leading" id="WYh-EN-7oF"/> |
| | | <constraint firstItem="vUN-kp-3ea" firstAttribute="trailing" secondItem="RIb-w0-AAo" secondAttribute="trailing" id="ZQn-HF-W3Y"/> |
| | | <constraint firstItem="RIb-w0-AAo" firstAttribute="top" secondItem="iN0-l3-epB" secondAttribute="top" id="5p4-ej-zMc"/> |
| | | <constraint firstAttribute="bottom" secondItem="RIb-w0-AAo" secondAttribute="bottom" id="C93-Os-Eqb"/> |
| | | <constraint firstItem="USh-pc-rFX" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" id="WYh-EN-7oF"/> |
| | | <constraint firstAttribute="trailing" secondItem="RIb-w0-AAo" secondAttribute="trailing" id="ZQn-HF-W3Y"/> |
| | | <constraint firstAttribute="bottom" secondItem="USh-pc-rFX" secondAttribute="bottom" id="ayY-u1-OKu"/> |
| | | <constraint firstItem="RIb-w0-AAo" firstAttribute="leading" secondItem="vUN-kp-3ea" secondAttribute="leading" id="id4-Yj-gvW"/> |
| | | <constraint firstItem="vUN-kp-3ea" firstAttribute="trailing" secondItem="USh-pc-rFX" secondAttribute="trailing" id="qs6-ux-Wne"/> |
| | | <constraint firstItem="RIb-w0-AAo" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" id="id4-Yj-gvW"/> |
| | | <constraint firstAttribute="trailing" secondItem="USh-pc-rFX" secondAttribute="trailing" id="qs6-ux-Wne"/> |
| | | </constraints> |
| | | <connections> |
| | | <outlet property="btn_cancel" destination="Frj-KE-ITo" id="71c-MW-RJK"/> |
| | |
| | | </objects> |
| | | <resources> |
| | | <image name="icon_choose_small" width="15.666666984558105" height="15.666666984558105"/> |
| | | <image name="icon_choose_small_s" width="15.666666984558105" height="16"/> |
| | | <systemColor name="systemBackgroundColor"> |
| | | <color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> |
| | | </systemColor> |
| | |
| | | return p |
| | | }() |
| | | |
| | | required init(url:String? = nil,autoPlay:Bool = false,placeHoderImageUrl:String? = nil,delegate:CLPlayerDelegate? = nil) { |
| | | required init(url:String? = nil,autoPlay:Bool = false,placeHoderImageUrl:String? = nil,needFirstImage:Bool = false,delegate:CLPlayerDelegate? = nil) { |
| | | super.init(frame: .zero) |
| | | addSubview(player) |
| | | player.delegate = delegate |
| | |
| | | make.edges.equalToSuperview() |
| | | } |
| | | self.placeHoderImageUrl = placeHoderImageUrl |
| | | if placeHoderImageUrl != nil{ |
| | | if placeHoderImageUrl != nil && needFirstImage == false{ |
| | | addPlaceHoderView(placeHoderImage: placeHoderImageUrl!) |
| | | } |
| | | |
| | | if let Url = URL(string: url){ |
| | | self.url = url |
| | | player.url = Url |
| | | |
| | | if needFirstImage{ |
| | | 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{ |
| | | player.play() |
| | | } |
| | |
| | | } |
| | | } |
| | | |
| | | private func addPlaceHoderView(placeHoderImage:String){ |
| | | private func addPlaceHoderView(placeHoderImage:String? = nil,firstFPSImage:UIImage? = nil){ |
| | | let placeV = UIView() |
| | | placeV.backgroundColor = .black |
| | | placeV.frame = player.frame |
| | | |
| | | let imageView = UIImageView() |
| | | imageView.sd_setImage(with: URL(string: placeHoderImage)) |
| | | imageView.contentMode = .scaleAspectFill |
| | | |
| | | if placeHoderImage != nil{ |
| | | imageView.sd_setImage(with: URL(string: placeHoderImage)) |
| | | } |
| | | |
| | | if firstFPSImage != nil{ |
| | | imageView.image = firstFPSImage |
| | | } |
| | | |
| | | imageView.contentMode = .scaleAspectFit |
| | | placeV.addSubview(imageView) |
| | | imageView.frame = player.frame |
| | | |
| | |
| | | """ |
| | | |
| | | public var tintColor = UIColor.blue |
| | | private var subVC:Bool = false |
| | | |
| | | public convenience init(url:String) { |
| | | self.init() |
| | | self.url = url |
| | | } |
| | | |
| | | public convenience init(type:AgreementType){ |
| | | public convenience init(type:AgreementType,subVC:Bool = false){ |
| | | self.init() |
| | | self.type = type |
| | | } |
| | |
| | | webView?.addObserver(self, forKeyPath: "estimatedProgress", options: .new, context: nil) |
| | | view.addSubview(webView!) |
| | | webView?.snp.makeConstraints({ (make) in |
| | | make.top.equalToSuperview().offset(UIDevice.jq_safeEdges.top) |
| | | make.top.equalToSuperview().offset(subVC ? UIDevice.jq_safeEdges.top:0) |
| | | make.left.right.bottom.equalToSuperview() |
| | | }) |
| | | |
| | |
| | | if type != nil{ |
| | | Services.agreementBy(type!).subscribe(onNext: {data in |
| | | if let model = data.data{ |
| | | self.webView?.loadHTMLString(model.content.jq_wrapHtml(), baseURL: nil) |
| | | self.webView?.loadHTMLString(model.content.jq_wrapHtml(edge: UIEdgeInsets(top: 0, left: 5, bottom: 0, right: 5)), baseURL: nil) |
| | | } |
| | | }).disposed(by: disposeBag) |
| | | } |
| | |
| | | } |
| | | formatItems.insert("苹果地图", at: 0) |
| | | |
| | | CommonAlertSheetView.show(items: formatItems) { index in |
| | | CommonAlertSheetView.show(title:"请选择地图",items: formatItems) { index in |
| | | switch index{ |
| | | case 0: |
| | | let item = MKMapItem(placemark: MKPlacemark(coordinate: CLLocationCoordinate2D(latitude: CLLocationDegrees(model.latitude), longitude: CLLocationDegrees(model.longitude)))) |
| | |
| | | <constraint firstAttribute="width" secondItem="bRv-iS-Gxa" secondAttribute="height" multiplier="1:0.8" id="AkY-bQ-ulu"/> |
| | | </constraints> |
| | | </view> |
| | | <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="心泉疗愈馆" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="ej2-gY-nmo"> |
| | | <rect key="frame" x="26.666666666666671" y="346" width="96" height="24"/> |
| | | <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="--" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="ej2-gY-nmo"> |
| | | <rect key="frame" x="26.666666666666671" y="346" width="18" height="24"/> |
| | | <fontDescription key="fontDescription" type="system" weight="medium" pointSize="20"/> |
| | | <color key="textColor" red="0.039215686274509803" green="0.25882352941176467" blue="0.074509803921568626" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> |
| | | <nil key="highlightedColor"/> |
| | |
| | | collectionView.register(UINib(nibName: "PavilionItemCell", bundle: nil), forCellWithReuseIdentifier: "_PavilionItemCell") |
| | | } |
| | | |
| | | override func setRx() { |
| | | if let m = viewModel{ |
| | | tf_search.rx.text.changed.bind(to: m.search).disposed(by: disposeBag) |
| | | } |
| | | } |
| | | |
| | | @IBAction func cancelAction(_ sender: UIButton) { |
| | | self.navigationController?.popViewController() |
| | | } |
| | |
| | | import AVFoundation |
| | | import MediaPlayer |
| | | import RxRelay |
| | | import RxSwift |
| | | |
| | | |
| | | let ChangeMasterVoice_Noti = Notification.Name.init(rawValue: "ChangeMasterVoice_Noti") |
| | |
| | | private static var _sharedInstance: AudioPlayer? |
| | | private(set) var meditationModel:MeditationModel? |
| | | weak var delegate:PayMusicDelegate? |
| | | private var disposeBag = DisposeBag() |
| | | |
| | | class func getSharedInstance() -> AudioPlayer { |
| | | guard let instance = _sharedInstance else { |
| | |
| | | self.masterPlayer?.volume = value |
| | | } |
| | | } |
| | | |
| | | |
| | | NotificationCenter.default.rx.notification(.AVPlayerItemDidPlayToEndTime).subscribe(onNext: {[weak self]data in |
| | | |
| | | guard let weakSelf = self else { return } |
| | | |
| | | let notifiUrl = ((data.object as? AVPlayerItem)?.asset as? AVURLAsset) |
| | | let sceneItem = (self?.scenePlayer?.currentItem?.asset as? AVURLAsset) |
| | | let bgmItem = (self?.bgmPlayer?.currentItem?.asset as? AVURLAsset) |
| | | |
| | | if bgmItem?.url == notifiUrl?.url{ |
| | | // self?.bgmPlayer?.seek(to: CMTime.zero) |
| | | // self?.bgmPlayer?.play() |
| | | |
| | | if weakSelf.playIndex < weakSelf.urls.count - 1{ |
| | | weakSelf.next() |
| | | weakSelf.delegate?.playState(.next) |
| | | }else{ |
| | | weakSelf.bgmPlayer?.pause() |
| | | weakSelf.playIndex = 0 |
| | | weakSelf.bgmPlayer?.replaceCurrentItem(with: AVPlayerItem(url: weakSelf.urls[0])) |
| | | weakSelf.bgmPlayer?.play() |
| | | |
| | | // weakSelf.delegate?.playState(.end) |
| | | // PayMusicVC.hidden() |
| | | // MPNowPlayingInfoCenter.default().nowPlayingInfo = nil |
| | | } |
| | | |
| | | } |
| | | |
| | | if sceneItem?.url == notifiUrl?.url{ |
| | | self?.scenePlayer?.seek(to: CMTime.zero) |
| | | self?.scenePlayer?.play() |
| | | } |
| | | |
| | | }).disposed(by: disposeBag) |
| | | |
| | | |
| | | // //播放完成 |
| | | // NotificationCenter.default.addObserver(self, selector: #selector(playBGMbackEnd), name:NSNotification.Name.AVPlayerItemDidPlayToEndTime, object: nil) |
| | | |
| | | |
| | | } // 私有化init方法 |
| | | |
| | | //销毁单例对象 |
| | |
| | | let totalTime = CMTimeGetSeconds((weakSelf.bgmPlayer?.currentItem?.duration)!) |
| | | |
| | | |
| | | if loadTime >= totalTime{ |
| | | if weakSelf.playIndex < urls.count - 1{ |
| | | weakSelf.next() |
| | | weakSelf.delegate?.playState(.next) |
| | | }else{ |
| | | weakSelf.bgmPlayer?.pause() |
| | | weakSelf.playIndex = 0 |
| | | weakSelf.bgmPlayer?.replaceCurrentItem(with: AVPlayerItem(url: urls[0])) |
| | | weakSelf.bgmPlayer?.play() |
| | | // if loadTime >= totalTime{ |
| | | // if weakSelf.playIndex < urls.count - 1{ |
| | | // weakSelf.next() |
| | | // weakSelf.delegate?.playState(.next) |
| | | // }else{ |
| | | // weakSelf.bgmPlayer?.pause() |
| | | // weakSelf.playIndex = 0 |
| | | // weakSelf.bgmPlayer?.replaceCurrentItem(with: AVPlayerItem(url: urls[0])) |
| | | // weakSelf.bgmPlayer?.play() |
| | | |
| | | // weakSelf.delegate?.playState(.end) |
| | | // PayMusicVC.hidden() |
| | | // MPNowPlayingInfoCenter.default().nowPlayingInfo = nil |
| | | } |
| | | } |
| | | // } |
| | | // } |
| | | |
| | | weakSelf.delegate?.playListen?(currentInterval: loadTime, totalInterval: totalTime) |
| | | |
| | |
| | | |
| | | /// 播放场景音乐 |
| | | func playSceneAt(_ url:String){ |
| | | guard let URL = URL(string: url) else { return } |
| | | guard let URL = URL(string: url.jq_urlEncoded()) else { return } |
| | | scenePlayer?.pause() |
| | | |
| | | if scenePlayer == nil{ |
| | |
| | | self.scenePlayer?.play() |
| | | self.scenePlayer?.volume = Float(UserDefaultSettingViewModel.getSetting()?.volume ?? 0.5) |
| | | } |
| | | |
| | | //播放完成 |
| | | NotificationCenter.default.addObserver(self, selector: #selector(playBGMbackEnd), name:NSNotification.Name.AVPlayerItemDidPlayToEndTime, object: nil) |
| | | } |
| | | |
| | | func dellocScene(){ |
| | |
| | | bgmPlayer?.play() |
| | | } |
| | | |
| | | @objc private func playBGMbackEnd(){ |
| | | self.scenePlayer?.seek(to: CMTimeMake(value: 0, timescale: 1)) |
| | | self.scenePlayer?.play() |
| | | } |
| | | // @objc private func playBGMbackEnd(){ |
| | | // self.scenePlayer?.seek(to: CMTimeMake(value: 0, timescale: 1)) |
| | | // self.scenePlayer?.play() |
| | | // } |
| | | |
| | | func previous(){ |
| | | playIndex -= 1 |
| | |
| | | |
| | | Services.getPlan().subscribe(onNext: {[weak self]data in |
| | | if let url = data.data{ |
| | | self?.bgplayer.replaceCurrentItem(with: AVPlayerItem(url: URL(string: url)!)) |
| | | self?.bgplayer.replaceCurrentItem(with: AVPlayerItem(url: URL(string: url.jq_urlEncoded())!)) |
| | | self?.bgplayer.play() |
| | | } |
| | | }).disposed(by: disposeBag) |
| | | |
| | | self.bgplayer.addPeriodicTimeObserver(forInterval: CMTimeMake(value: 1, timescale: 1), queue: DispatchQueue.main) {[weak self] time in |
| | | guard let weakSelf = self else { return } |
| | | // self.bgplayer.addPeriodicTimeObserver(forInterval: CMTimeMake(value: 1, timescale: 1), queue: DispatchQueue.main) {[weak self] time in |
| | | // guard let weakSelf = self else { return } |
| | | |
| | | //当前正在播放的时间 |
| | | let loadTime = CMTimeGetSeconds(time) |
| | | //视频总时间 |
| | | let totalTime = CMTimeGetSeconds((weakSelf.bgplayer.currentItem?.duration)!) |
| | | |
| | | if loadTime >= totalTime{ |
| | | weakSelf.bgplayer.seek(to: CMTime.zero) |
| | | weakSelf.bgplayer.play() |
| | | } |
| | | } |
| | | // //当前正在播放的时间 |
| | | // let loadTime = CMTimeGetSeconds(time) |
| | | // //视频总时间 |
| | | // let totalTime = CMTimeGetSeconds((weakSelf.bgplayer.currentItem?.duration)!) |
| | | // |
| | | // if loadTime >= totalTime{ |
| | | // weakSelf.bgplayer.seek(to: CMTime.zero) |
| | | // weakSelf.bgplayer.play() |
| | | // } |
| | | // } |
| | | } |
| | | |
| | | override func viewWillAppear(_ animated: Bool) { |
| | |
| | | } |
| | | |
| | | override func setRx() { |
| | | NotificationCenter.default.addObserver(forName: .AVPlayerItemDidPlayToEndTime, object: nil, queue: nil) { [weak self] _ in |
| | | self?.player.seek(to: CMTime.zero) |
| | | self?.player.play() |
| | | NotificationCenter.default.addObserver(forName: .AVPlayerItemDidPlayToEndTime, object: nil, queue: nil) { [weak self] data in |
| | | |
| | | let notifiUrl = ((data.object as? AVPlayerItem)?.asset as? AVURLAsset) |
| | | let bgItem = (self?.bgplayer.currentItem?.asset as? AVURLAsset) |
| | | let videoItem = (self?.player.currentItem?.asset as? AVURLAsset) |
| | | |
| | | if bgItem?.url == notifiUrl?.url{ |
| | | self?.bgplayer.seek(to: CMTime.zero) |
| | | self?.bgplayer.play() |
| | | } |
| | | |
| | | if videoItem?.url == notifiUrl?.url{ |
| | | self?.player.seek(to: CMTime.zero) |
| | | self?.player.play() |
| | | } |
| | | } |
| | | |
| | | NotificationCenter.default.rx.notification(PlantGuideQuit_Noti).take(until: self.rx.deallocated).subscribe(onNext: {[weak self]data in |
| | |
| | | |
| | | @IBAction func backAction(_ sender: UIButton) { |
| | | self.dismiss(animated: true) |
| | | |
| | | if var m = UserDefaultSettingViewModel.getSetting(){ |
| | | m.userFirstLaunch = false |
| | | UserDefaultSettingViewModel.saveSetting(m) |
| | | } |
| | | } |
| | | |
| | | @IBAction func customAction(_ sender: UIButton) { |
| | |
| | | |
| | | @IBAction func backAction(_ sender: UIButton) { |
| | | NotificationCenter.default.post(name: PlantGuideQuit_Noti, object: nil) |
| | | if var m = UserDefaultSettingViewModel.getSetting(){ |
| | | m.userFirstLaunch = false |
| | | UserDefaultSettingViewModel.saveSetting(m) |
| | | } |
| | | } |
| | | |
| | | @IBAction func answerAction(_ sender: UIButton) { |
| | |
| | | answer = "3" |
| | | } |
| | | |
| | | responseUserAnswerModel.userAnswerOneDTOList.append(ResponseUserAnswerDTOModel(answer: answer, type: questionIndex)) |
| | | responseUserAnswerModel.userAnswerOneDTOList.append(ResponseUserAnswerDTOModel(answer: answer, type: questionIndex + 1)) |
| | | |
| | | btn_sure.backgroundColor = btn_sure.isSelected ? UIColor(hexString: "#5E9456"):.clear |
| | | btn_deny.backgroundColor = btn_deny.isSelected ? UIColor(hexString: "#5E9456"):.clear |
| | |
| | | label_price.text = String(format: "奖品价值:¥%.2lf", model.worth) |
| | | label_energy.text = "所需能量值:\(model.energyValue)" |
| | | label_state.text = model.status == .no ? "已领取":"待领取" |
| | | view_state.backgroundColor = model.status == .no ? UIColor(hexString: "#B1CA99")! : UIColor(hexString: "#D0D0D0")! |
| | | view_state.backgroundColor = model.status == .no ? UIColor(hexString: "#D0D0D0")!:UIColor(hexString: "#B1CA99")! |
| | | |
| | | view_code.isHidden = model.code.isEmpty || model.status == .no |
| | | label_code.text = "领取验证码:\(model.code)" |
| | |
| | | } |
| | | |
| | | private func updateTreeInfo(){ |
| | | btn_seedingAgain.isHidden = treeInfoModel!.treeLevelType != .level_10 |
| | | btn_seedingAgain.isHidden = (treeInfoModel!.treeLevelType != .level_10 && treeInfoModel!.status == .no) |
| | | |
| | | // if treeLevel.rawValue != treeInfoModel?.treeLevelType.rawValue{ |
| | | // treeLevel = treeInfoModel!.treeLevelType |
| | |
| | | @IBAction func sowAgainAction(_ sender: UIButton) { |
| | | Services.sowAgain().subscribe(onNext: {[weak self] _ in |
| | | self?.getTreeData() |
| | | if let soundURL = URL(string:TreeLevel.level_1.sound){ |
| | | self?.voicePlayer.replaceCurrentItem(with: AVPlayerItem(url: soundURL)) |
| | | self?.voicePlayer.play() |
| | | |
| | | if self?.treeInfoModel?.treeLevelType == .level_10{ |
| | | if let soundURL = URL(string:TreeLevel.level_1.sound){ |
| | | self?.voicePlayer.replaceCurrentItem(with: AVPlayerItem(url: soundURL)) |
| | | self?.voicePlayer.play() |
| | | } |
| | | } |
| | | }).disposed(by: disposeBag) |
| | | } |
| | | |
| | | override func setRx() { |
| | | NotificationCenter.default.addObserver(forName: .AVPlayerItemDidPlayToEndTime, object: nil, queue: nil) { [weak self] _ in |
| | | self?.player.seek(to: CMTime.zero) |
| | | self?.player.play() |
| | | NotificationCenter.default.addObserver(forName: .AVPlayerItemDidPlayToEndTime, object: nil, queue: nil) { [weak self] data in |
| | | |
| | | let notifiUrl = ((data.object as? AVPlayerItem)?.asset as? AVURLAsset) |
| | | let currentItem = (self?.player.currentItem?.asset as? AVURLAsset) |
| | | |
| | | if currentItem?.url == notifiUrl?.url{ |
| | | self?.player.seek(to: CMTime.zero) |
| | | self?.player.play() |
| | | } |
| | | } |
| | | |
| | | NotificationCenter.default.addObserver(forName: UIApplication.didEnterBackgroundNotification, object: nil, queue: nil) { [weak self] _ in |
| | |
| | | return |
| | | } |
| | | |
| | | let pix = view_progressTotal.height / Double(total) |
| | | let realH = view_progressTotal.height - 4 //上下boder宽度 |
| | | |
| | | let pix = realH / Double(total) |
| | | let px = Double(current) * pix |
| | | let max = view_progressTotal.height - 5 |
| | | let max = realH |
| | | cons_progressHei.constant = min(px,max) |
| | | |
| | | self.label_progress.attributedText = AttributedStringbuilder.build().add(string: "\(current)", withFont: .systemFont(ofSize: 12, weight: .bold), withColor: .white, indent: 0, lineSpace: 0).add(string: "\n/\(total)", withFont: .systemFont(ofSize: 11,weight: .thin), withColor: .white).mutableAttributedString |
| | |
| | | sender.isUserInteractionEnabled = true |
| | | if m.isNext{ |
| | | let type = weakSelf.treeInfoModel?.treeLevelType ?? .level_1 |
| | | weakSelf.treeInfoModel!.treeLevelType = TreeLevel(rawValue: type.rawValue + 1) ?? .level_1 |
| | | weakSelf.treeInfoModel!.treeLevelType = m.treeLevelType |
| | | |
| | | let h = (JQ_ScreenW - 90) * 0.7729 |
| | | TreeTeskFirstRuleView.show(title: "升级", content:"恭喜!你的树苗已升级为\(weakSelf.treeInfoModel!.treeLevelType.title)阶段!",textAlignment: .center,height: h,textTopOffset: 57) |
| | |
| | | self.aPNGTreeImageView?.stopAnimating() |
| | | self.aPNGTreeImageView?.image = nil |
| | | self.aPNGTreeImageView?.staticImage = UIImage(contentsOfFile: staticDroopUrl.droppedScheme()!.absoluteString) |
| | | } |
| | | }else{ |
| | | self.aPNGTreeImageView?.staticImage = nil |
| | | self.aPNGTreeImageView?.image = treeApngImage |
| | | } |
| | | } |
| | | } |
| | | } |
| | |
| | | return |
| | | } |
| | | |
| | | guard viewModel.energyValue.value > m.energyValue else { |
| | | guard viewModel.energyValue.value >= m.energyValue else { |
| | | CommonAlertView.show(title: "提示", content: "兑换能量值不足", isSingle: true) { _ in |
| | | |
| | | } |
| | |
| | | @IBOutlet weak var view_container: UIView! |
| | | @IBOutlet weak var label_content: UILabel! |
| | | @IBOutlet weak var btn_complete: UIButton! |
| | | @IBOutlet weak var cons_hei: NSLayoutConstraint! |
| | | // @IBOutlet weak var cons_hei: NSLayoutConstraint! |
| | | @IBOutlet weak var cons_textTop: NSLayoutConstraint! |
| | | private var settingModel = UserDefaultSettingViewModel.getSetting() |
| | | |
| | |
| | | <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> |
| | | <subviews> |
| | | <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="26Z-P3-SaG"> |
| | | <rect key="frame" x="45" y="307" width="303" height="263"/> |
| | | <rect key="frame" x="45" y="299" width="303" height="279.33333333333326"/> |
| | | <subviews> |
| | | <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="top" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="bg_task_f" translatesAutoresizingMaskIntoConstraints="NO" id="WfK-ob-Idw"> |
| | | <rect key="frame" x="0.0" y="0.0" width="303" height="263"/> |
| | | <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="bg_task_f" translatesAutoresizingMaskIntoConstraints="NO" id="WfK-ob-Idw"> |
| | | <rect key="frame" x="0.0" y="0.0" width="303" height="279.33333333333331"/> |
| | | </imageView> |
| | | <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="心泉之树" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="FMr-RI-3OU"> |
| | | <rect key="frame" x="115.66666666666666" y="24" width="71.666666666666657" height="21"/> |
| | |
| | | <nil key="highlightedColor"/> |
| | | </label> |
| | | <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="2QG-Gl-6ul"> |
| | | <rect key="frame" x="40" y="206" width="223" height="40"/> |
| | | <rect key="frame" x="40" y="222.33333333333337" width="223" height="40"/> |
| | | <color key="backgroundColor" red="0.57254901960000004" green="0.6588235294" blue="0.4941176471" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> |
| | | <constraints> |
| | | <constraint firstAttribute="height" constant="40" id="X5k-u6-c00"/> |
| | |
| | | </connections> |
| | | </button> |
| | | <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="H2A-aP-FsC"> |
| | | <rect key="frame" x="18" y="67" width="267" height="84"/> |
| | | <rect key="frame" x="18" y="67" width="267" height="100.33333333333331"/> |
| | | <string key="text">亲爱的家人,感谢您用心的交流。 |
| | | 现在,您心灵之树的种子已经植入这片沃土,请以农夫的心态用心浇灌,不久的将来,将会长成苍天大树,结出丰硕的果实。加油哦!</string> |
| | | 现在,您心灵之树的种子已经植入这片沃土,请以农夫的心态用心浇灌,不久的将来,将会长成苍天大树,结出丰硕的果实。加油哦!亲爱的家人,感谢您用心的交流。 |
| | | </string> |
| | | <fontDescription key="fontDescription" type="system" pointSize="14"/> |
| | | <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="0.68999999999999995" colorSpace="custom" customColorSpace="sRGB"/> |
| | | <nil key="highlightedColor"/> |
| | |
| | | var window: UIWindow? |
| | | |
| | | func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) { |
| | | sleep(2) |
| | | |
| | | SVProgressHUD.setMaximumDismissTimeInterval(1.5) |
| | | SVProgressHUD.setDefaultMaskType(.custom) |
| | | |
| | | |
| | | guard let windowScene = (scene as? UIWindowScene) else { return } |
| | | window = UIWindow(windowScene: windowScene) |
| | | window?.frame = windowScene.coordinateSpace.bounds |