| | |
| | | buildSettings = { |
| | | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; |
| | | ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; |
| | | CLANG_ENABLE_MODULE_DEBUGGING = NO; |
| | | CODE_SIGN_ENTITLEMENTS = WanPai/WanPaiDebug.entitlements; |
| | | CODE_SIGN_IDENTITY = "Apple Development"; |
| | | CODE_SIGN_STYLE = Automatic; |
| | | CURRENT_PROJECT_VERSION = 19; |
| | | CURRENT_PROJECT_VERSION = 20; |
| | | DEVELOPMENT_TEAM = 2MWV8K39DV; |
| | | FRAMEWORK_SEARCH_PATHS = ( |
| | | "$(inherited)", |
| | |
| | | "$(inherited)", |
| | | "$(PROJECT_DIR)/WanPai/YYPaymentManager/WeChatPay", |
| | | ); |
| | | MARKETING_VERSION = 2.0.9; |
| | | MARKETING_VERSION = 2.1.0; |
| | | OTHER_LDFLAGS = ( |
| | | "$(inherited)", |
| | | "-ObjC", |
| | |
| | | "\"XCGLogger\"", |
| | | "\"-ld64\"", |
| | | ); |
| | | PRODUCT_BUNDLE_IDENTIFIER = "com.I-GO.user"; |
| | | PRODUCT_BUNDLE_IDENTIFIER = com.sinata.WeParkLife; |
| | | PRODUCT_NAME = "$(TARGET_NAME)"; |
| | | PROVISIONING_PROFILE_SPECIFIER = ""; |
| | | SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; |
| | |
| | | buildSettings = { |
| | | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; |
| | | ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; |
| | | CLANG_ENABLE_MODULE_DEBUGGING = NO; |
| | | CODE_SIGN_ENTITLEMENTS = WanPai/WanPaiRelease.entitlements; |
| | | CODE_SIGN_IDENTITY = "Apple Development"; |
| | | CODE_SIGN_STYLE = Automatic; |
| | | CURRENT_PROJECT_VERSION = 19; |
| | | CURRENT_PROJECT_VERSION = 20; |
| | | DEVELOPMENT_TEAM = 2MWV8K39DV; |
| | | FRAMEWORK_SEARCH_PATHS = ( |
| | | "$(inherited)", |
| | |
| | | "$(inherited)", |
| | | "$(PROJECT_DIR)/WanPai/YYPaymentManager/WeChatPay", |
| | | ); |
| | | MARKETING_VERSION = 2.0.9; |
| | | MARKETING_VERSION = 2.1.0; |
| | | OTHER_LDFLAGS = ( |
| | | "$(inherited)", |
| | | "-ObjC", |
| | |
| | | "\"XCGLogger\"", |
| | | "\"-ld64\"", |
| | | ); |
| | | PRODUCT_BUNDLE_IDENTIFIER = "com.I-GO.user"; |
| | | PRODUCT_BUNDLE_IDENTIFIER = com.sinata.WeParkLife; |
| | | PRODUCT_NAME = "$(TARGET_NAME)"; |
| | | PROVISIONING_PROFILE_SPECIFIER = ""; |
| | | SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; |
| | |
| | | |
| | | @IBOutlet weak var sureAction: UIButton! |
| | | |
| | | private var clouse:((Int)->Void)! |
| | | private var clouse:((Int,String)->Void)! |
| | | |
| | | @IBOutlet weak var tabview: UITableView! |
| | | |
| | |
| | | sureAction.layer.cornerRadius = 5 |
| | | |
| | | } |
| | | static func show(arr:[GetWorldCupListFromRank]?, clouse:@escaping (Int) -> Void){ |
| | | static func show(arr:[GetWorldCupListFromRank]?, clouse:@escaping (Int,String) -> Void){ |
| | | |
| | | let alertView = WorldCupListRankView.jq_loadNibView() |
| | | alertView.clouse = clouse |
| | |
| | | if dataSoure?.count == 0 { |
| | | return |
| | | } |
| | | self.clouse(dataSoure?[self.selectIndex].worldCupId ?? 0) |
| | | self.clouse(dataSoure?[self.selectIndex].worldCupId ?? 0,dataSoure?[self.selectIndex].name ?? "") |
| | | UIView.animate(withDuration: 0.4) { |
| | | self.alpha = 0 |
| | | self.layoutIfNeeded() |
| | |
| | | case coin = 1 |
| | | case cashAndCoin = 2 |
| | | case cash = 3 |
| | | case mpiao = 4 |
| | | } |
| | | |
| | | enum UseStateType:Int,HandyJSONEnum{ |
| | |
| | | var userName: String = "未命名" |
| | | var wpCoin: Int = 0 |
| | | var referee:Int = 0 //是否是裁判(0=否,1=是) |
| | | var vipEndTime: String = "" |
| | | } |
| | | |
| | | struct BenefitImageModel:HandyJSON{ |
| | |
| | | var ruleModel: CouponModelRuleModel? |
| | | var type:CouponType = .discount |
| | | var useCondition: CouponConditionType = .nationwide |
| | | var useStatus: CouponUseType = .overdue |
| | | |
| | | var useStatus: CouponUseType = .used |
| | | var count : Int = 0 |
| | | var showAll = false |
| | | |
| | | var goJB = false |
| | | required init(){} |
| | | } |
| | | |
| | |
| | | var type = 2 //固定 |
| | | } |
| | | |
| | | struct OpenDoorModelCopy:HandyJSON{ |
| | | |
| | | var role = 1 |
| | | var time = [OpenDoorTimeModelCopy]() |
| | | var vipDetail = 1 |
| | | } |
| | | |
| | | struct OpenDoorTimeModel:HandyJSON { |
| | | var start_time:TimeInterval = 0 //开始时间 |
| | | var end_time:TimeInterval = 0 //结束时间 |
| | | } |
| | | struct OpenDoorTimeModelCopy:HandyJSON { |
| | | var start_time:String = "" //开始时间 |
| | | var end_time:String = "" //结束时间 |
| | | } |
| | | |
| | | struct LoginModel:HandyJSON{ |
| | |
| | | var timeType: Int = 0 |
| | | var vipName:String = "" |
| | | var ticketList = [TicketModel]() |
| | | var useStatus: CouponUseType = .unused |
| | | } |
| | | |
| | | //struct CouponTwoModel:HandyJSON { |
| | |
| | | var headImg: String = "" |
| | | var isVip: Int = 0 |
| | | var name: String = "" |
| | | var vipEndTime: Int = 0 |
| | | var vipList = [VipModel]() |
| | | } |
| | | |
| | |
| | | //2.0 |
| | | extension Services{ |
| | | /// 获取平台配置模块详情 |
| | | class func getHomeModule()->Observable<BaseResponse<BannerModel>>{ |
| | | class func getHomeModule(id: Int)->Observable<BaseResponse<BannerModel>>{ |
| | | let params = ParamsAppender.build(url: All_Url) |
| | | .interface(url: "/other/base/homeModule/getHomeModule") |
| | | .append(key: "id", value: id) |
| | | return NetworkRequest.request(params: params, method: .post, progress: true) |
| | | } |
| | | |
| | |
| | | let cell = collectionView.dequeueReusableCell(withReuseIdentifier: "MemberCellId", for: indexPath) as! MemberCell |
| | | cell.nameLab.text = vipList?[indexPath.row].vipName |
| | | cell.moneyLab.text = "¥\(vipList?[indexPath.row].price?.doubleValue ?? 0)" |
| | | cell.timeLab.text = "有效期\(vipList?[indexPath.row].time ?? 0)天" |
| | | var timeStr = "天" |
| | | if vipList?[indexPath.row].timeType == 1 { |
| | | timeStr = "天" |
| | | }else if vipList?[indexPath.row].timeType == 2 { |
| | | timeStr = "月" |
| | | }else if vipList?[indexPath.row].timeType == 3 { |
| | | timeStr = "年" |
| | | } |
| | | cell.timeLab.text = "有效期\(vipList?[indexPath.row].time ?? 0)\(timeStr)" |
| | | if indexPath.row == selectIndex { |
| | | cell.seleceltView() |
| | | }else{ |
| | |
| | | // |
| | | |
| | | import UIKit |
| | | |
| | | import JQTools |
| | | class CouponCellTwo: UITableViewCell { |
| | | |
| | | @IBOutlet weak var moneyLab: UILabel! |
| | |
| | | @IBOutlet weak var numberLab: UILabel! |
| | | |
| | | |
| | | @IBOutlet weak var to_use: UIButton! |
| | | override func awakeFromNib() { |
| | | super.awakeFromNib() |
| | | // Initialization code |
| | |
| | | // Configure the view for the selected state |
| | | } |
| | | |
| | | @IBAction func btnAction(_ sender: Any) { |
| | | let vc = WelfareExchangeRecordListVC() |
| | | JQ_currentViewController().jq_push(vc: vc) |
| | | } |
| | | } |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="23504" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES"> |
| | | <document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="23727" 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="23506"/> |
| | | <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="23721"/> |
| | | <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"/> |
| | | <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/> |
| | |
| | | <nil key="textColor"/> |
| | | <nil key="highlightedColor"/> |
| | | </label> |
| | | <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="aqx-UH-wou"> |
| | | <rect key="frame" x="87.666666666666657" y="5.6666666666666679" width="61" height="23"/> |
| | | <constraints> |
| | | <constraint firstAttribute="height" constant="23" id="Qpq-V9-9CY"/> |
| | | <constraint firstAttribute="width" constant="61" id="e3e-8b-xvi"/> |
| | | </constraints> |
| | | <fontDescription key="fontDescription" type="system" pointSize="12"/> |
| | | <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/> |
| | | <state key="normal" title="去使用"> |
| | | <color key="titleColor" name="FE6E0D"/> |
| | | </state> |
| | | <userDefinedRuntimeAttributes> |
| | | <userDefinedRuntimeAttribute type="number" keyPath="ld_cornerRadiusXIB"> |
| | | <real key="value" value="2"/> |
| | | </userDefinedRuntimeAttribute> |
| | | <userDefinedRuntimeAttribute type="color" keyPath="ld_borderColorXIB"> |
| | | <color key="value" name="FE6E0D"/> |
| | | </userDefinedRuntimeAttribute> |
| | | <userDefinedRuntimeAttribute type="number" keyPath="ld_borderWidthXIB"> |
| | | <real key="value" value="1"/> |
| | | </userDefinedRuntimeAttribute> |
| | | </userDefinedRuntimeAttributes> |
| | | <connections> |
| | | <action selector="btnAction:" destination="KGk-i7-Jjw" eventType="touchUpInside" id="7ZG-7O-dhF"/> |
| | | </connections> |
| | | </button> |
| | | </subviews> |
| | | <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> |
| | | <constraints> |
| | |
| | | <constraint firstItem="XKr-Ap-PzD" firstAttribute="top" secondItem="MwK-vg-xjL" secondAttribute="bottom" constant="5" id="L9g-hv-Zru"/> |
| | | <constraint firstAttribute="trailing" secondItem="ZEZ-VJ-t0V" secondAttribute="trailing" constant="10" id="roA-ZU-Tgh"/> |
| | | <constraint firstItem="MwK-vg-xjL" firstAttribute="leading" secondItem="SSX-kA-h99" secondAttribute="leading" id="vXb-af-zJW"/> |
| | | <constraint firstItem="ZEZ-VJ-t0V" firstAttribute="leading" secondItem="aqx-UH-wou" secondAttribute="trailing" constant="5" id="xTw-xl-J0n"/> |
| | | <constraint firstItem="aqx-UH-wou" firstAttribute="centerY" secondItem="ZEZ-VJ-t0V" secondAttribute="centerY" id="yIw-mw-Z1g"/> |
| | | </constraints> |
| | | </view> |
| | | </subviews> |
| | |
| | | <outlet property="nameLab" destination="MwK-vg-xjL" id="2gD-AC-x4M"/> |
| | | <outlet property="numberLab" destination="ZEZ-VJ-t0V" id="wY8-Dc-ZJi"/> |
| | | <outlet property="timeLab" destination="XKr-Ap-PzD" id="JT4-9q-AoH"/> |
| | | <outlet property="to_use" destination="aqx-UH-wou" id="tvT-7R-4zR"/> |
| | | </connections> |
| | | <point key="canvasLocation" x="129.7709923664122" y="-35.211267605633807"/> |
| | | </tableViewCell> |
| | |
| | | <resources> |
| | | <image name="MemberBackground" width="28" height="27.333333969116211"/> |
| | | <image name="MemberBackground2" width="27.333333969116211" height="22.666666030883789"/> |
| | | <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> |
| | |
| | | if let m = item as? HomeStoreConfigModel{ |
| | | switch m.type{ |
| | | case .worldcup: |
| | | let vc = WorldCupIntroVC() |
| | | push(vc: vc) |
| | | Services.getHomeModule(id: m.id).subscribe(onNext: {data in |
| | | let vc = WorldCupIntroVC() |
| | | vc.id = m.id |
| | | self.push(vc: vc) |
| | | },onError: { error in |
| | | |
| | | }).disposed(by: disposeBag) |
| | | |
| | | case .worldcupDetail: |
| | | let vc = WorldCupContentApplyVC(id: m.id) |
| | | push(vc: vc) |
| | |
| | | cell.vipList = model?.vipList |
| | | cell.selectBlock = { index in |
| | | self.selectIndex = index |
| | | tableView.reloadData() |
| | | } |
| | | return cell |
| | | |
| | |
| | | // cell.timeLab.text = "有效期至\(model?.vipList[selectIndex].couponList[indexPath.row - 1].effectiveTime ?? "")" |
| | | // cell.contentLab.text = model?.vipList[selectIndex].couponList[indexPath.row - 1].instructionsForUse |
| | | if let m = model?.vipList[selectIndex].couponList[indexPath.row - 1] { |
| | | |
| | | m.useStatus = .unused |
| | | cell.couponModel = m |
| | | cell.btn_toUse.isHidden = true |
| | | |
| | | } |
| | | |
| | | return cell |
| | | }else{ |
| | | let cell = tableView.dequeueReusableCell(withIdentifier: "CouponCellTwoId", for: indexPath) as! CouponCellTwo |
| | | let index = indexPath.row - ((model?.vipList[selectIndex].couponList.count ?? 0) + 1) |
| | | cell.nameLab.text = model?.vipList[selectIndex].ticketList[index].name |
| | | cell.timeLab.text = "领取后\(model?.vipList[selectIndex].ticketList[index].time ?? 0)有效" |
| | | cell.numberLab.text = "\(model?.vipList[selectIndex].ticketList[index].count ?? 0)张" |
| | | if model?.vipList[selectIndex].ticketList.count ?? 0 > 0 { |
| | | |
| | | let index = indexPath.row - ((model?.vipList[selectIndex].couponList.count ?? 0) ) - 1 |
| | | cell.nameLab.text = model?.vipList[selectIndex].ticketList[index].name |
| | | cell.timeLab.text = "领取后\(model?.vipList[selectIndex].ticketList[index].time ?? 0)有效" |
| | | cell.numberLab.text = "\(model?.vipList[selectIndex].ticketList[index].count ?? 0)张" |
| | | cell.to_use.isHidden = true |
| | | } |
| | | return cell |
| | | } |
| | | |
| | |
| | | func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat { |
| | | |
| | | if indexPath.row == 0 { |
| | | if (model?.vipList.count ?? 0) > 3 { |
| | | return 450 |
| | | } |
| | | return 295 |
| | | // if (model?.vipList.count ?? 0) > 3 { |
| | | // return 450 |
| | | // } |
| | | let index = ((model?.vipList.count ?? 0) / 3) + (((model?.vipList.count ?? 0) % 3) > 0 ? 1 : 0) |
| | | return CGFloat(140 + index * 155) |
| | | |
| | | }else if indexPath.row > 0 && indexPath.row < ((model?.vipList[selectIndex].couponList.count ?? 0) + 1) { |
| | | let model = model?.vipList[selectIndex].couponList[indexPath.row - 1] |
| | | if rows.contains(where: {$0 == indexPath.row}){ |
| | | let h = max(String.jq_getHeight(text: model?.instructionsForUse ?? "", width: UIScreen.main.bounds.size.width - 200, font: 12), 30) |
| | | print("ttttttttt\(h)") |
| | | return h + 125 |
| | | }else{ |
| | | return 125 |
| | |
| | | tabView.register(UINib(nibName: "CouponCellTwo", bundle: nil), forCellReuseIdentifier: "CouponCellTwoId") |
| | | tabView.register(UINib(nibName: "WelfareCouponsTCell", bundle: nil), forCellReuseIdentifier: "_WelfareCouponsTCell") |
| | | // tabView.register(UINib(nibName: "CouponCell", bundle: nil), forCellReuseIdentifier: "CouponCellId") |
| | | Services.vipPayment().subscribe(onNext: { [weak self]data in |
| | | self?.model = data.data |
| | | self?.tabView.reloadData() |
| | | self?.nameLab.text = data.data?.name |
| | | if data.data?.isVip ?? 0 == 0 { |
| | | self?.memberLab.text = "当前暂未开通会员" |
| | | }else{ |
| | | self?.memberLab.text = "Vip" |
| | | } |
| | | |
| | | self?.headerImg.sd_setImage(with: URL(string: self?.model?.headImg ?? "") ,placeholderImage: UIImage(named: "user_default")) |
| | | }).disposed(by: disposeBag) |
| | | |
| | | NotificationCenter.default.rx.notification(WelfareCoupons_Noti).take(until: self.rx.deallocated).subscribe(onNext: {noti in |
| | | if let row = noti.object as? Int{ |
| | | if self.rows.contains(row){ |
| | |
| | | }).disposed(by: disposeBag) |
| | | } |
| | | |
| | | |
| | | override func viewWillAppear(_ animated: Bool) { |
| | | Services.vipPayment().subscribe(onNext: { [weak self]data in |
| | | self?.model = data.data |
| | | self?.tabView.reloadData() |
| | | if data.data?.name.count ?? 0 > 0 { |
| | | self?.nameLab.text = data.data?.name |
| | | }else { |
| | | self?.nameLab.text = "未命名" |
| | | } |
| | | |
| | | if data.data?.isVip ?? 0 == 0 { |
| | | self?.memberLab.text = "当前暂未开通会员" |
| | | }else{ |
| | | |
| | | self?.memberLab.text = Date.jq_TheTimeStampConversionMinutes(Double((data.data?.vipEndTime ?? 0) / 1000), "yyyy-MM-dd") |
| | | } |
| | | |
| | | self?.headerImg.sd_setImage(with: URL(string: self?.model?.headImg ?? "") ,placeholderImage: UIImage(named: "user_default")) |
| | | }).disposed(by: disposeBag) |
| | | } |
| | | @IBAction func selectAcceptAction(_ sender: UIButton) { |
| | | sender.isSelected = !sender.isSelected |
| | | acceptXy = sender.isSelected |
| | |
| | | guard let weakSelf = self else { return } |
| | | switch result { |
| | | case .success: |
| | | let vc = PaymentResultVC(result: .success, objType: .member, handleVC: nil, courseConfigId: nil, againClouse: nil) |
| | | let vc = PaymentResultVC(result: .success, objType: .member, handleVC: nil, courseConfigId: nil,list1: weakSelf.model?.vipList[weakSelf.selectIndex].couponList ?? [], |
| | | list2: weakSelf.model?.vipList[weakSelf.selectIndex].ticketList ?? [], againClouse: nil) |
| | | weakSelf.push(vc: vc) |
| | | case .cancel: |
| | | let vc = PaymentResultVC(result: .fail("已取消支付", 0), objType: .member, handleVC: nil, courseConfigId: nil, againClouse: nil) |
| | |
| | | guard let weakSelf = self else { return } |
| | | switch result { |
| | | case .success: |
| | | let vc = PaymentResultVC(result: .success, objType: .member, handleVC: nil, courseConfigId: nil, againClouse: nil) |
| | | let vc = PaymentResultVC(result: .success, objType: .member, handleVC: nil, courseConfigId: nil,list1: weakSelf.model?.vipList[weakSelf.selectIndex].couponList ?? [], |
| | | list2: weakSelf.model?.vipList[weakSelf.selectIndex].ticketList ?? [], againClouse: nil) |
| | | weakSelf.push(vc: vc) |
| | | case .cancel: |
| | | let vc = PaymentResultVC(result: .fail("已取消支付", 0), objType: .member, handleVC: nil, courseConfigId: nil, againClouse: nil) |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="22505" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES"> |
| | | <document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="23727" 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="22504"/> |
| | | <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="23721"/> |
| | | <capability name="Named colors" minToolsVersion="9.0"/> |
| | | <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/> |
| | | </dependencies> |
| | |
| | | </stackView> |
| | | <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="2" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Fwm-Fu-OQf"> |
| | | <rect key="frame" x="10" y="160" width="286" height="33.666666666666657"/> |
| | | <string key="text">您完成了一场社区世界杯正式比赛, |
| | | <string key="text">您完成了一场正式比赛, |
| | | 快去看看吧</string> |
| | | <fontDescription key="fontDescription" type="system" weight="medium" pointSize="14"/> |
| | | <color key="textColor" red="0.43137254899999999" green="0.43137254899999999" blue="0.43137254899999999" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> |
| | |
| | | import UIKit |
| | | import JQTools |
| | | |
| | | class PaymentResultVC: BaseVC { |
| | | class PaymentResultVC: BaseVC, UITableViewDelegate, UITableViewDataSource { |
| | | func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { |
| | | return couponList.count + ticketList.count |
| | | } |
| | | |
| | | func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { |
| | | if indexPath.row < couponList.count { |
| | | let cell = tableView.dequeueReusableCell(withIdentifier: "_WelfareCouponsTCell", for: indexPath) as! WelfareCouponsTCell |
| | | cell.indexPath = indexPath |
| | | let m = couponList[indexPath.row] |
| | | m.useStatus = .unused |
| | | m.goJB = true |
| | | cell.couponModel = m |
| | | return cell |
| | | }else{ |
| | | let cell = tableView.dequeueReusableCell(withIdentifier: "CouponCellTwoId", for: indexPath) as! CouponCellTwo |
| | | |
| | | cell.nameLab.text = ticketList[indexPath.row - couponList.count].name |
| | | cell.timeLab.text = "领取后\(ticketList[indexPath.row - couponList.count].time )有效" |
| | | cell.numberLab.text = "\(ticketList[indexPath.row - couponList.count].count )张" |
| | | |
| | | |
| | | return cell |
| | | } |
| | | } |
| | | |
| | | func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat { |
| | | |
| | | if indexPath.row < couponList.count { |
| | | let model = couponList[indexPath.row ] |
| | | if rows.contains(where: {$0 == indexPath.row}){ |
| | | let h = max(String.jq_getHeight(text: model.instructionsForUse , width: UIScreen.main.bounds.size.width - 200, font: 12), 30) |
| | | return h + 125 |
| | | }else{ |
| | | return 125 |
| | | } |
| | | }else{ |
| | | return 110 |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | enum PaymentResult:Equatable{ |
| | | case success |
| | |
| | | |
| | | var isExtend:Bool = false |
| | | var otherInfo:Dictionary<String,Any>? |
| | | |
| | | required init(result:PaymentResult,objType:PaymentObjType,handleVC:UIViewController? = nil,courseConfigId:Int? = nil,againClouse:(()->Void)? = nil) { |
| | | private var rows = Set<Int>() |
| | | @IBOutlet weak var tableview: UITableView! |
| | | @IBOutlet weak var tabBgView: UIView! |
| | | |
| | | var couponList = [CouponModel]() |
| | | var ticketList = [TicketModel]() |
| | | required init(result:PaymentResult,objType:PaymentObjType,handleVC:UIViewController? = nil,courseConfigId:Int? = nil,list1:[CouponModel] = [],list2:[TicketModel] = [],againClouse:(()->Void)? = nil) { |
| | | super.init(nibName: nil, bundle: nil) |
| | | self.result = result |
| | | self.objType = objType |
| | | self.handleVC = handleVC |
| | | self.againClouse = againClouse |
| | | self.courseConfigId = courseConfigId |
| | | self.couponList = list1 |
| | | self.ticketList = list2 |
| | | } |
| | | |
| | | required init?(coder: NSCoder) { |
| | |
| | | |
| | | override func viewDidLoad() { |
| | | super.viewDidLoad() |
| | | |
| | | tableview.separatorStyle = .none |
| | | tableview.delegate = self |
| | | tableview.dataSource = self |
| | | tableview.register(UINib(nibName: "CouponCellTwo", bundle: nil), forCellReuseIdentifier: "CouponCellTwoId") |
| | | tableview.register(UINib(nibName: "WelfareCouponsTCell", bundle: nil), forCellReuseIdentifier: "_WelfareCouponsTCell") |
| | | NotificationCenter.default.rx.notification(WelfareCoupons_Noti).take(until: self.rx.deallocated).subscribe(onNext: {noti in |
| | | if let row = noti.object as? Int{ |
| | | if self.rows.contains(row){ |
| | | self.rows.remove(row) |
| | | }else{ |
| | | self.rows.insert(row) |
| | | } |
| | | self.tableview.beginUpdates() |
| | | self.tableview.reloadRows(at: [IndexPath(row: row, section: 0)], with: .fade) |
| | | self.tableview.endUpdates() |
| | | } |
| | | }).disposed(by: disposeBag) |
| | | tableview.reloadData() |
| | | if result == .success{ |
| | | title = "支付成功" |
| | | img_paymentState.image = UIImage(named: "icon_success") |
| | |
| | | NotificationCenter.default.post(name: StudentRefresh_Nofi, object: nil) |
| | | case .none:break |
| | | } |
| | | Services.queryMemberCoupon(menthod: 2).subscribe(onNext: {[weak self] data in |
| | | if let models = data.data{ |
| | | self?.models = models |
| | | if models.count > 0{ |
| | | self?.label_content.text = "支付成功,恭喜您成为玩湃会员!并获得优惠券!" |
| | | } |
| | | self?.collectionView.reloadData() |
| | | } |
| | | }) { error in |
| | | |
| | | }.disposed(by: disposeBag) |
| | | // Services.queryMemberCoupon(menthod: 2).subscribe(onNext: {[weak self] data in |
| | | // if let models = data.data{ |
| | | // self?.models = models |
| | | // if models.count > 0{ |
| | | // self?.label_content.text = "支付成功,恭喜您成为玩湃会员!并获得优惠券!" |
| | | // } |
| | | // self?.collectionView.reloadData() |
| | | // } |
| | | // }) { error in |
| | | // |
| | | // }.disposed(by: disposeBag) |
| | | |
| | | case .courseApply: |
| | | //课时购买 |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <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"> |
| | | <document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="23727" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES"> |
| | | <device id="retina5_9" orientation="portrait" appearance="light"/> |
| | | <dependencies> |
| | | <deployment identifier="iOS"/> |
| | | <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="22131"/> |
| | | <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="23721"/> |
| | | <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="collectionView" destination="6ci-0V-ZT4" id="BTE-zu-4xN"/> |
| | | <outlet property="img_paymentState" destination="Fv7-HV-ioC" id="kvE-hr-cVH"/> |
| | | <outlet property="label_content" destination="RK0-X7-xSS" id="lD8-Jd-A6o"/> |
| | | <outlet property="tabBgView" destination="bbm-7J-QEq" id="fja-Lr-HhT"/> |
| | | <outlet property="tableview" destination="JFv-sI-Fag" id="jLn-qx-JGO"/> |
| | | <outlet property="view" destination="i5M-Pr-FkT" id="sfx-zR-JGt"/> |
| | | </connections> |
| | | </placeholder> |
| | |
| | | <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> |
| | | <subviews> |
| | | <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="icon_success" translatesAutoresizingMaskIntoConstraints="NO" id="Fv7-HV-ioC"> |
| | | <rect key="frame" x="167.66666666666666" y="99" width="40" height="40"/> |
| | | <rect key="frame" x="167.66666666666666" y="149" width="40" height="40"/> |
| | | <constraints> |
| | | <constraint firstAttribute="height" constant="40" id="crP-wS-sO8"/> |
| | | <constraint firstAttribute="width" constant="40" id="nbR-TE-irw"/> |
| | | </constraints> |
| | | </imageView> |
| | | <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="支付成功,恭喜您成为玩湃会员!并获得优惠券!" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="RK0-X7-xSS"> |
| | | <rect key="frame" x="30.333333333333343" y="159" width="314.33333333333326" height="17"/> |
| | | <rect key="frame" x="38" y="209" width="299.33333333333331" height="17"/> |
| | | <fontDescription key="fontDescription" type="system" weight="medium" pointSize="14"/> |
| | | <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> |
| | | <nil key="highlightedColor"/> |
| | | </label> |
| | | <collectionView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" dataMode="none" translatesAutoresizingMaskIntoConstraints="NO" id="6ci-0V-ZT4"> |
| | | <rect key="frame" x="0.0" y="314" width="375" height="454"/> |
| | | <rect key="frame" x="0.0" y="364" width="375" height="370"/> |
| | | <color key="backgroundColor" systemColor="systemBackgroundColor"/> |
| | | <collectionViewFlowLayout key="collectionViewLayout" minimumLineSpacing="10" minimumInteritemSpacing="10" id="7br-70-TUT"> |
| | | <size key="itemSize" width="128" height="128"/> |
| | |
| | | </collectionViewFlowLayout> |
| | | </collectionView> |
| | | <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="meY-wl-nNE"> |
| | | <rect key="frame" x="140" y="669" width="95" height="38"/> |
| | | <rect key="frame" x="140" y="686" width="95" height="38"/> |
| | | <constraints> |
| | | <constraint firstAttribute="width" constant="95" id="5rh-Ui-gwV"/> |
| | | <constraint firstAttribute="height" constant="38" id="nHo-hR-hM3"/> |
| | |
| | | </connections> |
| | | </button> |
| | | <stackView opaque="NO" contentMode="scaleToFill" spacing="20" translatesAutoresizingMaskIntoConstraints="NO" id="c1t-oI-xet"> |
| | | <rect key="frame" x="33.666666666666657" y="230" width="308" height="40"/> |
| | | <rect key="frame" x="33.666666666666657" y="280" width="308" height="40"/> |
| | | <subviews> |
| | | <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Lh5-H4-LBg"> |
| | | <rect key="frame" x="0.0" y="0.0" width="144" height="40"/> |
| | |
| | | </button> |
| | | </subviews> |
| | | </stackView> |
| | | <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="bbm-7J-QEq"> |
| | | <rect key="frame" x="0.0" y="256" width="375" height="430"/> |
| | | <subviews> |
| | | <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="JFv-sI-Fag"> |
| | | <rect key="frame" x="0.0" y="0.0" width="375" height="430"/> |
| | | <color key="backgroundColor" systemColor="systemBackgroundColor"/> |
| | | </tableView> |
| | | </subviews> |
| | | <constraints> |
| | | <constraint firstItem="JFv-sI-Fag" firstAttribute="leading" secondItem="bbm-7J-QEq" secondAttribute="leading" id="6Jn-3s-zKe"/> |
| | | <constraint firstItem="JFv-sI-Fag" firstAttribute="top" secondItem="bbm-7J-QEq" secondAttribute="top" id="SXT-3r-bP3"/> |
| | | <constraint firstAttribute="trailing" secondItem="JFv-sI-Fag" secondAttribute="trailing" id="ZmS-bi-2hW"/> |
| | | <constraint firstAttribute="bottom" secondItem="JFv-sI-Fag" secondAttribute="bottom" id="v4k-Xh-pN1"/> |
| | | </constraints> |
| | | </view> |
| | | </subviews> |
| | | <viewLayoutGuide key="safeArea" id="fnl-2z-Ty3"/> |
| | | <color key="backgroundColor" systemColor="systemBackgroundColor"/> |
| | | <constraints> |
| | | <constraint firstItem="fnl-2z-Ty3" firstAttribute="trailing" secondItem="6ci-0V-ZT4" secondAttribute="trailing" id="5Yg-0m-KVU"/> |
| | | <constraint firstItem="RK0-X7-xSS" firstAttribute="top" secondItem="Fv7-HV-ioC" secondAttribute="bottom" constant="20" id="6Ii-mh-axn"/> |
| | | <constraint firstItem="fnl-2z-Ty3" firstAttribute="trailing" secondItem="bbm-7J-QEq" secondAttribute="trailing" id="7te-zQ-khQ"/> |
| | | <constraint firstItem="Fv7-HV-ioC" firstAttribute="top" secondItem="fnl-2z-Ty3" secondAttribute="top" constant="49" id="Fj8-kC-rK8"/> |
| | | <constraint firstItem="fnl-2z-Ty3" firstAttribute="bottom" secondItem="6ci-0V-ZT4" secondAttribute="bottom" constant="10" id="ISt-a8-fXg"/> |
| | | <constraint firstItem="meY-wl-nNE" firstAttribute="centerX" secondItem="fnl-2z-Ty3" secondAttribute="centerX" id="JNm-aR-XPU"/> |
| | | <constraint firstItem="6ci-0V-ZT4" firstAttribute="top" secondItem="c1t-oI-xet" secondAttribute="bottom" constant="44" id="LuL-yl-IA1"/> |
| | | <constraint firstItem="c1t-oI-xet" firstAttribute="centerX" secondItem="fnl-2z-Ty3" secondAttribute="centerX" id="Pm4-Fl-Wha"/> |
| | | <constraint firstItem="fnl-2z-Ty3" firstAttribute="bottom" secondItem="meY-wl-nNE" secondAttribute="bottom" constant="71" id="UnI-Ey-Pc1"/> |
| | | <constraint firstItem="fnl-2z-Ty3" firstAttribute="bottom" secondItem="meY-wl-nNE" secondAttribute="bottom" constant="20" id="UnI-Ey-Pc1"/> |
| | | <constraint firstItem="RK0-X7-xSS" firstAttribute="centerX" secondItem="Fv7-HV-ioC" secondAttribute="centerX" id="XBX-DI-MSD"/> |
| | | <constraint firstItem="bbm-7J-QEq" firstAttribute="leading" secondItem="fnl-2z-Ty3" secondAttribute="leading" id="XOI-zL-Omy"/> |
| | | <constraint firstItem="Fv7-HV-ioC" firstAttribute="centerX" secondItem="fnl-2z-Ty3" secondAttribute="centerX" id="aaQ-gG-s1W"/> |
| | | <constraint firstItem="6ci-0V-ZT4" firstAttribute="leading" secondItem="fnl-2z-Ty3" secondAttribute="leading" id="gBF-6S-2xb"/> |
| | | <constraint firstItem="meY-wl-nNE" firstAttribute="top" secondItem="bbm-7J-QEq" secondAttribute="bottom" id="i7H-cB-5AS"/> |
| | | <constraint firstItem="c1t-oI-xet" firstAttribute="top" secondItem="RK0-X7-xSS" secondAttribute="bottom" constant="54" id="ike-m8-wcL"/> |
| | | <constraint firstItem="bbm-7J-QEq" firstAttribute="top" secondItem="RK0-X7-xSS" secondAttribute="bottom" constant="30" id="nOj-kg-hGr"/> |
| | | </constraints> |
| | | <point key="canvasLocation" x="103.05343511450381" y="20.422535211267608"/> |
| | | <point key="canvasLocation" x="-201" y="-68"/> |
| | | </view> |
| | | </objects> |
| | | <resources> |
| | |
| | | @IBOutlet weak var pickerView: UIPickerView! |
| | | |
| | | @IBOutlet weak var pickviewTwo: UIPickerView! |
| | | private var clickClouse:(((Int,String))->Void)! |
| | | private var clickClouse:(((Int,String,String))->Void)! |
| | | private var disposeBag = DisposeBag() |
| | | private var years = [Int]() |
| | | var dataSoure : [String :[Any]] = [:] |
| | |
| | | print(dataSoure); |
| | | } |
| | | |
| | | static func show(clickClouse:@escaping ((Int,String))->Void){ |
| | | static func show(clickClouse:@escaping ((Int,String,String))->Void){ |
| | | let studentChooseView = CommonYearsPickerView.jq_loadNibView() |
| | | studentChooseView.frame = sceneDelegate?.window?.frame ?? .zero |
| | | studentChooseView.clickClouse = clickClouse |
| | |
| | | @IBAction func completeAction(_ sender: UIButton) { |
| | | let index = pickerView.selectedRow(inComponent: 1) |
| | | var str = "" |
| | | var name = "" |
| | | if selectIndex == 1 { |
| | | if let dict = dataSoure[titleArr[selectIndex]]?[index] as? Dictionary<String, String> { |
| | | str = "\(dict.values.first ?? "")" |
| | | name = "\(dict.keys.first ?? "")" |
| | | } |
| | | |
| | | }else{ |
| | | str = "\(dataSoure[titleArr[selectIndex]]?[index] ?? "")" |
| | | name = str; |
| | | } |
| | | |
| | | clickClouse((selectIndex,str)) |
| | | clickClouse((selectIndex,str,name)) |
| | | closeAction() |
| | | } |
| | | } |
| | |
| | | private var model:WorldCupJudgeModel! |
| | | private var deviceModel:ActivityDetailStoreModel? |
| | | private var deviceQRCode:String? |
| | | private var startModel:SimpleModel? |
| | | var startModel:SimpleModel? |
| | | |
| | | @IBOutlet weak var redAddBtn: UIButton! |
| | | |
| | |
| | | if show { |
| | | redAddBtn.isHidden = true |
| | | blueAddBtn.isHidden = true |
| | | btn_handle.isHidden = true |
| | | self.btn_handle.setTitle("结束比赛", for: .normal) |
| | | // btn_handle.isHidden = true |
| | | self.updateUserView() |
| | | } |
| | | } |
| | |
| | | vc.redTeamItems = dataSoure?[indexPath.row].red ?? [] |
| | | vc.blueTeamItems = dataSoure?[indexPath.row].blue ?? [] |
| | | vc.show = true |
| | | vc.startModel = SimpleModel(ids: dataSoure?[indexPath.row].customs ?? []) |
| | | push(vc: vc) |
| | | |
| | | |
| | |
| | | tableView.snp.makeConstraints { make in |
| | | make.left.right.top.bottom.equalTo(0) |
| | | } |
| | | |
| | | } |
| | | override func viewWillAppear(_ animated: Bool) { |
| | | Services.getWorldCupCodeListID(worldCupId: model.id).subscribe(onNext: {[weak self] data in |
| | | self?.dataSoure = data.data |
| | | self?.tableView.reloadData() |
| | |
| | | Services.exploreHome().subscribe(onNext: {[weak self] data in |
| | | if let models = data.data,models.count > 0{ |
| | | self?.models = models |
| | | |
| | | self?.banner_collectionView.reloadData() |
| | | }else{ |
| | | |
| | |
| | | self?.user_avarImg.sd_setImage(with: URL(string: model.userHeadImg)) |
| | | self?.label_userName.text = model.userName.isEmpty ? "未命名":model.userName |
| | | |
| | | if model.isMember != "年度会员"{ |
| | | if model.vipEndTime.count < 1{ |
| | | self?.label_vip.text = "成为会员" |
| | | }else{ |
| | | self?.label_vip.text = model.isMember |
| | | self?.label_vip.text = "会员有效期至:\(model.vipEndTime)" |
| | | } |
| | | |
| | | self?.label_wpCoin.text = model.wpCoin.currencyNotPrefix() |
| | | self?.label_coin.text = "\(model.userIntegral)" |
| | | self?.img_vipMedal.isHidden = model.isMember != "年度会员" |
| | | self?.btn_becomeVIP.isEnabled = model.isMember != "年度会员" |
| | | self?.img_vipMedal.isHidden = model.vipEndTime.count < 1 |
| | | self?.btn_becomeVIP.isEnabled = model.vipEndTime.count < 1 |
| | | |
| | | |
| | | //临时隐藏会员功能按钮 |
| | | self?.label_vip.text = "普通会员" |
| | | // self?.label_vip.text = "普通会员" |
| | | self?.label_vip.isHidden = false |
| | | self?.img_vipMedal.isHidden = true |
| | | self?.btn_becomeVIP.isEnabled = false |
| | | // self?.btn_becomeVIP.isEnabled = false |
| | | |
| | | //临时隐藏会员功能按钮 |
| | | |
| | | |
| | |
| | | @objc func opensAction(){ |
| | | Services.getWorldCupListFromRank(id: id, isStudent: isStudent).subscribe(onNext: { [weak self]data in |
| | | if data.data?.count != 0 { |
| | | WorldCupListRankView.show(arr: data.data ?? []) { id in |
| | | WorldCupListRankView.show(arr: data.data ?? []) { id,name in |
| | | self?.viewModel.worldCupId.accept(id) |
| | | self?.viewModel.beginRefresh() |
| | | self?.ratioRankBtn.setTitle(name, for: .normal) |
| | | } |
| | | } |
| | | }).disposed(by: disposeBag) |
| | | } |
| | | @objc func filterAction(){ |
| | | CommonYearsPickerView.show {[weak self] index,value in |
| | | CommonYearsPickerView.show {[weak self] index,value,name in |
| | | // if index == 0{ |
| | | // self?.viewModel.year.accept(nil) |
| | | // self?.yearBtn.setTitle(" 全部", for: .normal) |
| | |
| | | self?.viewModel.time.accept(nil) |
| | | } |
| | | self?.viewModel.beginRefresh() |
| | | self?.yearBtn.setTitle(name, for: .normal) |
| | | } |
| | | } |
| | | |
| | |
| | | } |
| | | ratioRankBtn.setTitle("赛事排名", for: .normal) |
| | | ratioRankBtn.setTitleColor(.black.withAlphaComponent(0.74), for: .normal) |
| | | ratioRankBtn.titleLabel?.font = UIFont.systemFont(ofSize: 16) |
| | | ratioRankBtn.titleLabel?.font = UIFont.systemFont(ofSize: 14) |
| | | ratioRankBtn.jq_borderColor = UIColor(hexString: "#D9D9D9") |
| | | ratioRankBtn.jq_borderWidth = 1 |
| | | ratioRankBtn.setImage(UIImage(named: "icon_down_arrow"), for: .normal) |
| | |
| | | ratioRankBtn.snp.makeConstraints { make in |
| | | make.right.equalTo(-20) |
| | | make.centerY.equalToSuperview() |
| | | make.width.greaterThanOrEqualTo(100) |
| | | make.width.greaterThanOrEqualTo(120) |
| | | make.height.equalTo(35) |
| | | } |
| | | |
| | |
| | | label_state.textColor = Def_ThemeColor |
| | | switch recordsModel.goodType { |
| | | case .ticket: |
| | | // rightQR.constant = 9 |
| | | btn_qrCode.isHidden = false |
| | | default: |
| | | btn_qrCode.isHidden = true |
| | | } |
| | | case .expired,.used: |
| | | case .expired,.used: |
| | | label_state.textColor = UIColor(hexStr: "#7A7A7A") |
| | | btn_qrCode.isHidden = true |
| | | } |
| | | |
| | | lookDetails.isHidden = false |
| | | qrRight.constant = -9 |
| | | switch recordsModel.exchangeType{ |
| | | case.coin: |
| | | label_price.attributedText = AttributedStringbuilder.build().add(string: "\(recordsModel.integral)", withFont: UIFont.systemFont(ofSize: 18, weight: .medium), withColor: Def_ThemeColor) |
| | | .add(string: "积分", withFont: UIFont.systemFont(ofSize: 12, weight: .medium), withColor: Def_ThemeColor).mutableAttributedString |
| | | |
| | | |
| | | case .cashAndCoin: |
| | | var attribute = AttributedStringbuilder.build() |
| | | if recordsModel.integral != 0{ |
| | |
| | | label_price.attributedText = attribute.mutableAttributedString |
| | | case .cash: |
| | | label_price.attributedText = AttributedStringbuilder.build().add(string: recordsModel.cash.currency(), withFont: UIFont.systemFont(ofSize: 18, weight: .medium), withColor: Def_ThemeColor).mutableAttributedString |
| | | case .mpiao: |
| | | label_price.attributedText = AttributedStringbuilder.build().add(string: "会员赠送", withFont: UIFont.systemFont(ofSize: 18, weight: .medium), withColor: Def_ThemeColor).mutableAttributedString |
| | | lookDetails.isHidden = true |
| | | qrRight.constant = -90 |
| | | } |
| | | } |
| | | } |
| | |
| | | @IBOutlet weak var label_type: UILabel! |
| | | @IBOutlet weak var btn_qrCode: UIButton! |
| | | |
| | | |
| | | @IBOutlet weak var qrRight: NSLayoutConstraint! |
| | | @IBOutlet weak var lookDetails: UIButton! |
| | | |
| | | override func awakeFromNib() { |
| | | super.awakeFromNib() |
| | | selectionStyle = .none |
| | |
| | | |
| | | @IBAction func QRCodeAction(_ sender: UIButton) { |
| | | var time = OpenDoorTimeModel() |
| | | time.start_time = Date.jq_StringToTimeInterval((recordsModel.startTime + " 00:00:00"), "yyyy-MM-dd HH:mm:ss") |
| | | time.end_time = Date.jq_StringToTimeInterval((recordsModel.endTime + " 23:59:59"), "yyyy-MM-dd HH:mm:ss") |
| | | 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 recordsModel.exchangeType == .mpiao && recordsModel.goodType == .ticket{ |
| | | var timeCopy = OpenDoorTimeModelCopy() |
| | | timeCopy.start_time = recordsModel.startTime |
| | | timeCopy.end_time = recordsModel.endTime |
| | | let model = OpenDoorModelCopy(role: 1, time: [timeCopy], vipDetail: recordsModel.detailsId) |
| | | if let string = model.toJSONString(){ |
| | | QRPreview.show(string) |
| | | } |
| | | }else{ |
| | | time.start_time = Date.jq_StringToTimeInterval((recordsModel.startTime ), "yyyy-MM-dd HH:mm:ss") |
| | | time.end_time = Date.jq_StringToTimeInterval((recordsModel.endTime ), "yyyy-MM-dd HH:mm:ss") |
| | | let model = OpenDoorModel(sid: recordsModel.sid, rid: recordsModel.rid, uid: recordsModel.userId, time: [time], type: 2) |
| | | if let string = model.toJSONString(){ |
| | | QRPreview.show(string) |
| | | } |
| | | } |
| | | |
| | | } |
| | | } |
| | |
| | | <?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="23727" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES"> |
| | | <device id="retina6_12" orientation="portrait" appearance="light"/> |
| | | <dependencies> |
| | | <deployment identifier="iOS"/> |
| | | <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="22129"/> |
| | | <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="23721"/> |
| | | <capability name="Named colors" minToolsVersion="9.0"/> |
| | | <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/> |
| | | </dependencies> |
| | |
| | | </userDefinedRuntimeAttributes> |
| | | </view> |
| | | <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="待使用" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="B9F-rx-tLl"> |
| | | <rect key="frame" x="272" y="26.999999999999996" width="37" height="14.333333333333332"/> |
| | | <rect key="frame" x="273" y="26.999999999999996" width="36" height="14.333333333333332"/> |
| | | <fontDescription key="fontDescription" type="system" weight="medium" pointSize="12"/> |
| | | <color key="textColor" name="FE6E0D"/> |
| | | <nil key="highlightedColor"/> |
| | |
| | | <nil key="highlightedColor"/> |
| | | </label> |
| | | <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="0积分" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="q70-lq-Dux"> |
| | | <rect key="frame" x="14" y="96" width="48" height="22"/> |
| | | <rect key="frame" x="14.000000000000004" y="96" width="49.333333333333343" height="22"/> |
| | | <fontDescription key="fontDescription" type="system" weight="medium" pointSize="18"/> |
| | | <color key="textColor" name="FE6E0D"/> |
| | | <nil key="highlightedColor"/> |
| | |
| | | <outlet property="label_state" destination="B9F-rx-tLl" id="b3p-on-S1O"/> |
| | | <outlet property="label_title" destination="kAZ-BY-Ik3" id="kmw-z6-M0a"/> |
| | | <outlet property="label_type" destination="PyP-oy-jKg" id="bzv-vg-QxP"/> |
| | | <outlet property="lookDetails" destination="SV7-hE-gN3" id="Ed6-Vv-X1c"/> |
| | | <outlet property="qrRight" destination="dvB-cI-k6L" id="Naz-l1-bQN"/> |
| | | </connections> |
| | | <point key="canvasLocation" x="70.992366412213741" y="70.070422535211264"/> |
| | | <point key="canvasLocation" x="14.503816793893129" y="-0.35211267605633806"/> |
| | | </tableViewCell> |
| | | </objects> |
| | | <resources> |
| | |
| | | class WelfareCouponsTCell: UITableViewCell { |
| | | |
| | | |
| | | @IBOutlet weak var img_header: UIImageView! |
| | | @IBOutlet weak var numberLab: UILabel! |
| | | @IBOutlet weak var img_header: UIImageView! |
| | | @IBOutlet weak var img_footer: UIImageView! |
| | | @IBOutlet weak var label_price: UILabel! |
| | | @IBOutlet weak var label_useCon: UILabel! |
| | |
| | | @IBOutlet weak var img_status: UIImageView! |
| | | @IBOutlet weak var btn_toUse: UIButton! |
| | | |
| | | var indexPath:IndexPath! |
| | | @IBOutlet weak var lab_name: UILabel! |
| | | var indexPath:IndexPath! |
| | | var couponModel:CouponModel!{ |
| | | didSet{ |
| | | |
| | | |
| | | lab_name.text = couponModel.ruleModel?.experienceName ?? "" |
| | | label_price.text = couponModel.ruleModel?.deductionAmount |
| | | label_useCon.isHidden = couponModel.ruleModel?.conditionalAmount.isEmpty ?? true |
| | | |
| | |
| | | } |
| | | btn_detail.isHidden = couponModel.useCondition == .nationwide |
| | | label_info.text = couponModel.instructionsForUse |
| | | |
| | | if couponModel.count > 0 { |
| | | numberLab.text = "\(couponModel.count)张" |
| | | // btn_toUse.isHidden = true |
| | | }else{ |
| | | // btn_toUse.isHidden = false |
| | | numberLab.text = "" |
| | | } |
| | | switch couponModel.type { |
| | | case .none: |
| | | break |
| | |
| | | |
| | | |
| | | @IBAction func toUseAction(_ sender: UIButton) { |
| | | JQ_currentNavigationController().popToRootViewController(animated: true) |
| | | DispatchQueue.main.asyncAfter(deadline: .now()+0.5) { |
| | | JQ_currentViewController().tabBarController?.selectedIndex = 0 |
| | | } |
| | | if couponModel.goJB { |
| | | let vc = WelfareExchangeRecordListVC() |
| | | JQ_currentViewController().jq_push(vc: vc) |
| | | }else { |
| | | JQ_currentNavigationController().popToRootViewController(animated: true) |
| | | DispatchQueue.main.asyncAfter(deadline: .now()+0.5) { |
| | | JQ_currentViewController().tabBarController?.selectedIndex = 0 |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | } |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <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"> |
| | | <document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="23727" 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="22131"/> |
| | | <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="23721"/> |
| | | <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"/> |
| | |
| | | <rect key="frame" x="0.0" y="0.0" width="100" height="135.66666666666666"/> |
| | | </imageView> |
| | | <stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="16" translatesAutoresizingMaskIntoConstraints="NO" id="m8J-DK-my1"> |
| | | <rect key="frame" x="5" y="37.333333333333343" width="90" height="61"/> |
| | | <rect key="frame" x="5" y="20.666666666666657" width="90" height="94"/> |
| | | <subviews> |
| | | <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="¥ 0" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" minimumFontSize="10" translatesAutoresizingMaskIntoConstraints="NO" id="efu-ap-jzG"> |
| | | <rect key="frame" x="0.0" y="0.0" width="90" height="28"/> |
| | |
| | | <color key="textColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> |
| | | <nil key="highlightedColor"/> |
| | | </label> |
| | | <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="mNu-Zy-6JF"> |
| | | <rect key="frame" x="0.0" y="44" width="90" height="17"/> |
| | | <fontDescription key="fontDescription" type="system" weight="medium" pointSize="14"/> |
| | | <color key="textColor" name="F6F6F6"/> |
| | | <nil key="highlightedColor"/> |
| | | </label> |
| | | <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="满0可用" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Swu-3s-t08"> |
| | | <rect key="frame" x="0.0" y="43.999999999999993" width="90" height="17"/> |
| | | <rect key="frame" x="0.0" y="77" width="90" height="17"/> |
| | | <constraints> |
| | | <constraint firstAttribute="height" constant="17" id="bJ6-wC-a6S"/> |
| | | </constraints> |
| | |
| | | <nil key="highlightedColor"/> |
| | | </label> |
| | | <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="有效期至 --" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="5BW-jy-SC9"> |
| | | <rect key="frame" x="15" y="36" width="64" height="17"/> |
| | | <rect key="frame" x="14.999999999999996" y="36" width="62.666666666666657" height="17"/> |
| | | <constraints> |
| | | <constraint firstAttribute="height" constant="17" id="SG0-sw-1at"/> |
| | | </constraints> |
| | |
| | | <nil key="highlightedColor"/> |
| | | </label> |
| | | <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="--门店可用" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="9T6-ag-k9m"> |
| | | <rect key="frame" x="14.999999999999996" y="56" width="60.666666666666657" height="17"/> |
| | | <rect key="frame" x="15.000000000000004" y="56" width="59.333333333333343" height="17"/> |
| | | <constraints> |
| | | <constraint firstAttribute="height" constant="17" id="mwk-uL-whZ"/> |
| | | </constraints> |
| | |
| | | <nil key="highlightedColor"/> |
| | | </label> |
| | | <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Aod-kc-Nc3"> |
| | | <rect key="frame" x="79.666666666666657" y="51" width="50" height="27"/> |
| | | <rect key="frame" x="78.333333333333343" y="51" width="48" 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="查看详情"> |
| | |
| | | </constraints> |
| | | </imageView> |
| | | <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Osp-YM-6Uw" customClass="QMUIButton"> |
| | | <rect key="frame" x="15" y="76" width="70" height="17"/> |
| | | <rect key="frame" x="15" y="76" width="68" height="17"/> |
| | | <constraints> |
| | | <constraint firstAttribute="height" constant="17" id="Pja-xg-qDo"/> |
| | | </constraints> |
| | |
| | | <action selector="toUseAction:" destination="KGk-i7-Jjw" eventType="touchUpInside" id="eUa-3u-Wnb"/> |
| | | </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="bLV-TF-nE0"> |
| | | <rect key="frame" x="271" y="4.9999999999999991" width="0.0" height="0.0"/> |
| | | <fontDescription key="fontDescription" type="system" pointSize="12"/> |
| | | <nil key="textColor"/> |
| | | <nil key="highlightedColor"/> |
| | | </label> |
| | | </subviews> |
| | | <color key="backgroundColor" systemColor="systemBackgroundColor"/> |
| | | <constraints> |
| | |
| | | <constraint firstItem="Osp-YM-6Uw" firstAttribute="top" secondItem="9T6-ag-k9m" secondAttribute="bottom" constant="3" id="emP-CA-SjG"/> |
| | | <constraint firstItem="bwC-Qg-DNl" firstAttribute="leading" secondItem="G7I-Sh-sFL" secondAttribute="trailing" constant="10" id="f0U-Fv-9C9"/> |
| | | <constraint firstItem="fpg-MK-829" firstAttribute="top" secondItem="Osp-YM-6Uw" secondAttribute="bottom" constant="11" id="oKS-Hz-BTy"/> |
| | | <constraint firstItem="bLV-TF-nE0" firstAttribute="top" secondItem="htP-hm-rxQ" secondAttribute="top" constant="5" id="siG-sV-xZA"/> |
| | | <constraint firstAttribute="trailing" secondItem="bLV-TF-nE0" secondAttribute="trailing" constant="10" id="tb7-7x-olC"/> |
| | | <constraint firstItem="9T6-ag-k9m" firstAttribute="leading" secondItem="G7I-Sh-sFL" secondAttribute="leading" id="uDC-BI-Rjr"/> |
| | | </constraints> |
| | | </view> |
| | |
| | | <outlet property="img_footer" destination="fT4-6g-L0m" id="H23-lu-v1q"/> |
| | | <outlet property="img_header" destination="wLK-TU-eK6" id="EdA-jS-may"/> |
| | | <outlet property="img_status" destination="bwC-Qg-DNl" id="wZJ-ll-FYZ"/> |
| | | <outlet property="lab_name" destination="mNu-Zy-6JF" id="XtM-ws-Klb"/> |
| | | <outlet property="label_dueDatetime" destination="5BW-jy-SC9" id="AzI-Vk-u2M"/> |
| | | <outlet property="label_info" destination="otH-gu-7hx" id="JSu-Vb-xXL"/> |
| | | <outlet property="label_price" destination="efu-ap-jzG" id="Dds-Y0-cP3"/> |
| | | <outlet property="label_storeUse" destination="9T6-ag-k9m" id="nsD-Ag-fgg"/> |
| | | <outlet property="label_title" destination="G7I-Sh-sFL" id="bBq-aa-kjA"/> |
| | | <outlet property="label_useCon" destination="Swu-3s-t08" id="5lK-sO-Sbo"/> |
| | | <outlet property="numberLab" destination="bLV-TF-nE0" id="aGd-kd-Ka2"/> |
| | | <outlet property="view_line" destination="Idc-Qp-xg4" id="qgz-C4-7oJ"/> |
| | | </connections> |
| | | <point key="canvasLocation" x="104.58015267175573" y="32.74647887323944"/> |
| | |
| | | <image name="icon_coupon_used" width="56" height="43"/> |
| | | <image name="icon_trigon_down" width="8" height="5"/> |
| | | <image name="icon_trigon_up" width="8" height="5"/> |
| | | <namedColor name="F6F6F6"> |
| | | <color red="0.9649999737739563" green="0.9649999737739563" blue="0.9649999737739563" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> |
| | | </namedColor> |
| | | <namedColor name="FE6E0D"> |
| | | <color red="0.99199998378753662" green="0.53299999237060547" blue="0.0080000003799796104" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> |
| | | </namedColor> |
| | |
| | | self?.label_price.text = String(format: "%ld积分+%@", model.integral,model.cash.currency()) |
| | | case .cash: |
| | | self?.label_price.text = model.cash.currency() |
| | | case .mpiao: |
| | | self?.label_price.text = "\(model.integral)积分" |
| | | } |
| | | |
| | | self?.img_state.isHidden = model.useType == .unUsed |
| | |
| | | extension WelfareExchangeRecordSubListVC:UITableViewDelegate{ |
| | | func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { |
| | | let model = viewModel.dataSource.value[indexPath.row] |
| | | if model.exchangeType == .mpiao { |
| | | return |
| | | } |
| | | if model.goodType == .coupon{ |
| | | let vc = WelfareCouponsListVC() |
| | | push(vc: vc) |
| | |
| | | label_exchange.text = String(format: "%ld积分+%@", model.integral,model.cash.currency()) |
| | | case .cash: |
| | | label_exchange.text = model.cash.currency() |
| | | case .mpiao: |
| | | label_exchange.text = String(format: "%ld积分", model.integral) |
| | | } |
| | | |
| | | //加载门店 |
| | |
| | | attribute.add(string: String(format: "%ld积分和%@", coin,cash.currency()), withFont: UIFont.systemFont(ofSize: 16, weight: .medium), withColor: UIColor(hexStr: "#E41818").withAlphaComponent(0.8)) |
| | | case .coin: |
| | | attribute.add(string: "\(coin)积分", withFont: UIFont.systemFont(ofSize: 16, weight: .medium), withColor: UIColor(hexStr: "#E41818").withAlphaComponent(0.8)) |
| | | case .mpiao: |
| | | attribute.add(string: cash.currency(), withFont: UIFont.systemFont(ofSize: 16, weight: .medium), withColor: UIColor(hexStr: "#E41818").withAlphaComponent(0.8)) |
| | | |
| | | } |
| | | |
| | | attribute.add(string: "兑换此商品吗?", withFont: UIFont.systemFont(ofSize: 16, weight: .medium), withColor: .black.withAlphaComponent(0.9)) |
| | |
| | | private var webView: WKWebView! |
| | | private var btn:UIButton! |
| | | private var model:BannerModel? |
| | | |
| | | var id: Int = 0 |
| | | override func viewDidLoad() { |
| | | super.viewDidLoad() |
| | | |
| | | Services.getHomeModule().subscribe(onNext: {data in |
| | | Services.getHomeModule(id: id).subscribe(onNext: {data in |
| | | if let data = data.data{ |
| | | self.title = data.title |
| | | self.btn.sd_setBackgroundImage(with: URL(string: data.buttonImage), for: .normal) |
| | |
| | | self.btn.isHidden = data.model == "不跳转" |
| | | self.model = data |
| | | } |
| | | }).disposed(by: disposeBag) |
| | | },onError: { error in |
| | | |
| | | }).disposed(by: disposeBag) |
| | | view.backgroundColor = .white |
| | | |
| | | } |