| | |
| | | 1304B85B2A4EB0F8000D4F2E /* SearchBannerCCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = SearchBannerCCell.xib; sourceTree = "<group>"; }; |
| | | 1304B85E2A4EB59F000D4F2E /* SearchStoreListVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SearchStoreListVC.swift; sourceTree = "<group>"; }; |
| | | 1304B85F2A4EB59F000D4F2E /* SearchStoreListVC.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = SearchStoreListVC.xib; sourceTree = "<group>"; }; |
| | | 1306580A2B22C1BB008B2500 /* WanPaiRelease.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = WanPaiRelease.entitlements; sourceTree = "<group>"; }; |
| | | 130CE4512A4823AC00394384 /* StudentMedalCCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StudentMedalCCell.swift; sourceTree = "<group>"; }; |
| | | 130CE4522A4823AC00394384 /* StudentMedalCCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = StudentMedalCCell.xib; sourceTree = "<group>"; }; |
| | | 130CE4552A4925AB00394384 /* StudentVideoCCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StudentVideoCCell.swift; sourceTree = "<group>"; }; |
| | |
| | | 8D8400D02A2F1430003AF6A2 /* WanPai */ = { |
| | | isa = PBXGroup; |
| | | children = ( |
| | | 1306580A2B22C1BB008B2500 /* WanPaiRelease.entitlements */, |
| | | 131938692AC2D9B700FC63F1 /* WanPaiDebug.entitlements */, |
| | | 134BD51F2A6008BA00786819 /* YYPaymentManager */, |
| | | 13FB93B72A5C0270009F558A /* Category */, |
| | |
| | | CODE_SIGN_ENTITLEMENTS = WanPai/WanPaiDebug.entitlements; |
| | | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; |
| | | CODE_SIGN_STYLE = Manual; |
| | | CURRENT_PROJECT_VERSION = 1; |
| | | CURRENT_PROJECT_VERSION = 7; |
| | | DEVELOPMENT_TEAM = ""; |
| | | "DEVELOPMENT_TEAM[sdk=iphoneos*]" = 2MWV8K39DV; |
| | | FRAMEWORK_SEARCH_PATHS = ( |
| | |
| | | INFOPLIST_KEY_CFBundleDisplayName = "玩湃生活"; |
| | | INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.sports"; |
| | | INFOPLIST_KEY_NSCameraUsageDescription = "WanPai需要使用使用使用相机,来上传学员头像、评论图片、扫描二维码"; |
| | | INFOPLIST_KEY_NSLocationAlwaysAndWhenInUseUsageDescription = "WanPai需要使用使用定位,来推荐、搜索您附近的门店"; |
| | | INFOPLIST_KEY_NSLocationWhenInUseUsageDescription = "WanPai需要使用使用定位,来推荐、搜索您附近的门店"; |
| | | INFOPLIST_KEY_NSPhotoLibraryUsageDescription = "WanPai需要使用使用使用相册,来上传学员头像、评论图片、扫描二维码"; |
| | | INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; |
| | |
| | | "$(inherited)", |
| | | "$(PROJECT_DIR)/WanPai/YYPaymentManager/WeChatPay", |
| | | ); |
| | | MARKETING_VERSION = 1.0; |
| | | MARKETING_VERSION = 1.0.1; |
| | | OTHER_LDFLAGS = ( |
| | | "$(inherited)", |
| | | "-ObjC", |
| | |
| | | buildSettings = { |
| | | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; |
| | | ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; |
| | | CODE_SIGN_ENTITLEMENTS = WanPai/WanPaiRelease.entitlements; |
| | | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution"; |
| | | CODE_SIGN_STYLE = Manual; |
| | | CURRENT_PROJECT_VERSION = 1; |
| | | CURRENT_PROJECT_VERSION = 7; |
| | | DEVELOPMENT_TEAM = ""; |
| | | "DEVELOPMENT_TEAM[sdk=iphoneos*]" = 2MWV8K39DV; |
| | | FRAMEWORK_SEARCH_PATHS = ( |
| | |
| | | INFOPLIST_KEY_CFBundleDisplayName = "玩湃生活"; |
| | | INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.sports"; |
| | | INFOPLIST_KEY_NSCameraUsageDescription = "WanPai需要使用使用使用相机,来上传学员头像、评论图片、扫描二维码"; |
| | | INFOPLIST_KEY_NSLocationAlwaysAndWhenInUseUsageDescription = "WanPai需要使用使用定位,来推荐、搜索您附近的门店"; |
| | | INFOPLIST_KEY_NSLocationWhenInUseUsageDescription = "WanPai需要使用使用定位,来推荐、搜索您附近的门店"; |
| | | INFOPLIST_KEY_NSPhotoLibraryUsageDescription = "WanPai需要使用使用使用相册,来上传学员头像、评论图片、扫描二维码"; |
| | | INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; |
| | |
| | | "$(inherited)", |
| | | "$(PROJECT_DIR)/WanPai/YYPaymentManager/WeChatPay", |
| | | ); |
| | | MARKETING_VERSION = 1.0; |
| | | MARKETING_VERSION = 1.0.1; |
| | | OTHER_LDFLAGS = ( |
| | | "$(inherited)", |
| | | "-ObjC", |
| | |
| | | |
| | | import UIKit |
| | | import AVKit |
| | | import JQTools |
| | | import SceneKit |
| | | |
| | | class CommonScanQRCodeVC: BaseVC,AVCaptureMetadataOutputObjectsDelegate { |
| | | |
| | |
| | | public override func viewDidLoad() { |
| | | super.viewDidLoad() |
| | | title = "扫描二维码" |
| | | if UIImagePickerController.isSourceTypeAvailable(.camera){ |
| | | |
| | | if borderView == nil { |
| | | borderView = UIImageView(image: UIImage(named: "ty_qrcode_bg")) |
| | | } |
| | | |
| | | if scanLineView == nil { |
| | | scanLineView = UIImageView(image: UIImage(named: "ty_qrcode_line")) |
| | | } |
| | | |
| | | if closeBtn == nil && modalPresentationStyle == .fullScreen && self.presentationController != nil { |
| | | closeBtn = UIButton(type: .custom) |
| | | closeBtn!.addTarget(self, action: #selector(closeView), for: .touchUpInside) |
| | | let image = Bundle.JQ_Bundle(icon: "close_btn") |
| | | closeBtn!.setImage(image, for: .normal) |
| | | view.addSubview(closeBtn!) |
| | | closeBtn!.snp.makeConstraints { (make) in |
| | | make.top.equalTo(30) |
| | | make.left.equalTo(20) |
| | | make.width.height.equalTo(30) |
| | | if borderView == nil { |
| | | borderView = UIImageView(image: UIImage(named: "ty_qrcode_bg")) |
| | | } |
| | | } |
| | | |
| | | let authStatus = AVCaptureDevice.authorizationStatus(for: AVMediaType.video) |
| | | if authStatus == AVAuthorizationStatus.notDetermined { |
| | | AVCaptureDevice.requestAccess(for: AVMediaType.video) { (granted) in |
| | | if granted{ |
| | | self.limitSuccess() |
| | | }else{ |
| | | self.limitFaild() |
| | | if scanLineView == nil { |
| | | scanLineView = UIImageView(image: UIImage(named: "ty_qrcode_line")) |
| | | } |
| | | |
| | | if closeBtn == nil && modalPresentationStyle == .fullScreen && self.presentationController != nil { |
| | | closeBtn = UIButton(type: .custom) |
| | | closeBtn!.addTarget(self, action: #selector(closeView), for: .touchUpInside) |
| | | let image = Bundle.JQ_Bundle(icon: "close_btn") |
| | | closeBtn!.setImage(image, for: .normal) |
| | | view.addSubview(closeBtn!) |
| | | closeBtn!.snp.makeConstraints { (make) in |
| | | make.top.equalTo(30) |
| | | make.left.equalTo(20) |
| | | make.width.height.equalTo(30) |
| | | } |
| | | } |
| | | } else if authStatus == AVAuthorizationStatus.restricted || authStatus == AVAuthorizationStatus.denied { |
| | | limitFaild() |
| | | } else { |
| | | limitSuccess() |
| | | |
| | | let authStatus = AVCaptureDevice.authorizationStatus(for: AVMediaType.video) |
| | | if authStatus == AVAuthorizationStatus.notDetermined { |
| | | AVCaptureDevice.requestAccess(for: AVMediaType.video) { (granted) in |
| | | if granted{ |
| | | self.limitSuccess() |
| | | }else{ |
| | | self.limitFaild() |
| | | } |
| | | } |
| | | } else if authStatus == AVAuthorizationStatus.restricted || authStatus == AVAuthorizationStatus.denied { |
| | | limitFaild() |
| | | } else { |
| | | limitSuccess() |
| | | } |
| | | }else{ |
| | | alertError(msg: "当前环境相机不可用") |
| | | DispatchQueue.main.asyncAfter(deadline: .now()+1) { |
| | | self.navigationController?.popViewController() |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | // if(!checkCameraAuth()){ |
| | |
| | | alertController.addAction(cancelAction) |
| | | alertController.addAction(okAction) |
| | | self.present(alertController, animated: true, completion: nil) |
| | | } |
| | | |
| | | public override func viewWillAppear(_ animated: Bool) { |
| | | firstResult = true |
| | | if let session = self.session { |
| | | let queue = DispatchQueue(label: "startRun") |
| | | queue.async { |
| | | session.startRunning() |
| | | } |
| | | } |
| | | scanTimer?.fireDate = NSDate.distantPast |
| | | } |
| | | |
| | | func checkCameraAuth() -> Bool { |
| | |
| | | |
| | | class PaymentView: UIView,JQNibView{ |
| | | |
| | | enum PaymentEnumType { |
| | | case course //课程 |
| | | case yard //场地 |
| | | case joinMember //会员加入 |
| | | case game //游戏 |
| | | case recharge //充值 |
| | | case goods(ExchangeType) |
| | | case activity |
| | | } |
| | | |
| | | @IBOutlet weak var view_container: UIView! |
| | | @IBOutlet weak var cons_bottom: NSLayoutConstraint! |
| | | @IBOutlet weak var btn_wechat: UIButton! |
| | |
| | | @IBOutlet weak var btn_integral: UIButton! |
| | | private var hasNotStudent:Bool = false |
| | | private var clouse:((PayType)->Void)? |
| | | private var payType:PayType? |
| | | private var payType:PayType! |
| | | private var paymentEnumType:PaymentEnumType! |
| | | private var customType = [PayType]() //支付项目 |
| | | |
| | | override func awakeFromNib() { |
| | | super.awakeFromNib() |
| | |
| | | layoutIfNeeded() |
| | | } |
| | | |
| | | static func show(money:(ali:Double?,wx:Double?,coin:Int?,course:Int?,integral:Int?),hasNotStudent:Bool = false,_ clouse:@escaping (PayType)->Void){ |
| | | static func show(enumType:PaymentEnumType,money:(ali:Double?,wx:Double?,coin:Int?,course:Int?,integral:Int?),hasNotStudent:Bool = false,_ clouse:@escaping (PayType)->Void){ |
| | | let paymentView = PaymentView.jq_loadNibView() |
| | | paymentView.frame = sceneDelegate?.window?.frame ?? .zero |
| | | paymentView.clouse = clouse |
| | | paymentView.paymentEnumType = enumType |
| | | // paymentView.view_wechat.isHidden = (money.wx == nil || money.wx == 0) |
| | | paymentView.view_coin.isHidden = (money.coin == nil || money.coin == 0) |
| | | paymentView.view_course.isHidden = (money.course == nil || money.course == 0) |
| | |
| | | if !paymentView.view_alipay.isHidden{customType.append(.aliPay)} |
| | | if !paymentView.view_wechat.isHidden{customType.append(.wechat)} |
| | | if !paymentView.view_coin.isHidden{customType.append(.coin)} |
| | | |
| | | paymentView.customType = customType |
| | | paymentView.btn_course.isUserInteractionEnabled = !hasNotStudent |
| | | |
| | | paymentView.payType = customType.first |
| | |
| | | } |
| | | |
| | | @IBAction func paymentAction(_ sender: UIButton) { |
| | | guard payType != nil else {alertError(msg: "请选择支付方式");return} |
| | | //场地,游戏,门票 可免费,根据上面的金额,展示了哪些条目判断,如果都没展示,金额全部会是0 |
| | | switch paymentEnumType { |
| | | case .yard,.game: |
| | | if payType == nil && customType.count == 0{ |
| | | payType = .coin |
| | | }else{ |
| | | guard payType != nil else {alertError(msg: "请选择支付方式");return} |
| | | } |
| | | case .goods(let type): |
| | | if type == .ticket{ |
| | | if payType == nil && customType.count == 0{ |
| | | payType = .coin |
| | | }else{ |
| | | guard payType != nil else {alertError(msg: "请选择支付方式");return} |
| | | } |
| | | }else{ |
| | | guard payType != nil else {alertError(msg: "请选择支付方式");return} |
| | | } |
| | | default:guard payType != nil else {alertError(msg: "请选择支付方式");return} |
| | | } |
| | | clouse?(payType!) |
| | | hidden() |
| | | } |
| | |
| | | |
| | | /// 支付方式 |
| | | enum PayType:Int,HandyJSONEnum{ |
| | | case free = 0 //特殊状态:免费 |
| | | case wechat = 1 |
| | | case aliPay = 2 |
| | | case coin = 3 |
| | |
| | | <array/> |
| | | </dict> |
| | | </array> |
| | | <key>ITSAppUsesNonExemptEncryption</key> |
| | | <false/> |
| | | <key>LSApplicationQueriesSchemes</key> |
| | | <array> |
| | | <string>weixin</string> |
| | |
| | | import JQTools |
| | | |
| | | #if DEBUG |
| | | let All_Url = "http://192.168.110.27:56666" //罗易胜 |
| | | //let All_Url = "http://8.137.22.229:56666" //正式地址 |
| | | //let All_Url = "http://192.168.110.27:56666" //罗易胜 |
| | | let All_Url = "http://8.137.22.229:56666" //正式地址 |
| | | let Game_Url = "https://try.daowepark.com" |
| | | |
| | | |
| | | //let Socket_Url = "192.168.110.22" |
| | | #else |
| | | let All_Url = "http://8.137.22.229:56666" //正式地址 |
| | | //let Game_Url = "https://port.daowepark.com"//正式地址 |
| | | let Game_Url = "https://try.daowepark.com" //测试地址 |
| | | let Game_Url = "https://port.daowepark.com"//正式地址 |
| | | //let Game_Url = "https://try.daowepark.com" //测试地址 |
| | | |
| | | //let Socket_Url = "192.168.110.22" |
| | | #endif |
| | |
| | | return |
| | | } |
| | | |
| | | PaymentView.show(money: (ali:price,wx:price,coin:coin,course:course,integral:nil),hasNotStudent: isStudent) { [weak self] type in |
| | | PaymentView.show(enumType: .activity, money: (ali:price,wx:price,coin:coin,course:course,integral:nil),hasNotStudent: isStudent) { [weak self] type in |
| | | guard let weakSelf = self else { return } |
| | | if type == .courseNum{ |
| | | PaymentCourseView.show(id: weakSelf.activityDetailModel.id,number:course) { id in |
| | |
| | | } |
| | | |
| | | let isStudent = weakSelf.students.filter({$0.isStudent == 0}).count > 0 ? true:false |
| | | PaymentView.show(money: (ali:price,wx:price,coin:coin,course:course,integral:nil),hasNotStudent: isStudent) { [weak self] type in |
| | | PaymentView.show(enumType: .activity, money: (ali:price,wx:price,coin:coin,course:course,integral:nil),hasNotStudent: isStudent) { [weak self] type in |
| | | guard let weakSelf = self else { return } |
| | | if type == .courseNum{ |
| | | PaymentCourseView.show(id: weakSelf.activityDetailModel.id,number:course) { id in |
| | |
| | | } |
| | | } |
| | | case .wechat:break |
| | | case .coin: |
| | | case .coin,.free: |
| | | let vc = PaymentResultVC(result: .success, objType: .activityApply) |
| | | self?.push(vc: vc) |
| | | case .courseNum: |
| | |
| | | coin = weakSelf.signUpModel?.coinPrice ?? 0 |
| | | } |
| | | |
| | | PaymentView.show(money: (ali:discountPrice,wx:discountPrice,coin:coin,course:nil,integral:nil)) { [weak self] payType in |
| | | PaymentView.show(enumType: .course, money: (ali:discountPrice,wx:discountPrice,coin:coin,course:nil,integral:nil)) { [weak self] payType in |
| | | guard let weakSelf = self else { return } |
| | | |
| | | var resultPayPrice:Double = 0 |
| | |
| | | |
| | | case .coin: |
| | | resultPayPrice = Double(coin) |
| | | case .courseNum,.integral:break |
| | | default:break |
| | | } |
| | | |
| | | Services.courcePayment(conponId: weakSelf.selectCouponModel?.id, courseConfigId: model.id, id: weakSelf.detailModel!.id, price: resultPayPrice, payType: payType, stuId: weakSelf.studentModels.map({$0.id}),orderId: weakSelf.signUpModel?.coursePayId).subscribe(onNext: { data in |
| | |
| | | let vc = PaymentResultVC(result: .success, objType: .courseApply,handleVC: self,courseConfigId: model.id) |
| | | vc.isExtend = self?.signUpModel?.payStatus == .paymented |
| | | self?.push(vc: vc) |
| | | case .courseNum,.integral:break |
| | | default:break |
| | | } |
| | | }else{ |
| | | alertError(msg: data.msg) |
| | |
| | | collectionView.delegate = self |
| | | collectionView.dataSource = self |
| | | collectionView.backgroundColor = .white |
| | | collectionView.contentInset = UIEdgeInsets(top: 0, left: 14, bottom: 14, right: 14) |
| | | collectionView.contentInset = UIEdgeInsets(top: JQ_ScreenW * 0.564 + 57, left: 14, bottom: 14, right: 14) |
| | | |
| | | view.addSubview(collectionView) |
| | | collectionView.snp.makeConstraints { make in |
| | |
| | | } |
| | | |
| | | @IBAction func scanAction(_ sender: UIButton) { |
| | | guard UIImagePickerController.isSourceTypeAvailable(.camera) else { |
| | | alertError(msg: "当前环境相机不可用");return |
| | | } |
| | | |
| | | let scan = CommonScanQRCodeVC {[weak self] text, status in |
| | | if status{ |
| | | |
| | |
| | | @IBAction func launchGameAction(_ sender: UIButton) { |
| | | GamesPayView.show(price: gameListModel.cash, coin: gameListModel.playCoin,integral: gameListModel.integral) {[weak self] () in |
| | | guard let weakSelf = self else { return } |
| | | PaymentView.show(money: (ali: weakSelf.gameListModel.cash, wx: weakSelf.gameListModel.cash, coin: weakSelf.gameListModel.playCoin, course: nil,integral:weakSelf.gameListModel.integral)) { [weak self] payType in |
| | | PaymentView.show(enumType:.game,money: (ali: weakSelf.gameListModel.cash, wx: weakSelf.gameListModel.cash, coin: weakSelf.gameListModel.playCoin, course: nil,integral:weakSelf.gameListModel.integral)) { [weak self] payType in |
| | | guard let weakSelf = self else { return } |
| | | Services.payGame(configId: weakSelf.gameListModel.id, gameId: weakSelf.gameListModel.gameId, spaceId: weakSelf.storeId, sutuId: weakSelf.sutuId, type: payType).subscribe(onNext: {data in |
| | | switch payType { |
| | |
| | | |
| | | group.notify(queue: .main) { |
| | | self.items = self.items.sorted { v1, v2 in |
| | | if let m1 = v1 as? HomeStoreTopBannerModel,let m2 = v2 as? HomeStoreConfigModel{ |
| | | return m1.sort < m2.sort |
| | | |
| | | var sort1 = 0 |
| | | var sort2 = 0 |
| | | |
| | | if let m = v1 as? HomeStoreTopBannerModel{ |
| | | sort1 = m.sort |
| | | } |
| | | |
| | | if let m1 = v1 as? HomeStoreConfigModel,let m2 = v2 as? HomeStoreTopBannerModel{ |
| | | return m1.sort < m2.sort |
| | | if let m = v1 as? HomeStoreConfigModel{ |
| | | sort1 = m.sort |
| | | } |
| | | return false |
| | | |
| | | if let m = v2 as? HomeStoreTopBannerModel{ |
| | | sort2 = m.sort |
| | | } |
| | | |
| | | if let m = v2 as? HomeStoreConfigModel{ |
| | | sort2 = m.sort |
| | | } |
| | | return sort1 < sort2 |
| | | } |
| | | |
| | | let v = self.items.compactMap { any in |
| | | if let m = any as? HomeStoreTopBannerModel{ |
| | | return "\(m.sort)" |
| | | } |
| | | if let m = any as? HomeStoreConfigModel{ |
| | | return "\(m.sort)" |
| | | } |
| | | return "" |
| | | } |
| | | |
| | | self.layout.collectionView?.reloadData() |
| | |
| | | price = 199 |
| | | #endif |
| | | |
| | | PaymentView.show(money: (ali:price,wx:price,coin:nil,course:nil,integral:nil)) { type in |
| | | PaymentView.show(enumType: .joinMember, 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: |
| | |
| | | |
| | | |
| | | textView_treaty.isEditable = false |
| | | textView_treaty.linkTextAttributes = [.foregroundColor:UIColor.black.withAlphaComponent(0.8)] |
| | | textView_treaty.linkTextAttributes = [.foregroundColor:UIColor(hexStr: "#3a9edc").withAlphaComponent(0.8)] |
| | | let paragraphStyle = NSMutableParagraphStyle() |
| | | paragraphStyle.lineBreakMode = NSLineBreakMode.byCharWrapping |
| | | paragraphStyle.lineSpacing = 3 |
| | | paragraphStyle.lineSpacing = 5 |
| | | |
| | | let content = "我已阅读并同意《隐私协议》《用户协议》《运动安全告知书》" |
| | | let content = "我已阅读并同意\n《隐私协议》\n《用户协议》\n《运动安全告知书》" |
| | | let attribute = NSMutableAttributedString(string: content) |
| | | attribute.addAttribute(.foregroundColor, value: UIColor.black.withAlphaComponent(0.6), range: NSRange(location: 0, length: content.count)) |
| | | attribute.addAttribute(.font, value: UIFont.systemFont(ofSize: 12, weight: .medium), range: NSRange(location: 0, length: content.count)) |
| | | attribute.addAttributes([NSAttributedString.Key.link:URL(string: "tip://treaty")!], range: content.jq_subRange("《隐私协议》")!) |
| | | attribute.addAttribute(NSAttributedString.Key.underlineStyle, value: NSNumber(value:NSUnderlineStyle.single.rawValue), range: content.jq_subRange("《隐私协议》")!) |
| | | attribute.addAttribute(.underlineColor, value: UIColor(hexStr: "#3a9edc"), range: content.jq_subRange("《隐私协议》")!) |
| | | |
| | | attribute.addAttributes([NSAttributedString.Key.link:URL(string: "tip://user")!], range: content.jq_subRange("《用户协议》")!) |
| | | attribute.addAttribute(NSAttributedString.Key.underlineStyle, value: NSNumber(value:NSUnderlineStyle.single.rawValue), range: content.jq_subRange("《用户协议》")!) |
| | | attribute.addAttribute(.underlineColor, value: UIColor(hexStr: "#3a9edc"), range: content.jq_subRange("《用户协议》")!) |
| | | |
| | | |
| | | attribute.addAttributes([NSAttributedString.Key.link:URL(string: "tip://sportSafety")!], range: content.jq_subRange("《运动安全告知书》")!) |
| | | attribute.addAttribute(NSAttributedString.Key.underlineStyle, value: NSNumber(value:NSUnderlineStyle.single.rawValue), range: content.jq_subRange("《运动安全告知书》")!) |
| | | attribute.addAttribute(.underlineColor, value: UIColor(hexStr: "#3a9edc"), range: content.jq_subRange("《运动安全告知书》")!) |
| | | |
| | | |
| | | attribute.addAttributes([.paragraphStyle:paragraphStyle], range: _NSRange(location: 0, length: content.count)) |
| | | self.textView_treaty.attributedText = attribute |
| | | self.textView_treaty.delegate = self |
| | |
| | | </constraints> |
| | | </view> |
| | | <textView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" text="我已阅读并同意《隐私协议》《用户协议》《运动安全告知书》" textAlignment="natural" translatesAutoresizingMaskIntoConstraints="NO" id="BqB-Az-Ez1"> |
| | | <rect key="frame" x="64" y="484" width="287" height="45"/> |
| | | <rect key="frame" x="64" y="484" width="287" height="110"/> |
| | | <color key="backgroundColor" systemColor="systemBackgroundColor"/> |
| | | <constraints> |
| | | <constraint firstAttribute="height" constant="45" id="rzR-7J-NJs"/> |
| | | <constraint firstAttribute="height" constant="110" id="rzR-7J-NJs"/> |
| | | </constraints> |
| | | <color key="textColor" systemColor="labelColor"/> |
| | | <fontDescription key="fontDescription" type="system" weight="medium" pointSize="12"/> |
| | |
| | | @IBOutlet weak var banner_collectionView: UICollectionView! |
| | | @IBOutlet weak var label_empty: UILabel! |
| | | @IBOutlet weak var view_container: UIView! |
| | | @IBOutlet weak var btn_special: UIButton! |
| | | // @IBOutlet weak var btn_special: UIButton! |
| | | @IBOutlet weak var btn_userLocal: UIButton! |
| | | // @IBOutlet weak var cons_CollectionAspect: NSLayoutConstraint! |
| | | |
| | |
| | | <dependencies> |
| | | <deployment identifier="iOS"/> |
| | | <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="22131"/> |
| | | <capability name="Named colors" minToolsVersion="9.0"/> |
| | | <capability name="System colors in document resources" minToolsVersion="11.0"/> |
| | | <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/> |
| | | </dependencies> |
| | |
| | | <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="SearchVC" customModule="WanPai" customModuleProvider="target"> |
| | | <connections> |
| | | <outlet property="banner_collectionView" destination="GVG-mQ-5A4" id="keS-lx-iWt"/> |
| | | <outlet property="btn_special" destination="5WV-eT-XUG" id="OzE-I1-cJB"/> |
| | | <outlet property="btn_userLocal" destination="G6c-mm-jtO" id="AS9-Qs-vFK"/> |
| | | <outlet property="label_empty" destination="FYv-6M-gC5" id="SA6-TH-Aqp"/> |
| | | <outlet property="scrollView" destination="Jbe-CY-MmI" id="MM5-aA-VjT"/> |
| | |
| | | <rect key="frame" x="0.0" y="0.0" width="393" height="818"/> |
| | | <subviews> |
| | | <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="w1y-Zq-96N"> |
| | | <rect key="frame" x="0.0" y="0.0" width="393" height="1034.3333333333333"/> |
| | | <rect key="frame" x="0.0" y="0.0" width="393" height="838.66666666666663"/> |
| | | <subviews> |
| | | <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="EPq-uU-JgH"> |
| | | <rect key="frame" x="0.0" y="0.0" width="393" height="195.33333333333334"/> |
| | | <subviews> |
| | | <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="bg_search" translatesAutoresizingMaskIntoConstraints="NO" id="DGE-Vl-Na6"> |
| | | <rect key="frame" x="0.0" y="0.0" width="393" height="195.33333333333334"/> |
| | | </imageView> |
| | | <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="立刻开通玩湃生活会员" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="uWB-gY-2cI"> |
| | | <rect key="frame" x="110.00000000000001" y="65" width="173.33333333333337" height="20.333333333333329"/> |
| | | <fontDescription key="fontDescription" type="system" pointSize="17"/> |
| | | <color key="textColor" red="0.20392156862745098" green="0.3411764705882353" blue="0.42352941176470588" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> |
| | | <nil key="highlightedColor"/> |
| | | </label> |
| | | <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="5WV-eT-XUG"> |
| | | <rect key="frame" x="163.66666666666666" y="91.333333333333329" width="66" height="22"/> |
| | | <constraints> |
| | | <constraint firstAttribute="height" constant="22" id="BR2-cJ-9Ba"/> |
| | | </constraints> |
| | | <fontDescription key="fontDescription" type="system" pointSize="16"/> |
| | | <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/> |
| | | <state key="normal" title="查看特权"> |
| | | <color key="titleColor" name="FE6E0D"/> |
| | | </state> |
| | | <connections> |
| | | <action selector="privilegeAction:" destination="-1" eventType="touchUpInside" id="Z4c-Kv-KQQ"/> |
| | | </connections> |
| | | </button> |
| | | <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="GgO-kO-a8k"> |
| | | <rect key="frame" x="163.66666666666666" y="115.33333333333333" width="66" height="1"/> |
| | | <color key="backgroundColor" name="FE6E0D"/> |
| | | <constraints> |
| | | <constraint firstAttribute="height" constant="1" id="5yd-wv-Of4"/> |
| | | </constraints> |
| | | </view> |
| | | </subviews> |
| | | <color key="backgroundColor" red="0.94901960784313721" green="0.95294117647058818" blue="0.96862745098039216" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> |
| | | <constraints> |
| | | <constraint firstItem="uWB-gY-2cI" firstAttribute="centerX" secondItem="DGE-Vl-Na6" secondAttribute="centerX" id="1As-tk-5Wg"/> |
| | | <constraint firstItem="DGE-Vl-Na6" firstAttribute="top" secondItem="EPq-uU-JgH" secondAttribute="top" id="2se-HH-eQh"/> |
| | | <constraint firstItem="5WV-eT-XUG" firstAttribute="leading" secondItem="GgO-kO-a8k" secondAttribute="leading" id="4Ik-Gv-p1R"/> |
| | | <constraint firstAttribute="trailing" secondItem="DGE-Vl-Na6" secondAttribute="trailing" id="I9h-e1-P3P"/> |
| | | <constraint firstAttribute="width" secondItem="EPq-uU-JgH" secondAttribute="height" multiplier="1:0.4974" id="JV4-yx-f0F"/> |
| | | <constraint firstItem="uWB-gY-2cI" firstAttribute="top" secondItem="EPq-uU-JgH" secondAttribute="top" constant="65" id="Ljo-ro-H0i"/> |
| | | <constraint firstItem="DGE-Vl-Na6" firstAttribute="leading" secondItem="EPq-uU-JgH" secondAttribute="leading" id="XMG-o9-rS5"/> |
| | | <constraint firstItem="5WV-eT-XUG" firstAttribute="top" secondItem="uWB-gY-2cI" secondAttribute="bottom" constant="6" id="hcm-Wy-ZCQ"/> |
| | | <constraint firstItem="GgO-kO-a8k" firstAttribute="top" secondItem="5WV-eT-XUG" secondAttribute="bottom" constant="2" id="kGP-ew-4Ur"/> |
| | | <constraint firstAttribute="bottom" secondItem="DGE-Vl-Na6" secondAttribute="bottom" id="qiC-fw-sLe"/> |
| | | <constraint firstItem="5WV-eT-XUG" firstAttribute="trailing" secondItem="GgO-kO-a8k" secondAttribute="trailing" id="sMv-ZJ-Lmf"/> |
| | | <constraint firstItem="5WV-eT-XUG" firstAttribute="centerX" secondItem="uWB-gY-2cI" secondAttribute="centerX" id="zeI-yT-QNR"/> |
| | | </constraints> |
| | | </view> |
| | | <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="前往玩湃" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="DLd-us-4A3"> |
| | | <rect key="frame" x="23" y="237.33333333333334" width="65.333333333333329" height="22.000000000000028"/> |
| | | <rect key="frame" x="23" y="42" width="65.333333333333329" height="22"/> |
| | | <constraints> |
| | | <constraint firstAttribute="height" constant="22" id="MPB-gD-l4i"/> |
| | | </constraints> |
| | |
| | | <nil key="highlightedColor"/> |
| | | </label> |
| | | <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="kz4-Kz-Gzm"> |
| | | <rect key="frame" x="23" y="276.33333333333331" width="347" height="194.66666666666669"/> |
| | | <rect key="frame" x="23" y="81" width="347" height="194.66666666666663"/> |
| | | <subviews> |
| | | <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="当前城市暂无门店" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="FYv-6M-gC5"> |
| | | <rect key="frame" x="0.0" y="0.0" width="347" height="194.66666666666666"/> |
| | |
| | | <nil key="highlightedColor"/> |
| | | </label> |
| | | <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="G6c-mm-jtO"> |
| | | <rect key="frame" x="312" y="159.66666666666669" width="30" height="30"/> |
| | | <rect key="frame" x="312" y="159.66666666666666" width="30" height="30"/> |
| | | <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/> |
| | | <state key="normal" image="btn_map_local"/> |
| | | <connections> |
| | |
| | | </constraints> |
| | | </view> |
| | | <stackView opaque="NO" contentMode="scaleToFill" distribution="fillEqually" spacing="16" translatesAutoresizingMaskIntoConstraints="NO" id="W2A-PE-Zq8"> |
| | | <rect key="frame" x="26" y="817.33333333333337" width="341" height="162"/> |
| | | <rect key="frame" x="26" y="621.66666666666663" width="341" height="162"/> |
| | | <subviews> |
| | | <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Lz2-Km-ydI" customClass="TapBtn" customModule="WanPai" customModuleProvider="target"> |
| | | <rect key="frame" x="0.0" y="0.0" width="162.66666666666666" height="162"/> |
| | |
| | | </constraints> |
| | | </stackView> |
| | | <collectionView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" pagingEnabled="YES" showsHorizontalScrollIndicator="NO" dataMode="none" translatesAutoresizingMaskIntoConstraints="NO" id="GVG-mQ-5A4"> |
| | | <rect key="frame" x="0.0" y="503" width="393" height="257.33333333333326"/> |
| | | <rect key="frame" x="0.0" y="307.66666666666669" width="393" height="257.00000000000006"/> |
| | | <color key="backgroundColor" systemColor="systemBackgroundColor"/> |
| | | <constraints> |
| | | <constraint firstAttribute="width" secondItem="GVG-mQ-5A4" secondAttribute="height" multiplier="1:0.6541" id="r90-ek-NTR"/> |
| | |
| | | <constraints> |
| | | <constraint firstItem="GVG-mQ-5A4" firstAttribute="leading" secondItem="w1y-Zq-96N" secondAttribute="leading" id="17N-sE-wz0"/> |
| | | <constraint firstItem="kz4-Kz-Gzm" firstAttribute="leading" secondItem="w1y-Zq-96N" secondAttribute="leading" constant="23" id="3Uf-8q-OAN"/> |
| | | <constraint firstItem="EPq-uU-JgH" firstAttribute="top" secondItem="w1y-Zq-96N" secondAttribute="top" id="A23-af-LgB"/> |
| | | <constraint firstItem="W2A-PE-Zq8" firstAttribute="leading" secondItem="w1y-Zq-96N" secondAttribute="leading" constant="26" id="AtV-Kr-OEc"/> |
| | | <constraint firstItem="GVG-mQ-5A4" firstAttribute="top" secondItem="kz4-Kz-Gzm" secondAttribute="bottom" constant="32" id="Igg-1d-nE8"/> |
| | | <constraint firstAttribute="bottom" secondItem="W2A-PE-Zq8" secondAttribute="bottom" constant="55" id="K5D-B5-JBH"/> |
| | | <constraint firstItem="DLd-us-4A3" firstAttribute="top" secondItem="w1y-Zq-96N" secondAttribute="top" constant="42" id="LL4-80-YhX"/> |
| | | <constraint firstAttribute="trailing" secondItem="GVG-mQ-5A4" secondAttribute="trailing" id="OvB-FO-WkW"/> |
| | | <constraint firstItem="DLd-us-4A3" firstAttribute="top" secondItem="EPq-uU-JgH" secondAttribute="bottom" constant="42" id="RmO-Er-nzk"/> |
| | | <constraint firstItem="EPq-uU-JgH" firstAttribute="leading" secondItem="w1y-Zq-96N" secondAttribute="leading" id="TN8-uj-rSh"/> |
| | | <constraint firstItem="kz4-Kz-Gzm" firstAttribute="top" secondItem="DLd-us-4A3" secondAttribute="bottom" constant="17" id="TYk-Ic-7l5"/> |
| | | <constraint firstAttribute="trailing" secondItem="W2A-PE-Zq8" secondAttribute="trailing" constant="26" id="Yfu-Bf-75b"/> |
| | | <constraint firstItem="DLd-us-4A3" firstAttribute="leading" secondItem="w1y-Zq-96N" secondAttribute="leading" constant="23" id="fiq-V8-p3c"/> |
| | | <constraint firstAttribute="trailing" secondItem="kz4-Kz-Gzm" secondAttribute="trailing" constant="23" id="rbO-WH-9CE"/> |
| | | <constraint firstItem="W2A-PE-Zq8" firstAttribute="top" secondItem="GVG-mQ-5A4" secondAttribute="bottom" constant="57" id="ve8-5z-kaa"/> |
| | | <constraint firstAttribute="trailing" secondItem="EPq-uU-JgH" secondAttribute="trailing" id="zD3-4X-jiI"/> |
| | | </constraints> |
| | | </view> |
| | | </subviews> |
| | |
| | | </view> |
| | | </objects> |
| | | <resources> |
| | | <image name="bg_search" width="390" height="194"/> |
| | | <image name="btn_map_local" width="30" height="30"/> |
| | | <image name="icon_aboutUs" width="48" height="36"/> |
| | | <image name="icon_customer" width="45" height="38"/> |
| | | <namedColor name="FE6E0D"> |
| | | <color red="0.99199998378753662" green="0.53299999237060547" blue="0.0080000003799796104" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> |
| | | </namedColor> |
| | | <systemColor name="systemBackgroundColor"> |
| | | <color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> |
| | | </systemColor> |
| | | <systemColor name="systemGroupedBackgroundColor"> |
| | | <color red="0.94901960780000005" green="0.94901960780000005" blue="0.96862745100000003" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> |
| | | <color red="0.94901960784313721" green="0.94901960784313721" blue="0.96862745098039216" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> |
| | | </systemColor> |
| | | </resources> |
| | | </document> |
| | |
| | | |
| | | @IBAction func rechargeAction(_ sender: UIButton) { |
| | | let item = items[selectIndex] |
| | | PaymentView.show(money: (ali:item.money,wx:item.money,coin:nil,course:nil,integral:nil)) {[weak self] type in |
| | | PaymentView.show(enumType: .recharge, money: (ali:item.money,wx:item.money,coin:nil,course:nil,integral:nil)) {[weak self] type in |
| | | guard let weakSelf = self else { return } |
| | | Services.useBenefitPayment(amount: item.money, payType:type).subscribe(onNext: {data in |
| | | if let m = data.data{ |
| | |
| | | @IBOutlet weak var label_courseHours: UILabel! |
| | | @IBOutlet weak var view_courseHours: UIView! |
| | | @IBOutlet weak var view_exchangeStore: UIView! |
| | | @IBOutlet weak var view_vaildTime: UIView! |
| | | @IBOutlet weak var webView: WKWebView! |
| | | @IBOutlet weak var label_storeName: UILabel! |
| | | @IBOutlet weak var cons_webHei: NSLayoutConstraint! |
| | |
| | | override func viewDidLoad() { |
| | | super.viewDidLoad() |
| | | title = "商品详情" |
| | | |
| | | if goodsType == .ticket{ |
| | | view_vaildTime.isHidden = true //临时隐藏 |
| | | } |
| | | |
| | | //全局隐藏,目前不需要 |
| | | view_exchangeStore.isHidden = true |
| | |
| | | guard state else {return} |
| | | guard let weakSelf = self else { return } |
| | | |
| | | let goodsType = weakSelf.exchangeGoodsModel!.goodType |
| | | var n = num |
| | | if weakSelf.exchangeGoodsModel?.goodType == .course{ |
| | | if goodsType == .course{ |
| | | n = num * weakSelf.studentModels.count |
| | | } |
| | | |
| | | |
| | | if weakSelf.exchangeGoodsModel!.exchangeType == .coin{ |
| | | Services.exchangeOperation(exchangeType: .coin, goodsId: weakSelf.exchangeGoodsModel!.goodId, goodsType: weakSelf.exchangeGoodsModel!.goodType, num: n, payType: nil, stuIds: weakSelf.studentModels.map({"\($0.id)"}).joined(separator: ","),storeId: weakSelf.selectStoreModel?.storeId).subscribe(onNext: {[weak self] data in |
| | | Services.exchangeOperation(exchangeType: .coin, goodsId: weakSelf.exchangeGoodsModel!.goodId, goodsType: goodsType, num: n, payType: nil, stuIds: weakSelf.studentModels.map({"\($0.id)"}).joined(separator: ","),storeId: weakSelf.selectStoreModel?.storeId).subscribe(onNext: {[weak self] data in |
| | | guard let weakSelf = self else { return } |
| | | let vc = PaymentResultVC(result: .success, objType: .exchange) |
| | | vc.otherInfo = ["id":data.data?.returnId ?? 0,"goodsType":weakSelf.exchangeGoodsModel!.goodType.rawValue] |
| | | vc.otherInfo = ["id":data.data?.returnId ?? 0,"goodsType":goodsType.rawValue] |
| | | self?.push(vc: vc) |
| | | self?.exchangeSuccessUI() |
| | | NotificationCenter.default.post(name: UpdateWelfare_Noti, object: nil) |
| | |
| | | }).disposed(by: weakSelf.disposeBag) |
| | | }else { |
| | | //支付金额 |
| | | PaymentView.show(money: (ali:cash,wx:cash,coin:nil,course:nil,integral:nil)) { payType in |
| | | PaymentView.show(enumType: .goods(goodsType), money: (ali:cash,wx:cash,coin:nil,course:nil,integral:nil)) { payType in |
| | | Services.exchangeOperation(exchangeType: weakSelf.exchangeGoodsModel!.exchangeType, goodsId: weakSelf.exchangeGoodsModel!.goodId, goodsType: weakSelf.exchangeGoodsModel!.goodType, num: n, payType: payType, stuIds: weakSelf.studentModels.map({"\($0.id)"}).joined(separator: ","), storeId: weakSelf.selectStoreModel?.storeId).subscribe(onNext: {[weak self] data in |
| | | if let m = data.data{ |
| | | switch payType { |
| | |
| | | } |
| | | } |
| | | case .wechat:break |
| | | case .coin:break |
| | | case .coin: |
| | | let vc = PaymentResultVC(result: .success, objType: .exchange) |
| | | vc.otherInfo = ["id":m.returnId,"goodsType":weakSelf.exchangeGoodsModel!.goodType.rawValue] |
| | | self?.push(vc: vc) |
| | | self?.exchangeSuccessUI() |
| | | case .courseNum:break |
| | | case .integral:break |
| | | default:break |
| | | } |
| | | } |
| | | },onError: { error in |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="22154" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES"> |
| | | <document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="22155" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES"> |
| | | <device id="retina6_12" orientation="portrait" appearance="light"/> |
| | | <dependencies> |
| | | <deployment identifier="iOS"/> |
| | | <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="22130"/> |
| | | <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="22131"/> |
| | | <capability name="Named colors" minToolsVersion="9.0"/> |
| | | <capability name="Safe area layout guides" minToolsVersion="9.0"/> |
| | | <capability name="System colors in document resources" minToolsVersion="11.0"/> |
| | |
| | | <outlet property="view_selectStoreHei" destination="k25-Gd-ndU" id="XnP-Bn-wNP"/> |
| | | <outlet property="view_students" destination="0QQ-kQ-0an" id="cy7-oc-Uw9"/> |
| | | <outlet property="view_ticketType" destination="DXe-Ah-4gm" id="Zdx-tC-AKo"/> |
| | | <outlet property="view_vaildTime" destination="eTp-S5-gYB" id="2rY-96-r61"/> |
| | | <outlet property="webView" destination="tQn-lc-7cb" id="xcY-cg-bKR"/> |
| | | </connections> |
| | | </placeholder> |
| | |
| | | <color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> |
| | | </systemColor> |
| | | <systemColor name="systemGroupedBackgroundColor"> |
| | | <color red="0.94901960780000005" green="0.94901960780000005" blue="0.96862745100000003" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> |
| | | <color red="0.94901960784313721" green="0.94901960784313721" blue="0.96862745098039216" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> |
| | | </systemColor> |
| | | </resources> |
| | | </document> |
| | |
| | | @IBOutlet weak var coinCollectionView: UICollectionView! |
| | | @IBOutlet weak var btn_coupon: UIButton! |
| | | // @IBOutlet weak var btn_shoppping: UIButton! |
| | | @IBOutlet weak var btn_weekly: UIButton! |
| | | @IBOutlet weak var btn_todayFree: UIButton! |
| | | // @IBOutlet weak var btn_weekly: UIButton! |
| | | // @IBOutlet weak var btn_todayFree: UIButton! |
| | | |
| | | private var timerOffsetX:Double = 0 |
| | | private let cellW = 144.0 |
| | |
| | | } |
| | | |
| | | if let weeksBenefit = model.image?.weeksBenefit{ |
| | | self?.btn_weekly.sd_setImage(with: URL(string: weeksBenefit), for: .normal, placeholderImage: nil, context: nil) |
| | | // self?.btn_weekly.sd_setImage(with: URL(string: weeksBenefit), for: .normal, placeholderImage: nil, context: nil) |
| | | } |
| | | |
| | | if let todayFree = model.image?.todayFree{ |
| | | self?.btn_todayFree.sd_setImage(with: URL(string: todayFree), for: .normal, placeholderImage: nil, context: nil) |
| | | // self?.btn_todayFree.sd_setImage(with: URL(string: todayFree), for: .normal, placeholderImage: nil, context: nil) |
| | | } |
| | | } |
| | | }) { error in |
| | |
| | | <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="WelfareVC" customModule="WanPai" customModuleProvider="target"> |
| | | <connections> |
| | | <outlet property="btn_coupon" destination="Kte-Xd-tVd" id="Xg6-k9-w88"/> |
| | | <outlet property="btn_todayFree" destination="r4f-Ay-EGJ" id="zTX-Pu-U2q"/> |
| | | <outlet property="btn_vip" destination="6lk-Nd-Tug" id="fed-2F-KP6"/> |
| | | <outlet property="btn_weekly" destination="hBk-90-GU4" id="R7h-4s-dyR"/> |
| | | <outlet property="coinCollectionView" destination="yBw-of-rdU" id="g6s-C7-Axj"/> |
| | | <outlet property="img_userProfile" destination="7GZ-X8-dwC" id="nYH-xs-aFt"/> |
| | | <outlet property="label_coin" destination="5GZ-Mz-c7r" id="XTu-31-9ux"/> |
| | |
| | | <rect key="frame" x="0.0" y="59" width="393" height="759"/> |
| | | <subviews> |
| | | <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="1kO-ug-2Gd"> |
| | | <rect key="frame" x="0.0" y="0.0" width="393" height="1284.6666666666667"/> |
| | | <rect key="frame" x="0.0" y="0.0" width="393" height="715"/> |
| | | <subviews> |
| | | <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="qtJ-Db-Js8"> |
| | | <rect key="frame" x="0.0" y="0.0" width="393" height="152"/> |
| | |
| | | <color key="textColor" red="0.18823529410000001" green="0.3294117647" blue="0.38823529410000002" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> |
| | | <nil key="highlightedColor"/> |
| | | </label> |
| | | <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="bgn-Mv-nv3"> |
| | | <button hidden="YES" opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="bgn-Mv-nv3"> |
| | | <rect key="frame" x="90.333333333333329" y="116" width="51.999999999999986" height="22"/> |
| | | <constraints> |
| | | <constraint firstAttribute="height" constant="22" id="nYC-Nx-coY"/> |
| | |
| | | <action selector="rechargeAction:" destination="-1" eventType="touchUpInside" id="Vwg-Z8-yj2"/> |
| | | </connections> |
| | | </button> |
| | | <button hidden="YES" opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="cWO-5E-szA"> |
| | | <rect key="frame" x="291" y="116" width="52" height="22"/> |
| | | <constraints> |
| | | <constraint firstAttribute="width" constant="52" id="Tto-xt-EoC"/> |
| | | <constraint firstAttribute="height" constant="22" id="gzD-OM-r2g"/> |
| | | </constraints> |
| | | <fontDescription key="fontDescription" type="system" pointSize="10"/> |
| | | <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.18823529410000001" green="0.3294117647" blue="0.38823529410000002" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> |
| | | </state> |
| | | <userDefinedRuntimeAttributes> |
| | | <userDefinedRuntimeAttribute type="boolean" keyPath="ld_maskToBoundsXIB" value="YES"/> |
| | | <userDefinedRuntimeAttribute type="number" keyPath="ld_cornerRadiusXIB"> |
| | | <real key="value" value="11"/> |
| | | </userDefinedRuntimeAttribute> |
| | | <userDefinedRuntimeAttribute type="color" keyPath="jq_xibBorderColor"> |
| | | <color key="value" name="FE6E0D"/> |
| | | </userDefinedRuntimeAttribute> |
| | | <userDefinedRuntimeAttribute type="number" keyPath="jq_xibBorderWidth"> |
| | | <real key="value" value="1"/> |
| | | </userDefinedRuntimeAttribute> |
| | | </userDefinedRuntimeAttributes> |
| | | </button> |
| | | <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="KrQ-RG-f2e"> |
| | | <rect key="frame" x="31" y="23" width="174" height="62"/> |
| | | <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/> |
| | |
| | | </button> |
| | | </subviews> |
| | | <constraints> |
| | | <constraint firstItem="cWO-5E-szA" firstAttribute="centerY" secondItem="fYH-IU-RDd" secondAttribute="centerY" id="0K4-94-Qu9"/> |
| | | <constraint firstItem="cWO-5E-szA" firstAttribute="leading" secondItem="FKV-jp-n9Z" secondAttribute="trailing" constant="5" id="1ir-Ro-5p5"/> |
| | | <constraint firstItem="fYH-IU-RDd" firstAttribute="centerY" secondItem="joc-Xf-ULn" secondAttribute="centerY" id="8es-JY-3wH"/> |
| | | <constraint firstItem="FKV-jp-n9Z" firstAttribute="leading" secondItem="ft0-mn-MrN" secondAttribute="trailing" constant="5" id="Bje-9P-TL6"/> |
| | | <constraint firstAttribute="height" constant="152" id="DLs-yR-39v"/> |
| | |
| | | </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="01D-ex-NB6"> |
| | | <rect key="frame" x="40.999999999999993" y="752" width="65.333333333333314" height="22"/> |
| | | <constraints> |
| | | <constraint firstAttribute="height" constant="22" id="cZB-Sn-Vhw"/> |
| | | </constraints> |
| | | <fontDescription key="fontDescription" type="system" weight="medium" pointSize="16"/> |
| | | <color key="textColor" red="0.28235294119999998" green="0.28235294119999998" blue="0.28235294119999998" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> |
| | | <nil key="highlightedColor"/> |
| | | </label> |
| | | <button opaque="NO" contentMode="scaleAspectFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="hBk-90-GU4"> |
| | | <rect key="frame" x="41" y="793" width="311" height="203"/> |
| | | <constraints> |
| | | <constraint firstAttribute="width" secondItem="hBk-90-GU4" secondAttribute="height" multiplier="1:0.6525" id="iMt-GH-OCP"/> |
| | | </constraints> |
| | | <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/> |
| | | <connections> |
| | | <action selector="welfareWeeklyAction:" destination="-1" eventType="touchUpInside" id="bXl-Yh-tq4"/> |
| | | </connections> |
| | | </button> |
| | | <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="今日免费" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="8KD-JW-do0"> |
| | | <rect key="frame" x="40.999999999999993" y="1031" width="65.333333333333314" height="22"/> |
| | | <constraints> |
| | | <constraint firstAttribute="height" constant="22" id="pc0-0u-NIz"/> |
| | | </constraints> |
| | | <fontDescription key="fontDescription" type="system" weight="medium" pointSize="16"/> |
| | | <color key="textColor" red="0.28235294119999998" green="0.28235294119999998" blue="0.28235294119999998" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> |
| | | <nil key="highlightedColor"/> |
| | | </label> |
| | | <button opaque="NO" contentMode="scaleAspectFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="r4f-Ay-EGJ"> |
| | | <rect key="frame" x="41" y="1072" width="311" height="202.66666666666674"/> |
| | | <constraints> |
| | | <constraint firstAttribute="width" secondItem="r4f-Ay-EGJ" secondAttribute="height" multiplier="1:0.6525" id="WOq-qS-ptG"/> |
| | | </constraints> |
| | | <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/> |
| | | <connections> |
| | | <action selector="freeTodayAction:" destination="-1" eventType="touchUpInside" id="CF2-ok-0h8"/> |
| | | </connections> |
| | | </button> |
| | | </subviews> |
| | | <color key="backgroundColor" systemColor="systemBackgroundColor"/> |
| | | <constraints> |
| | | <constraint firstItem="15P-Xn-N3C" firstAttribute="top" secondItem="qtJ-Db-Js8" secondAttribute="bottom" constant="21" id="1vm-8y-gxJ"/> |
| | | <constraint firstItem="yBw-of-rdU" firstAttribute="leading" secondItem="1kO-ug-2Gd" secondAttribute="leading" id="2v6-zk-jO5"/> |
| | | <constraint firstAttribute="trailing" secondItem="qtJ-Db-Js8" secondAttribute="trailing" id="3Ja-c5-h01"/> |
| | | <constraint firstItem="8KD-JW-do0" firstAttribute="leading" secondItem="1kO-ug-2Gd" secondAttribute="leading" constant="41" id="3oG-S6-2FT"/> |
| | | <constraint firstItem="01D-ex-NB6" firstAttribute="leading" secondItem="1kO-ug-2Gd" secondAttribute="leading" constant="41" id="4mE-Yh-4C3"/> |
| | | <constraint firstAttribute="trailing" secondItem="hBk-90-GU4" secondAttribute="trailing" constant="41" id="65D-Zy-aO7"/> |
| | | <constraint firstItem="qtJ-Db-Js8" firstAttribute="top" secondItem="1kO-ug-2Gd" secondAttribute="top" id="ArH-VK-Ih1"/> |
| | | <constraint firstItem="hBk-90-GU4" firstAttribute="leading" secondItem="1kO-ug-2Gd" secondAttribute="leading" constant="41" id="DM6-A0-eq8"/> |
| | | <constraint firstItem="15P-Xn-N3C" firstAttribute="leading" secondItem="1kO-ug-2Gd" secondAttribute="leading" constant="30" id="E7I-5W-IU3"/> |
| | | <constraint firstAttribute="trailing" secondItem="r4f-Ay-EGJ" secondAttribute="trailing" constant="41" id="IEF-Ks-rrX"/> |
| | | <constraint firstAttribute="trailing" secondItem="yBw-of-rdU" secondAttribute="trailing" id="IP4-Gn-Ai6"/> |
| | | <constraint firstItem="3kA-cL-Ed9" firstAttribute="top" secondItem="GiC-Xf-dhQ" secondAttribute="bottom" constant="11" id="Kru-uw-J4P"/> |
| | | <constraint firstItem="r4f-Ay-EGJ" firstAttribute="leading" secondItem="1kO-ug-2Gd" secondAttribute="leading" constant="41" id="Oze-fE-LkT"/> |
| | | <constraint firstItem="3kA-cL-Ed9" firstAttribute="leading" secondItem="1kO-ug-2Gd" secondAttribute="leading" id="WeR-P6-ZdV"/> |
| | | <constraint firstAttribute="trailing" secondItem="3kA-cL-Ed9" secondAttribute="trailing" id="bts-6y-Zk6"/> |
| | | <constraint firstAttribute="bottom" secondItem="3kA-cL-Ed9" secondAttribute="bottom" constant="10" id="eyB-YC-OJF"/> |
| | | <constraint firstItem="GiC-Xf-dhQ" firstAttribute="leading" secondItem="1kO-ug-2Gd" secondAttribute="leading" constant="30" id="gY0-D8-1VM"/> |
| | | <constraint firstItem="01D-ex-NB6" firstAttribute="top" secondItem="3kA-cL-Ed9" secondAttribute="bottom" constant="47" id="nA0-zN-Mne"/> |
| | | <constraint firstItem="GiC-Xf-dhQ" firstAttribute="top" secondItem="yBw-of-rdU" secondAttribute="bottom" constant="17" id="nqA-X1-BoF"/> |
| | | <constraint firstItem="hBk-90-GU4" firstAttribute="top" secondItem="01D-ex-NB6" secondAttribute="bottom" constant="19" id="p7O-Nf-d3F"/> |
| | | <constraint firstItem="r4f-Ay-EGJ" firstAttribute="top" secondItem="8KD-JW-do0" secondAttribute="bottom" constant="19" id="rIa-aO-Ceb"/> |
| | | <constraint firstItem="yBw-of-rdU" firstAttribute="top" secondItem="15P-Xn-N3C" secondAttribute="bottom" constant="9" id="tn6-cH-k2u"/> |
| | | <constraint firstItem="qtJ-Db-Js8" firstAttribute="leading" secondItem="1kO-ug-2Gd" secondAttribute="leading" id="vz9-lC-ac4"/> |
| | | <constraint firstItem="8KD-JW-do0" firstAttribute="top" secondItem="hBk-90-GU4" secondAttribute="bottom" constant="35" id="wOz-Xc-Sdq"/> |
| | | <constraint firstAttribute="bottom" secondItem="r4f-Ay-EGJ" secondAttribute="bottom" constant="10" id="y44-d4-HxC"/> |
| | | </constraints> |
| | | </view> |
| | | </subviews> |
| | |
| | | @IBAction func paymentAction(_ sender: UIButton) { |
| | | Services.continuePaymentPrice(id: yardBookingModel.id).subscribe(onNext: { data in |
| | | if let model = data.data{ |
| | | PaymentView.show(money: (ali: model.cash, wx: model.cash, coin: model.playPaiCoin, course: nil,integral:nil)) { [weak self] paytype in |
| | | PaymentView.show(enumType: .yard, money: (ali: model.cash, wx: model.cash, coin: model.playPaiCoin, course: nil,integral:nil)) { [weak self] paytype in |
| | | guard let weakSelf = self else { return } |
| | | Services.continuePayment(id: weakSelf.yardBookingModel.id, payType: paytype).subscribe(onNext: {data in |
| | | if let m = data.data{ |
| | |
| | | } |
| | | } |
| | | case .wechat,.integral:break |
| | | case .coin: |
| | | case .coin,.free: |
| | | NotificationCenter.default.post(name: RefreshBooking_Noti, object: weakSelf.indexPath) |
| | | let vc = PaymentResultVC(result: .success, objType: .activityApply) |
| | | JQ_currentViewController().jq_push(vc: vc) |
| | |
| | | self?.label_paymentPrice.text = model.payMoney.string + "课时" |
| | | case .coin: |
| | | self?.label_paymentPrice.text = model.payMoney.int.string + "币" |
| | | case .integral:break |
| | | default:break |
| | | } |
| | | |
| | | self?.label_bookingTime.text = model.times |
| | |
| | | |
| | | Services.continuePaymentPrice(id: id).subscribe(onNext: {data in |
| | | if let model = data.data{ |
| | | PaymentView.show(money: (ali: model.cash, wx: model.cash, coin: model.playPaiCoin, course: nil,integral:nil)) { [weak self] paytype in |
| | | PaymentView.show(enumType: .yard, money: (ali: model.cash, wx: model.cash, coin: model.playPaiCoin, course: nil,integral:nil)) { [weak self] paytype in |
| | | guard let weakSelf = self else { return } |
| | | Services.continuePayment(id: id, payType: paytype).subscribe(onNext: {data in |
| | | if let m = data.data{ |
| | |
| | | } |
| | | } |
| | | case .wechat:break |
| | | case .coin: |
| | | case .coin,.free: |
| | | let vc = PaymentResultVC(result: .success, objType: .activityApply) |
| | | self?.push(vc: vc) |
| | | case .courseNum:break |
| | | case .integral:break |
| | | default:break |
| | | } |
| | | } |
| | | }) { error in |
| | | guard let weakSelf = self else { return } |
| | | }) {[weak self] error in |
| | | if let er = error as? NetworkRequest.NetRequestError{ |
| | | switch er { |
| | | case .Other(let code,let string): |
| | |
| | | } |
| | | |
| | | |
| | | PaymentView.show(money: (ali:price,wx:price,coin:coin,course:nil,integral:nil)) { [weak self] type in |
| | | PaymentView.show(enumType: .yard, money: (ali:price,wx:price,coin:coin,course:nil,integral:nil)) { [weak self] type in |
| | | guard let weakSelf = self else { return } |
| | | Services.reservationSite(booker: weakSelf.tf_person.text!, couponId: weakSelf.selectCouponModel?.id, id: weakSelf.siteDetailModel.id, payType: type, phone: weakSelf.tf_phone.text!, times: datetimes.joined(separator: ";"),halfName:halfName,isHalf:isHalf,nextName:nextName).subscribe(onNext: { data in |
| | | if let m = data.data{ |
| | |
| | | } |
| | | |
| | | case .wechat,.integral:break |
| | | case .coin: |
| | | case .coin,.free: |
| | | NotificationCenter.default.post(name: UpdateDetailDate_Noti, object: nil) |
| | | let vc = YardBookingDetailVC(siteBookingId: m.siteBooking) |
| | | weakSelf.push(vc: vc) |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> |
| | | <plist version="1.0"> |
| | | <dict> |
| | | <key>com.apple.developer.associated-domains</key> |
| | | <array> |
| | | <string>webcredentials:www.weparklife.com/</string> |
| | | </array> |
| | | </dict> |
| | | </plist> |