| | |
| | | "scale" : "1x" |
| | | }, |
| | | { |
| | | "filename" : "btn_add_shadow@2x.png", |
| | | "filename" : "add@2x.png", |
| | | "idiom" : "universal", |
| | | "scale" : "2x" |
| | | }, |
| | | { |
| | | "filename" : "btn_add_shadow@3x.png", |
| | | "filename" : "add@3x.png", |
| | | "idiom" : "universal", |
| | | "scale" : "3x" |
| | | } |
| | |
| | | @IBOutlet weak var tableView: UITableView! |
| | | private var clouse:((StoreSimpleModel)->Void)! |
| | | private var models = [StoreSimpleModel]() |
| | | private var selectIndex = 0 |
| | | private var selectIndex:Int? |
| | | private var defaultModel:StoreSimpleModel? |
| | | |
| | | override func awakeFromNib() { |
| | |
| | | self.layoutIfNeeded() |
| | | } completion: { _ in |
| | | self.removeFromSuperview() |
| | | let model = self.models[self.selectIndex] |
| | | self.clouse!(model) |
| | | if let s = self.selectIndex{ |
| | | let model = self.models[s] |
| | | self.clouse!(model) |
| | | } |
| | | } |
| | | } |
| | | |
| | |
| | | switch self { |
| | | case .waitPayment:return "待支付" |
| | | case .pending:return "待核销" |
| | | case .inStore:return "已到店" |
| | | case .inStore:return "已核销" |
| | | case .complete:return "已完成" |
| | | case .overdue:return "已过期" |
| | | case .cancel:return "已取消" |
| | |
| | | |
| | | var strTitle:String{ |
| | | switch self { |
| | | case .subCard: return "次卡" |
| | | case .subCard: return "日卡" |
| | | case .monthCard:return "月卡" |
| | | case .quarterCard:return "季卡" |
| | | case .yearCard:return "年卡" |
| | |
| | | var id = 0 |
| | | var img = "" |
| | | var jumpPage = "" |
| | | |
| | | var page = "" |
| | | var type = "" |
| | | var turnId = 0 |
| | | var pid = 0 |
| | | var pageId = 0 |
| | | var typeId = 0 |
| | | var state = 0 |
| | | var name = "" |
| | | } |
| | | |
| | | |
| | |
| | | return NetworkRequest.request(params: params, method: .post, progress: true) |
| | | } |
| | | |
| | | class func updateUserProfile(_ imgUrl:String)->Observable<BaseResponse<SimpleModel>>{ |
| | | let params = ParamsAppender.build(url: All_Url) |
| | | .interface(url: "/account/api/useBenefit/uploadImage") |
| | | .append(key: "userImage", value: imgUrl) |
| | | return NetworkRequest.request(params: params, method: .post, progress: true) |
| | | } |
| | | |
| | | /// 勋章 |
| | | static func studMedalList(studentId:Int)->Observable<BaseResponse<[StudentMedalModel]>>{ |
| | | let params = ParamsAppender.build(url: All_Url) |
| | |
| | | } |
| | | |
| | | /// 获取场地列表 |
| | | static func querySiteList(pageNum:Int,pageSize:Int,siteTypeId:Int?,cityCode:String?,storeId:Int?,startTime:String?,endTime:String?)->Observable<BaseResponse<[SiteItemModel]>>{ |
| | | static func querySiteList(pageNum:Int,pageSize:Int,siteTypeId:Int?,cityCode:String?,storeId:Int?,startTime:String?,endTime:String?,search:String?)->Observable<BaseResponse<[SiteItemModel]>>{ |
| | | let params = ParamsAppender.build(url: All_Url) |
| | | .interface(url: "/other/base/site/querySiteList") |
| | | .append(key: "pageNum", value: pageNum) |
| | |
| | | .append(key: "storeId", value: storeId) |
| | | .append(key: "startTime", value: startTime) |
| | | .append(key: "endTime", value: endTime) |
| | | .append(key: "search", value: search) |
| | | .append(key: "lat", value: locationTool.currentLocation?.coordinate.latitude.string) |
| | | .append(key: "lon", value: locationTool.currentLocation?.coordinate.longitude.string) |
| | | return NetworkRequest.request(params: params, method: .post, progress: false) |
| | |
| | | tableView.delegate = self |
| | | tableView.dataSource = self |
| | | tf_search.delegate = self |
| | | tableView.separatorStyle = .none |
| | | tableView.register(UINib(nibName: "ActivityInfoTCell", bundle: nil), forCellReuseIdentifier: "_ActivityInfoTCell") |
| | | // tableView.jq_setEmptyView() |
| | | |
| | |
| | | storesView.frame = sceneDelegate?.window?.frame ?? .zero |
| | | |
| | | storesView.img_logo.sd_setImage(with: URL(string: siteDetailModel.storeCoverDrawing)) |
| | | storesView.label_title.text = siteDetailModel.name |
| | | storesView.label_title.text = siteDetailModel.siteTypeName |
| | | storesView.label_address.text = siteDetailModel.storeName |
| | | storesView.label_distance.text = String(format: "距你%.2lfkm", siteDetailModel.distance) |
| | | storesView.clouse = clouse |
| | |
| | | <constraint firstAttribute="width" secondItem="OiY-s7-UjK" secondAttribute="height" multiplier="1:0.5" id="bfF-av-Mkl"/> |
| | | </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="Uxo-kQ-Zqa"> |
| | | <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="--" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="2" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Uxo-kQ-Zqa"> |
| | | <rect key="frame" x="13" y="253" width="221" height="17"/> |
| | | <fontDescription key="fontDescription" type="system" weight="semibold" pointSize="14"/> |
| | | <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="0.69999999999999996" colorSpace="custom" customColorSpace="sRGB"/> |
| | |
| | | <color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> |
| | | </systemColor> |
| | | <systemColor name="systemGray6Color"> |
| | | <color red="0.94901960784313721" green="0.94901960784313721" blue="0.96862745098039216" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> |
| | | <color red="0.94901960780000005" green="0.94901960780000005" blue="0.96862745100000003" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> |
| | | </systemColor> |
| | | </resources> |
| | | </document> |
| | |
| | | <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> |
| | | <subviews> |
| | | <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="btn_add_large" translatesAutoresizingMaskIntoConstraints="NO" id="5oh-CW-AiU"> |
| | | <rect key="frame" x="145.66666666666666" y="84" width="102" height="102"/> |
| | | <rect key="frame" x="145.66666666666666" y="81" width="102" height="102"/> |
| | | <constraints> |
| | | <constraint firstAttribute="width" constant="102" id="Pfw-bl-ayh"/> |
| | | <constraint firstAttribute="height" constant="102" id="Udg-me-xe5"/> |
| | |
| | | </userDefinedRuntimeAttributes> |
| | | </imageView> |
| | | <stackView opaque="NO" contentMode="scaleToFill" axis="vertical" translatesAutoresizingMaskIntoConstraints="NO" id="d3m-we-29R"> |
| | | <rect key="frame" x="0.0" y="210.00000000000003" width="393" height="352.66666666666674"/> |
| | | <rect key="frame" x="0.0" y="204.00000000000003" width="393" height="352.66666666666674"/> |
| | | <subviews> |
| | | <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="sgk-Rq-GPl"> |
| | | <rect key="frame" x="0.0" y="0.0" width="393" height="50.333333333333336"/> |
| | |
| | | </constraints> |
| | | </view> |
| | | <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="PXO-vA-az9"> |
| | | <rect key="frame" x="0.0" y="50.333333333333314" width="393" height="50.333333333333343"/> |
| | | <rect key="frame" x="0.0" y="50.333333333333343" width="393" height="50.333333333333343"/> |
| | | <subviews> |
| | | <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="icon_item_p" translatesAutoresizingMaskIntoConstraints="NO" id="waQ-bZ-tyt"> |
| | | <rect key="frame" x="15" y="19.333333333333371" width="12" height="12"/> |
| | | <rect key="frame" x="15" y="19.333333333333343" width="12" height="12"/> |
| | | </imageView> |
| | | <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="c21-81-tiw"> |
| | | <rect key="frame" x="14" y="50" width="365" height="0.3333333333333357"/> |
| | | <rect key="frame" x="14" y="49.999999999999972" width="365" height="0.3333333333333357"/> |
| | | <color key="backgroundColor" red="0.83137254900000002" green="0.83137254900000002" blue="0.83137254900000002" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> |
| | | <constraints> |
| | | <constraint firstAttribute="height" constant="0.40000000000000002" id="yBJ-iI-HbF"/> |
| | | </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="Fjk-Kb-cDF"> |
| | | <rect key="frame" x="30" y="16.666666666666686" width="28.666666666666671" height="17"/> |
| | | <rect key="frame" x="30" y="16.666666666666657" width="28.666666666666671" height="17"/> |
| | | <fontDescription key="fontDescription" type="system" weight="medium" pointSize="14"/> |
| | | <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="0.80000000000000004" colorSpace="custom" customColorSpace="sRGB"/> |
| | | <nil key="highlightedColor"/> |
| | |
| | | <textInputTraits key="textInputTraits"/> |
| | | </textField> |
| | | <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="icon_calendar" translatesAutoresizingMaskIntoConstraints="NO" id="BoR-bb-Uqf"> |
| | | <rect key="frame" x="361" y="16.333333333333371" width="18" height="18"/> |
| | | <rect key="frame" x="361" y="16.333333333333343" width="18" height="18"/> |
| | | </imageView> |
| | | </subviews> |
| | | <color key="backgroundColor" systemColor="systemBackgroundColor"/> |
| | |
| | | </constraints> |
| | | </view> |
| | | <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="eXg-lM-iFa"> |
| | | <rect key="frame" x="0.0" y="302.33333333333337" width="393" height="50.333333333333314"/> |
| | | <rect key="frame" x="0.0" y="302.33333333333331" width="393" height="50.333333333333314"/> |
| | | <subviews> |
| | | <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="NlW-dD-gIp"> |
| | | <rect key="frame" x="14" y="50" width="365" height="0.3333333333333357"/> |
| | | <rect key="frame" x="14" y="50.000000000000057" width="365" height="0.3333333333333357"/> |
| | | <color key="backgroundColor" red="0.83137254900000002" green="0.83137254900000002" blue="0.83137254900000002" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> |
| | | <constraints> |
| | | <constraint firstAttribute="height" constant="0.40000000000000002" id="i2J-rI-rHl"/> |
| | | </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="JjF-jS-GPH"> |
| | | <rect key="frame" x="14.000000000000004" y="16.666666666666629" width="57.333333333333343" height="17"/> |
| | | <rect key="frame" x="14.000000000000004" y="16.666666666666686" width="57.333333333333343" height="17"/> |
| | | <fontDescription key="fontDescription" type="system" weight="medium" pointSize="14"/> |
| | | <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="0.80000000000000004" colorSpace="custom" customColorSpace="sRGB"/> |
| | | <nil key="highlightedColor"/> |
| | |
| | | </subviews> |
| | | </stackView> |
| | | <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="KyK-7A-Oi3"> |
| | | <rect key="frame" x="100" y="601.66666666666663" width="193" height="40"/> |
| | | <rect key="frame" x="100" y="595.66666666666663" width="193" height="40"/> |
| | | <color key="backgroundColor" name="FE6E0D"/> |
| | | <constraints> |
| | | <constraint firstAttribute="height" constant="40" id="ftL-wZ-RWw"/> |
| | |
| | | <constraint firstItem="KyK-7A-Oi3" firstAttribute="top" secondItem="d3m-we-29R" secondAttribute="bottom" constant="39" id="8HH-th-KGV"/> |
| | | <constraint firstItem="KyK-7A-Oi3" firstAttribute="leading" secondItem="fnl-2z-Ty3" secondAttribute="leading" constant="100" id="GQG-YU-FM0"/> |
| | | <constraint firstItem="fnl-2z-Ty3" firstAttribute="trailing" secondItem="d3m-we-29R" secondAttribute="trailing" id="GUV-89-fyH"/> |
| | | <constraint firstItem="5oh-CW-AiU" firstAttribute="top" secondItem="fnl-2z-Ty3" secondAttribute="top" constant="25" id="QvX-15-W0k"/> |
| | | <constraint firstItem="5oh-CW-AiU" firstAttribute="top" secondItem="fnl-2z-Ty3" secondAttribute="top" constant="22" id="QvX-15-W0k"/> |
| | | <constraint firstItem="fnl-2z-Ty3" firstAttribute="trailing" secondItem="KyK-7A-Oi3" secondAttribute="trailing" constant="100" id="gh3-61-wYy"/> |
| | | <constraint firstItem="5oh-CW-AiU" firstAttribute="centerX" secondItem="fnl-2z-Ty3" secondAttribute="centerX" id="nOm-Zk-VjG"/> |
| | | <constraint firstItem="d3m-we-29R" firstAttribute="top" secondItem="5oh-CW-AiU" secondAttribute="bottom" constant="24" id="qXQ-dq-ECr"/> |
| | | <constraint firstItem="d3m-we-29R" firstAttribute="top" secondItem="5oh-CW-AiU" secondAttribute="bottom" constant="21" id="qXQ-dq-ECr"/> |
| | | </constraints> |
| | | <point key="canvasLocation" x="40" y="21"/> |
| | | </view> |
| | |
| | | return pageMenu |
| | | }() |
| | | |
| | | private lazy var leftBtn:QMUIButton = { |
| | | let btn = QMUIButton(type: .custom) |
| | | btn.setTitle("添加学员", for: .normal) |
| | | btn.titleLabel?.font = UIFont.systemFont(ofSize: 16) |
| | | btn.setTitleColor(.white, for: .normal) |
| | | btn.setImage(UIImage(named: "btn_add_shadow"), for: .normal) |
| | | btn.imagePosition = .left |
| | | btn.spacingBetweenImageAndTitle = 0 |
| | | btn.imageEdgeInsets = UIEdgeInsets(top: 2, left: 0, bottom: 0, right: 0) |
| | | btn.addTarget(self, action: #selector(addStudentAction), for: .touchUpInside) |
| | | return btn |
| | | }() |
| | | // private lazy var leftBtn:QMUIButton = { |
| | | // let btn = QMUIButton(type: .custom) |
| | | // btn.setTitle("添加学员", for: .normal) |
| | | // btn.titleLabel?.font = UIFont.systemFont(ofSize: 16) |
| | | // btn.setTitleColor(.white, for: .normal) |
| | | // btn.setImage(UIImage(named: "btn_add_shadow"), for: .normal) |
| | | // btn.imagePosition = .left |
| | | // btn.spacingBetweenImageAndTitle = 0 |
| | | // btn.imageEdgeInsets = UIEdgeInsets(top: 2, left: 0, bottom: 0, right: 0) |
| | | // btn.addTarget(self, action: #selector(addStudentAction), for: .touchUpInside) |
| | | // return btn |
| | | // }() |
| | | |
| | | lazy var pageViewController:FFPageViewController = { |
| | | let pageVC = FFPageViewController() |
| | |
| | | |
| | | override func setUI() { |
| | | cons_menuHeight.constant = 0 |
| | | scrollView.contentInset = UIEdgeInsets( top: JQ_ScreenW * 0.6794 - JQ_NavBarHeight, left: 0, bottom: 0, right: 0) |
| | | scrollView.contentInset = UIEdgeInsets( top: 265 - JQ_NavBarHeight, left: 0, bottom: 0, right: 0) |
| | | scrollView.delegate = self |
| | | scrollView.bringSubviewToFront(img_header) |
| | | |
| | |
| | | exerciseCollectionView.tag = 1001 |
| | | exerciseCollectionView.register(UINib(nibName: "StudentVideoCCell", bundle: nil), forCellWithReuseIdentifier: "_StudentVideoCCell") |
| | | |
| | | navigationItem.leftBarButtonItem = UIBarButtonItem(customView: leftBtn) |
| | | // navigationItem.leftBarButtonItem = UIBarButtonItem(customView: leftBtn) |
| | | |
| | | } |
| | | |
| | |
| | | CourseUnAssignView.show(startClouseHomeModel?.courseList ?? [], num: unDispatchNum ?? 0) |
| | | } |
| | | |
| | | @objc func addStudentAction() { |
| | | let vc = AddStudentVC(type: .course) |
| | | push(vc: vc) |
| | | } |
| | | @IBAction func addStudentAction(_ sender: QMUIButton) { |
| | | let vc = AddStudentVC(type: .course) |
| | | push(vc: vc) |
| | | } |
| | | |
| | | @IBAction func exchangeAction(_ sender: UIButton) { |
| | | let vc = StudentExchangeVC() |
| | |
| | | return .darkContent |
| | | } |
| | | |
| | | func scrollViewDidScroll(_ scrollView: UIScrollView) { |
| | | let offsetX = min(1,max(0,-(scrollView.contentOffset.y / 177.0))) |
| | | leftBtn.alpha = offsetX |
| | | } |
| | | // func scrollViewDidScroll(_ scrollView: UIScrollView) { |
| | | // let offsetX = min(1,max(0,-(scrollView.contentOffset.y / 177.0))) |
| | | // leftBtn.alpha = offsetX |
| | | // } |
| | | |
| | | @objc func localDetailAction(btn:UIButton){ |
| | | let index = btn.tag - 10 |
| | |
| | | <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="bg_home_3" translatesAutoresizingMaskIntoConstraints="NO" id="ZN5-HK-e2y"> |
| | | <rect key="frame" x="0.0" y="0.0" width="393" height="267"/> |
| | | </imageView> |
| | | <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="fQO-ad-jiD" customClass="QMUIButton"> |
| | | <rect key="frame" x="15" y="37" width="126" height="61"/> |
| | | <fontDescription key="fontDescription" type="system" pointSize="16"/> |
| | | <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/> |
| | | <state key="normal" title="添加学员" image="btn_add_shadow"/> |
| | | <connections> |
| | | <action selector="addStudentAction:" destination="-1" eventType="touchUpInside" id="elM-42-hKw"/> |
| | | </connections> |
| | | </button> |
| | | </subviews> |
| | | <color key="backgroundColor" systemColor="systemBackgroundColor"/> |
| | | <constraints> |
| | | <constraint firstAttribute="trailing" secondItem="ZN5-HK-e2y" secondAttribute="trailing" id="7Rz-Gb-oce"/> |
| | | <constraint firstAttribute="bottom" secondItem="ZN5-HK-e2y" secondAttribute="bottom" id="HXP-7e-Dpb"/> |
| | | <constraint firstAttribute="width" secondItem="k4g-ye-Foy" secondAttribute="height" multiplier="1:0.6794" id="ayV-t8-bqi"/> |
| | | <constraint firstItem="fQO-ad-jiD" firstAttribute="leading" secondItem="k4g-ye-Foy" secondAttribute="leadingMargin" constant="7" id="bhR-3i-UcO"/> |
| | | <constraint firstItem="ZN5-HK-e2y" firstAttribute="leading" secondItem="k4g-ye-Foy" secondAttribute="leading" id="fsI-bB-Fld"/> |
| | | <constraint firstItem="ZN5-HK-e2y" firstAttribute="top" secondItem="k4g-ye-Foy" secondAttribute="top" id="j5s-ra-g73"/> |
| | | <constraint firstItem="fQO-ad-jiD" firstAttribute="top" secondItem="k4g-ye-Foy" secondAttribute="topMargin" constant="-30" id="kcj-Dh-sMw"/> |
| | | </constraints> |
| | | </view> |
| | | <scrollView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="fJF-28-SsM" customClass="CourseInfoScrollView" customModule="WanPai" customModuleProvider="target"> |
| | |
| | | </objects> |
| | | <resources> |
| | | <image name="bg_home_3" width="390" height="206"/> |
| | | <image name="btn_add_shadow" width="60" height="61"/> |
| | | <image name="icon_BMI" width="20" height="20"/> |
| | | <image name="icon_circle_mini" width="16" height="16"/> |
| | | <image name="icon_man" width="16" height="16"/> |
| | |
| | | |
| | | var packageTypeData = BehaviorRelay<[NormalSimpleModel]?>(value: nil) |
| | | var selectPackeType = BehaviorRelay<NormalSimpleModel?>(value: nil) |
| | | var courseTypeId = BehaviorRelay<Int?>(value: nil) |
| | | var courseType = BehaviorRelay<NormalSimpleModel?>(value: nil) |
| | | var search = BehaviorRelay<String?>(value: nil) |
| | | |
| | | override func api() -> (Observable<BaseResponse<[SignUpCourseItemModel]>>)? { |
| | | return Services.registeredCourse(courseTypeId: courseTypeId.value, search: search.value) |
| | | return Services.registeredCourse(courseTypeId: courseType.value?.id, search: search.value) |
| | | } |
| | | |
| | | func getDefaultData(){ |
| | |
| | | }else{ |
| | | self?.viewModel.search.accept(self?.tf_search.text!) |
| | | } |
| | | self?.viewModel.beginRefresh() |
| | | }).disposed(by: disposeBag) |
| | | } |
| | | |
| | |
| | | guard !sender.isSelected else {return} |
| | | cleanOther() |
| | | sender.isSelected = true |
| | | showSubTypeView = CourseSubTypeView.show(inView: self.view, afterView: view_topView, items: viewModel.packageTypeData.value!,selectModel: viewModel.selectPackeType.value) { [weak self] m in |
| | | showSubTypeView = CourseSubTypeView.show(inView: self.view, afterView: view_topView, items: viewModel.packageTypeData.value!,selectModel: viewModel.courseType.value) { [weak self] m in |
| | | if m.name != "全部"{ |
| | | sender.setTitle(m.name, for: .normal) |
| | | self?.viewModel.selectPackeType.accept(m) |
| | | self?.viewModel.courseType.accept(m) |
| | | }else{ |
| | | sender.setTitle("课程类型", for: .normal) |
| | | self?.viewModel.selectPackeType.accept(nil) |
| | | self?.viewModel.courseType.accept(nil) |
| | | } |
| | | sender.isSelected = false |
| | | self?.viewModel.beginRefresh() |
| | |
| | | } |
| | | |
| | | @IBAction func searchAction(_ sender: UIButton) { |
| | | view.endEditing(true) |
| | | viewModel.beginRefresh() |
| | | } |
| | | |
| | | } |
| | | |
| | | extension SignUpCourseVC:UITableViewDelegate{ |
| | |
| | | } |
| | | tableView.separatorStyle = .none |
| | | tableView.sectionIndexColor = Def_ThemeColor |
| | | tableView.register(UINib(nibName: "CommonSingleTCell", bundle: nil), forCellReuseIdentifier: "_CommonSingleTCell") |
| | | // tableView.register(UINib(nibName: "CommonSingleTCell", bundle: nil), forCellReuseIdentifier: "_CommonSingleTCell") |
| | | startLocation() |
| | | Services.queryAllCity().subscribe(onNext: {[weak self] data in |
| | | guard let weakSelf = self else { return } |
| | |
| | | return keys |
| | | } |
| | | |
| | | func tableView(_ tableView: UITableView, titleForHeaderInSection section: Int) -> String? { |
| | | return keys[section] |
| | | } |
| | | // func tableView(_ tableView: UITableView, titleForHeaderInSection section: Int) -> String? { |
| | | // return keys[section] |
| | | // } |
| | | |
| | | func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? { |
| | | var header = tableView.dequeueReusableHeaderFooterView(withIdentifier: "header") |
| | | if header == nil{ |
| | | header = UITableViewHeaderFooterView(reuseIdentifier: "header") |
| | | let label = UILabel() |
| | | label.tag = 1000 |
| | | label.text = keys[section] |
| | | label.font = UIFont.systemFont(ofSize: 14, weight: .medium) |
| | | label.textColor = .black.withAlphaComponent(0.79) |
| | | header?.contentView.addSubview(label) |
| | | label.snp.makeConstraints { make in |
| | | make.left.equalTo(14) |
| | | make.centerY.equalToSuperview() |
| | | } |
| | | } |
| | | if let label = header?.contentView.viewWithTag(1000) as? UILabel{ |
| | | label.text = keys[section] |
| | | } |
| | | return header |
| | | } |
| | | |
| | | func tableView(_ tableView: UITableView, heightForHeaderInSection section: Int) -> CGFloat { |
| | | return 35 |
| | |
| | | } |
| | | |
| | | func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { |
| | | let cell = tableView.dequeueReusableCell(withIdentifier: "_CommonSingleTCell") as! CommonSingleTCell |
| | | if let model = dataDict[keys[indexPath.section]]?[indexPath.row]{ |
| | | cell.label_title.text = model.name |
| | | } |
| | | cell.img_select.isHidden = true |
| | | cell.view_container.borderColor = .clear |
| | | cell.view_container.backgroundColor = .white |
| | | return cell |
| | | var cell = tableView.dequeueReusableCell(withIdentifier: "_citySingleTCell") |
| | | if cell == nil{ |
| | | cell = UITableViewCell(style: .default, reuseIdentifier: "_citySingleTCell") |
| | | let label = UILabel() |
| | | label.tag = 1000 |
| | | label.text = keys[indexPath.section] |
| | | label.font = UIFont.systemFont(ofSize: 14, weight: .medium) |
| | | label.textColor = .black.withAlphaComponent(0.80) |
| | | cell?.contentView.addSubview(label) |
| | | label.snp.makeConstraints { make in |
| | | make.left.equalTo(14) |
| | | make.centerY.equalToSuperview() |
| | | } |
| | | } |
| | | |
| | | |
| | | if let label = cell!.contentView.viewWithTag(1000) as? UILabel{ |
| | | if let model = dataDict[keys[indexPath.section]]?[indexPath.row]{ |
| | | label.text = model.name |
| | | } |
| | | } |
| | | |
| | | return cell! |
| | | } |
| | | |
| | | func numberOfSections(in tableView: UITableView) -> Int { |
| | |
| | | var disposeBag = DisposeBag() |
| | | |
| | | @IBOutlet weak var img_icon: UIImageView! |
| | | @IBOutlet weak var label_gameName: UILabel! |
| | | var QRCodeModel:QRCodeModel! |
| | | var spaceId = 0 |
| | | var sutuId = 0 |
| | |
| | | var gameListModel:GameListModel!{ |
| | | didSet{ |
| | | img_icon.sd_setImage(with: URL(string: gameListModel.img)) |
| | | label_gameName.text = gameListModel.name |
| | | } |
| | | } |
| | | |
| | |
| | | <action selector="intruduceAction:" destination="KGk-i7-Jjw" eventType="touchUpInside" id="pDk-xC-owF"/> |
| | | </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="8mv-wJ-bVY"> |
| | | <rect key="frame" x="20" y="20" width="430" height="24"/> |
| | | <fontDescription key="fontDescription" type="system" weight="semibold" pointSize="20"/> |
| | | <color key="textColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> |
| | | <nil key="highlightedColor"/> |
| | | </label> |
| | | </subviews> |
| | | <constraints> |
| | | <constraint firstAttribute="trailing" secondItem="mgE-Do-xVL" secondAttribute="trailing" constant="17" id="8Xu-4Y-brX"/> |
| | | <constraint firstItem="tsc-uc-uMd" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" id="CHA-5d-hVu"/> |
| | | <constraint firstAttribute="bottom" secondItem="tsc-uc-uMd" secondAttribute="bottom" id="FPv-Ny-KDM"/> |
| | | <constraint firstAttribute="bottom" secondItem="mgE-Do-xVL" secondAttribute="bottom" constant="20" id="Sdk-GI-bjo"/> |
| | | <constraint firstItem="8mv-wJ-bVY" firstAttribute="top" secondItem="H2p-sc-9uM" secondAttribute="top" constant="20" id="VFx-cc-P3D"/> |
| | | <constraint firstItem="mgE-Do-xVL" firstAttribute="trailing" secondItem="Zkh-2V-b37" secondAttribute="trailing" id="aF4-oB-yGg"/> |
| | | <constraint firstItem="tsc-uc-uMd" firstAttribute="top" secondItem="H2p-sc-9uM" secondAttribute="top" id="dfI-16-wfq"/> |
| | | <constraint firstItem="mgE-Do-xVL" firstAttribute="top" secondItem="Zkh-2V-b37" secondAttribute="bottom" constant="17" id="eRC-9w-WHl"/> |
| | | <constraint firstAttribute="trailing" secondItem="8mv-wJ-bVY" secondAttribute="trailing" constant="20" id="iQi-4J-WD7"/> |
| | | <constraint firstAttribute="trailing" secondItem="tsc-uc-uMd" secondAttribute="trailing" id="rhh-jO-lfR"/> |
| | | <constraint firstItem="8mv-wJ-bVY" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" constant="20" id="tep-7N-0lO"/> |
| | | </constraints> |
| | | </tableViewCellContentView> |
| | | <viewLayoutGuide key="safeArea" id="njF-e1-oar"/> |
| | | <connections> |
| | | <outlet property="img_icon" destination="tsc-uc-uMd" id="mXE-32-ghe"/> |
| | | <outlet property="label_gameName" destination="8mv-wJ-bVY" id="Gwu-Lf-5Pn"/> |
| | | </connections> |
| | | <point key="canvasLocation" x="180.15267175572518" y="2.1126760563380285"/> |
| | | </tableViewCell> |
| | |
| | | //http://vjs.zencdn.net/v/oceans.mp4 |
| | | //https://media.w3.org/2010/05/sintel/trailer.mp4 |
| | | |
| | | let ChooseHomeStore_Noti = Notification.Name.init("ChooseHomeStore_Noti") |
| | | |
| | | class HomeVC: BaseVC{ |
| | | @IBOutlet weak var collectionView: BaseCollectionView! |
| | | @IBOutlet weak var label_vipInfo: UILabel! |
| | | @IBOutlet weak var view_banner: CommonBannerView! |
| | | |
| | | @IBOutlet weak var btn_localTap: TapBtn! |
| | | private var layout:WaterFallFlowLayout! |
| | | @IBOutlet weak var label_store: UILabel! |
| | | private var items = Array<Any>() |
| | |
| | | if let models = data.data{ |
| | | let imgs = models.compactMap({$0.img}) |
| | | self?.view_banner.setImages(images: imgs, type: .URL) { index in |
| | | //todo |
| | | |
| | | jumpPage(name: models[index].name, page: models[index].page, type: models[index].type, id: models[index].turnId) |
| | | } |
| | | } |
| | | }) { error in |
| | |
| | | // collectionView.jq_setEmptyView("无数据", image: UIImage(named: "icon_LOGO")?.jq_imageWithTintColor(color: .gray), foregroundColor: .gray, clouse: nil) |
| | | } |
| | | |
| | | override func setRx() { |
| | | NotificationCenter.default.rx.notification(ChooseHomeStore_Noti).take(until: self.rx.deallocated).subscribe(onNext: { [weak self] noti in |
| | | guard let weakSelf = self else { return } |
| | | weakSelf.chooseStoresAction(weakSelf.btn_localTap) |
| | | }).disposed(by: disposeBag) |
| | | } |
| | | |
| | | private func getStoreInfo(){ |
| | | Services.homeInfo().subscribe(onNext: {[weak self] data in |
| | | if let m = data.data{ |
| | |
| | | <objects> |
| | | <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="HomeVC" customModule="WanPai" customModuleProvider="target"> |
| | | <connections> |
| | | <outlet property="btn_localTap" destination="CWt-Cn-ccL" id="9nt-jZ-TyT"/> |
| | | <outlet property="collectionView" destination="ysy-N3-BCh" id="3mf-b9-Tj4"/> |
| | | <outlet property="label_store" destination="VD5-cz-3Fs" id="azK-up-VpY"/> |
| | | <outlet property="label_vipInfo" destination="Y4w-3W-3I4" id="Daq-hU-gwK"/> |
| | |
| | | } |
| | | |
| | | @IBAction func updateProfileAction(_ sender: UIButton) { |
| | | JQ_ImagePickerTool.getSharedInstance().singleImage({ image in |
| | | self.profileImg = image |
| | | }, clipSize: CGSize(width: JQ_ScreenW, height: JQ_ScreenW)) |
| | | } |
| | | JQ_ImagePickerTool.getSharedInstance().singleImage({ image in |
| | | self.profileImg = image |
| | | self.btn_userProfile.setImage(image, for: .normal) |
| | | image.uploadImgToService().subscribe { text in |
| | | Services.updateUserProfile(text).subscribe(onNext: {_ in |
| | | alertSuccess(msg: "修改成功") |
| | | NotificationCenter.default.post(name: UpdateWelfare_Noti, object: nil) |
| | | }) { error in |
| | | alertError(msg: error.localizedDescription) |
| | | }.disposed(by: self.disposeBag) |
| | | } onError: { error in |
| | | alertError(msg: error.localizedDescription) |
| | | }.disposed(by: self.disposeBag) |
| | | }, clipSize: CGSize(width: JQ_ScreenW, height: JQ_ScreenW)) |
| | | } |
| | | |
| | | |
| | | @IBAction func dismissAccountAction(_ sender: UIButton) { |
| | |
| | | label_title.text = billingModel.consumeName |
| | | label_datetime.text = billingModel.consumeTime |
| | | label_price.text = billingModel.consumeAmount.currency() |
| | | if billingModel.consumeAmount > 0{ |
| | | if billingModel.detailsType == .positive{ |
| | | label_price.text = "+\(billingModel.consumeAmount.jq_formatFloat)" |
| | | label_price.textColor = UIColor(hexStr: "#2AA60B") |
| | | }else{ |
| | |
| | | |
| | | override func setUI() { |
| | | view.addSubview(headView) |
| | | headView.snp.makeConstraints { make in |
| | | make.top.equalTo(self.view.safeAreaLayoutGuide.snp.top) |
| | | make.left.right.equalToSuperview() |
| | | make.height.equalTo(JQ_ScreenW * 0.5564) |
| | | } |
| | | headView.frame = CGRect(x: 0, y:UIDevice.jq_safeEdges.top + (navigationController?.navigationBar.height)! , width: view.size.width, height: view.size.width * 0.5564) |
| | | // headView.snp.makeConstraints { make in |
| | | // make.top.equalTo(self.view.snp.top) |
| | | // make.left.right.equalToSuperview() |
| | | // make.height.equalTo(JQ_ScreenW * 0.5564) |
| | | // } |
| | | view.addSubview(collectionView) |
| | | collectionView.snp.makeConstraints { make in |
| | | make.top.equalTo(headView.snp.bottom) |
| | |
| | | let vc = WelfareRedeemGoodsDetailVC(commodityId: model.goodId, goodsType: model.goodsType) |
| | | push(vc: vc) |
| | | } |
| | | |
| | | // func collectionView(_ collectionView: UICollectionView, viewForSupplementaryElementOfKind kind: String, at indexPath: IndexPath) -> UICollectionReusableView { |
| | | // let headView = collectionView.dequeueReusableSupplementaryView(ofKind: kind, withReuseIdentifier: "_CoinStoreHeadView", for: indexPath) as! CoinStoreHeadView |
| | | // headView.innerView = self.view |
| | | // headView.viewModel = viewModel |
| | | // headView.label_coin.text = "\(benefitHomeModel?.userIntegral ?? 0)积分" |
| | | // headView.label_username.text = benefitHomeModel?.userName ?? "" |
| | | // headView.img_cover.sd_setImage(with: URL(string: benefitHomeModel?.userHeadImg)) |
| | | // headView.tf_search.rx.text.orEmpty.bind(to: viewModel.search).disposed(by: disposeBag) |
| | | // headView.integral = benefitHomeModel?.userIntegral ?? 0 |
| | | // |
| | | // return headView |
| | | // } |
| | | } |
| | | |
| | | extension CoinStoreCenterVC:UICollectionViewDataSource{ |
| | |
| | | |
| | | func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int { |
| | | return viewModel.dataSource.value.count |
| | | } |
| | | |
| | | func numberOfSections(in collectionView: UICollectionView) -> Int { |
| | | return 1 |
| | | } |
| | | } |
| | |
| | | |
| | | @IBAction func filterAction(_ sender: QMUIButton) { |
| | | JQ_MenuView().show(self, tapView: sender, items: ["全部记录","充值","扣除"], tableHei: 150) {[weak self] index, str in |
| | | self?.btn_filter.setTitle(str, for: .normal) |
| | | if index == 0{ |
| | | self?.viewModel.type.accept(nil) |
| | | }else{ |
| | |
| | | @IBOutlet weak var view_students: UIView! |
| | | @IBOutlet weak var view_ticketType: UIView! |
| | | @IBOutlet weak var label_ticketType: UILabel! |
| | | @IBOutlet weak var view_selectStore: UIView! |
| | | @IBOutlet weak var view_selectStoreHei: NSLayoutConstraint! |
| | | |
| | | private var bannerView:CommonBannerView = { |
| | | let banner = CommonBannerView() |
| | |
| | | override func viewDidLoad() { |
| | | super.viewDidLoad() |
| | | title = "商品详情" |
| | | |
| | | view_selectStore.isHidden = true |
| | | view_selectStoreHei.constant = 0 |
| | | Services.UseBenefitDetail(goodsId: id, goodsType: goodsType).subscribe(onNext: {[weak self] data in |
| | | guard let weakSelf = self else { return } |
| | | if let model = data.data{ |
| | |
| | | Services.exchangeStoreIds(id: model.goodId, type: model.goodType).subscribe(onNext: {[weak self] data in |
| | | if let models = data.data{ |
| | | self?.storeModels = models |
| | | self?.selectStoreModel = models.first |
| | | self?.label_storeName.text = models.first?.storeName ?? "未知门店" |
| | | // self?.selectStoreModel = models.first |
| | | // self?.label_storeName.text = models.first?.storeName ?? "未知门店" |
| | | } |
| | | }).disposed(by: weakSelf.disposeBag) |
| | | } |
| | |
| | | ChooseStoreView.show(models: storeModels,defaultModel: selectStoreModel) {[weak self] m in |
| | | self?.selectStoreModel = m |
| | | self?.label_storeName.text = m.storeName |
| | | self?.view_selectStore.isHidden = false |
| | | self?.view_selectStoreHei.constant = 42 |
| | | UIView.animate(withDuration: 0.4) { |
| | | self?.view.layoutIfNeeded() |
| | | } |
| | | } |
| | | } |
| | | |
| | |
| | | |
| | | // var mpower = max(1,studentModels.count) //倍率 |
| | | |
| | | ChooseNumberView.show(maxNumber: exchangeGoodsModel!.perLimit) {[weak self] num in |
| | | guard let weakSelf = self else { return } |
| | | let attribute = AttributedStringbuilder() |
| | | attribute.add(string: "确认消耗", withFont: UIFont.systemFont(ofSize: 16, weight: .medium), withColor: .black.withAlphaComponent(0.9)) |
| | | |
| | | switch weakSelf.exchangeGoodsModel!.exchangeType{ |
| | | case .cash: |
| | | attribute.add(string: (weakSelf.exchangeGoodsModel!.cash * Double(num)).currency(), withFont: UIFont.systemFont(ofSize: 16, weight: .medium), withColor: UIColor(hexStr: "#E41818").withAlphaComponent(0.8)) |
| | | case .cashAndCoin: |
| | | attribute.add(string: String(format: "%ld积分和%@", weakSelf.exchangeGoodsModel!.integral * num,(weakSelf.exchangeGoodsModel!.cash * Double(num)).currency()), withFont: UIFont.systemFont(ofSize: 16, weight: .medium), withColor: UIColor(hexStr: "#E41818").withAlphaComponent(0.8)) |
| | | case .coin: |
| | | attribute.add(string: "\(weakSelf.exchangeGoodsModel!.integral * num)积分", withFont: UIFont.systemFont(ofSize: 16, weight: .medium), withColor: UIColor(hexStr: "#E41818").withAlphaComponent(0.8)) |
| | | if exchangeGoodsModel!.perLimit > 1{ |
| | | ChooseNumberView.show(maxNumber: exchangeGoodsModel!.perLimit) {[weak self] num in |
| | | self?.showExchangeUI(num: num) |
| | | } |
| | | |
| | | attribute.add(string: "兑换此商品吗?", withFont: UIFont.systemFont(ofSize: 16, weight: .medium), withColor: .black.withAlphaComponent(0.9)) |
| | | CommonAlertView.show(title: "兑换商品", attribute: attribute.mutableAttributedString) { state in |
| | | guard state else {return} |
| | | |
| | | if weakSelf.exchangeGoodsModel!.exchangeType == .coin{ |
| | | Services.exchangeOperation(exchangeType: .coin, goodsId: weakSelf.exchangeGoodsModel!.goodId, goodsType: weakSelf.exchangeGoodsModel!.goodType, num: num, payType: nil, stuIds: weakSelf.studentModels.map({"\($0.id)"}).joined(separator: ","),storeId: weakSelf.selectStoreModel?.storeId).subscribe(onNext: {data in |
| | | alertSuccess(msg: "兑换成功") |
| | | weakSelf.exchangeSuccessUI() |
| | | }).disposed(by: weakSelf.disposeBag) |
| | | }else { |
| | | //支付金额 |
| | | let cash = weakSelf.exchangeGoodsModel!.cash |
| | | PaymentView.show(money: (ali:cash,wx:cash,coin:nil,course:nil)) { payType in |
| | | Services.exchangeOperation(exchangeType: weakSelf.exchangeGoodsModel!.exchangeType, goodsId: weakSelf.exchangeGoodsModel!.goodId, goodsType: weakSelf.exchangeGoodsModel!.goodType, num: num, payType: payType, stuIds: weakSelf.studentModels.map({"\($0.id)"}).joined(separator: ","), storeId: weakSelf.selectStoreModel?.storeId).subscribe(onNext: {data in |
| | | if let m = data.data{ |
| | | switch payType { |
| | | case .aliPay: |
| | | YYPaymentManager.shared.sendPaymentRequest(YYAlipayRequest(orderString: m.orderString)) { result in |
| | | switch result { |
| | | case .success:alertSuccess(msg: "兑换成功") |
| | | weakSelf.exchangeSuccessUI() |
| | | case .cancel: |
| | | alert(msg: "已取消兑换") |
| | | case .failure(let error): |
| | | alertError(msg: error.localizedDescription) |
| | | } |
| | | } |
| | | case .wechat:break |
| | | case .coin:break |
| | | case .courseNum:break |
| | | } |
| | | } |
| | | }).disposed(by: weakSelf.disposeBag) |
| | | } |
| | | } |
| | | } |
| | | } |
| | | }else{ |
| | | showExchangeUI(num: 1) |
| | | } |
| | | } |
| | | |
| | | private func showExchangeUI(num:Int){ |
| | | let attribute = AttributedStringbuilder() |
| | | attribute.add(string: "确认消耗", withFont: UIFont.systemFont(ofSize: 16, weight: .medium), withColor: .black.withAlphaComponent(0.9)) |
| | | |
| | | switch exchangeGoodsModel!.exchangeType{ |
| | | case .cash: |
| | | attribute.add(string: (exchangeGoodsModel!.cash * Double(num)).currency(), withFont: UIFont.systemFont(ofSize: 16, weight: .medium), withColor: UIColor(hexStr: "#E41818").withAlphaComponent(0.8)) |
| | | case .cashAndCoin: |
| | | attribute.add(string: String(format: "%ld积分和%@", exchangeGoodsModel!.integral * num,(exchangeGoodsModel!.cash * Double(num)).currency()), withFont: UIFont.systemFont(ofSize: 16, weight: .medium), withColor: UIColor(hexStr: "#E41818").withAlphaComponent(0.8)) |
| | | case .coin: |
| | | attribute.add(string: "\(exchangeGoodsModel!.integral * num)积分", 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)) |
| | | CommonAlertView.show(title: "兑换商品", attribute: attribute.mutableAttributedString) {[weak self] state in |
| | | guard state else {return} |
| | | guard let weakSelf = self else { return } |
| | | |
| | | if weakSelf.exchangeGoodsModel!.exchangeType == .coin{ |
| | | Services.exchangeOperation(exchangeType: .coin, goodsId: weakSelf.exchangeGoodsModel!.goodId, goodsType: weakSelf.exchangeGoodsModel!.goodType, num: num, payType: nil, stuIds: weakSelf.studentModels.map({"\($0.id)"}).joined(separator: ","),storeId: weakSelf.selectStoreModel?.storeId).subscribe(onNext: {[weak self] data in |
| | | guard let weakSelf = self else { return } |
| | | if data.code == 200{ |
| | | CommonAlertView.show(title: "提示", content: "兑换成功!") {[weak self] _ in |
| | | self?.exchangeSuccessUI() |
| | | } |
| | | }else{ |
| | | alertError(msg: data.msg) |
| | | } |
| | | }).disposed(by: weakSelf.disposeBag) |
| | | }else { |
| | | //支付金额 |
| | | let cash = weakSelf.exchangeGoodsModel!.cash |
| | | PaymentView.show(money: (ali:cash,wx:cash,coin:nil,course:nil)) { payType in |
| | | Services.exchangeOperation(exchangeType: weakSelf.exchangeGoodsModel!.exchangeType, goodsId: weakSelf.exchangeGoodsModel!.goodId, goodsType: weakSelf.exchangeGoodsModel!.goodType, num: num, payType: payType, stuIds: weakSelf.studentModels.map({"\($0.id)"}).joined(separator: ","), storeId: weakSelf.selectStoreModel?.storeId).subscribe(onNext: {[weak self] data in |
| | | guard let weakSelf = self else { return } |
| | | if let m = data.data{ |
| | | switch payType { |
| | | case .aliPay: |
| | | YYPaymentManager.shared.sendPaymentRequest(YYAlipayRequest(orderString: m.orderString)) { result in |
| | | switch result { |
| | | case .success: |
| | | CommonAlertView.show(title: "提示", content: "兑换成功!") {[weak self] _ in |
| | | self?.exchangeSuccessUI() |
| | | } |
| | | case .cancel: |
| | | alert(msg: "已取消兑换") |
| | | case .failure(let error): |
| | | alertError(msg: error.localizedDescription) |
| | | } |
| | | } |
| | | case .wechat:break |
| | | case .coin:break |
| | | case .courseNum:break |
| | | } |
| | | } |
| | | }).disposed(by: weakSelf.disposeBag) |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | private func exchangeSuccessUI(){ |
| | | btn_exchange.setTitle("已兑换", for: .normal) |
| | | btn_exchange.isEnabled = false |
| | |
| | | <device id="retina6_12" orientation="portrait" appearance="light"/> |
| | | <dependencies> |
| | | <deployment identifier="iOS"/> |
| | | <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="22129"/> |
| | | <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="22130"/> |
| | | <capability name="Named colors" minToolsVersion="9.0"/> |
| | | <capability name="Safe area layout guides" minToolsVersion="9.0"/> |
| | | <capability name="System colors in document resources" minToolsVersion="11.0"/> |
| | |
| | | <outlet property="view_banner" destination="Qqf-lq-tQb" id="nPC-xS-Gbj"/> |
| | | <outlet property="view_courseHours" destination="FLV-Kf-Avt" id="oDU-BH-bZj"/> |
| | | <outlet property="view_exchangeStore" destination="PF8-aV-ew9" id="x4R-3l-zbD"/> |
| | | <outlet property="view_selectStore" destination="82O-lS-xHR" id="zts-hz-3lt"/> |
| | | <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="webView" destination="tQn-lc-7cb" id="xcY-cg-bKR"/> |
| | |
| | | import JQTools |
| | | import QMUIKit |
| | | |
| | | let UpdateWelfare_Noti = Notification.Name.init("UpdateWelfare_Noti") |
| | | |
| | | class WelfareVC: BaseVC { |
| | | |
| | | @IBOutlet weak var img_userProfile: UIImageView! |
| | |
| | | |
| | | override func viewDidLoad() { |
| | | super.viewDidLoad() |
| | | |
| | | Services.benefitHome().subscribe(onNext: {[weak self] data in |
| | | if let model = data.data{ |
| | | self?.benefitHomeModel = model |
| | | self?.img_userProfile.sd_setImage(with: URL(string: model.userHeadImg)) |
| | | self?.label_username.text = model.userName.isEmpty ? "未命名":model.userName |
| | | self?.btn_vip.isHidden = model.isMember != "年度会员" |
| | | self?.label_coin.text = model.wpCoin.currencyNotPrefix() |
| | | self?.label_score.text = "\(model.userIntegral)" |
| | | self?.coinCollectionView.reloadData() |
| | | |
| | | if let coupon = model.image?.myConpons{ |
| | | self?.btn_coupon.sd_setImage(with: URL(string: coupon), for: .normal, placeholderImage: nil,context: nil) |
| | | } |
| | | |
| | | if let onlineShop = model.image?.onlineShop{ |
| | | self?.btn_shoppping.sd_setImage(with: URL(string: onlineShop), for: .normal, placeholderImage: nil, context: nil) |
| | | } |
| | | |
| | | if let weeksBenefit = model.image?.weeksBenefit{ |
| | | 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) |
| | | } |
| | | |
| | | // if model.commodities.count > 5{ |
| | | // self?.autoScroll() |
| | | // } |
| | | } |
| | | }) { error in |
| | | |
| | | }.disposed(by: disposeBag) |
| | | getData() |
| | | } |
| | | |
| | | override func viewDidDisappear(_ animated: Bool) { |
| | |
| | | coinCollectionView.register(UINib(nibName: "WelfareCoinCCell", bundle: nil), forCellWithReuseIdentifier: "_WelfareCoinCCell") |
| | | } |
| | | |
| | | override func setRx() { |
| | | NotificationCenter.default.rx.notification(UpdateWelfare_Noti).take(until: self.rx.deallocated).subscribe(onNext: {[weak self] noti in |
| | | self?.getData() |
| | | }).disposed(by: disposeBag) |
| | | } |
| | | |
| | | private func getData(){ |
| | | Services.benefitHome().subscribe(onNext: {[weak self] data in |
| | | if let model = data.data{ |
| | | self?.benefitHomeModel = model |
| | | self?.img_userProfile.sd_setImage(with: URL(string: model.userHeadImg)) |
| | | self?.label_username.text = model.userName.isEmpty ? "未命名":model.userName |
| | | self?.btn_vip.isHidden = model.isMember != "年度会员" |
| | | self?.label_coin.text = model.wpCoin.currencyNotPrefix() |
| | | self?.label_score.text = "\(model.userIntegral)" |
| | | self?.coinCollectionView.reloadData() |
| | | |
| | | if let coupon = model.image?.myConpons{ |
| | | self?.btn_coupon.sd_setImage(with: URL(string: coupon), for: .normal, placeholderImage: nil,context: nil) |
| | | } |
| | | |
| | | if let onlineShop = model.image?.onlineShop{ |
| | | self?.btn_shoppping.sd_setImage(with: URL(string: onlineShop), for: .normal, placeholderImage: nil, context: nil) |
| | | } |
| | | |
| | | if let weeksBenefit = model.image?.weeksBenefit{ |
| | | 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) |
| | | } |
| | | |
| | | // if model.commodities.count > 5{ |
| | | // self?.autoScroll() |
| | | // } |
| | | } |
| | | }) { error in |
| | | |
| | | }.disposed(by: disposeBag) |
| | | } |
| | | |
| | | @IBAction func userProfileAction(_ sender: UIButton) { |
| | | let vc = ProfileVC() |
| | | push(vc: vc) |
| | |
| | | hiddenAction() |
| | | sender.isSelected = true |
| | | var items = Array<NormalSimpleModel>() |
| | | items.append(NormalSimpleModel(id: 0, name: "商品类型")) |
| | | items.append(NormalSimpleModel(id: 1, name: "实物")) |
| | | items.append(NormalSimpleModel(id: 2, name: "课包")) |
| | | items.append(NormalSimpleModel(id: 3, name: "门票")) |
| | | items.append(NormalSimpleModel(id: 0, name: "全部")) |
| | | items.append(NormalSimpleModel(id: 1, name: "实物商品")) |
| | | items.append(NormalSimpleModel(id: 2, name: "课包商品")) |
| | | items.append(NormalSimpleModel(id: 3, name: "门票商品")) |
| | | items.append(NormalSimpleModel(id: 4, name: "优惠券")) |
| | | |
| | | let model = items.filter({$0.id == viewModel.goodsType.value?.rawValue}) |
| | | typeSubTypeView = CourseSubTypeView.show(inView: self.innerView, afterView: self, items: items, selectModel: model.first) {[weak self] m in |
| | | sender.setTitle(m.name, for: .normal) |
| | | if m.id == 0{ |
| | | self?.viewModel.goodsType.accept(nil) |
| | | sender.setTitle("商品类型", for: .normal) |
| | | }else{ |
| | | self?.viewModel.goodsType.accept(ExchangeType(rawValue: m.id)) |
| | | sender.setTitle(m.name, for: .normal) |
| | | } |
| | | self?.viewModel.beginRefresh() |
| | | sender.isSelected = false |
| | |
| | | <device id="retina6_12" orientation="portrait" appearance="light"/> |
| | | <dependencies> |
| | | <deployment identifier="iOS"/> |
| | | <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="22129"/> |
| | | <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="22130"/> |
| | | <capability name="Named colors" minToolsVersion="9.0"/> |
| | | <capability name="Safe area layout guides" minToolsVersion="9.0"/> |
| | | <capability name="System colors in document resources" minToolsVersion="11.0"/> |
| | |
| | | <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/> |
| | | <placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/> |
| | | <collectionReusableView opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" reuseIdentifier="_CoinStoreHeadView" id="U6b-Vx-4bR" customClass="CoinStoreHeadView" customModule="WanPai" customModuleProvider="target"> |
| | | <rect key="frame" x="0.0" y="0.0" width="457" height="219"/> |
| | | <rect key="frame" x="0.0" y="0.0" width="457" height="224"/> |
| | | <autoresizingMask key="autoresizingMask"/> |
| | | <subviews> |
| | | <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="ZP6-sh-vZG"> |
| | |
| | | </connections> |
| | | </button> |
| | | <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="8CB-nR-iEe"> |
| | | <rect key="frame" x="0.0" y="164" width="457" height="45"/> |
| | | <rect key="frame" x="0.0" y="164" width="457" height="52"/> |
| | | <subviews> |
| | | <stackView opaque="NO" contentMode="scaleToFill" distribution="equalSpacing" spacing="19" translatesAutoresizingMaskIntoConstraints="NO" id="yJz-Nm-kJx"> |
| | | <rect key="frame" x="14" y="0.0" width="296" height="45"/> |
| | | <rect key="frame" x="14" y="0.0" width="275" height="52"/> |
| | | <subviews> |
| | | <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="tGC-9B-kBe" customClass="QMUIButton"> |
| | | <rect key="frame" x="0.0" y="0.0" width="86" height="45"/> |
| | | <rect key="frame" x="0.0" y="0.0" width="79" height="52"/> |
| | | <fontDescription key="fontDescription" type="system" weight="medium" pointSize="16"/> |
| | | <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/> |
| | | <state key="normal" title="默认排序" image="icon_down_arrow"> |
| | |
| | | </connections> |
| | | </button> |
| | | <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="CSW-RY-Hpe" customClass="QMUIButton"> |
| | | <rect key="frame" x="105" y="0.0" width="86" height="45"/> |
| | | <rect key="frame" x="98" y="0.0" width="79" height="52"/> |
| | | <fontDescription key="fontDescription" type="system" weight="medium" pointSize="16"/> |
| | | <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/> |
| | | <state key="normal" title="商品类型" image="icon_down_arrow"> |
| | |
| | | </connections> |
| | | </button> |
| | | <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="UwS-hX-I6m" customClass="QMUIButton"> |
| | | <rect key="frame" x="210" y="0.0" width="86" height="45"/> |
| | | <rect key="frame" x="196" y="0.0" width="79" height="52"/> |
| | | <fontDescription key="fontDescription" type="system" weight="medium" pointSize="16"/> |
| | | <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/> |
| | | <state key="normal" title="适用门店" image="icon_down_arrow"> |
| | |
| | | </subviews> |
| | | <color key="backgroundColor" systemColor="systemBackgroundColor"/> |
| | | <constraints> |
| | | <constraint firstAttribute="height" constant="52" id="1Co-fD-4AD"/> |
| | | <constraint firstItem="yJz-Nm-kJx" firstAttribute="leading" secondItem="8CB-nR-iEe" secondAttribute="leading" constant="14" id="9hc-im-Sub"/> |
| | | <constraint firstItem="yJz-Nm-kJx" firstAttribute="top" secondItem="8CB-nR-iEe" secondAttribute="top" id="NVE-6F-bmA"/> |
| | | <constraint firstAttribute="bottom" secondItem="yJz-Nm-kJx" secondAttribute="bottom" id="eLa-V0-hfY"/> |
| | |
| | | <viewLayoutGuide key="safeArea" id="VXr-Tz-HHm"/> |
| | | <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> |
| | | <constraints> |
| | | <constraint firstAttribute="bottom" secondItem="8CB-nR-iEe" secondAttribute="bottom" constant="10" id="283-7K-fB5"/> |
| | | <constraint firstAttribute="bottom" secondItem="8CB-nR-iEe" secondAttribute="bottom" priority="250" constant="10" id="283-7K-fB5"/> |
| | | <constraint firstItem="m7l-8u-Pbk" firstAttribute="top" secondItem="pwx-YV-g10" secondAttribute="top" id="40V-TJ-lnj"/> |
| | | <constraint firstItem="pwx-YV-g10" firstAttribute="top" secondItem="ZP6-sh-vZG" secondAttribute="bottom" constant="26" id="9rX-LZ-GPt"/> |
| | | <constraint firstItem="VXr-Tz-HHm" firstAttribute="trailing" secondItem="pwx-YV-g10" secondAttribute="trailing" constant="53" id="AL2-1N-JTb"/> |
| | |
| | | <outlet property="shadowView" destination="8CB-nR-iEe" id="Lhn-LX-roE"/> |
| | | <outlet property="tf_search" destination="kj9-Ot-DUR" id="IBN-9O-U07"/> |
| | | </connections> |
| | | <point key="canvasLocation" x="167.17557251908397" y="79.929577464788736"/> |
| | | <point key="canvasLocation" x="167.17557251908397" y="81.690140845070431"/> |
| | | </collectionReusableView> |
| | | </objects> |
| | | <resources> |
| | | <image name="icon_down_arrow" width="20" height="14"/> |
| | | <image name="icon_down_arrow_s" width="20" height="14"/> |
| | | <image name="icon_down_arrow" width="13" height="8"/> |
| | | <image name="icon_down_arrow_s" width="13" height="8"/> |
| | | <image name="icon_search" width="17" height="17"/> |
| | | <namedColor name="FE6E0D"> |
| | | <color red="0.99199998378753662" green="0.53299999237060547" blue="0.0080000003799796104" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> |
| | |
| | | <color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> |
| | | </systemColor> |
| | | <systemColor name="systemGroupedBackgroundColor"> |
| | | <color red="0.94901960784313721" green="0.94901960784313721" blue="0.96862745098039216" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> |
| | | <color red="0.94901960780000005" green="0.94901960780000005" blue="0.96862745100000003" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> |
| | | </systemColor> |
| | | </resources> |
| | | </document> |
| | |
| | | } |
| | | |
| | | @objc func runTimer(){ |
| | | let second = (yardBookingModel.insertTime / 1000) - Date().timeIntervalSince1970 |
| | | let second = (yardBookingModel.insertTime / 1000) + 30 * 60 - Date().timeIntervalSince1970 |
| | | if second <= 0{ |
| | | timer?.invalidate() |
| | | }else{ |
| | |
| | | <nil key="highlightedColor"/> |
| | | </label> |
| | | <stackView opaque="NO" contentMode="scaleToFill" spacing="12" translatesAutoresizingMaskIntoConstraints="NO" id="Jlr-qA-GbX"> |
| | | <rect key="frame" x="283" y="141" width="188" height="31"/> |
| | | <rect key="frame" x="306" y="141" width="165" height="31"/> |
| | | <subviews> |
| | | <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Z37-Ah-lZf"> |
| | | <rect key="frame" x="0.0" y="0.0" width="88" height="31"/> |
| | |
| | | </connections> |
| | | </button> |
| | | <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="g9Q-HA-dpz"> |
| | | <rect key="frame" x="100" y="0.0" width="88" height="31"/> |
| | | <rect key="frame" x="100" y="0.0" width="65" height="31"/> |
| | | <color key="backgroundColor" name="FE6E0D"/> |
| | | <constraints> |
| | | <constraint firstAttribute="width" constant="88" id="88X-NE-svW"/> |
| | | <constraint firstAttribute="width" constant="65" id="88X-NE-svW"/> |
| | | </constraints> |
| | | <fontDescription key="fontDescription" type="system" weight="semibold" pointSize="14"/> |
| | | <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/> |
| | |
| | | <rect key="frame" x="0.0" y="0.0" width="399" height="195"/> |
| | | <autoresizingMask key="autoresizingMask"/> |
| | | <subviews> |
| | | <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="MY1-tt-nld"> |
| | | <rect key="frame" x="13.999999999999996" y="17" width="40.666666666666657" height="19.333333333333329"/> |
| | | <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" horizontalCompressionResistancePriority="250" text="-----------------------------------" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="MY1-tt-nld"> |
| | | <rect key="frame" x="13.999999999999986" y="17" width="250.66666666666663" height="19.333333333333329"/> |
| | | <fontDescription key="fontDescription" type="system" weight="medium" pointSize="16"/> |
| | | <color key="textColor" red="0.23921568627450979" green="0.24313725490196078" blue="0.27058823529411763" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> |
| | | <nil key="highlightedColor"/> |
| | | </label> |
| | | <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Gr9-IR-avJ"> |
| | | <rect key="frame" x="62.666666666666657" y="17.333333333333332" width="40" height="18.999999999999996"/> |
| | | <view contentMode="scaleToFill" horizontalHuggingPriority="1000" horizontalCompressionResistancePriority="1000" translatesAutoresizingMaskIntoConstraints="NO" id="Gr9-IR-avJ"> |
| | | <rect key="frame" x="272.66666666666669" y="17.333333333333332" width="40" height="18.999999999999996"/> |
| | | <subviews> |
| | | <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="HvA-v4-DgN"> |
| | | <rect key="frame" x="5.0000000000000071" y="2" width="30" height="15"/> |
| | | <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" horizontalCompressionResistancePriority="250" text="Label" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="HvA-v4-DgN"> |
| | | <rect key="frame" x="5" y="2" width="30" height="15"/> |
| | | <fontDescription key="fontDescription" type="system" weight="medium" pointSize="10"/> |
| | | <color key="textColor" red="0.99215686274509807" green="0.45098039215686275" blue="0.0078431372549019607" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> |
| | | <nil key="highlightedColor"/> |
| | |
| | | </userDefinedRuntimeAttribute> |
| | | </userDefinedRuntimeAttributes> |
| | | </view> |
| | | <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="距离我0km" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="CgS-vI-Bxr"> |
| | | <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="750" verticalHuggingPriority="251" horizontalCompressionResistancePriority="1000" text="距离我0km" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="CgS-vI-Bxr"> |
| | | <rect key="frame" x="322.66666666666669" y="19.666666666666668" width="62.333333333333314" height="14.333333333333332"/> |
| | | <fontDescription key="fontDescription" type="system" weight="medium" pointSize="12"/> |
| | | <color key="textColor" red="0.23921568627450979" green="0.24313725490196078" blue="0.27058823529411763" alpha="0.69999999999999996" colorSpace="custom" customColorSpace="sRGB"/> |
| | |
| | | <constraint firstItem="Gr9-IR-avJ" firstAttribute="leading" secondItem="MY1-tt-nld" secondAttribute="trailing" constant="8" id="nE8-is-sKC"/> |
| | | <constraint firstItem="CgS-vI-Bxr" firstAttribute="centerY" secondItem="MY1-tt-nld" secondAttribute="centerY" id="qtv-FK-qUC"/> |
| | | <constraint firstItem="Gr9-IR-avJ" firstAttribute="centerY" secondItem="MY1-tt-nld" secondAttribute="centerY" id="sAl-ck-Fn9"/> |
| | | <constraint firstItem="CgS-vI-Bxr" firstAttribute="leading" relation="greaterThanOrEqual" secondItem="Gr9-IR-avJ" secondAttribute="trailing" constant="10" id="tcN-PX-o8R"/> |
| | | <constraint firstItem="mcL-hw-SED" firstAttribute="top" secondItem="hxt-yX-skH" secondAttribute="bottom" constant="12" id="v2v-v3-7fY"/> |
| | | <constraint firstItem="MY1-tt-nld" firstAttribute="top" secondItem="H2p-sc-9uM" secondAttribute="top" constant="17" id="vov-Ky-VXp"/> |
| | | <constraint firstAttribute="bottom" secondItem="mcL-hw-SED" secondAttribute="bottom" id="yZJ-mJ-W0a"/> |
| | |
| | | @IBOutlet weak var label_paymentPrice: UILabel! |
| | | @IBOutlet weak var label_bookingTime: UILabel! |
| | | @IBOutlet weak var label_paymentTime: UILabel! |
| | | @IBOutlet weak var view_paymentTime: UIView! |
| | | @IBOutlet weak var label_usedState: UILabel! |
| | | @IBOutlet weak var img_QRCode: UIImageView! |
| | | @IBOutlet weak var view_qrCode: UIView! |
| | |
| | | self?.label_paymentPrice.text = model.payMoney.int.string + "币" |
| | | } |
| | | |
| | | self?.label_bookingTime.text = Date.jq_format(TimeInterval(model.startTime / 1000), formatter: "yyyy-MM-dd") |
| | | self?.label_bookingTime.text = Date.jq_format(TimeInterval(model.startTime / 1000), formatter: "yyyy-MM-dd HH:mm") |
| | | |
| | | switch model.state { |
| | | case .waitPayment: |
| | |
| | | |
| | | case .pending: |
| | | if let m = self?.yardBookingDetailDataModel{ |
| | | let t = OpenDoorTimeModel(start_time: TimeInterval(model.startTime / 1000) - 15 * 3600, end_time: TimeInterval(model.endTime / 1000)) |
| | | let t = OpenDoorTimeModel(start_time: TimeInterval(model.startTime / 1000), end_time: TimeInterval(model.endTime / 1000)) |
| | | let openDoorModel = OpenDoorModel(sid: m.siteId, rid: data.data?.ids ?? [], uid: m.appUserId, time: [t], type: 2) |
| | | if let modelStr = openDoorModel.toJSONString(){ |
| | | self?.img_QRCode.image = QRCodeImage(string: modelStr, size: 132 * sceneDelegate!.window!.screen.scale) |
| | |
| | | } |
| | | fallthrough |
| | | default: |
| | | self?.label_paymentTime.text = Date.jq_format(TimeInterval(model.payTime / 1000), formatter: "yyyy-MM-dd") |
| | | |
| | | self?.view_paymentTime.isHidden = model.payTime == 0 |
| | | self?.label_paymentTime.text = Date.jq_format(TimeInterval(model.payTime / 1000), formatter: "yyyy-MM-dd HH:mm") |
| | | self?.label_usedState.text = model.state.titleRaw |
| | | self?.view_qrCode.isHidden = false |
| | | self?.btn_cancel.isHidden = false |
| | |
| | | <outlet property="label_yardName" destination="7h1-Dw-eHi" id="zti-Dx-dlW"/> |
| | | <outlet property="view" destination="i5M-Pr-FkT" id="sfx-zR-JGt"/> |
| | | <outlet property="view_halfYard" destination="nqL-6S-ZE7" id="dSS-cN-Fyb"/> |
| | | <outlet property="view_paymentTime" destination="icd-To-U0G" id="Jc6-ml-Idn"/> |
| | | <outlet property="view_qrCode" destination="1hl-Kq-mul" id="8Ro-IP-cgz"/> |
| | | </connections> |
| | | </placeholder> |
| | |
| | | |
| | | }).disposed(by: weakSelf.disposeBag) |
| | | } |
| | | } |
| | | }else{ |
| | | weakSelf.navigationController?.popToRootViewController(animated: true) |
| | | } |
| | | } |
| | | } |
| | | |
| | |
| | | <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> |
| | | <subviews> |
| | | <scrollView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="aCz-js-83k"> |
| | | <rect key="frame" x="0.0" y="59" width="393" height="759"/> |
| | | <rect key="frame" x="0.0" y="59" width="393" height="758.99999999999977"/> |
| | | <subviews> |
| | | <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="9j6-1C-tRQ"> |
| | | <rect key="frame" x="0.0" y="0.0" width="393" height="1432.6666666666667"/> |
| | |
| | | <nil key="highlightedColor"/> |
| | | </label> |
| | | <wkWebView contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="oRE-1Z-WlN"> |
| | | <rect key="frame" x="14" y="51" width="365" height="50"/> |
| | | <rect key="frame" x="0.0" y="51" width="393" height="50"/> |
| | | <constraints> |
| | | <constraint firstAttribute="height" constant="50" id="tkN-1P-oj8"/> |
| | | </constraints> |
| | |
| | | <color key="backgroundColor" systemColor="systemBackgroundColor"/> |
| | | <constraints> |
| | | <constraint firstAttribute="bottom" secondItem="oRE-1Z-WlN" secondAttribute="bottom" constant="14" id="GKU-b4-XpY"/> |
| | | <constraint firstAttribute="trailing" secondItem="oRE-1Z-WlN" secondAttribute="trailing" constant="14" id="HHA-EF-4Wo"/> |
| | | <constraint firstAttribute="trailing" secondItem="oRE-1Z-WlN" secondAttribute="trailing" id="HHA-EF-4Wo"/> |
| | | <constraint firstItem="oRE-1Z-WlN" firstAttribute="top" secondItem="MCU-6e-poI" secondAttribute="bottom" constant="14" id="Rg5-L2-8Sa"/> |
| | | <constraint firstItem="MCU-6e-poI" firstAttribute="leading" secondItem="0Dm-wG-zL9" secondAttribute="leading" constant="14" id="WCY-oz-OZk"/> |
| | | <constraint firstItem="oRE-1Z-WlN" firstAttribute="leading" secondItem="0Dm-wG-zL9" secondAttribute="leading" constant="14" id="kQ4-fU-rsW"/> |
| | | <constraint firstItem="oRE-1Z-WlN" firstAttribute="leading" secondItem="0Dm-wG-zL9" secondAttribute="leading" id="kQ4-fU-rsW"/> |
| | | <constraint firstItem="MCU-6e-poI" firstAttribute="top" secondItem="0Dm-wG-zL9" secondAttribute="top" constant="17" id="nTj-pX-nMs"/> |
| | | </constraints> |
| | | </view> |
| | |
| | | |
| | | |
| | | override func api() -> (Observable<BaseResponse<[SiteItemModel]>>)? { |
| | | return Services.querySiteList(pageNum: page, pageSize: pageSize, siteTypeId: siteType.value?.id, cityCode: city.value?.code, storeId: selectStore.value?.id, startTime: startDate.value, endTime: endDate.value) |
| | | return Services.querySiteList(pageNum: page, pageSize: pageSize, siteTypeId: siteType.value?.id, cityCode: city.value?.code, storeId: selectStore.value?.id, startTime: startDate.value, endTime: endDate.value,search: search.value) |
| | | } |
| | | } |
| | | |