| | |
| | | 134BD52C2A6008BA00786819 /* YYPaymentManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 134BD5202A6008BA00786819 /* YYPaymentManager.swift */; }; |
| | | 134BD52D2A6008BA00786819 /* YYPaymentResultModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 134BD5212A6008BA00786819 /* YYPaymentResultModel.swift */; }; |
| | | 134BD52E2A6008BA00786819 /* YYPayRequest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 134BD5222A6008BA00786819 /* YYPayRequest.swift */; }; |
| | | 1350BF172ADFD1D9007FC49F /* RatingBar.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1350BF162ADFD1D9007FC49F /* RatingBar.swift */; }; |
| | | 1353D5752A56CA0A00539FCA /* Services.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1353D5732A56CA0A00539FCA /* Services.swift */; }; |
| | | 1353D5762A56CA0A00539FCA /* NetworkRequest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1353D5742A56CA0A00539FCA /* NetworkRequest.swift */; }; |
| | | 1355ABFA2A4BE9FF002B25E4 /* WelfareCouponsSubListVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1355ABF92A4BE9FF002B25E4 /* WelfareCouponsSubListVC.swift */; }; |
| | |
| | | 134BD5212A6008BA00786819 /* YYPaymentResultModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = YYPaymentResultModel.swift; sourceTree = "<group>"; }; |
| | | 134BD5222A6008BA00786819 /* YYPayRequest.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = YYPayRequest.swift; sourceTree = "<group>"; }; |
| | | 134BD5332A60099B00786819 /* WanPai-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "WanPai-Bridging-Header.h"; sourceTree = SOURCE_ROOT; }; |
| | | 1350BF162ADFD1D9007FC49F /* RatingBar.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RatingBar.swift; sourceTree = "<group>"; }; |
| | | 1353D5732A56CA0A00539FCA /* Services.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Services.swift; sourceTree = "<group>"; }; |
| | | 1353D5742A56CA0A00539FCA /* NetworkRequest.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NetworkRequest.swift; sourceTree = "<group>"; }; |
| | | 1355ABF92A4BE9FF002B25E4 /* WelfareCouponsSubListVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WelfareCouponsSubListVC.swift; sourceTree = "<group>"; }; |
| | |
| | | 1394023E2AB456DB003CF61E /* PaymentCourseView.xib */, |
| | | 130EC17F2AD3F6AF003CA9BA /* CommonAlertSheetView.swift */, |
| | | 130EC1812AD3F6C0003CA9BA /* CommonAlertSheetView.xib */, |
| | | 1350BF162ADFD1D9007FC49F /* RatingBar.swift */, |
| | | ); |
| | | path = View; |
| | | sourceTree = "<group>"; |
| | |
| | | 132876682A49A4CB00FC9122 /* StudentReportVC.swift in Sources */, |
| | | 133A61882A4E7A200066C4E6 /* CustomerSubListVC.swift in Sources */, |
| | | 137B866F2AB3F87000C4D01B /* GamesPayView.swift in Sources */, |
| | | 1350BF172ADFD1D9007FC49F /* RatingBar.swift in Sources */, |
| | | 1304B8602A4EB59F000D4F2E /* SearchStoreListVC.swift in Sources */, |
| | | 8D630BF82A31801300F0B7A8 /* SearchVC.swift in Sources */, |
| | | 13B6BBA12ABAE44E006D0C0E /* CourseSignUpTCell.swift in Sources */, |
New file |
| | |
| | | { |
| | | "images" : [ |
| | | { |
| | | "idiom" : "universal", |
| | | "scale" : "1x" |
| | | }, |
| | | { |
| | | "filename" : "btn_play@2x.png", |
| | | "idiom" : "universal", |
| | | "scale" : "2x" |
| | | }, |
| | | { |
| | | "filename" : "btn_play@3x.png", |
| | | "idiom" : "universal", |
| | | "scale" : "3x" |
| | | } |
| | | ], |
| | | "info" : { |
| | | "author" : "xcode", |
| | | "version" : 1 |
| | | } |
| | | } |
| | |
| | | } |
| | | |
| | | override var preferredStatusBarStyle: UIStatusBarStyle{ |
| | | return .default |
| | | return .lightContent |
| | | } |
| | | |
| | | override var shouldAutorotate: Bool{ |
| | |
| | | @IBOutlet weak var btn_alipay: UIButton! |
| | | @IBOutlet weak var btn_coin: UIButton! |
| | | @IBOutlet weak var btn_course: UIButton! |
| | | @IBOutlet weak var label_integral: UILabel! |
| | | |
| | | @IBOutlet weak var view_wechat: UIView! |
| | | @IBOutlet weak var view_alipay: UIView! |
| | |
| | | @IBOutlet weak var label_courseMoney: UILabel! |
| | | @IBOutlet weak var btn_complete: UIButton! |
| | | @IBOutlet weak var btn_integral: UIButton! |
| | | |
| | | |
| | | |
| | | private var clouse:((PayType)->Void)? |
| | |
| | | paymentView.label_wechatMoney.text = money.wx?.currency() ?? "0" |
| | | paymentView.label_coinMoney.text = "\(money.coin ?? 0)币" |
| | | paymentView.label_courseMoney.text = "\(money.course ?? 0)课时" |
| | | paymentView.label_integral.text = "\(money.integral ?? 0)积分" |
| | | sceneDelegate?.window?.addSubview(paymentView) |
| | | paymentView.cons_bottom.constant = 0 |
| | | |
| | |
| | | <constraint firstAttribute="height" constant="0.40000000000000002" id="5k6-hd-aob"/> |
| | | </constraints> |
| | | </view> |
| | | <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="icon_notice" translatesAutoresizingMaskIntoConstraints="NO" id="cCG-Q7-Q0C"> |
| | | <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="icon_coin" translatesAutoresizingMaskIntoConstraints="NO" id="cCG-Q7-Q0C"> |
| | | <rect key="frame" x="15" y="21" width="28" height="29"/> |
| | | <constraints> |
| | | <constraint firstAttribute="width" constant="28" id="0kD-VT-hw3"/> |
| | |
| | | <action selector="tapAction:" destination="iN0-l3-epB" eventType="touchUpInside" id="zbU-Kl-1M1"/> |
| | | </connections> |
| | | </button> |
| | | <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="0积分" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="U8u-9j-U4a"> |
| | | <rect key="frame" x="132.33333333333334" y="26" width="43" height="19.333333333333329"/> |
| | | <fontDescription key="fontDescription" type="system" weight="medium" pointSize="16"/> |
| | | <color key="textColor" red="0.93333333330000001" green="0.043137254899999998" blue="0.043137254899999998" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> |
| | | <nil key="highlightedColor"/> |
| | | </label> |
| | | </subviews> |
| | | <color key="backgroundColor" systemColor="systemBackgroundColor"/> |
| | | <constraints> |
| | |
| | | <constraint firstItem="fiP-vF-ya1" firstAttribute="centerY" secondItem="cCG-Q7-Q0C" secondAttribute="centerY" id="OqT-Rg-7gu"/> |
| | | <constraint firstAttribute="bottom" secondItem="8Ok-2i-KOu" secondAttribute="bottom" id="dBP-Dr-OJf"/> |
| | | <constraint firstAttribute="height" constant="60" id="fxz-ZW-vRj"/> |
| | | <constraint firstItem="U8u-9j-U4a" firstAttribute="centerY" secondItem="cCG-Q7-Q0C" secondAttribute="centerY" id="old-1o-5gd"/> |
| | | <constraint firstAttribute="trailing" secondItem="8Ok-2i-KOu" secondAttribute="trailing" constant="14" id="rfJ-rg-rg2"/> |
| | | <constraint firstItem="U8u-9j-U4a" firstAttribute="leading" secondItem="fiP-vF-ya1" secondAttribute="trailing" constant="11" id="uoa-Ff-rZh"/> |
| | | <constraint firstAttribute="trailing" secondItem="MCE-3F-QM0" secondAttribute="trailing" constant="14" id="vo5-J6-ioe"/> |
| | | <constraint firstItem="MCE-3F-QM0" firstAttribute="centerY" secondItem="cCG-Q7-Q0C" secondAttribute="centerY" id="yWk-BV-nae"/> |
| | | </constraints> |
| | |
| | | <outlet property="label_aliPayMoney" destination="uCD-UF-eto" id="1BE-9I-1Dh"/> |
| | | <outlet property="label_coinMoney" destination="MfR-5x-oVT" id="Rwg-Rc-14o"/> |
| | | <outlet property="label_courseMoney" destination="1dn-gY-wfT" id="H3V-IY-yYU"/> |
| | | <outlet property="label_integral" destination="U8u-9j-U4a" id="cCq-FK-gF9"/> |
| | | <outlet property="label_wechatMoney" destination="nW3-BN-jAP" id="HUP-W9-gDY"/> |
| | | <outlet property="view_alipay" destination="4Ft-AC-zgU" id="W5X-ct-zGp"/> |
| | | <outlet property="view_coin" destination="S7h-OF-RAr" id="0wr-zD-dLr"/> |
New file |
| | |
| | | // |
| | | // RatingBar.swift |
| | | // WanPai |
| | | // |
| | | // Created by 无故事王国 on 2023/10/18. |
| | | // |
| | | |
| | | // 基本原理:在这个RatingBar里面分别创建两个子View,一个覆盖另一个,每个子View创建numStars个UIImageView,然后通过修改rating的值来控制最顶层的子View可见范围来实现Rating数值变化效果 |
| | | // RatingBar.swift |
| | | // RatingBar |
| | | // |
| | | // Created by Sai on 15/4/22. |
| | | // Copyright (c) 2015年 Sai. All rights reserved. |
| | | // |
| | | |
| | | import UIKit |
| | | //@IBDesignable 在视图中拖入控件可以看到渲染情况,结果出现以下错误,http://stackoverflow.com/questions/27374330/ibdesignable-error-ib-designables-failed-to-update-auto-layout-status-interf 这里也是一样情况,暂时无解 |
| | | //error: IB Designables: Failed to update auto layout status: Interface Builder Cocoa Touch Tool crashed |
| | | //error: IB Designables: Failed to render instance of PlaceholderTextView: Rendering the view took longer than 200 ms. Your drawing code may suffer from slow performance. |
| | | class RatingBar: UIView { |
| | | |
| | | @IBInspectable var rating: CGFloat = 0{//当前数值 |
| | | didSet{ |
| | | if 0 > rating {rating = 0} |
| | | else if ratingMax < rating {rating = ratingMax} |
| | | //回调给代理 |
| | | delegate?.ratingDidChange(ratingBar: self, rating: rating) |
| | | |
| | | self.setNeedsLayout() |
| | | } |
| | | } |
| | | @IBInspectable var ratingMax: CGFloat = 5//总数值,必须为numStars的倍数 |
| | | @IBInspectable var numStars: Int = 5 //星星总数 |
| | | @IBInspectable var canAnimation: Bool = false//是否开启动画模式 |
| | | @IBInspectable var animationTimeInterval: TimeInterval = 0.2//动画时间 |
| | | @IBInspectable var incomplete:Bool = false//评分时是否允许不是整颗星星 |
| | | @IBInspectable var isIndicator:Bool = false//RatingBar是否是一个指示器(用户无法进行更改) |
| | | |
| | | @IBInspectable var imageLight: UIImage = UIImage(named: "icon_star")! |
| | | @IBInspectable var imageDark: UIImage = UIImage(named: "btn_start_u")! |
| | | |
| | | var foregroundRatingView: UIView! |
| | | var backgroundRatingView: UIView! |
| | | |
| | | var delegate: RatingBarDelegate? |
| | | var isDrew = false |
| | | |
| | | func buildView(){ |
| | | if isDrew {return} |
| | | isDrew = true |
| | | //创建前后两个View,作用是通过rating数值显示或者隐藏“foregroundRatingView”来改变RatingBar的星星效果 |
| | | self.backgroundRatingView = self.createRatingView(image: imageDark) |
| | | self.foregroundRatingView = self.createRatingView(image: imageLight) |
| | | animationRatingChange() |
| | | self.addSubview(self.backgroundRatingView) |
| | | self.addSubview(self.foregroundRatingView) |
| | | //加入单击手势 |
| | | let tapGesture = UITapGestureRecognizer(target: self, action: #selector(tapRateView)) |
| | | tapGesture.numberOfTapsRequired = 1 |
| | | self.addGestureRecognizer(tapGesture) |
| | | } |
| | | override func layoutSubviews() { |
| | | super.layoutSubviews() |
| | | buildView() |
| | | let animationTimeInterval = self.canAnimation ? self.animationTimeInterval : 0 |
| | | //开启动画改变foregroundRatingView可见范围 |
| | | UIView.animate(withDuration: animationTimeInterval, animations: {self.animationRatingChange()}) |
| | | } |
| | | //改变foregroundRatingView可见范围 |
| | | func animationRatingChange(){ |
| | | let realRatingScore = self.rating / self.ratingMax |
| | | self.foregroundRatingView.frame = CGRectMake(0, 0,self.bounds.size.width * realRatingScore, self.bounds.size.height) |
| | | |
| | | } |
| | | //根据图片名,创建一列RatingView |
| | | func createRatingView(image: UIImage) ->UIView{ |
| | | let view = UIView(frame: self.bounds) |
| | | view.clipsToBounds = true |
| | | view.backgroundColor = UIColor.clear |
| | | //开始创建子Item,根据numStars总数 |
| | | for position in 0 ..< numStars{ |
| | | let imageView = UIImageView(image: image) |
| | | imageView.frame = CGRectMake(CGFloat(position) * self.bounds.size.width / CGFloat(numStars), 0, self.bounds.size.width / CGFloat(numStars), self.bounds.size.height) |
| | | imageView.contentMode = UIView.ContentMode.scaleAspectFit |
| | | view.addSubview(imageView) |
| | | } |
| | | return view |
| | | } |
| | | //点击编辑分数后,通过手势的x坐标来设置数值 |
| | | @objc func tapRateView(_ sender: UITapGestureRecognizer){ |
| | | if isIndicator {return}//如果是指示器,就不能交互 |
| | | let tapPoint = sender.location(in: self) |
| | | let offset = tapPoint.x |
| | | //通过x坐标判断分数 |
| | | let realRatingScore = offset / (self.bounds.size.width / ratingMax); |
| | | self.rating = self.incomplete ? realRatingScore : round(realRatingScore) |
| | | |
| | | } |
| | | } |
| | | protocol RatingBarDelegate{ |
| | | func ratingDidChange(ratingBar: RatingBar,rating: CGFloat) |
| | | } |
| | |
| | | |
| | | var strTitle:String{ |
| | | switch self { |
| | | case .allUser:return "全部用户参与" |
| | | case .vip:return "仅限年度会员参与" |
| | | case .student:return "仅限运动营成员参与" |
| | | case .allUser:return "全部用户" |
| | | case .vip:return "仅限年度会员" |
| | | case .student:return "仅限运动营成员" |
| | | } |
| | | } |
| | | } |
| | |
| | | |
| | | |
| | | enum CardType:Int,HandyJSONEnum{ |
| | | case none = 0 |
| | | case subCard = 1 |
| | | case monthCard = 2 |
| | | case quarterCard = 3 |
| | |
| | | case .monthCard:return "月卡" |
| | | case .quarterCard:return "季卡" |
| | | case .yearCard:return "年卡" |
| | | default:return "" |
| | | } |
| | | } |
| | | } |
| | |
| | | |
| | | struct CityProfileModel:HandyJSON { |
| | | var id = 0 |
| | | var code = "" |
| | | var code = 0 |
| | | var name = "" |
| | | } |
| | | |
| | |
| | | |
| | | } |
| | | |
| | | struct SiteDetailDateTimeModel:HandyJSON,Equatable{ |
| | | class SiteDetailDateTimeModel:HandyJSON,Equatable{ |
| | | var selectable = 0 //是否可选(0=否,1=是) |
| | | var time = "" |
| | | |
| | | static func ==(lhs: SiteDetailDateTimeModel, rhs: SiteDetailDateTimeModel) -> Bool { |
| | | return (lhs.selectable == rhs.selectable) && (lhs.time == rhs.time) |
| | | } |
| | | |
| | | required init() {} |
| | | } |
| | | |
| | | |
| | |
| | | var cash: Double = 0 |
| | | var startTime: String = "" |
| | | var useStatus: UseStateType = .used |
| | | var cardType:CardType = .none |
| | | var userId:Int = 0 |
| | | var sid = [Int]() |
| | | var rid = [Int]() |
| | | |
| | | } |
| | | |
| | | struct RecordsDetailModel:HandyJSON{ |
| | |
| | | var integral = 0 |
| | | var otherId = 0 |
| | | var playCoin = 0 |
| | | var video = "" |
| | | var intro = "" |
| | | } |
| | | |
| | | struct DoorModel:HandyJSON{ |
| | |
| | | } |
| | | |
| | | struct OpenDoorModel:HandyJSON{ |
| | | var sid:Int? //场馆ID,全国通用值为0 |
| | | var sid = [Int]() //场馆ID,全国通用值为0 |
| | | var rid = [Int]() //区域ID,单场馆和多场馆都可以放入,全国可以为空数组 |
| | | var uid:Int? //用户ID |
| | | var time = [OpenDoorTimeModel]() //时间 |
| | |
| | | //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" |
| | | let Game_Url = "https://port.daowepark.com" |
| | | #endif |
| | | |
| | |
| | | .append(key: "siteId", value: spaceId) |
| | | .append(key: "storeId", value: storeId) |
| | | return NetworkRequest.request(params: params, method: .post, progress: false) |
| | | } |
| | | |
| | | class func game_intro()->Observable<BaseResponse<String>>{ |
| | | let params = ParamsAppender.build(url: All_Url) |
| | | .interface(url: "/other/api/game/getIntro") |
| | | return NetworkRequest.request(params: params, method: .post, progress: true) |
| | | } |
| | | |
| | | //支付游戏 |
| | |
| | | return NetworkRequest.request(params: params, method: .post, progress: false) |
| | | } |
| | | |
| | | class func queryStoreList()->Observable<BaseResponse<[NormalSimpleModel]>>{ |
| | | class func queryStoreList(cityCode:Int? = nil)->Observable<BaseResponse<[NormalSimpleModel]>>{ |
| | | let params = ParamsAppender.build(url: All_Url) |
| | | .interface(url: "/other/base/store/queryStoreLists") |
| | | .append(key: "lat", value: locationTool.currentLocation?.coordinate.latitude.string) |
| | | .append(key: "lon", value: locationTool.currentLocation?.coordinate.longitude.string) |
| | | .append(key: "cityCode", value: cityCode) |
| | | return NetworkRequest.request(params: params, method: .post, progress: false) |
| | | } |
| | | |
| | |
| | | return NetworkRequest.request(params: params, method: .post, progress: false) |
| | | } |
| | | |
| | | static func lessonDetails(lessonId:Int,stuId:Int)->Observable<BaseResponse<SimpleModel>>{ |
| | | let params = ParamsAppender.build(url: All_Url) |
| | | .interface(url: "/account/api/startCource/lessonDetails") |
| | | .append(key: "stuId", value: stuId) |
| | | .append(key: "lessonId", value: lessonId) |
| | | return NetworkRequest.request(params: params, method: .post, progress: true) |
| | | } |
| | | |
| | | |
| | | /// 上课首页-课程列表 |
| | | static func weeksOfCourseDetails(stuId:Int,time:Date,storeId:Int)->Observable<BaseResponse<WeeklyCourseModel>>{ |
| | |
| | | } |
| | | |
| | | /// 评价门店 |
| | | static func evaluationStore(id:Int,content:String,imgs:String,score:Int)->Observable<BaseResponse<SimpleModel>>{ |
| | | static func evaluationStore(id:Int,content:String,imgs:String,score:Double)->Observable<BaseResponse<SimpleModel>>{ |
| | | let params = ParamsAppender.build(url: All_Url) |
| | | .interface(url: "/other/base/storeEvaluation/saveEvaluation") |
| | | .append(key: "storeId", value: id) |
| | |
| | | } |
| | | |
| | | /// 获取场地列表 |
| | | static func querySiteList(pageNum:Int,pageSize:Int,siteTypeId:Int?,cityCode:String?,storeId:Int?,startTime:String?,endTime:String?,search:String?)->Observable<BaseResponse<[SiteItemModel]>>{ |
| | | static func querySiteList(pageNum:Int,pageSize:Int,siteTypeId:Int?,cityCode:Int?,storeId:Int?,startTime:String?,endTime:String?,search:String?)->Observable<BaseResponse<[SiteItemModel]>>{ |
| | | let params = ParamsAppender.build(url: All_Url) |
| | | .interface(url: "/other/base/site/querySiteList") |
| | | .append(key: "pageNum", value: pageNum) |
| | |
| | | extension Services{ |
| | | |
| | | /// 获取赛事列表 |
| | | class func queryCompetitionList(cityCode:String?,content:String?,heat:SortType?,registerCondition:Int?)->Observable<BaseResponse<[ActivityListModel]>>{ |
| | | class func queryCompetitionList(cityCode:Int?,content:String?,heat:SortType?,registerCondition:Int?)->Observable<BaseResponse<[ActivityListModel]>>{ |
| | | let params = ParamsAppender.build(url: All_Url) |
| | | .interface(url: "/competition/base/competition/queryCompetitionList") |
| | | .append(key: "cityCode", value: cityCode) |
| | |
| | | } |
| | | |
| | | /// 获取省市数据 |
| | | class func queryProvinceAndCity(pcode:String? = nil)->Observable<BaseResponse<[CityProfileModel]>>{ |
| | | class func queryProvinceAndCity(pcode:Int? = nil)->Observable<BaseResponse<[CityProfileModel]>>{ |
| | | let params = ParamsAppender.build(url: All_Url) |
| | | .interface(url: "/other/base/store/queryProvinceAndCity") |
| | | .append(key: "pcode", value: pcode) |
| | |
| | | } |
| | | |
| | | /// 获取城市code获取门店 |
| | | class func queryStoreAtCity(cityCode:String)->Observable<BaseResponse<[CityProfileModel]>>{ |
| | | class func queryStoreAtCity(cityCode:Int)->Observable<BaseResponse<[CityProfileModel]>>{ |
| | | let params = ParamsAppender.build(url: All_Url) |
| | | .interface(url: "/other/base/store/queryStoreByCityCode") |
| | | .append(key: "cityCode", value: cityCode) |
| | |
| | | <?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="22154" 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="22130"/> |
| | | <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"/> |
| | |
| | | <objects> |
| | | <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/> |
| | | <placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/> |
| | | <tableViewCell contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" reuseIdentifier="_ActivityInfoTCell" rowHeight="185" id="KGk-i7-Jjw" customClass="ActivityInfoTCell" customModule="WanPai" customModuleProvider="target"> |
| | | <rect key="frame" x="0.0" y="0.0" width="489" height="185"/> |
| | | <tableViewCell contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" reuseIdentifier="_ActivityInfoTCell" rowHeight="169" id="KGk-i7-Jjw" customClass="ActivityInfoTCell" customModule="WanPai" customModuleProvider="target"> |
| | | <rect key="frame" x="0.0" y="0.0" width="489" height="169"/> |
| | | <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/> |
| | | <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" ambiguous="YES" tableViewCell="KGk-i7-Jjw" id="H2p-sc-9uM"> |
| | | <rect key="frame" x="0.0" y="0.0" width="489" height="185"/> |
| | | <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="KGk-i7-Jjw" id="H2p-sc-9uM"> |
| | | <rect key="frame" x="0.0" y="0.0" width="489" height="169"/> |
| | | <autoresizingMask key="autoresizingMask"/> |
| | | <subviews> |
| | | <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="lCa-en-qcl"> |
| | |
| | | </userDefinedRuntimeAttribute> |
| | | </userDefinedRuntimeAttributes> |
| | | </imageView> |
| | | <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="rom-jP-xgQ"> |
| | | <rect key="frame" x="131" y="21" width="42.666666666666657" height="22"/> |
| | | <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="750" verticalHuggingPriority="251" horizontalCompressionResistancePriority="250" text="--" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="3" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="rom-jP-xgQ"> |
| | | <rect key="frame" x="130.99999999999997" y="21" width="303.33333333333326" height="22"/> |
| | | <constraints> |
| | | <constraint firstAttribute="height" constant="22" id="AOB-7s-rct"/> |
| | | <constraint firstAttribute="height" relation="greaterThanOrEqual" constant="22" id="AOB-7s-rct"/> |
| | | </constraints> |
| | | <fontDescription key="fontDescription" type="system" weight="medium" pointSize="17"/> |
| | | <nil key="textColor"/> |
| | |
| | | <color key="textColor" red="0.99607843137254903" green="0.47843137254901957" blue="0.011764705882352941" 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" numberOfLines="2" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="6i5-yn-dMM"> |
| | | <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="--" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="5" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="6i5-yn-dMM"> |
| | | <rect key="frame" x="131" y="69" width="347" height="13.333333333333329"/> |
| | | <fontDescription key="fontDescription" type="system" pointSize="11"/> |
| | | <color key="textColor" red="0.23921568627450979" green="0.24313725490196078" blue="0.27058823529411763" alpha="0.69999999999999996" colorSpace="custom" customColorSpace="sRGB"/> |
| | |
| | | <nil key="highlightedColor"/> |
| | | </label> |
| | | <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="kwa-Xn-64L"> |
| | | <rect key="frame" x="14" y="183" width="461" height="0.33333333333334281"/> |
| | | <rect key="frame" x="14" y="167.33333333333334" width="461" height="0.33333333333334281"/> |
| | | <color key="backgroundColor" red="0.59215686274509804" green="0.59215686274509804" blue="0.59215686274509804" alpha="0.22" colorSpace="custom" customColorSpace="sRGB"/> |
| | | <constraints> |
| | | <constraint firstAttribute="height" constant="0.40000000000000002" id="bBX-ct-nwS"/> |
| | | </constraints> |
| | | </view> |
| | | <button opaque="NO" userInteractionEnabled="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="sdT-Zi-Mxo"> |
| | | <rect key="frame" x="390" y="130" width="86" height="31"/> |
| | | <rect key="frame" x="390" y="111.33333333333333" width="86" height="30.999999999999986"/> |
| | | <color key="backgroundColor" name="FE6E0D"/> |
| | | <constraints> |
| | | <constraint firstAttribute="height" constant="31" id="FIY-uM-c4A"/> |
| | |
| | | </userDefinedRuntimeAttribute> |
| | | </userDefinedRuntimeAttributes> |
| | | </button> |
| | | <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="0" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="dC6-S9-Yzg"> |
| | | <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="1000" verticalHuggingPriority="251" horizontalCompressionResistancePriority="1000" text="0" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="dC6-S9-Yzg"> |
| | | <rect key="frame" x="465.33333333333331" y="21.666666666666671" width="11.666666666666686" height="21"/> |
| | | <fontDescription key="fontDescription" type="system" weight="semibold" pointSize="18"/> |
| | | <color key="textColor" red="0.89411764705882346" green="0.10980392156862745" blue="0.10980392156862745" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> |
| | | <nil key="highlightedColor"/> |
| | | </label> |
| | | <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="icon_hot" translatesAutoresizingMaskIntoConstraints="NO" id="aDx-6g-Fwl"> |
| | | <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" verticalHuggingPriority="251" horizontalCompressionResistancePriority="1000" image="icon_hot" translatesAutoresizingMaskIntoConstraints="NO" id="aDx-6g-Fwl"> |
| | | <rect key="frame" x="445.33333333333331" y="22.666666666666671" width="15" height="19"/> |
| | | <constraints> |
| | | <constraint firstAttribute="height" constant="19" id="Qxp-GM-F7m"/> |
| | |
| | | </label> |
| | | </subviews> |
| | | <constraints> |
| | | <constraint firstItem="kwa-Xn-64L" firstAttribute="top" secondItem="sdT-Zi-Mxo" secondAttribute="bottom" constant="25" id="2OB-8g-bsb"/> |
| | | <constraint firstItem="dC6-S9-Yzg" firstAttribute="leading" secondItem="aDx-6g-Fwl" secondAttribute="trailing" constant="5" id="49l-cA-GUT"/> |
| | | <constraint firstItem="lCa-en-qcl" firstAttribute="top" secondItem="H2p-sc-9uM" secondAttribute="top" constant="21" id="4g6-br-OY3"/> |
| | | <constraint firstItem="6i5-yn-dMM" firstAttribute="top" secondItem="Pj9-n0-bRl" secondAttribute="bottom" constant="4" id="7ej-b0-vBO"/> |
| | | <constraint firstItem="rom-jP-xgQ" firstAttribute="leading" secondItem="lCa-en-qcl" secondAttribute="trailing" constant="11" id="88c-FP-Ox9"/> |
| | | <constraint firstItem="ymb-ff-rLX" firstAttribute="top" secondItem="9O5-p4-WaJ" secondAttribute="bottom" constant="4" id="93j-rN-wOR"/> |
| | | <constraint firstItem="aDx-6g-Fwl" firstAttribute="leading" secondItem="rom-jP-xgQ" secondAttribute="trailing" constant="11" id="971-Mu-sgq"/> |
| | | <constraint firstAttribute="trailing" secondItem="kwa-Xn-64L" secondAttribute="trailing" constant="14" id="9hY-ie-aoz"/> |
| | | <constraint firstItem="kwa-Xn-64L" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" constant="14" id="FW7-kP-lHi"/> |
| | | <constraint firstAttribute="trailingMargin" secondItem="9O5-p4-WaJ" secondAttribute="trailing" constant="11" id="LU8-oF-vfP"/> |
| | | <constraint firstItem="dC6-S9-Yzg" firstAttribute="centerY" secondItem="rom-jP-xgQ" secondAttribute="centerY" id="OIo-0u-Hwn"/> |
| | | <constraint firstItem="Pj9-n0-bRl" firstAttribute="top" secondItem="rom-jP-xgQ" secondAttribute="bottom" constant="5" id="QWi-tj-XVf"/> |
| | | <constraint firstAttribute="trailing" secondItem="dC6-S9-Yzg" secondAttribute="trailing" constant="12" id="SLq-Dk-htR"/> |
| | | <constraint firstAttribute="bottom" secondItem="kwa-Xn-64L" secondAttribute="bottom" id="YVS-p4-IkB"/> |
| | | <constraint firstAttribute="bottom" secondItem="kwa-Xn-64L" secondAttribute="bottom" priority="250" id="YVS-p4-IkB"/> |
| | | <constraint firstItem="sdT-Zi-Mxo" firstAttribute="top" secondItem="9O5-p4-WaJ" secondAttribute="bottom" constant="8" id="Ytl-BS-4pD"/> |
| | | <constraint firstAttribute="trailing" secondItem="6i5-yn-dMM" secondAttribute="trailing" constant="11" id="ZnT-0m-CmR"/> |
| | | <constraint firstAttribute="trailing" secondItem="sdT-Zi-Mxo" secondAttribute="trailing" constant="13" id="bHK-4G-2Fj"/> |
| | | <constraint firstItem="kwa-Xn-64L" firstAttribute="top" secondItem="lCa-en-qcl" secondAttribute="bottom" constant="22" id="eca-E7-5au"/> |
| | | <constraint firstItem="lCa-en-qcl" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" constant="15" id="grf-S5-jdp"/> |
| | | <constraint firstItem="dDz-PN-B0q" firstAttribute="top" secondItem="lCa-en-qcl" secondAttribute="top" id="iGi-57-VJl"/> |
| | | <constraint firstItem="Pj9-n0-bRl" firstAttribute="leading" secondItem="rom-jP-xgQ" secondAttribute="leading" id="kEB-9C-sEM"/> |
| | |
| | | <constraint firstItem="9O5-p4-WaJ" firstAttribute="leading" secondItem="6i5-yn-dMM" secondAttribute="leading" id="lAg-Y0-FLs"/> |
| | | <constraint firstItem="dDz-PN-B0q" firstAttribute="leading" secondItem="lCa-en-qcl" secondAttribute="leading" id="nQH-fU-x7b"/> |
| | | <constraint firstItem="9O5-p4-WaJ" firstAttribute="top" secondItem="6i5-yn-dMM" secondAttribute="bottom" constant="4" id="rNR-EU-0EI"/> |
| | | <constraint firstItem="sdT-Zi-Mxo" firstAttribute="bottom" secondItem="lCa-en-qcl" secondAttribute="bottom" id="tVB-6o-iso"/> |
| | | <constraint firstItem="6i5-yn-dMM" firstAttribute="leading" secondItem="rom-jP-xgQ" secondAttribute="leading" id="wv7-BV-JSf"/> |
| | | <constraint firstItem="rom-jP-xgQ" firstAttribute="top" secondItem="lCa-en-qcl" secondAttribute="top" id="xDW-fU-NYJ"/> |
| | | </constraints> |
| | |
| | | <outlet property="label_state" destination="dDz-PN-B0q" id="MxD-ut-Nvh"/> |
| | | <outlet property="label_title" destination="rom-jP-xgQ" id="9sb-b0-rvH"/> |
| | | </connections> |
| | | <point key="canvasLocation" x="168.70229007633588" y="70.070422535211264"/> |
| | | <point key="canvasLocation" x="168.70229007633588" y="63.028169014084511"/> |
| | | </tableViewCell> |
| | | </objects> |
| | | <resources> |
| | |
| | | <color red="0.99199998378753662" green="0.53299999237060547" blue="0.0080000003799796104" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> |
| | | </namedColor> |
| | | <systemColor name="systemGray6Color"> |
| | | <color red="0.94901960784313721" green="0.94901960784313721" blue="0.96862745098039216" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> |
| | | <color red="0.94901960780000005" green="0.94901960780000005" blue="0.96862745100000003" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> |
| | | </systemColor> |
| | | </resources> |
| | | </document> |
| | |
| | | |
| | | class ActivityListViewModel:RefreshModel<ActivityListModel>{ |
| | | |
| | | var cityCode = BehaviorRelay<String?>(value:nil) |
| | | var cityCode = BehaviorRelay<Int?>(value:nil) |
| | | var content = BehaviorRelay<String>(value: "") |
| | | var heat = BehaviorRelay<SortType?>(value:nil) |
| | | var registerCondition = BehaviorRelay<RegisterAcitivyType?>(value:nil) |
| | |
| | | hiddenMenu() |
| | | sender.isSelected = true |
| | | var items = Array<NormalSimpleModel>() |
| | | items.append(NormalSimpleModel(id: 1, name: "全部用户")) |
| | | items.append(NormalSimpleModel(id: 1, name: "全部用户参与")) |
| | | items.append(NormalSimpleModel(id: 2, name: "仅限年度会员参与")) |
| | | items.append(NormalSimpleModel(id: 3, name: "仅限运动营成员参与")) |
| | | courseSubTypeView = CourseSubTypeView.show(inView: self.view, afterView: btn_joinCondition, items: items,selectModel: selectSignupConditionModel) { [weak self] m in |
| | |
| | | <?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="22154" 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="22130"/> |
| | | <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"/> |
| | |
| | | <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="icon_search" translatesAutoresizingMaskIntoConstraints="NO" id="EWk-iy-k27"> |
| | | <rect key="frame" x="4" y="10.666666666666671" width="17" height="17"/> |
| | | </imageView> |
| | | <textField opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="248" contentHorizontalAlignment="left" contentVerticalAlignment="center" placeholder="输入课程名称,门店名称" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="EI5-wd-5bK" customClass="QMUITextField"> |
| | | <textField opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="248" contentHorizontalAlignment="left" contentVerticalAlignment="center" placeholder="输入赛事名称" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="EI5-wd-5bK" customClass="QMUITextField"> |
| | | <rect key="frame" x="25" y="0.0" width="291" height="38"/> |
| | | <fontDescription key="fontDescription" type="system" weight="medium" pointSize="14"/> |
| | | <textInputTraits key="textInputTraits" returnKeyType="search"/> |
| | |
| | | </connections> |
| | | </button> |
| | | <stackView opaque="NO" contentMode="scaleToFill" distribution="equalSpacing" spacing="34" translatesAutoresizingMaskIntoConstraints="NO" id="C5c-IL-ihi"> |
| | | <rect key="frame" x="14" y="53" width="300" height="52"/> |
| | | <rect key="frame" x="14" y="53" width="268" height="52"/> |
| | | <subviews> |
| | | <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Rto-cM-8TA" customClass="QMUIButton"> |
| | | <rect key="frame" x="0.0" y="0.0" width="86" height="52"/> |
| | | <rect key="frame" x="0.0" y="0.0" width="79" height="52"/> |
| | | <fontDescription key="fontDescription" type="system" weight="medium" pointSize="16"/> |
| | | <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/> |
| | | <state key="normal" title="举办城市" image="icon_down_arrow"> |
| | |
| | | </connections> |
| | | </button> |
| | | <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="IUE-I2-25f" customClass="QMUIButton"> |
| | | <rect key="frame" x="120" y="0.0" width="86" height="52"/> |
| | | <rect key="frame" x="113" y="0.0" width="79" height="52"/> |
| | | <fontDescription key="fontDescription" type="system" weight="medium" pointSize="16"/> |
| | | <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/> |
| | | <state key="normal" title="报名条件" image="icon_down_arrow"> |
| | |
| | | </connections> |
| | | </button> |
| | | <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="93Z-rq-u2S" customClass="QMUIButton"> |
| | | <rect key="frame" x="240" y="0.0" width="60" height="52"/> |
| | | <rect key="frame" x="226" y="0.0" width="42" height="52"/> |
| | | <fontDescription key="fontDescription" type="system" weight="medium" pointSize="16"/> |
| | | <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/> |
| | | <state key="normal" title="热度" image="icon_sort_normal"> |
| | |
| | | </userDefinedRuntimeAttributes> |
| | | </view> |
| | | <tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" style="plain" separatorStyle="default" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="-1" estimatedSectionHeaderHeight="-1" sectionFooterHeight="-1" estimatedSectionFooterHeight="-1" translatesAutoresizingMaskIntoConstraints="NO" id="oPv-XK-by8" customClass="BaseTableView" customModule="WanPai" customModuleProvider="target"> |
| | | <rect key="frame" x="0.0" y="174" width="393" height="644"/> |
| | | <rect key="frame" x="0.0" y="174" width="393" height="586"/> |
| | | <color key="backgroundColor" systemColor="systemBackgroundColor"/> |
| | | </tableView> |
| | | <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="SAi-a4-ThB"> |
| | |
| | | <constraint firstItem="oPv-XK-by8" firstAttribute="leading" secondItem="fnl-2z-Ty3" secondAttribute="leading" id="LVH-gv-S08"/> |
| | | <constraint firstItem="oPv-XK-by8" firstAttribute="top" secondItem="lxS-3O-LKA" secondAttribute="bottom" constant="10" id="LhC-Y3-Mp6"/> |
| | | <constraint firstItem="SAi-a4-ThB" firstAttribute="leading" secondItem="fnl-2z-Ty3" secondAttribute="leading" id="S11-lN-ZCo"/> |
| | | <constraint firstItem="SAi-a4-ThB" firstAttribute="top" secondItem="oPv-XK-by8" secondAttribute="bottom" constant="10" id="W15-SB-E9l"/> |
| | | <constraint firstItem="lxS-3O-LKA" firstAttribute="leading" secondItem="fnl-2z-Ty3" secondAttribute="leading" id="hfP-l9-atC"/> |
| | | <constraint firstItem="fnl-2z-Ty3" firstAttribute="bottom" secondItem="oPv-XK-by8" secondAttribute="bottom" id="vsz-9f-M98"/> |
| | | <constraint firstItem="fnl-2z-Ty3" firstAttribute="trailing" secondItem="SAi-a4-ThB" secondAttribute="trailing" id="wtG-nE-Ka9"/> |
| | | <constraint firstAttribute="trailing" secondItem="lxS-3O-LKA" secondAttribute="trailing" id="yq3-DX-WWU"/> |
| | | </constraints> |
| | | <point key="canvasLocation" x="138" y="21"/> |
| | | <point key="canvasLocation" x="136.64122137404578" y="20.422535211267608"/> |
| | | </view> |
| | | </objects> |
| | | <resources> |
| | | <image name="icon_down_arrow" width="20" height="14"/> |
| | | <image name="icon_down_arrow_s" width="20" height="14"/> |
| | | <image name="icon_down_arrow" width="13" height="8"/> |
| | | <image name="icon_down_arrow_s" width="13" height="8"/> |
| | | <image name="icon_search" width="17" height="17"/> |
| | | <image name="icon_sort_normal" width="27" height="30"/> |
| | | <image name="icon_sort_normal" width="9" height="12"/> |
| | | <namedColor name="FE6E0D"> |
| | | <color red="0.99199998378753662" green="0.53299999237060547" blue="0.0080000003799796104" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> |
| | | </namedColor> |
| | |
| | | didSet{ |
| | | label_title.text = weeklyCourseItemModel.name |
| | | label_time.text = weeklyCourseItemModel.time.joined(separator: "|") |
| | | label_info.text = weeklyCourseItemModel.intro |
| | | label_info.text = String(format: "%@/会员扣%ld课时", weeklyCourseItemModel.money.currency(),weeklyCourseItemModel.num) |
| | | |
| | | if weeklyCourseItemModel.type == 1{ |
| | | btn_handle.setTitle("请假", for: .normal) |
| | |
| | | let endTime = Date.jq_StringToTimeInterval(String(format: "%@ %@", date!,b1[index]),"yyyy.MM.dd HH:mm:ss") |
| | | times.append(OpenDoorTimeModel(start_time: startTime, end_time: endTime)) |
| | | } |
| | | let openDoorModel = OpenDoorModel(sid: studentAppointModel.siteId, rid: studentAppointModel.ids , uid: studentAppointModel.userId, time: times, type: 2) |
| | | let openDoorModel = OpenDoorModel(sid: [studentAppointModel.siteId], rid: studentAppointModel.ids , uid: studentAppointModel.userId, time: times, type: 2) |
| | | if let modelStr = openDoorModel.toJSONString(){ |
| | | QRPreview.show(modelStr) |
| | | } |
| | |
| | | title = "添加运动营成员" |
| | | if studentInfo != nil{ |
| | | title = "编辑运动营成员" |
| | | tf_name.placeholder = "请输入运动营成员姓名" |
| | | tf_height.placeholder = "请输入运动营成员身高" |
| | | tf_weight.placeholder = "请输入运动营成员体重" |
| | | tf_phone.placeholder = "请输入运动营成员联系方式" |
| | | tf_idCard.placeholder = "请输入运动营成员身份证号" |
| | | tf_name.text = studentInfo!.stuName |
| | | tf_idCard.text = studentInfo!.idCard |
| | | tf_height.text = String(format: "%.0lf", studentInfo!.stuHeight) |
| | |
| | | } |
| | | }else{ |
| | | title = "添加人员" |
| | | tf_name.placeholder = "请输入人员姓名" |
| | | tf_height.placeholder = "请输入人员身高" |
| | | tf_weight.placeholder = "请输入人员体重" |
| | | tf_phone.placeholder = "请输入人员联系方式" |
| | | tf_idCard.placeholder = "请输入人员身份证号" |
| | | } |
| | | |
| | | let idCardView = IDCardView() |
| | |
| | | label_originPrice.alpha = 0 |
| | | label_vipPrice.alpha = 0 |
| | | view_listen.alpha = 0 |
| | | view_listen.isHidden = true |
| | | label_price.isHidden = (m.list.first?.paymentPrice ?? 0) == 0 |
| | | } |
| | | |
| | |
| | | <color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> |
| | | <nil key="highlightedColor"/> |
| | | </label> |
| | | <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="rpx-zm-bba"> |
| | | <button opaque="NO" userInteractionEnabled="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="rpx-zm-bba"> |
| | | <rect key="frame" x="37.333333333333343" y="27.333333333333314" width="56.666666666666657" 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="titleColor" red="0.9882352941176471" green="0.94901960784313721" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> |
| | | </state> |
| | | <connections> |
| | | <action selector="detailAction:" destination="-1" eventType="touchUpInside" id="8x0-Dp-LPp"/> |
| | | </connections> |
| | | </button> |
| | | </subviews> |
| | | <constraints> |
| | |
| | | <color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> |
| | | <nil key="highlightedColor"/> |
| | | </label> |
| | | <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="4FR-g7-qm9"> |
| | | <button opaque="NO" userInteractionEnabled="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="4FR-g7-qm9"> |
| | | <rect key="frame" x="31" y="27.333333333333314" width="69" 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="titleColor" red="0.98823529409999999" green="0.94901960780000005" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> |
| | | </state> |
| | | <connections> |
| | | <action selector="detailAction:" destination="-1" eventType="touchUpInside" id="udl-hr-etv"/> |
| | | </connections> |
| | | </button> |
| | | </subviews> |
| | | <constraints> |
| | |
| | | <color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> |
| | | <nil key="highlightedColor"/> |
| | | </label> |
| | | <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="eg1-Jb-LxV"> |
| | | <button opaque="NO" userInteractionEnabled="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="eg1-Jb-LxV"> |
| | | <rect key="frame" x="31" y="27.333333333333314" width="69" 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="titleColor" red="0.98823529409999999" green="0.94901960780000005" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> |
| | | </state> |
| | | <connections> |
| | | <action selector="detailAction:" destination="-1" eventType="touchUpInside" id="kWq-Fd-bYv"/> |
| | | </connections> |
| | | </button> |
| | | </subviews> |
| | | <constraints> |
| | |
| | | </view> |
| | | </subviews> |
| | | </stackView> |
| | | <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="640-q8-Cdv"> |
| | | <rect key="frame" x="0.0" y="0.0" width="393" height="61"/> |
| | | <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/> |
| | | <connections> |
| | | <action selector="detailAction:" destination="-1" eventType="touchUpInside" id="szP-fb-sh5"/> |
| | | </connections> |
| | | </button> |
| | | </subviews> |
| | | <color key="backgroundColor" name="FE6E0D"/> |
| | | <constraints> |
| | | <constraint firstAttribute="height" constant="61" id="0pN-vy-q6R"/> |
| | | <constraint firstAttribute="trailing" secondItem="8jh-Rx-lWh" secondAttribute="trailing" id="3vg-YM-95J"/> |
| | | <constraint firstAttribute="bottom" secondItem="8jh-Rx-lWh" secondAttribute="bottom" id="5Gr-nb-ZpF"/> |
| | | <constraint firstItem="640-q8-Cdv" firstAttribute="leading" secondItem="wDl-8F-uHt" secondAttribute="leading" id="EcQ-m1-ofc"/> |
| | | <constraint firstAttribute="trailing" secondItem="640-q8-Cdv" secondAttribute="trailing" id="Smf-EY-i9E"/> |
| | | <constraint firstItem="640-q8-Cdv" firstAttribute="top" secondItem="wDl-8F-uHt" secondAttribute="top" id="aSI-vi-oef"/> |
| | | <constraint firstItem="8jh-Rx-lWh" firstAttribute="top" secondItem="wDl-8F-uHt" secondAttribute="top" id="ljX-c0-ETU"/> |
| | | <constraint firstAttribute="bottom" secondItem="640-q8-Cdv" secondAttribute="bottom" id="qDO-Op-ID4"/> |
| | | <constraint firstItem="8jh-Rx-lWh" firstAttribute="leading" secondItem="wDl-8F-uHt" secondAttribute="leading" id="usj-W6-dwc"/> |
| | | </constraints> |
| | | </view> |
| | |
| | | let vc = GamesDataSourceVC() |
| | | push(vc: vc) |
| | | } |
| | | |
| | | @IBAction func introAction(_ sender: UIButton) { |
| | | Services.game_intro().subscribe(onNext: {data in |
| | | let vc = CommonWebVC(type: .other, content: data.data) |
| | | vc.title = "步骤说明" |
| | | self.push(vc: vc) |
| | | |
| | | }) { error in |
| | | |
| | | }.disposed(by: disposeBag) |
| | | |
| | | } |
| | | |
| | | } |
| | | |
| | |
| | | <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="22130"/> |
| | | <capability name="Named colors" minToolsVersion="9.0"/> |
| | | <capability name="Safe area layout guides" minToolsVersion="9.0"/> |
| | | <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/> |
| | |
| | | <state key="normal" title="步骤说明"> |
| | | <color key="titleColor" red="0.0" green="0.0" blue="0.0" alpha="0.80000000000000004" colorSpace="custom" customColorSpace="sRGB"/> |
| | | </state> |
| | | <connections> |
| | | <action selector="introAction:" destination="-1" eventType="touchUpInside" id="hv2-Fc-4kE"/> |
| | | </connections> |
| | | </button> |
| | | <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="qbM-g9-Y9Z"> |
| | | <rect key="frame" x="153.66666666666666" y="509" width="58" height="29"/> |
| | |
| | | <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="游戏名称" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Kan-n5-x6Y"> |
| | | <rect key="frame" x="0.0" y="1.333333333333333" width="49.333333333333336" height="14.333333333333336"/> |
| | | <fontDescription key="fontDescription" type="system" weight="medium" pointSize="12"/> |
| | | <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="0.80000000000000004" colorSpace="custom" customColorSpace="sRGB"/> |
| | | <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="0.59999999999999998" 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="JC0-fu-Ikf"> |
| | |
| | | <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="游戏时间" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Urs-ko-JX5"> |
| | | <rect key="frame" x="0.0" y="1.3333333333333366" width="49.333333333333336" height="14.333333333333336"/> |
| | | <fontDescription key="fontDescription" type="system" weight="medium" pointSize="12"/> |
| | | <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="0.80000000000000004" colorSpace="custom" customColorSpace="sRGB"/> |
| | | <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="0.59999999999999998" 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="JNb-qy-xgC"> |
| | |
| | | <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="得分" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="R7d-nP-2Sb"> |
| | | <rect key="frame" x="0.0" y="1.3333333333333295" width="24.666666666666668" height="14.333333333333336"/> |
| | | <fontDescription key="fontDescription" type="system" weight="medium" pointSize="12"/> |
| | | <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="0.80000000000000004" colorSpace="custom" customColorSpace="sRGB"/> |
| | | <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="0.59999999999999998" 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="aQt-6B-IPi"> |
| | |
| | | import UIKit |
| | | import RxSwift |
| | | import RxRelay |
| | | import JQTools |
| | | |
| | | class GamesTCell: UITableViewCell { |
| | | |
| | |
| | | } |
| | | |
| | | @IBAction func intruduceAction(_ sender: UIButton) { |
| | | GamesIntruduceView.show() |
| | | GamesIntruduceView.show(url: gameListModel.video, content: gameListModel.intro) |
| | | } |
| | | |
| | | @IBAction func launchGameAction(_ sender: UIButton) { |
| | |
| | | case .aliPay: |
| | | YYPaymentManager.shared.sendPaymentRequest(YYAlipayRequest(orderString: data.data?.orderString ?? "")) { result in |
| | | switch result { |
| | | case .success:alertSuccess(msg: "支付成功") |
| | | case .success: |
| | | let vc = PaymentResultVC(result: .success, objType: .games) |
| | | vc.modalPresentationStyle = .fullScreen |
| | | JQ_currentViewController().present(vc, animated: true) |
| | | case .cancel:alert(msg: "支付已取消") |
| | | case .failure(let error):alert(msg: error.localizedDescription) |
| | | case .failure(let error): |
| | | |
| | | alert(msg: error.localizedDescription) |
| | | } |
| | | } |
| | | default:alert(msg: "启动成功") |
| | | default: |
| | | let vc = PaymentResultVC(result: .success, objType: .games) |
| | | vc.modalPresentationStyle = .fullScreen |
| | | JQ_currentViewController().present(vc, animated: true) |
| | | } |
| | | }else{ |
| | | alert(msg: data.msg) |
| | | let vc = PaymentResultVC(result: .fail(data.msg), objType: .games) |
| | | vc.modalPresentationStyle = .fullScreen |
| | | JQ_currentViewController().present(vc, animated: true) |
| | | } |
| | | }) { error in |
| | | alert(msg: error.localizedDescription) |
| | | if let er = error as? NetworkRequest.NetRequestError{ |
| | | switch er { |
| | | case .Other(_,let string): |
| | | let vc = PaymentResultVC(result: .fail(string), objType: .games) |
| | | vc.modalPresentationStyle = .fullScreen |
| | | JQ_currentViewController().present(vc, animated: true) |
| | | default: |
| | | let vc = PaymentResultVC(result: .fail("支付失败"), objType: .games) |
| | | vc.modalPresentationStyle = .fullScreen |
| | | JQ_currentViewController().present(vc, animated: true) |
| | | } |
| | | } |
| | | }.disposed(by: weakSelf.disposeBag) |
| | | } |
| | | } |
| | |
| | | pageMenu.setTrackerHeight(3, cornerRadius: 1.5) |
| | | pageMenu.tracker.backgroundColor = Def_ThemeColor |
| | | pageMenu.trackerFollowingMode = .always |
| | | pageMenu.contentInset = UIEdgeInsets(top: 0, left: 14, bottom: 0, right: 14) |
| | | pageMenu.contentInset = UIEdgeInsets(top: 0, left: 0, bottom: 0, right: 0) |
| | | |
| | | // 分割线 |
| | | pageMenu.dividingLine.backgroundColor = .clear |
| | |
| | | // item |
| | | pageMenu.spacing = 20.0 |
| | | pageMenu.permutationWay = .notScrollEqualWidths |
| | | pageMenu.setItems(["单机游戏","跨城赛","90°准度赛"], selectedItemIndex: 0) |
| | | // pageMenu.setItems(["单机游戏","跨城赛","90°准度赛"], selectedItemIndex: 0) |
| | | pageMenu.setItems(["单机游戏"], selectedItemIndex: 0) |
| | | |
| | | // 字体 |
| | | pageMenu.selectedItemTitleFont = UIFont.systemFont(ofSize: 14, weight: .semibold) |
| | |
| | | pageMenu.tracker.backgroundColor = .clear |
| | | pageMenu.trackerFollowingMode = .always |
| | | pageMenu.contentInset = UIEdgeInsets(top: 0, left: 19, bottom: 0, right: 19) |
| | | pageMenu.setItems(["单机游戏","互联游戏"], selectedItemIndex: 0) |
| | | // pageMenu.setItems(["单机游戏","互联游戏"], selectedItemIndex: 0) |
| | | pageMenu.setItems(["单机游戏"], selectedItemIndex: 0) |
| | | |
| | | // 分割线 |
| | | pageMenu.dividingLine.backgroundColor = .clear |
| | |
| | | |
| | | import UIKit |
| | | import JQTools |
| | | import AVKit |
| | | |
| | | class GamesIntruduceView: UIView,JQNibView{ |
| | | |
| | | @IBOutlet weak var img_profile: UIImageView! |
| | | @IBOutlet weak var label_content: UILabel! |
| | | @IBOutlet weak var view_container: UIView! |
| | | @IBOutlet weak var btn_play: UIButton! |
| | | |
| | | private var videoUrl:String? |
| | | |
| | | override func awakeFromNib() { |
| | | super.awakeFromNib() |
| | |
| | | layoutIfNeeded() |
| | | } |
| | | |
| | | static func show(){ |
| | | static func show(url:String,content:String){ |
| | | let intruduceView = GamesIntruduceView.jq_loadNibView() |
| | | intruduceView.frame = sceneDelegate?.window?.frame ?? .zero |
| | | sceneDelegate?.window?.addSubview(intruduceView) |
| | | intruduceView.label_content.text = content |
| | | |
| | | if url.lowercased().contains("jpg") || url.lowercased().contains("png") || url.lowercased().contains("jpeg"){ |
| | | intruduceView.img_profile.sd_setImage(with: URL(string: url)) |
| | | intruduceView.btn_play.isHidden = true |
| | | }else{ |
| | | intruduceView.btn_play.isHidden = false |
| | | intruduceView.videoUrl = url |
| | | guard !url.isEmpty else {return} |
| | | guard let Url = URL(string: url) else { return } |
| | | DispatchQueue.global(qos: .utility).async { |
| | | do { |
| | | let asset = AVURLAsset.init(url: Url) |
| | | let gen = AVAssetImageGenerator.init(asset: asset) |
| | | gen.appliesPreferredTrackTransform = true |
| | | let time = CMTimeMakeWithSeconds(0.0, preferredTimescale: 1) |
| | | var actualTime : CMTime = CMTimeMakeWithSeconds(0, preferredTimescale: 0) |
| | | let image = try gen.copyCGImage(at: time, actualTime: &actualTime) |
| | | |
| | | DispatchQueue.main.async { |
| | | intruduceView.img_profile.image = UIImage.init(cgImage: image) |
| | | } |
| | | } catch { |
| | | print("错误") |
| | | } |
| | | } |
| | | } |
| | | |
| | | UIView.animate(withDuration: 0.5) { |
| | | intruduceView.alpha = 1 |
| | |
| | | } |
| | | } |
| | | |
| | | @IBAction func playAction(_ sender: UIButton) { |
| | | let playerVC = AVPlayerViewController() |
| | | playerVC.allowsPictureInPicturePlayback = false |
| | | playerVC.player = AVPlayer(url: URL(string: videoUrl)!) |
| | | playerVC.player?.play() |
| | | |
| | | JQ_currentViewController().present(playerVC, animated: true) |
| | | } |
| | | |
| | | @IBAction func closeAction(_ sender: UIButton) { |
| | | UIView.animate(withDuration: 0.5) { |
| | |
| | | <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="22130"/> |
| | | <capability name="System colors in document resources" minToolsVersion="11.0"/> |
| | | <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/> |
| | | </dependencies> |
| | |
| | | <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="gvg-hN-QSP"> |
| | | <rect key="frame" x="0.0" y="55.000000000000014" width="363" height="181.33333333333337"/> |
| | | <subviews> |
| | | <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="Pjc-TT-Gr7"> |
| | | <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="Pjc-TT-Gr7"> |
| | | <rect key="frame" x="0.0" y="0.0" width="363" height="181.33333333333334"/> |
| | | </imageView> |
| | | <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="RpO-dN-soW"> |
| | | <rect key="frame" x="151.66666666666666" y="60.666666666666686" width="60" height="60"/> |
| | | <constraints> |
| | | <constraint firstAttribute="height" constant="60" id="5IN-KV-uZ0"/> |
| | | <constraint firstAttribute="width" constant="60" id="AJb-Hu-1ik"/> |
| | | </constraints> |
| | | <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/> |
| | | <state key="normal" image="btn_play"/> |
| | | <connections> |
| | | <action selector="playAction:" destination="iN0-l3-epB" eventType="touchUpInside" id="BQn-1T-GsT"/> |
| | | </connections> |
| | | </button> |
| | | </subviews> |
| | | <color key="backgroundColor" systemColor="underPageBackgroundColor"/> |
| | | <constraints> |
| | |
| | | <constraint firstAttribute="bottom" secondItem="Pjc-TT-Gr7" secondAttribute="bottom" id="8aj-ey-XLF"/> |
| | | <constraint firstItem="Pjc-TT-Gr7" firstAttribute="leading" secondItem="gvg-hN-QSP" secondAttribute="leading" id="CHb-7H-3Zx"/> |
| | | <constraint firstAttribute="width" secondItem="gvg-hN-QSP" secondAttribute="height" multiplier="1:0.5" id="Emh-7O-Byi"/> |
| | | <constraint firstItem="RpO-dN-soW" firstAttribute="centerY" secondItem="Pjc-TT-Gr7" secondAttribute="centerY" id="VEz-N3-izc"/> |
| | | <constraint firstItem="RpO-dN-soW" firstAttribute="centerX" secondItem="Pjc-TT-Gr7" secondAttribute="centerX" id="hbA-j4-VOb"/> |
| | | <constraint firstItem="Pjc-TT-Gr7" firstAttribute="top" secondItem="gvg-hN-QSP" secondAttribute="top" id="jRW-hh-xZ9"/> |
| | | </constraints> |
| | | </view> |
| | |
| | | <constraint firstAttribute="trailing" secondItem="Ija-B4-tPM" secondAttribute="trailing" constant="15" id="xOX-aW-FZ1"/> |
| | | </constraints> |
| | | <connections> |
| | | <outlet property="btn_play" destination="RpO-dN-soW" id="2o8-y1-T6q"/> |
| | | <outlet property="img_profile" destination="Pjc-TT-Gr7" id="ZGo-oN-xUb"/> |
| | | <outlet property="label_content" destination="m5u-Hy-qXS" id="Zei-Sj-yo8"/> |
| | | <outlet property="view_container" destination="Ija-B4-tPM" id="TJ3-LP-M4s"/> |
| | |
| | | </objects> |
| | | <resources> |
| | | <image name="btn_close_2" width="20" height="20"/> |
| | | <image name="btn_play" width="40" height="40"/> |
| | | <systemColor name="systemBackgroundColor"> |
| | | <color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> |
| | | </systemColor> |
| | |
| | | gamesPayView.integral = integral |
| | | gamesPayView.needPay = needPay |
| | | |
| | | if price != 0{ |
| | | if price != 0 && price != 0{ |
| | | gamesPayView.label_price.isHidden = false |
| | | gamesPayView.label_price.attributedText = AttributedStringbuilder.build().add(string: "游玩价格:", withFont: UIFont.systemFont(ofSize: 16, weight: .medium), withColor: .black.withAlphaComponent(0.8)).add(string: price.currency(), withFont: UIFont.systemFont(ofSize: 16, weight: .medium), withColor: Def_ThemeColor).mutableAttributedString |
| | | } |
| | | |
| | | |
| | | if coin != nil{ |
| | | if coin != nil && coin != 0{ |
| | | gamesPayView.label_coin.isHidden = false |
| | | gamesPayView.label_coin.attributedText = AttributedStringbuilder.build().add(string: "玩湃币:", withFont: UIFont.systemFont(ofSize: 16, weight: .medium), withColor: .black.withAlphaComponent(0.8)).add(string: "\(coin!)币", withFont: UIFont.systemFont(ofSize: 16, weight: .medium), withColor: Def_ThemeColor).mutableAttributedString |
| | | } |
| | | |
| | | if integral != nil{ |
| | | if integral != nil && integral != 0{ |
| | | gamesPayView.label_integral.isHidden = false |
| | | gamesPayView.label_integral.attributedText = AttributedStringbuilder.build().add(string: "积分:", withFont: UIFont.systemFont(ofSize: 16, weight: .medium), withColor: .black.withAlphaComponent(0.8)).add(string: "\(integral!)", withFont: UIFont.systemFont(ofSize: 16, weight: .medium), withColor: Def_ThemeColor).mutableAttributedString |
| | | } |
| | |
| | | <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> |
| | | <subviews> |
| | | <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="NhD-L8-tag"> |
| | | <rect key="frame" x="45" y="286.66666666666669" width="303" height="304.00000000000006"/> |
| | | <rect key="frame" x="45" y="288" width="303" height="301"/> |
| | | <subviews> |
| | | <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="支付" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Rrk-nd-S2C"> |
| | | <rect key="frame" x="133" y="24" width="37" height="21.666666666666671"/> |
| | | <rect key="frame" x="133" y="24" width="37" height="18"/> |
| | | <constraints> |
| | | <constraint firstAttribute="height" constant="18" id="lSb-Vu-Tsm"/> |
| | | </constraints> |
| | | <fontDescription key="fontDescription" type="system" weight="semibold" pointSize="18"/> |
| | | <nil key="textColor"/> |
| | | <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="0.80000000000000004" colorSpace="custom" customColorSpace="sRGB"/> |
| | | <nil key="highlightedColor"/> |
| | | </label> |
| | | <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="说明:支付后可进行游戏" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="7bY-nF-3cy"> |
| | | <rect key="frame" x="10" y="74.666666666666629" width="283" height="19.333333333333329"/> |
| | | <rect key="frame" x="10" y="71" width="283" height="20"/> |
| | | <constraints> |
| | | <constraint firstAttribute="height" constant="20" id="P8A-bW-CQg"/> |
| | | </constraints> |
| | | <fontDescription key="fontDescription" type="system" weight="medium" pointSize="16"/> |
| | | <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="0.60999999999999999" colorSpace="custom" customColorSpace="sRGB"/> |
| | | <color key="textColor" red="0.3529411764705882" green="0.3529411764705882" blue="0.3529411764705882" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> |
| | | <nil key="highlightedColor"/> |
| | | </label> |
| | | <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="ClC-PT-9qa"> |
| | | <rect key="frame" x="161.66666666666666" y="241.99999999999994" width="121.33333333333334" height="40"/> |
| | | <rect key="frame" x="161.66666666666666" y="239" width="121.33333333333334" height="40"/> |
| | | <color key="backgroundColor" name="FE6E0D"/> |
| | | <constraints> |
| | | <constraint firstAttribute="height" constant="40" id="8av-Fz-RtD"/> |
| | | </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="去支付"/> |
| | | <userDefinedRuntimeAttributes> |
| | | <userDefinedRuntimeAttribute type="boolean" keyPath="ld_maskToBoundsXIB" value="YES"/> |
| | | <userDefinedRuntimeAttribute type="number" keyPath="ld_cornerRadiusXIB"> |
| | | <real key="value" value="20"/> |
| | | </userDefinedRuntimeAttribute> |
| | | </userDefinedRuntimeAttributes> |
| | | <connections> |
| | | <action selector="payAction:" destination="iN0-l3-epB" eventType="touchUpInside" id="IWA-hK-358"/> |
| | | </connections> |
| | | </button> |
| | | <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="YwI-CF-a9z"> |
| | | <rect key="frame" x="20.000000000000007" y="241.99999999999994" width="121.66666666666669" height="40"/> |
| | | <rect key="frame" x="20.000000000000007" y="239" width="121.66666666666669" height="40"/> |
| | | <color key="backgroundColor" red="0.75294117647058822" green="0.75294117647058822" blue="0.75294117647058822" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> |
| | | <constraints> |
| | | <constraint firstAttribute="height" constant="40" id="sib-43-x2L"/> |
| | |
| | | <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="关闭"/> |
| | | <userDefinedRuntimeAttributes> |
| | | <userDefinedRuntimeAttribute type="number" keyPath="ld_cornerRadiusXIB"> |
| | | <real key="value" value="20"/> |
| | | </userDefinedRuntimeAttribute> |
| | | </userDefinedRuntimeAttributes> |
| | | <connections> |
| | | <action selector="closeAction:" destination="iN0-l3-epB" eventType="touchUpInside" id="Wld-yq-U5m"/> |
| | | </connections> |
| | | </button> |
| | | <stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="14" translatesAutoresizingMaskIntoConstraints="NO" id="lN2-O5-10B"> |
| | | <rect key="frame" x="103.33333333333334" y="115" width="96.333333333333343" height="88"/> |
| | | <rect key="frame" x="103.33333333333334" y="112" width="96.333333333333343" height="88"/> |
| | | <subviews> |
| | | <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="游玩价格:--" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Agf-Eq-DTG"> |
| | | <rect key="frame" x="0.0" y="0.0" width="96.333333333333329" height="20"/> |
| | |
| | | |
| | | |
| | | @IBAction func joinAction(_ sender: QMUIButton) { |
| | | PaymentView.show(money: (ali:199,wx:199,coin:nil,course:nil,integral:nil)) { type in |
| | | |
| | | var price = 0.01 |
| | | #if !DEBUG |
| | | price = 199 |
| | | #endif |
| | | |
| | | PaymentView.show(money: (ali:price,wx:price,coin:nil,course:nil,integral:nil)) { type in |
| | | Services.enrollMember(paytype: type).subscribe(onNext: {data in |
| | | switch type { |
| | | case .aliPay: |
| | |
| | | override var isSelected: Bool{ |
| | | didSet{ |
| | | img_select.image = isSelected ? UIImage(named: "btn_choose_s"):UIImage(named: "btn_choose") |
| | | label_content.textColor = isSelected ? Def_ThemeColor : .black.withAlphaComponent(0.56) |
| | | } |
| | | } |
| | | } |
| | |
| | | collectionView.isHidden = true |
| | | switch result { |
| | | case .fail(let str): |
| | | label_title.text = "支付失败" |
| | | btn_again.setTitle("再次支付", for: .normal) |
| | | btn_back.setTitle("返回", for: .normal) |
| | | img_paymentState.image = UIImage(named: "icon_fail") |
| | | label_content.text = str |
| | | case .success: |
| | | label_title.text = "支付成功" |
| | | btn_again.isHidden = true |
| | | btn_back.setTitleColor(.white, for: .normal) |
| | | btn_back.backgroundColor = Def_ThemeColor |
| | | btn_back.setTitle("选择游戏", for: .normal) |
| | | btn_back.setTitle("我的数据", for: .normal) |
| | | img_paymentState.image = UIImage(named: "icon_success") |
| | | label_content.text = "支付成功,请选择游戏!" |
| | | label_content.text = "支付成功" |
| | | case .none:break |
| | | } |
| | | |
| | |
| | | if let handleVC{ |
| | | handleVC.navigationController?.popToRootViewController(animated: true) |
| | | } |
| | | dismiss(animated: true) |
| | | dismiss(animated: true) { |
| | | JQ_currentViewController().jq_push(vc: GamesDataSourceVC()) |
| | | } |
| | | } |
| | | } |
| | | |
| | |
| | | } |
| | | } |
| | | |
| | | private func getData(_ provinceId:String? = nil){ |
| | | private func getData(_ provinceId:Int? = nil){ |
| | | Services.queryProvinceAndCity(pcode: provinceId).subscribe(onNext: { [weak self] data in |
| | | guard let weakSelf = self else { return } |
| | | if provinceId == nil{ |
| | |
| | | }).disposed(by: disposeBag) |
| | | } |
| | | |
| | | private func getStore(_ cityCode:String){ |
| | | private func getStore(_ cityCode:Int){ |
| | | Services.queryStoreAtCity(cityCode: cityCode).subscribe(onNext: { [weak self] data in |
| | | guard let weakSelf = self else { return } |
| | | weakSelf.storesModel = data.data ?? [] |
| | |
| | | } |
| | | if itemType == .course{ |
| | | studentChooseView.tableView.register(UINib(nibName: "StudentInfoTCell", bundle: nil), forCellReuseIdentifier: "_StudentInfoTCell") |
| | | studentChooseView.btn_add.setTitle("添加运动营成员", for: .normal) |
| | | }else if itemType == .activity{ |
| | | studentChooseView.tableView.register(UINib(nibName: "StudentInfo_2_TCell", bundle: nil), forCellReuseIdentifier: "_StudentInfo_2_TCell") |
| | | studentChooseView.btn_add.setTitle("添加人员", for: .normal) |
| | | } |
| | | |
| | | studentChooseView.frame = sceneDelegate?.window?.frame ?? .zero |
| | |
| | | import Photos |
| | | import QMUIKit |
| | | |
| | | class SearchStoreDetailFeedbackVC: BaseVC { |
| | | class SearchStoreDetailFeedbackVC: BaseVC, RatingBarDelegate { |
| | | func ratingDidChange(ratingBar: RatingBar, rating: CGFloat) { |
| | | score = rating.double |
| | | } |
| | | |
| | | @IBOutlet weak var stackView: UIStackView! |
| | | @IBOutlet weak var view_start: RatingBar! |
| | | @IBOutlet weak var collectionView: UICollectionView! |
| | | @IBOutlet weak var textView: QMUITextView! |
| | | private var id:Int! |
| | | private var items = NSMutableArray() |
| | | private var imgs = [UIImage]() |
| | | private var imgUrls = [String]() |
| | | private var score = 0.0 |
| | | |
| | | init(id:Int) { |
| | | super.init(nibName: nil, bundle: nil) |
| | |
| | | collectionView.register(UINib(nibName: "UploadImgCCell", bundle: nil), forCellWithReuseIdentifier: "_UploadImgCCell") |
| | | items.add("Empty") |
| | | collectionView.reloadData() |
| | | } |
| | | |
| | | @IBAction func startAction(_ sender: UIButton) { |
| | | let tag = sender.tag |
| | | |
| | | for v in (stackView.arrangedSubviews as! [UIButton]){ |
| | | v.isSelected = v.tag <= tag |
| | | } |
| | | view_start.delegate = self |
| | | } |
| | | |
| | | @IBAction func addAction(_ sender: UIButton) { |
| | | let score = ((stackView.arrangedSubviews as! [UIButton]).filter({$0.isSelected}).last?.tag ?? 9) - 9 |
| | | |
| | | guard score != 0 else {alertError(msg: "请先为门店评分");return} |
| | | |
| | | guard !textView.text.isEmpty else { |
| | |
| | | showHUD("图片上传中") |
| | | imgs.uploadImgToService(needCompress: true).subscribe { texts in |
| | | self.imgUrls = texts |
| | | self.uploadData(score: score) |
| | | self.uploadData(score: self.score) |
| | | } onError: { error in |
| | | alert(msg: error.localizedDescription) |
| | | }.disposed(by: disposeBag) |
| | | }else{ |
| | | self.uploadData(score: score) |
| | | self.uploadData(score: self.score) |
| | | } |
| | | } |
| | | |
| | | private func uploadData(score:Int){ |
| | | private func uploadData(score:Double){ |
| | | Services.evaluationStore(id: id, content: textView.text, imgs: imgUrls.joined(separator: ","), score: score).subscribe(onNext: {data in |
| | | alertSuccess(msg: "评价成功") |
| | | DispatchQueue.main.asyncAfter(deadline: .now()+1) { |
| | |
| | | <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="SearchStoreDetailFeedbackVC" customModule="WanPai" customModuleProvider="target"> |
| | | <connections> |
| | | <outlet property="collectionView" destination="Bdf-BC-sQU" id="6At-sV-EKq"/> |
| | | <outlet property="stackView" destination="eVR-tY-BNf" id="bu9-4c-oDW"/> |
| | | <outlet property="textView" destination="DZE-7p-bin" id="rKH-5k-SVF"/> |
| | | <outlet property="view" destination="i5M-Pr-FkT" id="sfx-zR-JGt"/> |
| | | <outlet property="view_start" destination="QB9-mQ-hr0" id="Hva-SE-AVB"/> |
| | | </connections> |
| | | </placeholder> |
| | | <placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/> |
| | |
| | | <nil key="textColor"/> |
| | | <nil key="highlightedColor"/> |
| | | </label> |
| | | <stackView opaque="NO" contentMode="scaleToFill" spacing="5" translatesAutoresizingMaskIntoConstraints="NO" id="eVR-tY-BNf"> |
| | | <rect key="frame" x="88.666666666666686" y="76.666666666666671" width="110" height="22"/> |
| | | <subviews> |
| | | <button opaque="NO" tag="10" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="UoP-cT-TEF"> |
| | | <rect key="frame" x="0.0" y="0.0" width="18" height="22"/> |
| | | <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/> |
| | | <state key="normal" image="btn_start_u"/> |
| | | <state key="selected" image="btn_start"/> |
| | | <connections> |
| | | <action selector="startAction:" destination="-1" eventType="touchUpInside" id="Jr1-xo-EUj"/> |
| | | </connections> |
| | | </button> |
| | | <button opaque="NO" tag="11" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="GFD-em-bLY"> |
| | | <rect key="frame" x="23" y="0.0" width="18" height="22"/> |
| | | <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/> |
| | | <state key="normal" image="btn_start_u"/> |
| | | <state key="selected" image="btn_start"/> |
| | | <connections> |
| | | <action selector="startAction:" destination="-1" eventType="touchUpInside" id="RNK-J1-NbV"/> |
| | | </connections> |
| | | </button> |
| | | <button opaque="NO" tag="12" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="zc9-Uc-1xK"> |
| | | <rect key="frame" x="45.999999999999986" y="0.0" width="18" height="22"/> |
| | | <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/> |
| | | <state key="normal" image="btn_start_u"/> |
| | | <state key="selected" image="btn_start"/> |
| | | <connections> |
| | | <action selector="startAction:" destination="-1" eventType="touchUpInside" id="yew-Vq-oWc"/> |
| | | </connections> |
| | | </button> |
| | | <button opaque="NO" tag="13" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="yHm-w0-pr4"> |
| | | <rect key="frame" x="68.999999999999986" y="0.0" width="18" height="22"/> |
| | | <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/> |
| | | <state key="normal" image="btn_start_u"/> |
| | | <state key="selected" image="btn_start"/> |
| | | <connections> |
| | | <action selector="startAction:" destination="-1" eventType="touchUpInside" id="6jh-L5-DD2"/> |
| | | </connections> |
| | | </button> |
| | | <button opaque="NO" tag="14" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Ub1-EE-3Ax"> |
| | | <rect key="frame" x="91.999999999999986" y="0.0" width="18" height="22"/> |
| | | <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/> |
| | | <state key="normal" image="btn_start_u"/> |
| | | <state key="selected" image="btn_start"/> |
| | | <connections> |
| | | <action selector="startAction:" destination="-1" eventType="touchUpInside" id="gRh-95-SGw"/> |
| | | </connections> |
| | | </button> |
| | | </subviews> |
| | | </stackView> |
| | | <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="评价内容:" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="4n5-rh-U3q"> |
| | | <rect key="frame" x="14" y="114" width="71.666666666666671" height="17"/> |
| | | <fontDescription key="fontDescription" type="system" weight="medium" pointSize="14"/> |
| | |
| | | <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="0.51000000000000001" colorSpace="custom" customColorSpace="calibratedRGB"/> |
| | | <nil key="highlightedColor"/> |
| | | </label> |
| | | <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="QB9-mQ-hr0" customClass="RatingBar" customModule="WanPai" customModuleProvider="target"> |
| | | <rect key="frame" x="88.666666666666686" y="78.666666666666671" width="110" height="18"/> |
| | | <color key="backgroundColor" systemColor="systemBackgroundColor"/> |
| | | <constraints> |
| | | <constraint firstAttribute="width" constant="110" id="M8E-1I-8xS"/> |
| | | <constraint firstAttribute="height" constant="18" id="OFm-6Q-geJ"/> |
| | | </constraints> |
| | | <userDefinedRuntimeAttributes> |
| | | <userDefinedRuntimeAttribute type="number" keyPath="ratingMax"> |
| | | <real key="value" value="5"/> |
| | | </userDefinedRuntimeAttribute> |
| | | <userDefinedRuntimeAttribute type="number" keyPath="rating"> |
| | | <real key="value" value="0.0"/> |
| | | </userDefinedRuntimeAttribute> |
| | | <userDefinedRuntimeAttribute type="boolean" keyPath="canAnimation" value="YES"/> |
| | | <userDefinedRuntimeAttribute type="boolean" keyPath="incomplete" value="YES"/> |
| | | <userDefinedRuntimeAttribute type="boolean" keyPath="isIndicator" value="NO"/> |
| | | <userDefinedRuntimeAttribute type="image" keyPath="imageLight" value="btn_start"/> |
| | | <userDefinedRuntimeAttribute type="image" keyPath="imageDark" value="btn_start_u"/> |
| | | </userDefinedRuntimeAttributes> |
| | | </view> |
| | | </subviews> |
| | | <viewLayoutGuide key="safeArea" id="fnl-2z-Ty3"/> |
| | | <color key="backgroundColor" systemColor="systemBackgroundColor"/> |
| | |
| | | <constraint firstItem="Bdf-BC-sQU" firstAttribute="leading" secondItem="fnl-2z-Ty3" secondAttribute="leading" constant="14" id="FQn-ws-DNf"/> |
| | | <constraint firstItem="aSi-ik-NOd" firstAttribute="centerY" secondItem="aOL-oD-g8G" secondAttribute="centerY" id="GHJ-Ej-MGt"/> |
| | | <constraint firstItem="Bdf-BC-sQU" firstAttribute="top" secondItem="aOL-oD-g8G" secondAttribute="bottom" constant="6" id="MOi-6C-9JU"/> |
| | | <constraint firstItem="QB9-mQ-hr0" firstAttribute="centerY" secondItem="JaJ-JT-dcZ" secondAttribute="centerY" id="Mdc-Xv-PJu"/> |
| | | <constraint firstItem="JaJ-JT-dcZ" firstAttribute="leading" secondItem="fnl-2z-Ty3" secondAttribute="leading" constant="14" id="PnD-Zo-hhG"/> |
| | | <constraint firstItem="fnl-2z-Ty3" firstAttribute="trailing" secondItem="h50-S0-pKG" secondAttribute="trailing" constant="100" id="S7d-6d-nzt"/> |
| | | <constraint firstItem="aOL-oD-g8G" firstAttribute="top" secondItem="oDM-kN-KPX" secondAttribute="bottom" constant="22" id="XXj-4r-mQ1"/> |
| | |
| | | <constraint firstItem="fnl-2z-Ty3" firstAttribute="bottom" secondItem="h50-S0-pKG" secondAttribute="bottom" constant="23" id="cUd-i8-fBz"/> |
| | | <constraint firstItem="fnl-2z-Ty3" firstAttribute="trailing" secondItem="Bdf-BC-sQU" secondAttribute="trailing" constant="14" id="eYU-ax-TcF"/> |
| | | <constraint firstItem="JaJ-JT-dcZ" firstAttribute="top" secondItem="i5M-Pr-FkT" secondAttribute="topMargin" constant="20" id="h3p-DZ-GDN"/> |
| | | <constraint firstItem="eVR-tY-BNf" firstAttribute="leading" secondItem="JaJ-JT-dcZ" secondAttribute="trailing" constant="3" id="ksM-IT-LLv"/> |
| | | <constraint firstItem="QB9-mQ-hr0" firstAttribute="leading" secondItem="JaJ-JT-dcZ" secondAttribute="trailing" constant="3" id="hKo-jk-aqM"/> |
| | | <constraint firstItem="aOL-oD-g8G" firstAttribute="leading" secondItem="fnl-2z-Ty3" secondAttribute="leading" constant="14" id="m1D-88-DgM"/> |
| | | <constraint firstItem="4n5-rh-U3q" firstAttribute="top" secondItem="JaJ-JT-dcZ" secondAttribute="bottom" constant="18" id="pJa-s8-fh0"/> |
| | | <constraint firstItem="oDM-kN-KPX" firstAttribute="top" secondItem="4n5-rh-U3q" secondAttribute="bottom" constant="12" id="rHe-pF-tKV"/> |
| | | <constraint firstItem="4n5-rh-U3q" firstAttribute="leading" secondItem="JaJ-JT-dcZ" secondAttribute="leading" id="usU-rf-zql"/> |
| | | <constraint firstItem="eVR-tY-BNf" firstAttribute="centerY" secondItem="JaJ-JT-dcZ" secondAttribute="centerY" id="w8g-vQ-ggi"/> |
| | | </constraints> |
| | | <point key="canvasLocation" x="139.69465648854961" y="20.422535211267608"/> |
| | | </view> |
| | |
| | | didSet{ |
| | | if let m = searchStoreDetailModel{ |
| | | headView.searchStoreDetailModel = m |
| | | tableView.reloadData() |
| | | |
| | | DispatchQueue.main.async { |
| | | self.headView.cons_labelHeiCons.constant = String.jq_getHeight(text: m.storeInfo, width: self.view.width - 100, font: 14) |
| | | self.headView.layoutIfNeeded() |
| | | self.headView.layoutSubviews() |
| | | self.tableView.reloadData() |
| | | let height = self.headView.systemLayoutSizeFitting(UIView.layoutFittingCompressedSize).height |
| | | self.headView.frame = CGRect(x: 0, y: 0, width: JQ_ScreenW, height: height) |
| | | self.tableView.tableHeaderView = self.headView |
| | | } |
| | | } |
| | | } |
| | | } |
| | |
| | | super.viewDidLoad() |
| | | title = "门店详情" |
| | | |
| | | DispatchQueue.main.async { |
| | | self.headView.layoutIfNeeded() |
| | | self.headView.layoutSubviews() |
| | | let height = self.headView.systemLayoutSizeFitting(UIView.layoutFittingCompressedSize).height |
| | | self.headView.frame = CGRect(x: 0, y: 0, width: JQ_ScreenW, height: height) |
| | | self.tableView.tableHeaderView = self.headView |
| | | } |
| | | // DispatchQueue.main.async { |
| | | // self.headView.layoutIfNeeded() |
| | | // self.headView.layoutSubviews() |
| | | // let height = self.headView.systemLayoutSizeFitting(UIView.layoutFittingCompressedSize).height |
| | | // self.headView.frame = CGRect(x: 0, y: 0, width: JQ_ScreenW, height: height) |
| | | // self.tableView.tableHeaderView = self.headView |
| | | // } |
| | | |
| | | Services.exploreStoreDetail(storeId: id).subscribe(onNext: {[weak self] data in |
| | | if let model = data.data{ |
| | | self?.searchStoreDetailModel = model |
| | | |
| | | // DispatchQueue.main.async { |
| | | // self?.headView.layoutIfNeeded() |
| | | // self?.headView.layoutSubviews() |
| | | // let height = self!.headView.systemLayoutSizeFitting(UIView.layoutFittingCompressedSize).height |
| | | // self?.headView.frame = CGRect(x: 0, y: 0, width: JQ_ScreenW, height: height) |
| | | // self?.tableView.tableHeaderView = self!.headView |
| | | // } |
| | | |
| | | // DispatchQueue.main.asyncAfter(deadline: .now()+1.5){ |
| | | // self?.tableView.tableHeaderView?.height = 500 |
| | | // } |
| | |
| | | @IBOutlet weak var btn_location: QMUIButton! |
| | | @IBOutlet weak var btn_phone: QMUIButton! |
| | | @IBOutlet weak var view_banner: UIView! |
| | | @IBOutlet weak var cons_labelHeiCons: NSLayoutConstraint! |
| | | |
| | | private lazy var bannerView:CommonBannerView = { |
| | | let banner = CommonBannerView() |
| | |
| | | btn_feedback.spacingBetweenImageAndTitle = 3 |
| | | btn_location.spacingBetweenImageAndTitle = 5 |
| | | btn_phone.spacingBetweenImageAndTitle = 4 |
| | | |
| | | |
| | | } |
| | | |
| | | |
| | | @IBAction func feedbackAction(_ sender: UIButton) { |
| | | let vc = SearchStoreDetailFeedbackVC(id: searchStoreDetailModel.storeId) |
| | | JQ_currentViewController().jq_push(vc: vc) |
| | | } |
| | | |
| | | |
| | | @IBAction func navAction(_ sender: QMUIButton) { |
| | | JQ_MapNavigationTool.startNav(CLLocationCoordinate2D(latitude: searchStoreDetailModel.lat, longitude: searchStoreDetailModel.lon), distanceName: searchStoreDetailModel.storeAddress, scheme: "weparklife") |
| | | } |
| | | |
| | | |
| | | @IBAction func phoneAction(_ sender: QMUIButton) { |
| | | UIApplication.shared.open(URL(string: "tel://\(searchStoreDetailModel.phone)")!) |
| | |
| | | <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/> |
| | | <placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/> |
| | | <view contentMode="scaleToFill" id="iN0-l3-epB" customClass="SearchStoreDetailHeadView" customModule="WanPai" customModuleProvider="target"> |
| | | <rect key="frame" x="0.0" y="0.0" width="393" height="740"/> |
| | | <rect key="frame" x="0.0" y="0.0" width="393" height="398"/> |
| | | <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES" flexibleMaxY="YES"/> |
| | | <subviews> |
| | | <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="fnG-1M-O7B"> |
| | |
| | | <nil key="highlightedColor"/> |
| | | </label> |
| | | <stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="10" translatesAutoresizingMaskIntoConstraints="NO" id="Qij-Fp-PqX"> |
| | | <rect key="frame" x="319" y="230" width="60" height="98"/> |
| | | <rect key="frame" x="319" y="234" width="60" height="98"/> |
| | | <subviews> |
| | | <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Mrd-r7-x2d" customClass="QMUIButton"> |
| | | <rect key="frame" x="0.0" y="0.0" width="60" height="26"/> |
| | |
| | | </constraints> |
| | | </view> |
| | | <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="WSq-v8-MBS"> |
| | | <rect key="frame" x="14" y="357.66666666666674" width="365" height="367.33333333333326"/> |
| | | <rect key="frame" x="14" y="357.66666666666669" width="365" height="25.333333333333314"/> |
| | | <constraints> |
| | | <constraint firstAttribute="height" relation="greaterThanOrEqual" constant="20" id="VAx-XQ-pas"/> |
| | | </constraints> |
| | | <fontDescription key="fontDescription" type="system" pointSize="14"/> |
| | | <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="0.80000000000000004" colorSpace="custom" customColorSpace="sRGB"/> |
| | | <nil key="highlightedColor"/> |
| | | </label> |
| | | <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="F7r-jD-foF"> |
| | | <rect key="frame" x="13" y="739" width="380" height="1"/> |
| | | <rect key="frame" x="13" y="397" width="380" height="1"/> |
| | | <color key="backgroundColor" red="0.59215686274509804" green="0.59215686274509804" blue="0.59215686274509804" alpha="0.22" colorSpace="custom" customColorSpace="sRGB"/> |
| | | <constraints> |
| | | <constraint firstAttribute="height" constant="1" id="Vvf-kb-2Im"/> |
| | |
| | | <constraint firstItem="BLD-qG-SkK" firstAttribute="top" secondItem="fnG-1M-O7B" secondAttribute="bottom" constant="14" id="f0m-Id-Egu"/> |
| | | <constraint firstItem="oRn-Uj-bSc" firstAttribute="top" secondItem="yAu-Fs-X4T" secondAttribute="bottom" constant="25" id="fMP-VR-7mi"/> |
| | | <constraint firstItem="fnG-1M-O7B" firstAttribute="top" secondItem="iN0-l3-epB" secondAttribute="top" id="jV7-9G-KFS"/> |
| | | <constraint firstItem="Qij-Fp-PqX" firstAttribute="top" secondItem="fnG-1M-O7B" secondAttribute="bottom" constant="10" id="lyl-OX-49M"/> |
| | | <constraint firstAttribute="trailing" secondItem="Qij-Fp-PqX" secondAttribute="trailing" constant="14" id="oBZ-zg-7Bo"/> |
| | | <constraint firstItem="fnG-1M-O7B" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" id="obN-m7-bch"/> |
| | | <constraint firstItem="Qij-Fp-PqX" firstAttribute="top" secondItem="BLD-qG-SkK" secondAttribute="top" id="tbg-bl-dth"/> |
| | | <constraint firstItem="yAu-Fs-X4T" firstAttribute="leading" secondItem="26L-GM-v2t" secondAttribute="trailing" constant="5" id="y8r-SN-pQA"/> |
| | | <constraint firstItem="F7r-jD-foF" firstAttribute="top" secondItem="WSq-v8-MBS" secondAttribute="bottom" priority="750" constant="14" id="z9Q-xj-dc3"/> |
| | | <constraint firstItem="F7r-jD-foF" firstAttribute="top" secondItem="WSq-v8-MBS" secondAttribute="bottom" constant="14" id="z9Q-xj-dc3"/> |
| | | </constraints> |
| | | <freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/> |
| | | <connections> |
| | | <outlet property="btn_feedback" destination="Mrd-r7-x2d" id="EvO-B6-le4"/> |
| | | <outlet property="btn_location" destination="nPR-en-u9G" id="APm-w8-Hil"/> |
| | | <outlet property="btn_phone" destination="zjV-pe-qxa" id="YWR-WN-RAW"/> |
| | | <outlet property="cons_labelHeiCons" destination="VAx-XQ-pas" id="vUr-As-Yx7"/> |
| | | <outlet property="label_address" destination="yAu-Fs-X4T" id="l1C-mA-o7N"/> |
| | | <outlet property="label_info" destination="WSq-v8-MBS" id="3vg-Bx-VmW"/> |
| | | <outlet property="label_title" destination="BLD-qG-SkK" id="bqE-QF-ran"/> |
| | | <outlet property="label_workTime" destination="YGq-0Z-lO5" id="sCn-jn-Yd0"/> |
| | | <outlet property="view_banner" destination="fnG-1M-O7B" id="sVO-t7-A10"/> |
| | | </connections> |
| | | <point key="canvasLocation" x="61.832061068702288" y="11.267605633802818"/> |
| | | <point key="canvasLocation" x="61.832061068702288" y="-109.1549295774648"/> |
| | | </view> |
| | | </objects> |
| | | <resources> |
| | |
| | | label_datetime.text = billingModel.consumeTime |
| | | label_price.text = billingModel.consumeAmount.currency() |
| | | if billingModel.detailsType == .positive{ |
| | | label_price.text = "+\(billingModel.consumeAmount.jq_formatFloat)" |
| | | label_price.text = billingModel.consumeAmount.jq_formatFloat |
| | | label_price.textColor = UIColor(hexStr: "#2AA60B") |
| | | }else{ |
| | | label_price.text = "\(billingModel.consumeAmount.jq_formatFloat)" |
| | | label_price.text = billingModel.consumeAmount.jq_formatFloat |
| | | label_price.textColor = UIColor(hexStr: "#FD2A02") |
| | | } |
| | | } |
| | |
| | | |
| | | |
| | | @IBAction func QRCodeAction(_ sender: UIButton) { |
| | | QRPreview.show("test") |
| | | var time = OpenDoorTimeModel() |
| | | time.start_time = Date.jq_StringToTimeInterval((recordsModel.startTime + " 00:00"), "yyyy-MM-dd HH:mm") |
| | | time.end_time = Date.jq_StringToTimeInterval((recordsModel.endTime + " 00:00"), "yyyy-MM-dd HH:mm") |
| | | let model = OpenDoorModel(sid: recordsModel.sid, rid: recordsModel.rid, uid: recordsModel.userId, time: [time], type: 2) |
| | | if let string = model.toJSONString(){ |
| | | QRPreview.show(string) |
| | | } |
| | | } |
| | | } |
| | |
| | | |
| | | if weakSelf.exchangeGoodsModel!.exchangeType == .coin{ |
| | | Services.exchangeOperation(exchangeType: .coin, goodsId: weakSelf.exchangeGoodsModel!.goodId, goodsType: weakSelf.exchangeGoodsModel!.goodType, num: num, payType: nil, stuIds: weakSelf.studentModels.map({"\($0.id)"}).joined(separator: ","),storeId: weakSelf.selectStoreModel?.storeId).subscribe(onNext: {[weak self] data in |
| | | if data.code == 200{ |
| | | CommonAlertView.show(title: "提示", content: "兑换成功!") {[weak self] _ in |
| | | self?.exchangeSuccessUI() |
| | | } |
| | | }else{ |
| | | alertError(msg: data.msg) |
| | | },onError: { error in |
| | | if let er = error as? NetworkRequest.NetRequestError{ |
| | | switch er { |
| | | case .Other(_,let string): |
| | | CommonAlertView.show(title: "兑换商品", content: string) { _ in |
| | | |
| | | } |
| | | default: |
| | | CommonAlertView.show(title: "兑换商品", content: "兑换失败") { _ in |
| | | |
| | | } |
| | | } |
| | | } |
| | | }).disposed(by: weakSelf.disposeBag) |
| | | }else { |
| | |
| | | case .integral:break |
| | | } |
| | | } |
| | | },onError: { error in |
| | | if let er = error as? NetworkRequest.NetRequestError{ |
| | | switch er { |
| | | case .Other(_,let string): |
| | | CommonAlertView.show(title: "兑换商品", content: string) { _ in |
| | | |
| | | } |
| | | default: |
| | | CommonAlertView.show(title: "兑换商品", content: "兑换失败") { _ in |
| | | |
| | | } |
| | | } |
| | | } |
| | | }).disposed(by: weakSelf.disposeBag) |
| | | } |
| | | } |
| | |
| | | self?.showQRCode(model, ids: data.data?.ids ?? []) |
| | | case .pending: |
| | | self?.btn_payment.isHidden = true |
| | | self?.btn_cancel.isHidden = true |
| | | self?.btn_cancel.isHidden = false |
| | | self?.showQRCode(model, ids: data.data?.ids ?? []) |
| | | fallthrough |
| | | default: |
| | |
| | | |
| | | if let m = yardBookingDetailDataModel{ |
| | | let t = OpenDoorTimeModel(start_time: TimeInterval(model.startTime / 1000), end_time: TimeInterval(model.endTime / 1000)) |
| | | let openDoorModel = OpenDoorModel(sid: m.siteId, rid: ids, uid: m.appUserId, time: [t], type: 2) |
| | | let openDoorModel = OpenDoorModel(sid: [m.siteId], rid: ids, uid: m.appUserId, time: [t], type: 2) |
| | | if let modelStr = openDoorModel.toJSONString(){ |
| | | img_QRCode.image = QRCodeImage(string: modelStr, size: 132 * sceneDelegate!.window!.screen.scale) |
| | | } |
| | |
| | | if let models = data.data{ |
| | | guard let weakSelf = self else { return } |
| | | weakSelf.items = models |
| | | for item in weakSelf.items { |
| | | if item.selectable == 1{ |
| | | let d = weakSelf.date.jq_format("yyyy-MM-dd ") + item.time.components(separatedBy: "-").last! |
| | | let interval = Date.jq_StringToTimeInterval(d, "yyyy-MM-dd HH:mm") |
| | | let canSelect = Date().timeIntervalSince1970 < interval |
| | | item.selectable = canSelect ? 1:0 |
| | | } |
| | | } |
| | | |
| | | |
| | | weakSelf.collectionView.reloadData() |
| | | weakSelf.innerHeight = ceil(Double(models.count) / 3.0) * cellH + floor(Double(models.count) / 3.0) * 1.0 |
| | | weakSelf.clouse?(weakSelf.innerHeight,weakSelf.currentPage) |
| | |
| | | let cell = collectionView.dequeueReusableCell(withReuseIdentifier: "_CalendarDateTimeTCell", for: indexPath) as! CalendarDateTimeTCell |
| | | let m = items[indexPath.row] |
| | | cell.label_content.text = m.time |
| | | let d = date.jq_format("yyyy-MM-dd ") + m.time.components(separatedBy: "-").last! |
| | | let interval = Date.jq_StringToTimeInterval(d, "yyyy-MM-dd HH:mm") |
| | | // let d = date.jq_format("yyyy-MM-dd ") + m.time.components(separatedBy: "-").last! |
| | | // let interval = Date.jq_StringToTimeInterval(d, "yyyy-MM-dd HH:mm") |
| | | // |
| | | // let canSelect = Date().timeIntervalSince1970 < interval |
| | | |
| | | let canSelect = Date().timeIntervalSince1970 < interval |
| | | |
| | | if canSelect && m.selectable == 1{ |
| | | if m.selectable == 1{ |
| | | cell.contentView.backgroundColor = UIColor.white |
| | | cell.label_content.textColor = UIColor(hexStr: "#323232") |
| | | }else{ |
| | |
| | | isHalf = btn_fullYard.isSelected ? 2:1 |
| | | } |
| | | |
| | | if siteDetailModel.nextName.count > 0{ |
| | | if siteDetailModel.nextName.count > 0 && isHalf == 1{ |
| | | nextName = siteDetailModel.nextName[yardIndex] |
| | | } |
| | | |
| | |
| | | } |
| | | }).disposed(by: disposeBag) |
| | | |
| | | Services.queryStoreList().subscribe(onNext: {data in |
| | | if let models = data.data{ |
| | | self.storeItems.append(NormalSimpleModel(id: 0, name: "全部")) |
| | | self.storeItems.append(contentsOf: models) |
| | | } |
| | | }).disposed(by: disposeBag) |
| | | |
| | | getStoreList() |
| | | viewModel.configure(tableView) |
| | | viewModel.beginRefresh() |
| | | |
| | |
| | | btn_stores.setTitle(viewModel.selectStore.value?.name ?? "所在门店", for: .normal) |
| | | } |
| | | |
| | | |
| | | private func getStoreList(){ |
| | | Services.queryStoreList(cityCode: viewModel.city.value?.code).subscribe(onNext: {data in |
| | | if let models = data.data{ |
| | | self.storeItems.removeAll() |
| | | self.storeItems.append(NormalSimpleModel(id: 0, name: "全部")) |
| | | self.storeItems.append(contentsOf: models) |
| | | } |
| | | }).disposed(by: disposeBag) |
| | | } |
| | | |
| | | override func setRx() { |
| | | tf_search.rx.text.orEmpty.bind(to: viewModel.search).disposed(by: disposeBag) |
| | | } |
| | |
| | | guard !sender.isSelected else {return} |
| | | closeAction() |
| | | sender.isSelected = true |
| | | yardBookingTimeView = YardBookingTimeView.show(inView: self.view, afterView: view_top) { [weak self] t1, t2 in |
| | | yardBookingTimeView = YardBookingTimeView.show(inView: self.view, afterView: view_top,defaultStarTime: viewModel.startDate.value,defaultEndTime: viewModel.endDate.value) { [weak self] t1, t2 in |
| | | self?.viewModel.startDate.accept(t1) |
| | | self?.viewModel.endDate.accept(t2) |
| | | self?.viewModel.beginRefresh() |
| | |
| | | self?.viewModel.city.accept(model) |
| | | sender.setTitle(model.name, for: .normal) |
| | | sender.isSelected = false |
| | | self?.viewModel.siteType.accept(nil) |
| | | self?.viewModel.selectStore.accept(nil) |
| | | self?.btn_stores.setTitle("所在门店", for: .normal) |
| | | self?.getStoreList() |
| | | self?.viewModel.beginRefresh() |
| | | } closeClouse: { |
| | | sender.isSelected = false |
| | |
| | | @IBOutlet weak var cons_viewTop: NSLayoutConstraint! |
| | | @IBOutlet weak var tf_startTime: UITextField! |
| | | @IBOutlet weak var tf_endTime: UITextField! |
| | | private var defaultStarTime:String? |
| | | private var defaultEndTime:String? |
| | | |
| | | private var closeClouse:((String,String)->Void)? |
| | | |
| | |
| | | } |
| | | |
| | | @discardableResult |
| | | static func show(inView:UIView,afterView:UIView,closeClouse:@escaping (String,String)->Void)->YardBookingTimeView{ |
| | | static func show(inView:UIView,afterView:UIView,defaultStarTime:String? = nil,defaultEndTime:String? = nil,closeClouse:@escaping (String,String)->Void)->YardBookingTimeView{ |
| | | let yardBookingTimeView = YardBookingTimeView.jq_loadNibView() |
| | | inView.addSubview(yardBookingTimeView) |
| | | yardBookingTimeView.closeClouse = closeClouse |
| | | yardBookingTimeView.defaultStarTime = defaultStarTime |
| | | yardBookingTimeView.defaultEndTime = defaultEndTime |
| | | yardBookingTimeView.tf_startTime.text = defaultStarTime |
| | | yardBookingTimeView.tf_endTime.text = defaultEndTime |
| | | yardBookingTimeView.snp.makeConstraints { make in |
| | | make.top.equalTo(afterView.snp.bottom) |
| | | make.left.right.bottom.equalTo(inView) |
| | |
| | | |
| | | |
| | | @IBAction func startTimeAction(_ sender: Any) { |
| | | tf_endTime.text = "" |
| | | CommonDatePickerView.show(type: .HHmm) {[weak self] _, _, _,hour,minute in |
| | | self?.tf_startTime.text = String(format: "%02ld:%02ld", hour!,minute!) |
| | | } |
| | | } |
| | | |
| | | @IBAction func endTimeAction(_ sender: Any) { |
| | | if tf_startTime.text == ""{ |
| | | alert(msg: "请先选择开始时间");return |
| | | } |
| | | CommonDatePickerView.show(type: .HHmm) { [weak self] _, _, _,hour,minute in |
| | | if hour ?? 0 < self?.tf_startTime.text!.components(separatedBy: ":").first?.int ?? 0{ |
| | | alert(msg: "结束时间不能小于开始时间");return |
| | | } |
| | | self?.tf_endTime.text = String(format: "%02ld:%02ld", hour!,minute!) |
| | | |
| | | self?.cons_viewTop.constant = -133 |
| | | UIView.animate(withDuration: 0.4) { |
| | | self!.alpha = 0 |
| | | self!.layoutIfNeeded() |
| | | } completion: { _ in |
| | | let startDate = self!.tf_startTime.text! |
| | | let endDate = self!.tf_endTime.text! |
| | | self!.closeClouse?(startDate,endDate) |
| | | self!.removeFromSuperview() |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | @IBAction func closeAction(_ sender: Any) { |
| | | //以下,点击空白收回,可能废弃 |
| | | cons_viewTop.constant = -133 |
| | | UIView.animate(withDuration: 0.4) { |
| | | self.alpha = 0 |
| | |
| | | } |
| | | } |
| | | |
| | | if ((URLContexts.first?.url.absoluteString.contains("weparklife://safepay")) != nil){ |
| | | let url = URLContexts.first!.url |
| | | YYPaymentManager.shared.handleApplication(UIApplication.shared, open: url, options: [:]) |
| | | } |
| | | |
| | | if URLContexts.first!.url.host == "resendContextReqByScheme"{ |
| | | WXApi.handleOpen(URLContexts.first!.url, delegate: YYPaymentManager.shared) |
| | | } |