WanPai/Assets.xcassets/Btns/.DS_StoreBinary files differ
WanPai/Assets.xcassets/Btns/btn_add_shadow.imageset/Contents.json
@@ -5,12 +5,12 @@ "scale" : "1x" }, { "filename" : "add@2x.png", "filename" : "编组 14@2x.png", "idiom" : "universal", "scale" : "2x" }, { "filename" : "add@3x.png", "filename" : "编组 14@3x.png", "idiom" : "universal", "scale" : "3x" } WanPai/Assets.xcassets/Btns/btn_add_shadow.imageset/add@2x.pngBinary files differ
WanPai/Assets.xcassets/Btns/btn_add_shadow.imageset/add@3x.pngBinary files differ
WanPai/Assets.xcassets/Btns/btn_add_shadow.imageset/编组 14@2x.png
WanPai/Assets.xcassets/Btns/btn_add_shadow.imageset/编组 14@3x.png
WanPai/Assets.xcassets/Btns/btn_add_shadow_s.imageset/Contents.json
New file @@ -0,0 +1,22 @@ { "images" : [ { "idiom" : "universal", "scale" : "1x" }, { "filename" : "btn_add_shadow_s@2x.png", "idiom" : "universal", "scale" : "2x" }, { "filename" : "btn_add_shadow_s@3x.png", "idiom" : "universal", "scale" : "3x" } ], "info" : { "author" : "xcode", "version" : 1 } } WanPai/Assets.xcassets/Btns/btn_add_shadow_s.imageset/btn_add_shadow_s@2x.png
WanPai/Assets.xcassets/Btns/btn_add_shadow_s.imageset/btn_add_shadow_s@3x.png
WanPai/Assets.xcassets/Icons/icon_more_s.imageset/Contents.json
New file @@ -0,0 +1,22 @@ { "images" : [ { "idiom" : "universal", "scale" : "1x" }, { "filename" : "icon_more_s@2x.png", "idiom" : "universal", "scale" : "2x" }, { "filename" : "icon_more_s@3x.png", "idiom" : "universal", "scale" : "3x" } ], "info" : { "author" : "xcode", "version" : 1 } } WanPai/Assets.xcassets/Icons/icon_more_s.imageset/icon_more_s@2x.png
WanPai/Assets.xcassets/Icons/icon_more_s.imageset/icon_more_s@3x.png
WanPai/Common/View/PaymentCourseView.swift
@@ -130,6 +130,8 @@ extension PaymentCourseView:UITableViewDelegate{ func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { let model = models[indexPath.row] guard model.courseNum != 0 else {return} selectIndex = indexPath.row tableView.reloadData() } @@ -142,6 +144,11 @@ let cell = tableView.dequeueReusableCell(withIdentifier: "_PaymentCourseTCell") as! PaymentCourseTCell cell.courseListSubModel = model cell.isselect(indexPath.row == selectIndex) if model.courseNum == 0{ cell.contentView.alpha = 0.3 }else{ cell.contentView.alpha = 1.0 } return cell } WanPai/Model/CommonModels.swift
@@ -632,6 +632,7 @@ var exchangeType: ExchangePaymentType = .coin var integral: Int = 0 var exchangeAddrType: CouponConditionType = .nationwide var cardType:CardType! = .subCard } @@ -711,7 +712,8 @@ var time = [String]() var num = 0 var money:Double = 0 var isType = 0 //1不能请假,0:可以请假 required init(){} } WanPai/Network/Services.swift
@@ -17,7 +17,7 @@ //let All_Url = "https://console-mock.apipost.cn/mock/b5b2dee0-5564-40ae-f082-a352d502a153" //let All_Url = "http://192.168.110.165:10393/mock/b5b2dee0-5564-40ae-f082-a352d502a153" #else let All_Url = "http://8.137.22.229" let All_Url = "http://8.137.22.229:56666" let Game_Url = "https://port.daowepark.com" #endif @@ -526,7 +526,7 @@ static func queryPhysical(stuId:Int)->Observable<BaseResponse<StartClouseReportModel>>{ let params = ParamsAppender.build(url: All_Url) .interface(url: "/account/api/startCource/queryPhysical") .append(key: "stuId", value: stuId) .append(key: "stuID", value: stuId) return NetworkRequest.request(params: params, method: .post, progress: true) } @@ -828,8 +828,8 @@ class func exchangeRecordDetail(id:Int,goodType:ExchangeType)->Observable<BaseResponse<RecordsDetailModel>>{ let params = ParamsAppender.build(url: All_Url) .interface(url: "/account/api/useBenefit/redemptionDetails") .append(key: "id", value: id) .append(key: "goodType", value: goodType.rawValue) .append(key: "detailsId", value: id) // .append(key: "goodType", value: goodType.rawValue) return NetworkRequest.request(params: params, method: .post, progress: true) } WanPai/Root/Course/TCell/CourseBookingTCell.swift
@@ -18,11 +18,14 @@ if weeklyCourseItemModel.type == 1{ btn_handle.setTitle("请假", for: .normal) btn_handle.isEnabled = true btn_handle.backgroundColor = UIColor(hexStr: "#6CC366") // btn_handle.backgroundColor = UIColor(hexStr: "#6CC366") let handleColor = weeklyCourseItemModel.isType == 1 ? UIColor.gray.withAlphaComponent(0.5):UIColor(hexStr: "#6CC366") btn_handle.backgroundColor = handleColor } if weeklyCourseItemModel.type == 2{ btn_handle.setTitle("购课", for: .normal) btn_handle.setTitle("报名", for: .normal) btn_handle.isEnabled = true btn_handle.backgroundColor = UIColor(hexStr: "#6CC366") } @@ -39,14 +42,15 @@ @IBOutlet weak var label_time: UILabel! @IBOutlet weak var label_info: UILabel! @IBOutlet weak var btn_handle: UIButton! @IBOutlet weak var view_corner: UIView! var clickClouse:((WeeklyCourseItemModel)->Void)? override func awakeFromNib() { super.awakeFromNib() selectionStyle = .none backgroundColor = .clear contentView.backgroundColor = .clear backgroundColor = .white contentView.backgroundColor = .white } @IBAction func bookingAction(_ sender: UIButton) { WanPai/Root/Course/TCell/CourseBookingTCell.xib
@@ -1,9 +1,10 @@ <?xml version="1.0" encoding="UTF-8"?> <document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="22154" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES"> <document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="22155" 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="22129"/> <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="22131"/> <capability name="System colors in document resources" minToolsVersion="11.0"/> <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/> </dependencies> <objects> @@ -16,6 +17,10 @@ <rect key="frame" x="0.0" y="0.0" width="337" height="95"/> <autoresizingMask key="autoresizingMask"/> <subviews> <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="rYv-E4-9YK"> <rect key="frame" x="0.0" y="7" width="337" height="81"/> <color key="backgroundColor" systemColor="systemBackgroundColor"/> </view> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="2" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="uBt-D3-uxa"> <rect key="frame" x="14" y="39" width="100" height="17"/> <fontDescription key="fontDescription" type="system" weight="medium" pointSize="14"/> @@ -65,19 +70,27 @@ <action selector="bookingAction:" destination="KGk-i7-Jjw" eventType="touchUpInside" id="Iyg-vB-cvj"/> </connections> </button> <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="icon_more" translatesAutoresizingMaskIntoConstraints="NO" id="ca5-70-BBW"> <rect key="frame" x="317" y="38.666666666666664" width="11" height="17.999999999999993"/> <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="icon_more_s" translatesAutoresizingMaskIntoConstraints="NO" id="ca5-70-BBW"> <rect key="frame" x="321" y="41.666666666666664" width="7" height="12"/> <constraints> <constraint firstAttribute="height" constant="12" id="OLB-Lj-hDF"/> <constraint firstAttribute="width" constant="7" id="Q68-Fn-34Z"/> </constraints> </imageView> </subviews> <constraints> <constraint firstItem="rYv-E4-9YK" firstAttribute="top" secondItem="H2p-sc-9uM" secondAttribute="top" constant="7" id="3Vb-HJ-rki"/> <constraint firstAttribute="trailing" secondItem="hxG-tv-maw" secondAttribute="trailing" constant="29" id="8ck-B7-DOy"/> <constraint firstItem="uBt-D3-uxa" firstAttribute="centerY" secondItem="H2p-sc-9uM" secondAttribute="centerY" id="CeF-Tg-D8i"/> <constraint firstItem="uBt-D3-uxa" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" constant="14" id="GXZ-NY-FSr"/> <constraint firstItem="nxc-Xp-QTZ" firstAttribute="leading" secondItem="uBt-D3-uxa" secondAttribute="trailing" constant="10" id="Je0-bw-bFU"/> <constraint firstItem="hxG-tv-maw" firstAttribute="centerY" secondItem="uBt-D3-uxa" secondAttribute="centerY" id="M3B-O2-xtI"/> <constraint firstItem="nxc-Xp-QTZ" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" constant="124" id="Vc3-ne-itC"/> <constraint firstAttribute="trailing" secondItem="rYv-E4-9YK" secondAttribute="trailing" id="YX2-bP-Zhd"/> <constraint firstItem="ca5-70-BBW" firstAttribute="centerY" secondItem="uBt-D3-uxa" secondAttribute="centerY" id="ZCf-Ly-7o6"/> <constraint firstItem="hxG-tv-maw" firstAttribute="leading" secondItem="nxc-Xp-QTZ" secondAttribute="trailing" constant="28" id="dWM-Zg-Czb"/> <constraint firstAttribute="bottom" secondItem="rYv-E4-9YK" secondAttribute="bottom" constant="7" id="eul-GW-mkI"/> <constraint firstItem="rYv-E4-9YK" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" id="gBy-DK-aYi"/> <constraint firstItem="nxc-Xp-QTZ" firstAttribute="centerY" secondItem="uBt-D3-uxa" secondAttribute="centerY" id="u6a-AJ-52h"/> <constraint firstAttribute="trailing" secondItem="ca5-70-BBW" secondAttribute="trailing" constant="9" id="yex-Ry-j9c"/> </constraints> @@ -87,11 +100,15 @@ <outlet property="label_info" destination="trU-MW-rOB" id="apB-iN-WHi"/> <outlet property="label_time" destination="wnJ-m8-Cn6" id="Le5-1b-72V"/> <outlet property="label_title" destination="uBt-D3-uxa" id="EtQ-fq-UjT"/> <outlet property="view_corner" destination="rYv-E4-9YK" id="HPC-RQ-fIY"/> </connections> <point key="canvasLocation" x="87.786259541984734" y="38.380281690140848"/> </tableViewCell> </objects> <resources> <image name="icon_more" width="11" height="18"/> <image name="icon_more_s" width="7" height="12"/> <systemColor name="systemBackgroundColor"> <color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> </systemColor> </resources> </document> WanPai/Root/Course/TCell/StudentMentalTCell.swift
@@ -24,6 +24,7 @@ label_l2.text = mentalInfo.l2 label_info.text = mentalInfo.info btn_go.setTitle(mentalInfo.btnName, for: .normal) } } WanPai/Root/Course/TCell/StudentMentalTCell.xib
@@ -1,9 +1,9 @@ <?xml version="1.0" encoding="UTF-8"?> <document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="21701" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES"> <document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="22155" 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="21679"/> <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="22131"/> <capability name="Safe area layout guides" minToolsVersion="9.0"/> <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/> </dependencies> @@ -46,24 +46,30 @@ <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="4Ke-FO-be2"> <rect key="frame" x="124" y="36" width="81.666666666666686" height="19.333333333333329"/> <rect key="frame" x="124" y="36" width="81.666666666666686" height="22"/> <constraints> <constraint firstAttribute="height" constant="22" id="JYr-aP-seY"/> </constraints> <fontDescription key="fontDescription" type="system" weight="semibold" pointSize="16"/> <nil key="textColor"/> <nil key="highlightedColor"/> </label> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="LV0" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="MnM-t0-l2g"> <rect key="frame" x="205.66666666666666" y="36" width="29.333333333333343" height="19.333333333333329"/> <rect key="frame" x="205.66666666666666" y="37.333333333333336" width="29.333333333333343" height="19.333333333333336"/> <fontDescription key="fontDescription" type="system" weight="semibold" pointSize="16"/> <color key="textColor" red="0.99215686274509807" green="0.27058823529411763" blue="0.22352941176470587" 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="6pu-Zv-nvR"> <rect key="frame" x="124.00000000000001" y="57.333333333333336" width="11.666666666666671" height="14.333333333333336"/> <rect key="frame" x="124.00000000000001" y="60" width="11.666666666666671" height="17"/> <constraints> <constraint firstAttribute="height" constant="17" id="9vf-fn-MVG"/> </constraints> <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="EYg-kL-G0m"> <button opaque="NO" userInteractionEnabled="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="EYg-kL-G0m"> <rect key="frame" x="354" y="118" width="65" height="31"/> <color key="backgroundColor" red="0.42352941176470588" green="0.76470588235294112" blue="0.40000000000000002" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <constraints> WanPai/Root/Course/TCell/StudentRemarkTCell.swift
@@ -48,6 +48,8 @@ func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell { let cell = collectionView.dequeueReusableCell(withReuseIdentifier: "_CommonSingleImgCCell", for: indexPath) as! CommonSingleImgCCell cell.img.backgroundColor = .gray.withAlphaComponent(0.1) let imgUrl = studentCommentModel.imgs[indexPath.row] cell.img.sd_setImage(with: URL(string: imgUrl)) return cell } WanPai/Root/Course/VC/CourseInfoVC.swift
@@ -73,19 +73,6 @@ return pageMenu }() // private lazy var leftBtn:QMUIButton = { // let btn = QMUIButton(type: .custom) // btn.setTitle("添加学员", for: .normal) // btn.titleLabel?.font = UIFont.systemFont(ofSize: 16) // btn.setTitleColor(.white, for: .normal) // btn.setImage(UIImage(named: "btn_add_shadow"), for: .normal) // btn.imagePosition = .left // btn.spacingBetweenImageAndTitle = 0 // btn.imageEdgeInsets = UIEdgeInsets(top: 2, left: 0, bottom: 0, right: 0) // btn.addTarget(self, action: #selector(addStudentAction), for: .touchUpInside) // return btn // }() lazy var pageViewController:FFPageViewController = { let pageVC = FFPageViewController() pageVC.view.backgroundColor = .clear @@ -158,7 +145,7 @@ }).disposed(by: disposeBag) Services.weeksOfGetHours().subscribe(onNext: {[weak self] data in self?.btn_dispatchCourse.isHidden = data.data == 0 // self?.btn_dispatchCourse.isHidden = data.data == 0 self?.unDispatchNum = data.data }) { error in @@ -200,6 +187,7 @@ } tableView.separatorStyle = .none tableView.register(UINib(nibName: "CourseBookingTCell", bundle: nil), forCellReuseIdentifier: "_CourseBookingTCell") tableView.backgroundColor = .clear mentalCollectionView.delegate = self mentalCollectionView.dataSource = self @@ -237,13 +225,19 @@ } }).disposed(by: weakSelf.disposeBag) }).disposed(by: disposeBag) NotificationCenter.default.rx.notification(UpdateCurrentStore_Noti).take(until: self.rx.deallocated).subscribe(onNext: {[weak self] noti in self?.getSelectDayData() }) { error in }.disposed(by: disposeBag) } private func setAttribute(t1:String,t2:String)->NSMutableAttributedString{ let color:UIColor = UIColor(hexStr: "#2F5264") let a1 = AttributedStringbuilder() a1.add(string: t1, withFont: UIFont.systemFont(ofSize: 26), withColor: color) .add(string: t2, withFont: UIFont.systemFont(ofSize: 16), withColor: color) a1.add(string: t1, withFont: UIFont.systemFont(ofSize: 22), withColor: color) .add(string: t2, withFont: UIFont.systemFont(ofSize: 12), withColor: color) return a1.mutableAttributedString } @@ -253,6 +247,9 @@ } @objc func dispatchCourseAction(){ guard unDispatchNum != 0 else { alert(msg: "没有未分配的课时");return } CourseUnAssignView.show(startClouseHomeModel?.courseList ?? [], num: unDispatchNum ?? 0) } @@ -296,6 +293,18 @@ push(vc: vc) } @IBAction func forwardWeekAction(_ sender: UIButton) { let forwardPage = pageViewController.currentPage - 1 pageViewController.scroll(toPage: forwardPage, animation: true) } @IBAction func nextWeekAction(_ sender: UIButton) { let nextPage = pageViewController.currentPage + 1 pageViewController.scroll(toPage: nextPage, animation: true) } private func getSelectDayData(){ if let model = startClouseHomeModel{ if let storeStr = UserDefaults.standard.object(forKey: "CurrentStore") as? String{ @@ -303,7 +312,7 @@ Services.weeksOfCourseDetails(stuId: model.stuId, time: currentDate,storeId: deserModel.storeId).subscribe(onNext: {[weak self] data in if let model = data.data{ self?.weeklyCourseModel = model self?.cons_tableHei.constant = 58 + 70 * Double(model.data.count) self?.cons_tableHei.constant = 58 + 72 * Double(model.data.count) UIView.animate(withDuration: 0.3) { self?.view.layoutIfNeeded() self?.viewDidLayoutSubviews() @@ -317,7 +326,7 @@ } override var preferredStatusBarStyle: UIStatusBarStyle{ return .darkContent return .lightContent } // func scrollViewDidScroll(_ scrollView: UIScrollView) { @@ -335,7 +344,7 @@ extension CourseInfoVC:UITableViewDelegate{ func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { let m = weeklyCourseModel?.data[indexPath.row] // let m = weeklyCourseModel?.data[indexPath.row] let vc = SignUpCourseVC() push(vc: vc) } @@ -344,39 +353,32 @@ extension CourseInfoVC:UITableViewDataSource{ func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { let cell = tableView.dequeueReusableCell(withIdentifier: "_CourseBookingTCell") as! CourseBookingTCell cell.contentView.backgroundColor = UIColor(hexStr: "#F2F6F9") cell.view_corner.jq_addShadows(shadowColor: UIColor(hexStr: "#DADADA").withAlphaComponent(0.5), corner: 16, radius: 3.5, offset: CGSize(width: 0, height: 2), opacity: 1) if indexPath.row == 0 && weeklyCourseModel?.data.count == 1{ cell.contentView.jq_addCorners(corner: [.allCorners], radius: 16,width: JQ_ScreenW - 48,height: 70) }else if indexPath.row == 0 && weeklyCourseModel?.data.count != 1{ cell.contentView.jq_addCorners(corner: [.topLeft,.topRight], radius: 16,width: JQ_ScreenW - 48,height: 70) }else if indexPath.row == (weeklyCourseModel?.data.count ?? 0) - 1{ cell.contentView.jq_addCorners(corner: [.bottomLeft,.bottomRight], radius: 16,width: JQ_ScreenW - 48,height: 70) }else{ cell.contentView.jq_addCorners(corner: [.allCorners], radius: 0,width: JQ_ScreenW - 48,height: 70) } cell.weeklyCourseItemModel = weeklyCourseModel?.data[indexPath.row] cell.clickClouse = {[weak self] m in guard let weakSelf = self else { return } if let stuId = weakSelf.startClouseHomeModel?.stuId{ //请假 if m.type == 1{ Services.startCourceRreverse(courseId: m.id, time: weakSelf.currentDate.jq_format("yyyy-MM-dd"), stuId: stuId).subscribe(onNext: { data in alertSuccess(msg: "请假成功") tableView.beginUpdates() weakSelf.weeklyCourseModel?.data.remove(at: indexPath.row) tableView.deleteRows(at: [indexPath], with: .automatic) tableView.endUpdates() weakSelf.cons_tableHei.constant = 58 + 70 * Double(weakSelf.weeklyCourseModel?.data.count ?? 0) UIView.animate(withDuration: 0.3) { weakSelf.view.layoutIfNeeded() weakSelf.viewDidLayoutSubviews() if m.type == 1 && m.isType == 0{ CommonAlertView.show(title: "提示", content: "确认请假?") { status in if status{ Services.startCourceRreverse(courseId: m.id, time: weakSelf.currentDate.jq_format("yyyy-MM-dd"), stuId: stuId).subscribe(onNext: { data in alertSuccess(msg: "请假成功") tableView.beginUpdates() weakSelf.weeklyCourseModel?.data.remove(at: indexPath.row) tableView.deleteRows(at: [indexPath], with: .automatic) tableView.endUpdates() weakSelf.cons_tableHei.constant = 58 + 70 * Double(weakSelf.weeklyCourseModel?.data.count ?? 0) UIView.animate(withDuration: 0.3) { weakSelf.view.layoutIfNeeded() weakSelf.viewDidLayoutSubviews() } }).disposed(by: weakSelf.disposeBag) } }).disposed(by: weakSelf.disposeBag) } } //购课 if m.type == 2{ let vc = ExperienceCourseVC(courseId: m.id) @@ -385,6 +387,8 @@ } } return cell } @@ -397,7 +401,7 @@ } func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat { return 70 return 72 } func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? { WanPai/Root/Course/VC/CourseInfoVC.xib
@@ -1,9 +1,9 @@ <?xml version="1.0" encoding="UTF-8"?> <document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="22154" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES"> <document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="22155" 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="22130"/> <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="22131"/> <capability name="Named colors" 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"/> @@ -51,7 +51,7 @@ <rect key="frame" x="0.0" y="0.0" width="393" height="267"/> </imageView> <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="fQO-ad-jiD" customClass="QMUIButton"> <rect key="frame" x="15" y="37" width="175" height="61"/> <rect key="frame" x="15" y="37" width="183" height="68"/> <fontDescription key="fontDescription" type="system" pointSize="16"/> <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/> <state key="normal" title="添加运动营成员" image="btn_add_shadow"/> @@ -100,7 +100,7 @@ </userDefinedRuntimeAttributes> </imageView> <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="dM8-7c-aXP"> <rect key="frame" x="0.0" y="0.0" width="393" height="1085.3333333333333"/> <rect key="frame" x="0.0" y="0.0" width="393" height="1072.3333333333333"/> <subviews> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="运动营成员名" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="egC-eg-thJ"> <rect key="frame" x="27" y="37" width="128.33333333333334" height="29"/> @@ -257,7 +257,10 @@ </constraints> </view> <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="hpJ-2G-ATO"> <rect key="frame" x="116.66666666666669" y="216" width="160" height="27"/> <rect key="frame" x="116.66666666666669" y="216" width="160" height="17"/> <constraints> <constraint firstAttribute="height" constant="17" id="iFg-cd-8MU"/> </constraints> <fontDescription key="fontDescription" type="system" pointSize="12"/> <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/> <state key="normal" title="查看运动营成员更多测试报告"> @@ -268,7 +271,7 @@ </connections> </button> <stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="15" translatesAutoresizingMaskIntoConstraints="NO" id="nW8-qE-ePO"> <rect key="frame" x="0.0" y="266" width="393" height="101"/> <rect key="frame" x="0.0" y="253" width="393" height="101"/> <subviews> <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="DRH-pO-upo"> <rect key="frame" x="0.0" y="0.0" width="393" height="25"/> @@ -390,13 +393,13 @@ </subviews> </stackView> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="我的日程" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="CR5-qX-86L"> <rect key="frame" x="45.000000000000007" y="394" width="73.666666666666686" height="21.666666666666686"/> <rect key="frame" x="45.000000000000007" y="381" width="73.666666666666686" height="21.666666666666686"/> <fontDescription key="fontDescription" type="system" pointSize="18"/> <color key="textColor" red="0.17254901960784313" green="0.30980392156862746" blue="0.38823529411764707" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <nil key="highlightedColor"/> </label> <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="j3F-fo-P15"> <rect key="frame" x="318" y="391" width="56" height="28"/> <rect key="frame" x="318" y="378" width="56" height="28"/> <fontDescription key="fontDescription" name=".PingFangSC-Regular" family=".PingFang SC" pointSize="14"/> <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/> <state key="normal" title="上课记录"> @@ -407,57 +410,57 @@ </connections> </button> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="0000-00.00-0000.00.00" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="N78-t5-4OO"> <rect key="frame" x="126.33333333333333" y="430.66666666666669" width="140.33333333333337" height="14.333333333333314"/> <rect key="frame" x="126.33333333333333" y="417.66666666666669" width="140.33333333333337" height="14.333333333333314"/> <fontDescription key="fontDescription" type="system" pointSize="12"/> <color key="textColor" red="0.58823529411764708" green="0.58823529411764708" blue="0.58823529411764708" 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="QI0-rG-m2x"> <rect key="frame" x="331" y="429.33333333333331" width="43" height="17"/> <rect key="frame" x="331" y="416.33333333333331" width="43" height="17"/> <fontDescription key="fontDescription" type="system" pointSize="14"/> <color key="textColor" red="0.17254901960784313" green="0.30980392156862746" blue="0.38823529411764707" 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="Xl3-tO-aDi"> <rect key="frame" x="312" y="419.66666666666669" width="12" height="32.333333333333314"/> <rect key="frame" x="312" y="406" width="12" height="34"/> <fontDescription key="fontDescription" type="system" pointSize="27"/> <color key="textColor" red="0.17254901959999999" green="0.30980392159999998" blue="0.38823529410000002" 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="tXu-lh-XbB"> <rect key="frame" x="38" y="431.33333333333331" width="43" height="17"/> <rect key="frame" x="38" y="418.33333333333331" width="43" height="17"/> <fontDescription key="fontDescription" type="system" pointSize="14"/> <color key="textColor" red="0.17254901959999999" green="0.30980392159999998" blue="0.38823529410000002" 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="Ojc-7l-9aZ"> <rect key="frame" x="19" y="421.66666666666669" width="12" height="32.333333333333314"/> <rect key="frame" x="19" y="408" width="12" height="34"/> <fontDescription key="fontDescription" type="system" pointSize="27"/> <color key="textColor" red="0.17254901959999999" green="0.30980392159999998" blue="0.38823529410000002" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <nil key="highlightedColor"/> </label> <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="UMv-8K-vwR"> <rect key="frame" x="0.0" y="487.33333333333326" width="393" height="50"/> <rect key="frame" x="0.0" y="474.33333333333331" width="393" height="49.999999999999943"/> <color key="backgroundColor" systemColor="systemBackgroundColor"/> <constraints> <constraint firstAttribute="height" constant="50" id="bj2-Gb-oIH"/> </constraints> </view> <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="icon_star" translatesAutoresizingMaskIntoConstraints="NO" id="uha-8d-tRd"> <rect key="frame" x="24" y="623.33333333333337" width="22" height="23"/> <rect key="frame" x="24" y="610.33333333333337" width="22" height="23"/> <constraints> <constraint firstAttribute="height" constant="23" id="SDl-H8-Wdc"/> <constraint firstAttribute="width" constant="22" id="VaN-Xb-9IW"/> </constraints> </imageView> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="运动营成员勋章" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Ioo-oF-wME"> <rect key="frame" x="52.999999999999993" y="625.33333333333337" width="114.33333333333331" height="19.333333333333371"/> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="运动营成员徽章" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Ioo-oF-wME"> <rect key="frame" x="52.999999999999993" y="612.33333333333337" width="114.33333333333331" height="19.333333333333371"/> <fontDescription key="fontDescription" type="system" pointSize="16"/> <color key="textColor" red="0.17254901960784313" green="0.30980392156862746" blue="0.38823529411764707" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <nil key="highlightedColor"/> </label> <collectionView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" dataMode="none" translatesAutoresizingMaskIntoConstraints="NO" id="b9G-TL-PI1"> <rect key="frame" x="0.0" y="676.33333333333337" width="393" height="50"/> <rect key="frame" x="0.0" y="663.33333333333337" width="393" height="50"/> <color key="backgroundColor" systemColor="systemBackgroundColor"/> <constraints> <constraint firstAttribute="height" constant="50" id="c8h-cI-ZAt"/> @@ -470,7 +473,7 @@ </collectionViewFlowLayout> </collectionView> <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Okg-Yc-buM"> <rect key="frame" x="100" y="743.33333333333337" width="193" height="40"/> <rect key="frame" x="100" y="730.33333333333337" width="193" height="40"/> <color key="backgroundColor" name="FE6E0D"/> <constraints> <constraint firstAttribute="height" constant="40" id="rQm-Bd-Kpj"/> @@ -489,21 +492,21 @@ </connections> </button> <tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" style="grouped" separatorStyle="default" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="18" estimatedSectionHeaderHeight="-1" sectionFooterHeight="18" estimatedSectionFooterHeight="-1" translatesAutoresizingMaskIntoConstraints="NO" id="O0u-hX-kAR"> <rect key="frame" x="24" y="537.33333333333337" width="345" height="70"/> <rect key="frame" x="24" y="524.33333333333337" width="345" height="70"/> <color key="backgroundColor" systemColor="systemBackgroundColor"/> <constraints> <constraint firstAttribute="height" constant="70" id="Opj-Pl-2o1"/> </constraints> </tableView> <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Tc8-tf-Jm4"> <rect key="frame" x="19" y="820.33333333333337" width="355" height="1"/> <rect key="frame" x="19" y="807.33333333333337" width="355" height="1"/> <color key="backgroundColor" red="0.59215686274509804" green="0.59215686274509804" blue="0.59215686274509804" alpha="0.25" colorSpace="custom" customColorSpace="sRGB"/> <constraints> <constraint firstAttribute="height" constant="1" id="zCQ-gS-bAL"/> </constraints> </view> <stackView opaque="NO" contentMode="scaleToFill" axis="vertical" translatesAutoresizingMaskIntoConstraints="NO" id="wNl-09-jiS"> <rect key="frame" x="22" y="821.33333333333337" width="349" height="264.00000000000011"/> <rect key="frame" x="22" y="808.33333333333337" width="349" height="264.00000000000011"/> <subviews> <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="KR4-hI-8vp"> <rect key="frame" x="0.0" y="0.0" width="349" height="53"/> @@ -575,12 +578,26 @@ </subviews> </stackView> <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="icon_scheme" translatesAutoresizingMaskIntoConstraints="NO" id="b2B-sv-AXV"> <rect key="frame" x="21" y="395.33333333333331" width="18" height="19"/> <rect key="frame" x="21" y="382.33333333333331" width="18" height="19"/> <constraints> <constraint firstAttribute="height" constant="19" id="U9y-Q3-689"/> <constraint firstAttribute="width" constant="18" id="ker-Ij-iyX"/> </constraints> </imageView> <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="KOe-DB-V1y"> <rect key="frame" x="19" y="408" width="62" height="34"/> <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/> <connections> <action selector="forwardWeekAction:" destination="-1" eventType="touchUpInside" id="aFk-9R-1NP"/> </connections> </button> <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="0oQ-r1-XZo"> <rect key="frame" x="312" y="406" width="62" height="34"/> <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/> <connections> <action selector="nextWeekAction:" destination="-1" eventType="touchUpInside" id="IPl-xK-4ew"/> </connections> </button> </subviews> <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <constraints> @@ -593,8 +610,11 @@ <constraint firstItem="O0u-hX-kAR" firstAttribute="top" secondItem="UMv-8K-vwR" secondAttribute="bottom" id="2uf-vy-jzM"/> <constraint firstAttribute="trailing" secondItem="wNl-09-jiS" secondAttribute="trailing" constant="22" id="3SP-6t-93o"/> <constraint firstItem="gbo-sZ-lm5" firstAttribute="leading" secondItem="dM8-7c-aXP" secondAttribute="leading" constant="27" id="3e7-4s-VCK"/> <constraint firstItem="Ojc-7l-9aZ" firstAttribute="top" secondItem="KOe-DB-V1y" secondAttribute="top" id="3tT-oY-ruu"/> <constraint firstItem="egC-eg-thJ" firstAttribute="leading" secondItem="dM8-7c-aXP" secondAttribute="leading" constant="27" id="71E-fS-Lee"/> <constraint firstItem="tXu-lh-XbB" firstAttribute="trailing" secondItem="KOe-DB-V1y" secondAttribute="trailing" id="7bF-aw-dLh"/> <constraint firstItem="tXu-lh-XbB" firstAttribute="centerY" secondItem="Ojc-7l-9aZ" secondAttribute="centerY" constant="2" id="8Ir-Jt-aOD"/> <constraint firstItem="QI0-rG-m2x" firstAttribute="trailing" secondItem="0oQ-r1-XZo" secondAttribute="trailing" id="9wO-w2-QaN"/> <constraint firstItem="QI0-rG-m2x" firstAttribute="leading" secondItem="Xl3-tO-aDi" secondAttribute="trailing" constant="7" id="BIF-uG-EbJ"/> <constraint firstItem="b2B-sv-AXV" firstAttribute="leading" secondItem="dM8-7c-aXP" secondAttribute="leading" constant="21" id="BJ2-n5-Jow"/> <constraint firstItem="CR5-qX-86L" firstAttribute="top" secondItem="nW8-qE-ePO" secondAttribute="bottom" constant="27" id="Cdl-RT-tsm"/> @@ -603,6 +623,7 @@ <constraint firstItem="j3F-fo-P15" firstAttribute="centerY" secondItem="CR5-qX-86L" secondAttribute="centerY" id="Ick-M6-Hzh"/> <constraint firstItem="Ioo-oF-wME" firstAttribute="leading" secondItem="uha-8d-tRd" secondAttribute="trailing" constant="7" id="JfJ-xw-6OJ"/> <constraint firstItem="QI0-rG-m2x" firstAttribute="centerY" secondItem="Xl3-tO-aDi" secondAttribute="centerY" constant="2" id="JlO-tM-ePB"/> <constraint firstItem="0oQ-r1-XZo" firstAttribute="leading" secondItem="Xl3-tO-aDi" secondAttribute="leading" id="KhS-CM-BDR"/> <constraint firstItem="hpJ-2G-ATO" firstAttribute="centerX" secondItem="dM8-7c-aXP" secondAttribute="centerX" id="MDr-hU-dEg"/> <constraint firstItem="Ioo-oF-wME" firstAttribute="centerY" secondItem="uha-8d-tRd" secondAttribute="centerY" id="Nzi-A3-U8i"/> <constraint firstItem="CR5-qX-86L" firstAttribute="centerY" secondItem="b2B-sv-AXV" secondAttribute="centerY" id="PDG-Y7-gzV"/> @@ -629,19 +650,23 @@ <constraint firstAttribute="trailing" secondItem="b9G-TL-PI1" secondAttribute="trailing" id="kUc-2f-uS8"/> <constraint firstItem="Okg-Yc-buM" firstAttribute="top" secondItem="b9G-TL-PI1" secondAttribute="bottom" constant="17" id="lV4-8e-Z9f"/> <constraint firstAttribute="bottom" secondItem="wNl-09-jiS" secondAttribute="bottom" priority="750" id="ld4-jQ-Q11"/> <constraint firstItem="Ojc-7l-9aZ" firstAttribute="bottom" secondItem="KOe-DB-V1y" secondAttribute="bottom" id="mAm-co-ZbI"/> <constraint firstItem="2CP-x2-Qn7" firstAttribute="centerY" secondItem="s1y-gM-ejj" secondAttribute="centerY" id="mwb-cW-nv3"/> <constraint firstItem="N78-t5-4OO" firstAttribute="centerX" secondItem="dM8-7c-aXP" secondAttribute="centerX" id="psh-NY-wpI"/> <constraint firstItem="Ojc-7l-9aZ" firstAttribute="leading" secondItem="KOe-DB-V1y" secondAttribute="leading" id="pv6-PJ-aU9"/> <constraint firstItem="wNl-09-jiS" firstAttribute="leading" secondItem="dM8-7c-aXP" secondAttribute="leading" constant="22" id="pwE-Zg-2eb"/> <constraint firstItem="0oQ-r1-XZo" firstAttribute="bottom" secondItem="Xl3-tO-aDi" secondAttribute="bottom" id="q8G-S9-MPY"/> <constraint firstAttribute="trailing" secondItem="ya3-wv-QBZ" secondAttribute="trailing" constant="19" id="qOh-FI-ja8"/> <constraint firstAttribute="trailing" secondItem="j3F-fo-P15" secondAttribute="trailing" constant="19" id="s0x-bj-8j4"/> <constraint firstAttribute="trailing" secondItem="QI0-rG-m2x" secondAttribute="trailing" constant="19" id="t07-X1-RLI"/> <constraint firstItem="s1y-gM-ejj" firstAttribute="top" secondItem="egC-eg-thJ" secondAttribute="bottom" constant="9" id="tME-09-nWN"/> <constraint firstItem="uha-8d-tRd" firstAttribute="leading" secondItem="dM8-7c-aXP" secondAttribute="leading" constant="24" id="tf3-QF-jpk"/> <constraint firstItem="egC-eg-thJ" firstAttribute="top" secondItem="dM8-7c-aXP" secondAttribute="top" constant="37" id="tvI-rg-y5R"/> <constraint firstItem="0oQ-r1-XZo" firstAttribute="top" secondItem="Xl3-tO-aDi" secondAttribute="top" id="ukB-mT-Rce"/> <constraint firstItem="CR5-qX-86L" firstAttribute="leading" secondItem="b2B-sv-AXV" secondAttribute="trailing" constant="6" id="uol-Qy-oWs"/> <constraint firstItem="UMv-8K-vwR" firstAttribute="top" secondItem="tXu-lh-XbB" secondAttribute="bottom" constant="39" id="uxC-SF-92L"/> <constraint firstItem="uha-8d-tRd" firstAttribute="top" secondItem="O0u-hX-kAR" secondAttribute="bottom" constant="16" id="vAj-gf-AyT"/> <constraint firstItem="nW8-qE-ePO" firstAttribute="top" secondItem="hpJ-2G-ATO" secondAttribute="bottom" constant="23" id="xey-Mz-hta"/> <constraint firstItem="nW8-qE-ePO" firstAttribute="top" secondItem="hpJ-2G-ATO" secondAttribute="bottom" constant="20" id="xey-Mz-hta"/> <constraint firstItem="wNl-09-jiS" firstAttribute="top" secondItem="Tc8-tf-Jm4" secondAttribute="bottom" id="y0F-lW-977"/> <constraint firstAttribute="trailing" secondItem="Tc8-tf-Jm4" secondAttribute="trailing" constant="19" id="zt8-rw-EZz"/> </constraints> @@ -676,7 +701,7 @@ </objects> <resources> <image name="bg_home_3" width="390" height="206"/> <image name="btn_add_shadow" width="60" height="61"/> <image name="btn_add_shadow" width="68" height="68"/> <image name="icon_BMI" width="20" height="20"/> <image name="icon_circle_mini" width="16" height="16"/> <image name="icon_man" width="16" height="16"/> WanPai/Root/Course/VC/CourseVC.xib
@@ -1,9 +1,9 @@ <?xml version="1.0" encoding="UTF-8"?> <document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="22154" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES"> <document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="22155" 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="22130"/> <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="22131"/> <capability name="System colors in document resources" minToolsVersion="11.0"/> <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/> </dependencies> @@ -36,10 +36,10 @@ </constraints> </imageView> <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="phT-6H-ZdB" customClass="QMUIButton"> <rect key="frame" x="166" y="103" width="226" height="61"/> <rect key="frame" x="166" y="116" width="202" height="35"/> <fontDescription key="fontDescription" type="system" weight="medium" pointSize="18"/> <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/> <state key="normal" title="立即创建运动营成员" image="btn_add_shadow"/> <state key="normal" title="立即创建运动营成员" image="btn_add_shadow_s"/> <connections> <action selector="addStudentAction:" destination="-1" eventType="touchUpInside" id="QEp-me-456"/> </connections> @@ -104,7 +104,7 @@ <resources> <image name="bg_home_1" width="390" height="265"/> <image name="bg_home_2" width="390" height="678"/> <image name="btn_add_shadow" width="60" height="61"/> <image name="btn_add_shadow_s" width="36" height="35"/> <image name="icon_user_large" width="92" height="94"/> <systemColor name="systemBackgroundColor"> <color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> WanPai/Root/Course/VC/ExperienceCourseVC.swift
@@ -17,7 +17,8 @@ @IBOutlet weak var collectionView: UICollectionView! @IBOutlet weak var cons_collectionHei: NSLayoutConstraint! @IBOutlet weak var label_needNum: UILabel! @IBOutlet weak var hei_cons: NSLayoutConstraint! private var courseId:Int! private var experienceCourseModel:ExperienceCourseModel? private var cellW:Double = 0 @@ -27,11 +28,12 @@ override func viewDidLoad() { super.viewDidLoad() title = "体验购课" cellW = ((view.width - 28.0) - 11.0 * 3) / 4 cellW = ((view.width - 40.0) - 11.0 * 3) / 4 cellH = cellW * 0.439 collectionView.delegate = self collectionView.dataSource = self collectionView.isScrollEnabled = false collectionView.register(UINib(nibName: "Common_1_CCell", bundle: nil), forCellWithReuseIdentifier: "_Common_1_CCell") collectionView.contentInset = UIEdgeInsets(top: 0, left: 14, bottom: 0, right: 14) @@ -40,7 +42,7 @@ if let model = data.data{ self?.label_name.text = model.name self?.label_num.text = "\(model.num)课时" self?.label_week.text = model.week self?.label_week.text = "每" + model.week self?.label_times.text = model.time.joined(separator: "|") self?.experienceCourseModel = model self?.collectionView.reloadData() @@ -62,20 +64,23 @@ } @IBAction func paymenAction(_ sender: UIButton) { guard selectIndexs.count > 0 else {alert(msg: "请选择上课时间");return} let n = (experienceCourseModel?.num ?? 0) * (experienceCourseModel?.time.count ?? 0) * selectIndexs.count if let storeId = UserDefaults.standard.value(forKey: "Current_StoreID") as? Int{ PaymentCourseView.show(storeId: storeId, number: n) {[weak self] s in guard let weakSelf = self else { return } if let storeStr = UserDefaults.standard.object(forKey: "CurrentStore") as? String{ if let deserModel = HomeStoreModel.deserialize(from: storeStr){ PaymentCourseView.show(storeId: deserModel.storeId, number: n) {[weak self] s in guard let weakSelf = self else { return } var t = [String]() for selectIndex in weakSelf.selectIndexs { t.append(weakSelf.experienceCourseModel!.day[selectIndex]) var t = [String]() for selectIndex in weakSelf.selectIndexs { t.append(weakSelf.experienceCourseModel!.day[selectIndex]) } Services.payCourse(courseId: weakSelf.courseId, num: n, oldCourseId: s, time: t).subscribe(onNext: {data in alertSuccess(msg: "购买成功") }) { error in }.disposed(by: weakSelf.disposeBag) } Services.payCourse(courseId: weakSelf.courseId, num: n, oldCourseId: s, time: t).subscribe(onNext: {data in alertSuccess(msg: "购买成功") }) { error in }.disposed(by: weakSelf.disposeBag) } } } @@ -84,9 +89,23 @@ extension ExperienceCourseVC:UICollectionViewDelegate{ func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) { if selectIndexs.contains(indexPath.row){ selectIndexs.remove(indexPath.row) if indexPath.row == 0 || (indexPath.row == (experienceCourseModel!.day.count - 1)){ selectIndexs.remove(indexPath.row) }else if selectIndexs.contains(indexPath.row + 1) && selectIndexs.contains(indexPath.row - 1){ alert(msg: "必须连续选择") }else{ selectIndexs.remove(indexPath.row) } }else{ selectIndexs.insert(indexPath.row) if selectIndexs.count != 0{ if selectIndexs.contains(indexPath.row - 1) || selectIndexs.contains(indexPath.row + 1){ selectIndexs.insert(indexPath.row) }else{ alert(msg: "必须连续选择") } }else{ selectIndexs.insert(indexPath.row) } } let n = (experienceCourseModel?.num ?? 0) * (experienceCourseModel?.time.count ?? 0) * selectIndexs.count label_needNum.text = "\(n)" @@ -106,6 +125,7 @@ cell.label_content.backgroundColor = isSelected ? Def_ThemeColor : .white cell.label_content.textColor = isSelected ? .white : UIColor(hexStr: "#898989") cell.label_content.borderWidth = isSelected ? 0:1 cell.label_content.borderColor = UIColor(hexStr: "#F2E9E9") return cell } } @@ -116,7 +136,7 @@ } func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, minimumInteritemSpacingForSectionAt section: Int) -> CGFloat { return 11 return 13 } func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, sizeForItemAt indexPath: IndexPath) -> CGSize { WanPai/Root/Course/VC/ExperienceCourseVC.xib
@@ -1,9 +1,9 @@ <?xml version="1.0" encoding="UTF-8"?> <document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="22154" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES"> <document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="22155" 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="22129"/> <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="22131"/> <capability name="Named colors" minToolsVersion="9.0"/> <capability name="Safe area layout guides" minToolsVersion="9.0"/> <capability name="System colors in document resources" minToolsVersion="11.0"/> @@ -14,6 +14,7 @@ <connections> <outlet property="collectionView" destination="aAb-vH-gKv" id="XZh-vb-HXz"/> <outlet property="cons_collectionHei" destination="j83-zf-wYk" id="Bwi-SR-CJ7"/> <outlet property="hei_cons" destination="j83-zf-wYk" id="q3S-dY-tNy"/> <outlet property="label_name" destination="cFP-un-jIB" id="zQP-Ga-obG"/> <outlet property="label_needNum" destination="uz9-su-Hs0" id="0xY-zw-KvC"/> <outlet property="label_num" destination="zEZ-Rl-yb2" id="X1R-XL-dqp"/> @@ -111,16 +112,17 @@ </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="jIs-Eo-pYf"> <rect key="frame" x="14" y="15" width="71.666666666666671" height="20"/> <rect key="frame" x="14" y="15" width="72" height="20"/> <constraints> <constraint firstAttribute="height" constant="20" id="I5b-Fd-ZLX"/> <constraint firstAttribute="width" constant="72" id="lkX-wM-aAg"/> </constraints> <fontDescription key="fontDescription" type="system" weight="semibold" pointSize="14"/> <nil key="textColor"/> <nil key="highlightedColor"/> </label> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="--" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="2ac-mL-0CR"> <rect key="frame" x="90.666666666666671" y="15" width="13" height="20"/> <rect key="frame" x="91" y="15" width="13" height="20"/> <constraints> <constraint firstAttribute="height" constant="20" id="9qn-vE-WlN"/> </constraints> @@ -128,10 +130,10 @@ <nil key="textColor"/> <nil key="highlightedColor"/> </label> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="00:00-00:00" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="nDH-V7-Kbb"> <rect key="frame" x="90.666666666666657" y="43" width="86.666666666666657" height="20"/> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="00:00-00:00" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="nDH-V7-Kbb"> <rect key="frame" x="91" y="43" width="292" height="20"/> <constraints> <constraint firstAttribute="height" constant="20" id="ijd-ir-7HJ"/> <constraint firstAttribute="height" relation="greaterThanOrEqual" constant="20" id="ijd-ir-7HJ"/> </constraints> <fontDescription key="fontDescription" type="system" weight="medium" pointSize="14"/> <color key="textColor" name="FE6E0D"/> @@ -145,6 +147,7 @@ <constraint firstItem="DG5-ef-vo4" firstAttribute="top" secondItem="nDH-V7-Kbb" secondAttribute="bottom" constant="15" id="8RB-I5-qIP"/> <constraint firstItem="nDH-V7-Kbb" firstAttribute="top" secondItem="2ac-mL-0CR" secondAttribute="bottom" constant="8" id="E1N-2q-CuW"/> <constraint firstItem="2ac-mL-0CR" firstAttribute="leading" secondItem="jIs-Eo-pYf" secondAttribute="trailing" constant="5" id="GLr-vA-TJc"/> <constraint firstAttribute="trailing" secondItem="nDH-V7-Kbb" secondAttribute="trailing" constant="10" id="Xh8-bX-nAG"/> <constraint firstItem="nDH-V7-Kbb" firstAttribute="leading" secondItem="2ac-mL-0CR" secondAttribute="leading" id="ZMe-Do-YTr"/> <constraint firstItem="jIs-Eo-pYf" firstAttribute="top" secondItem="1pI-gM-cuI" secondAttribute="top" constant="15" id="ajZ-nB-NIq"/> <constraint firstItem="2ac-mL-0CR" firstAttribute="centerY" secondItem="jIs-Eo-pYf" secondAttribute="centerY" id="pu0-C5-rGQ"/> @@ -172,7 +175,7 @@ <nil key="highlightedColor"/> </label> <collectionView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" dataMode="none" translatesAutoresizingMaskIntoConstraints="NO" id="aAb-vH-gKv"> <rect key="frame" x="14" y="48" width="365" height="36"/> <rect key="frame" x="0.0" y="48" width="393" height="36"/> <color key="backgroundColor" systemColor="systemBackgroundColor"/> <constraints> <constraint firstAttribute="height" constant="36" id="j83-zf-wYk"/> @@ -192,9 +195,9 @@ <constraint firstItem="v2i-6n-RCr" firstAttribute="top" secondItem="aAb-vH-gKv" secondAttribute="bottom" constant="18" id="LLl-rU-vtZ"/> <constraint firstItem="1vX-Nj-xwW" firstAttribute="top" secondItem="SWn-GW-by1" secondAttribute="top" constant="15" id="Y6x-VO-0SQ"/> <constraint firstAttribute="bottom" secondItem="v2i-6n-RCr" secondAttribute="bottom" id="alO-qh-HM2"/> <constraint firstAttribute="trailing" secondItem="aAb-vH-gKv" secondAttribute="trailing" constant="14" id="ayC-DH-LhH"/> <constraint firstAttribute="trailing" secondItem="aAb-vH-gKv" secondAttribute="trailing" id="ayC-DH-LhH"/> <constraint firstItem="aAb-vH-gKv" firstAttribute="top" secondItem="1vX-Nj-xwW" secondAttribute="bottom" constant="13" id="hQ6-GF-56v"/> <constraint firstItem="aAb-vH-gKv" firstAttribute="leading" secondItem="SWn-GW-by1" secondAttribute="leading" constant="14" id="qt0-wr-M5t"/> <constraint firstItem="aAb-vH-gKv" firstAttribute="leading" secondItem="SWn-GW-by1" secondAttribute="leading" id="qt0-wr-M5t"/> <constraint firstAttribute="trailing" secondItem="v2i-6n-RCr" secondAttribute="trailing" id="yhP-Qg-aQP"/> </constraints> </view> WanPai/Root/Course/VC/StudentMentalListVC.swift
@@ -16,6 +16,7 @@ var level:Int! var info:String! var btnName:String! var medalType:MedalType = .club } lazy private var tableView:UITableView = { @@ -41,7 +42,7 @@ override func viewDidLoad() { super.viewDidLoad() title = "运动营成员勋章" title = "运动营成员徽章" view.addSubview(tableView) tableView.snp.makeConstraints { make in @@ -53,13 +54,13 @@ for model in models{ switch model.medalType{ case .club: self?.items.append(MentalInfo(icon: UIImage(named: "icon_coupon_1"), l1: "COURSE", l2: model.medalName, level: model.levelNum, info: model.upgradeConditions, btnName: "去预约")) self?.items.append(MentalInfo(icon: UIImage(named: "icon_coupon_1"), l1: "COURSE", l2: model.medalName, level: model.levelNum, info: String(format: "再上课打卡%@次可升级LV%ld", model.upgradeConditions,model.nextLevel), btnName: "去预约",medalType: model.medalType)) case .communtiy: self?.items.append(MentalInfo(icon: UIImage(named: "icon_coupon_3"), l1: "ON_LINE", l2: model.medalName, level: model.levelNum, info: model.upgradeConditions, btnName: "去预约")) self?.items.append(MentalInfo(icon: UIImage(named: "icon_coupon_3"), l1: "ON_LINE", l2: model.medalName, level: model.levelNum, info: String(format: "再预约场地%@次可升级LV%ld", model.upgradeConditions,model.nextLevel), btnName: "去预约",medalType: model.medalType)) case .deepPlayer: self?.items.append(MentalInfo(icon: UIImage(named: "icon_coupon_4"), l1: "APPOINTMENT", l2: model.medalName, level: model.levelNum, info: model.upgradeConditions, btnName: "去完成")) self?.items.append(MentalInfo(icon: UIImage(named: "icon_coupon_4"), l1: "APPOINTMENT", l2: model.medalName, level: model.levelNum, info: String(format: "再完成课后练习%@次可升级LV%ld", model.upgradeConditions,model.nextLevel), btnName: "去完成",medalType: model.medalType)) case .sport: self?.items.append(MentalInfo(icon: UIImage(named: "icon_coupon_2"), l1: "EVENTS", l2: model.medalName, level: model.levelNum, info: model.upgradeConditions, btnName: "去报名")) self?.items.append(MentalInfo(icon: UIImage(named: "icon_coupon_2"), l1: "EVENTS", l2: model.medalName, level: model.levelNum, info: String(format: "再参与赛事%@次可升级LV%ld", model.upgradeConditions,model.nextLevel), btnName: "去报名",medalType: model.medalType)) } } self?.tableView.reloadData() @@ -68,7 +69,24 @@ } } extension StudentMentalListVC:UITableViewDelegate{} extension StudentMentalListVC:UITableViewDelegate{ func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { let model = items[indexPath.row] switch model.medalType { case .club: navigationController?.popToRootViewController(animated: true) case .communtiy: let vc = YardListVC() push(vc: vc) case .sport: let vc = ActivityListVC() push(vc: vc) case .deepPlayer: let vc = CourseExerciseSubListVC() push(vc: vc) } } } extension StudentMentalListVC:UITableViewDataSource{ func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { WanPai/Root/Course/VC/StudentRemarkListVC.swift
@@ -42,7 +42,7 @@ override func viewDidLoad() { super.viewDidLoad() title = "运动营成员评语" viewModel.configure(tableView) viewModel.configure(tableView,needMore: false) viewModel.beginRefresh() } WanPai/Root/Course/VC/StudentReportVC.swift
@@ -16,6 +16,7 @@ @IBOutlet weak var label_stu_wei: UILabel! @IBOutlet weak var label_stu_BMI: UILabel! @IBOutlet weak var stackView: UIStackView! @IBOutlet weak var view_line: UIView! private let zoomImageView = QMUIZoomImageView() private var stuId:Int! @@ -29,7 +30,8 @@ fatalError("init(coder:) has not been implemented") } override func viewDidLoad() { override func viewDidLoad() { super.viewDidLoad() title = "测试报告" @@ -42,6 +44,7 @@ SDWebImageDownloader.shared.downloadImage(with: URL(string: m.url)) {[weak self] image, data, error, status in if let image{ self?.zoomImageView.image = image self?.zoomImageView.hideEmpty() } } } @@ -57,7 +60,7 @@ view.addSubview(zoomImageView) zoomImageView.showEmpty(withText: "暂无报告") zoomImageView.snp.makeConstraints { make in make.top.equalTo(stackView.snp.bottom) make.top.equalTo(view_line.snp.bottom).offset(30) make.left.right.bottom.equalToSuperview() } } WanPai/Root/Course/VC/StudentReportVC.xib
@@ -1,9 +1,9 @@ <?xml version="1.0" encoding="UTF-8"?> <document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="21701" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES"> <document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="22155" 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="21679"/> <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="22131"/> <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"/> @@ -16,6 +16,7 @@ <outlet property="label_stu_wei" destination="xwL-RR-Ccb" id="LHS-E5-yKQ"/> <outlet property="stackView" destination="Z7n-yb-GDw" id="zOs-T2-lqM"/> <outlet property="view" destination="i5M-Pr-FkT" id="sfx-zR-JGt"/> <outlet property="view_line" destination="sbv-cf-74N" id="Ded-aL-ctI"/> </connections> </placeholder> <placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/> @@ -127,13 +128,23 @@ <constraint firstAttribute="height" constant="55" id="OI4-sQ-iST"/> </constraints> </stackView> <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="sbv-cf-74N"> <rect key="frame" x="19" y="168" width="355" height="1"/> <color key="backgroundColor" red="0.59215686274509804" green="0.59215686274509804" blue="0.59215686274509804" alpha="0.25" colorSpace="custom" customColorSpace="sRGB"/> <constraints> <constraint firstAttribute="height" constant="1" id="Xnp-LE-bvE"/> </constraints> </view> </subviews> <viewLayoutGuide key="safeArea" id="fnl-2z-Ty3"/> <color key="backgroundColor" systemColor="systemBackgroundColor"/> <constraints> <constraint firstAttribute="trailing" secondItem="Z7n-yb-GDw" secondAttribute="trailing" id="ARR-nu-eW0"/> <constraint firstItem="fnl-2z-Ty3" firstAttribute="trailing" secondItem="sbv-cf-74N" secondAttribute="trailing" constant="19" id="kBv-eu-kpg"/> <constraint firstItem="Z7n-yb-GDw" firstAttribute="leading" secondItem="fnl-2z-Ty3" secondAttribute="leading" constant="27" id="nzg-Xn-lNe"/> <constraint firstItem="Z7n-yb-GDw" firstAttribute="top" secondItem="fnl-2z-Ty3" secondAttribute="top" constant="24" id="o28-Ul-Nty"/> <constraint firstItem="sbv-cf-74N" firstAttribute="top" secondItem="Z7n-yb-GDw" secondAttribute="bottom" constant="30" id="r95-HK-zia"/> <constraint firstItem="sbv-cf-74N" firstAttribute="leading" secondItem="fnl-2z-Ty3" secondAttribute="leading" constant="19" id="yBL-wE-Cc3"/> </constraints> <point key="canvasLocation" x="140" y="21"/> </view> WanPai/Root/Home/VC/HomeVC.swift
@@ -16,6 +16,7 @@ //https://media.w3.org/2010/05/sintel/trailer.mp4 let ChooseHomeStore_Noti = Notification.Name.init("ChooseHomeStore_Noti") let UpdateCurrentStore_Noti = Notification.Name.init("UpdateCurrentStore_Noti") class HomeVC: BaseVC{ @IBOutlet weak var collectionView: BaseCollectionView! @@ -217,6 +218,7 @@ UserDefaults.standard.set(weakSelf.storeModel!.toJSONString(), forKey: "CurrentStore") UserDefaults.standard.synchronize() NotificationCenter.default.post(name: UpdateCurrentStore_Noti, object: nil, userInfo: nil) } } WanPai/Root/Other/VC/PaymentResultVC.swift
@@ -72,8 +72,8 @@ btn_backHome.isHidden = result != .success collectionView.isHidden = result != .success switch result { case .fail: label_content.text = "支付失败,这是失败原因!" case .fail(let str, _): label_content.text = str case .success: label_content.text = "支付成功,恭喜您成为玩湃会员!并获得优惠券!" case .none:break @@ -96,6 +96,7 @@ btn_again.setTitle("再次支付", for: .normal) btn_back.setTitle("返回", for: .normal) label_content.text = str if code == 3{btn_again.setTitle("去充值", for: .normal)} case .success: btn_again.setTitle("立即预约", for: .normal) btn_back.setTitle("返回首页", for: .normal) @@ -107,9 +108,10 @@ btn_backHome.isHidden = true collectionView.isHidden = true switch result { case .fail: case .fail(let str, let code): btn_back.setTitle("返回", for: .normal) label_content.text = "报名失败,这是失败原因!" label_content.text = str if code == 3{btn_again.setTitle("去充值", for: .normal)} case .success: btn_again.setTitle("查看报名", for: .normal) btn_back.setTitle("返回首页", for: .normal) @@ -122,9 +124,10 @@ collectionView.isHidden = true switch result { case .fail(let str,let code): label_content.text = str btn_again.setTitle("再次支付", for: .normal) btn_back.setTitle("返回", for: .normal) label_content.text = str if code == 3{btn_again.setTitle("去充值", for: .normal)} case .success: btn_again.setTitle("查看预约", for: .normal) btn_back.setTitle("返回首页", for: .normal) @@ -140,6 +143,7 @@ btn_again.setTitle("再次支付", for: .normal) btn_back.setTitle("返回", for: .normal) label_content.text = str if code == 3{btn_again.setTitle("去充值", for: .normal)} case .success: btn_again.isHidden = true btn_back.setTitleColor(.white, for: .normal) @@ -164,22 +168,23 @@ switch str{ case "查看预约": dismiss(animated:true){ [weak self] in let vc = YardBookingListVC() self?.handleVC?.navigationController?.pushViewController(vc) } let vc = YardBookingListVC() JQ_currentViewController().jq_push(vc: vc) case "立即预约": navigationController?.popToRootViewController(animated: true) NotificationCenter.default.post(name: UpdateCurrentStore_Noti, object: nil) case "查看报名": dismiss(animated:true){ [weak self] in let vc = ActivitySignupListVC() self?.handleVC?.navigationController?.pushViewController(vc) } let vc = ActivitySignupListVC() JQ_currentViewController().jq_push(vc: vc) case "再次支付": navigationController?.popViewController(animated: true, {[weak self] in self?.againClouse?() }) case "去充值": navigationController?.popViewController(animated: true, {() in let vc = RechargeCenterVC() JQ_currentViewController().jq_push(vc: vc) }) default:break } } WanPai/Root/Other/View/CommonDatePickerView.swift
@@ -20,7 +20,7 @@ private var type:DatePickerType! private var years = [Int]() private var months = [1,2,3,4,5,6,7,8,9,10,11,12] private var months = [12,11,10,9,8,7,6,5,4,3,2,1] private var hours = [Int]() private var minutes = [Int]() private var days = [Int]() @@ -149,7 +149,6 @@ extension CommonDatePickerView:UIPickerViewDataSource{ func pickerView(_ pickerView: UIPickerView, numberOfRowsInComponent component: Int) -> Int { if component == 0{ switch type{ WanPai/Root/Search/VC/CustomerSubListVC.swift
@@ -57,7 +57,8 @@ let bannberView = CommonBannerView(frame: CGRect(x: 0, y: 0, width: JQ_ScreenW, height: JQ_ScreenW * 0.564)) self?.tableView.tableHeaderView = bannberView bannberView.setImages(images: models.map({$0.img}), type: .URL) { index in let model = models[index] jumpPage(name: model.name, page: model.page, type: model.type, id: model.turnId) } self?.tableView.reloadData() } WanPai/Root/Welfare/TCell/BillInfoTCell.swift
@@ -17,10 +17,10 @@ label_price.text = billingModel.consumeAmount.currency() if billingModel.detailsType == .positive{ label_price.text = billingModel.consumeAmount.jq_formatFloat label_price.textColor = UIColor(hexStr: "#2AA60B") label_price.textColor = UIColor(hexStr: "#FD2A02") }else{ label_price.text = billingModel.consumeAmount.jq_formatFloat label_price.textColor = UIColor(hexStr: "#FD2A02") label_price.textColor = UIColor(hexStr: "#2AA60B") } } } WanPai/Root/Welfare/VC/RechargeCenterVC.swift
@@ -25,26 +25,38 @@ @IBOutlet weak var cons_collectHei: NSLayoutConstraint! private var items = [RechargeItem]() private let cellW = (JQ_ScreenW - 88) / 3.0 private let cellH = ((JQ_ScreenW - 88) / 3.0) * 0.5148 private var cellW:Double = 0 private var cellH:Double = 0 private var selectIndex = 0 var viewModel:RechargeRecordViewModel! // var viewModel:RechargeRecordViewModel! override func viewDidAppear(_ animated: Bool) { super.viewDidAppear(animated) view_cion.valueNumber = NSNumber(value: viewModel.coin.value) } override func viewDidLoad() { super.viewDidLoad() title = "充值中心" cellW = (view.size.width - 88.0) / 3.0 cellH = (view.size.width - 88.0) / 3.0 * 0.5148 Services.benefitHome().subscribe(onNext: {[weak self] data in if let m = data.data{ self?.view_cion.valueNumber = NSNumber(value: m.wpCoin) } }) { error in }.disposed(by: disposeBag) view_cion.font = UIFont.init(name: "Impact", size: 36)! view_cion.textColor = .white Services.voucherCenter().subscribe(onNext: {[weak self] data in guard let weakSelf = self else { return } for v in data.data ?? []{ weakSelf.items.append(RechargeItem(coin: v.wpGold, money: v.amount)) weakSelf.items.append(RechargeItem(coin: v.wpGold, money: v.amount)) } @@ -82,8 +94,9 @@ @IBAction func introAction(_ sender: UIButton) { Services.rechargeDescription().subscribe(onNext: {[weak self] data in if let string = data.data{ let vc = JQ_CommonWebViewController(htmlText: string, baseURL: nil) self?.present(vc, animated: true) let vc = CommonWebVC(type: .other, content: string) vc.title = "储值说明" self?.jq_push(vc: vc) } }).disposed(by: disposeBag) } WanPai/Root/Welfare/VC/RechargeRecordVC.swift
@@ -91,7 +91,7 @@ @IBAction func datetimeAction(_ sender: UIButton) { CommonDatePickerView.show(before: 3, after: 0, type: .YM) {[weak self] year, month, day,_,_ in self?.btn_date.setTitle(String(format: "%ld年%02ld月>", year!,month!), for: .normal) self?.viewModel.yearMonth.accept(String(format: "%ld-02ld", year!,month!)) self?.viewModel.yearMonth.accept(String(format: "%ld-%02ld", year!,month!)) self?.viewModel.beginRefresh() } } @@ -110,7 +110,6 @@ @IBAction func rechargeAction(_ sender: UIButton) { let vc = RechargeCenterVC() vc.viewModel = viewModel push(vc: vc) } } WanPai/Root/Welfare/VC/RechargeRecordVC.xib
@@ -1,9 +1,9 @@ <?xml version="1.0" encoding="UTF-8"?> <document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="22154" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES"> <document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="22155" 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="22130"/> <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="22131"/> <capability name="Named colors" minToolsVersion="9.0"/> <capability name="Safe area layout guides" minToolsVersion="9.0"/> <capability name="System colors in document resources" minToolsVersion="11.0"/> @@ -42,7 +42,7 @@ <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="可用积分" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="MNG-iP-MVp"> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="当前剩余" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="MNG-iP-MVp"> <rect key="frame" x="172" y="144" width="49.333333333333343" height="14.333333333333343"/> <fontDescription key="fontDescription" type="system" weight="medium" pointSize="12"/> <color key="textColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> WanPai/Root/Welfare/VC/WelfareCouponsListVC.swift
@@ -108,7 +108,7 @@ } @objc func fliterAction(){ JQ_MenuView().show(self, tapView: btn_filter, items: ["全部","未使用","已使用","已过期"], tableHei: 230) {[weak self] index, str in JQ_MenuView().show(self, tapView: btn_filter, items: ["全部","已使用","未使用","已过期"], tableHei: 230) {[weak self] index, str in self?.btn_filter.setTitle(str, for: .normal) if let vc = self?.pageViewController.currentController as? WelfareCouponsSubListVC{ if index == 0{ WanPai/Root/Welfare/VC/WelfareExchangeRecordDetailVC.swift
@@ -14,7 +14,8 @@ private var id:Int! private var goodsType:ExchangeType! @IBOutlet weak var view_banner: UIView! @IBOutlet weak var label_cardType: UILabel! @IBOutlet weak var view_banner: UIView! @IBOutlet weak var label_course: UILabel! @IBOutlet weak var label_title: UILabel! @IBOutlet weak var label_price: UILabel! @@ -70,6 +71,7 @@ self?.img_state.isHidden = model.useType == .unUsed self?.img_state1.isHidden = model.useType == .unUsed self?.label_cardType.text = model.cardType.strTitle switch model.goodType{ WanPai/Root/Welfare/VC/WelfareExchangeRecordDetailVC.xib
@@ -1,9 +1,9 @@ <?xml version="1.0" encoding="UTF-8"?> <document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="22154" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES"> <document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="22155" 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="22129"/> <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="22131"/> <capability name="Named colors" minToolsVersion="9.0"/> <capability name="Safe area layout guides" minToolsVersion="9.0"/> <capability name="System colors in document resources" minToolsVersion="11.0"/> @@ -15,6 +15,7 @@ <outlet property="cons_webHeight" destination="wrH-M0-oLp" id="lfX-Vg-RCO"/> <outlet property="img_state" destination="7pC-js-UtM" id="b53-6P-AOb"/> <outlet property="img_state1" destination="M4e-TS-dOq" id="O4P-ZU-Amf"/> <outlet property="label_cardType" destination="4LY-C7-cIl" id="9oI-zr-yoV"/> <outlet property="label_course" destination="OqZ-I4-JSH" id="rve-jQ-v6A"/> <outlet property="label_duetime" destination="qwp-eY-ANG" id="sCR-Dn-zFm"/> <outlet property="label_ordertime" destination="jqC-oi-87t" id="qm4-Ra-XvV"/> WanPai/Root/Welfare/VC/WelfareWeeklySubListVC.swift
@@ -40,7 +40,7 @@ override func viewDidLoad() { super.viewDidLoad() viewModel.configure(tableView) viewModel.configure(tableView,needMore: false) viewModel.beginRefresh() // tableView.jq_setEmptyView() }