| | |
| | | |
| | | |
| | | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { |
| | | sleep(2) |
| | | Services.startNetworkMonitor() |
| | | YYPaymentManager.shared.configuredWeChat(appID: WeChatAPPID, universalLink: WechatUniversalLinks) |
| | | YYPaymentManager.shared.configuredAlipay(appScheme: APPScheme) |
| | |
| | | |
| | | func needLogin(){ |
| | | UserViewModel.clearToken() |
| | | if JQ_currentViewController() is LoginVC{return} |
| | | let loginNav = LoginNav(rootViewController: LoginVC()) |
| | | loginNav.modalPresentationStyle = .fullScreen |
| | | JQ_currentViewController().present(loginNav, animated: true) |
| | |
| | | image.isUserInteractionEnabled = true |
| | | setImage(image: image, index: images.count - 1) |
| | | scrollView.addSubview(image) |
| | | addTapGesWithImage(image: image) |
| | | |
| | | for i in 1 ... images.count{ |
| | | let image = UIImageView() |
| | | image.frame = CGRect(x:width * |
| | | CGFloat(i),y:0,width:width,height:height) |
| | | image.contentMode = .scaleToFill |
| | | image.isUserInteractionEnabled = true |
| | | image.tag = i - 1 |
| | | scrollView.addSubview(image) |
| | | setImage(image: image, index: i - 1) |
| | | addTapGesWithImage(image: image) |
| | |
| | | image.isUserInteractionEnabled = true |
| | | scrollView.addSubview(image) |
| | | setImage(image: image, index: 0) |
| | | addTapGesWithImage(image: image) |
| | | |
| | | // pageControl.center = CGPoint(x:width/2,y:height - CGFloat(15)) |
| | | pageControl.isEnabled = true |
| | |
| | | } |
| | | } |
| | | |
| | | func jumpPage(name:String,page:String = "",type:String = "",id:Int? = nil){ |
| | | func jumpPage(model:String,page:String = "",type:String = "",id:Int? = nil){ |
| | | |
| | | var storeModel:NormalSimpleModel? |
| | | if let storeStr = UserDefaults.standard.object(forKey: "CurrentStore") as? String{ |
| | |
| | | } |
| | | } |
| | | |
| | | switch name { |
| | | case "加入玩湃": |
| | | if page == "主页"{} |
| | | |
| | | if page == "运动营列表"{ |
| | | switch model { |
| | | case "加入会员": |
| | | if page == "成为会员"{ |
| | | let vc = JoinMemberIntroduceVC() |
| | | JQ_currentViewController().jq_push(vc:vc) |
| | | } |
| | | |
| | | case "首页banner": |
| | | if page == "成为会员"{ |
| | | let vc = JoinMemberIntroduceVC() |
| | | JQ_currentViewController().jq_push(vc:vc) |
| | | } |
| | | case "首页": |
| | | if page == "常见问题"{ |
| | | JQ_currentViewController().jq_push(vc: CustomerListVC(page: 1)) |
| | | } |
| | | ///=============== |
| | | |
| | | |
| | | case "加入玩湃": |
| | | if page == "主页"{ |
| | | JQ_currentViewController().navigationController?.popToRootViewController(animated: true) |
| | | DispatchQueue.main.asyncAfter(deadline: .now()+0.5) { |
| | | JQ_currentViewController().tabBarController?.selectedIndex = 0 |
| | | } |
| | | } |
| | | |
| | | if page == "课程列表"{ |
| | | if type == "详情"{ |
| | | JQ_currentViewController().jq_push(vc: CourseDetailVC(id:id ?? 0)) |
| | | }else{ |
| | |
| | | } |
| | | } |
| | | |
| | | if page == "线上课得积分"{ |
| | | if type == "详情"{ |
| | | |
| | | }else{ |
| | | let vc = CourseOnlineListVC(position: 1) |
| | | vc.title = page |
| | | JQ_currentViewController().jq_push(vc: vc) |
| | | } |
| | | } |
| | | |
| | | if page == "看视频得奖励"{ |
| | | if page == "线上课得积分" || page == "看视频得奖励"{ |
| | | if type == "详情"{ |
| | | let vc = CourseVideoDetailVC(id: id ?? 0) |
| | | vc.title = page |
| | | JQ_currentViewController().jq_push(vc: vc) |
| | | }else{ |
| | | let vc = CourseOnlineListVC(position: 2) |
| | | let vc = CourseOnlineSubListVC(classificationId: id ?? 0) |
| | | vc.title = page |
| | | JQ_currentViewController().jq_push(vc: vc) |
| | | } |
| | | } |
| | | |
| | | // if page == "看视频得奖励"{ |
| | | // if type == "详情"{ |
| | | // let vc = CourseVideoDetailVC(id: id ?? 0) |
| | | // vc.title = page |
| | | // JQ_currentViewController().jq_push(vc: vc) |
| | | // }else{ |
| | | // let vc = CourseOnlineSubListVC(classificationId: id ?? 0) |
| | | // vc.title = page |
| | | // JQ_currentViewController().jq_push(vc: vc) |
| | | // } |
| | | // } |
| | | |
| | | if page == "预约场地"{ |
| | | if type == "详情"{ |
| | |
| | | JQ_currentViewController().jq_push(vc: JoinMemberIntroduceVC()) |
| | | } |
| | | |
| | | case "开始运动营": |
| | | case "开始课程": |
| | | if page == "主页"{ |
| | | |
| | | JQ_currentViewController().navigationController?.popToRootViewController(animated: true) |
| | | DispatchQueue.main.asyncAfter(deadline: .now()+0.5) { |
| | | JQ_currentViewController().tabBarController?.selectedIndex = 1 |
| | | } |
| | | } |
| | | |
| | | case "使用福利": |
| | | if page == "主页"{ |
| | | |
| | | JQ_currentViewController().navigationController?.popToRootViewController(animated: true) |
| | | DispatchQueue.main.asyncAfter(deadline: .now()+0.5) { |
| | | JQ_currentViewController().tabBarController?.selectedIndex = 2 |
| | | } |
| | | } |
| | | |
| | | if page == "充值中心"{ |
| | |
| | | } |
| | | |
| | | if page == "本周福利"{ |
| | | if type == "限时折扣"{ |
| | | if type == "限时折扣(主页)"{ |
| | | JQ_currentViewController().jq_push(vc: WelfareWeeklyListVC(page: 0)) |
| | | } |
| | | if type == "赠送课时"{ |
| | | if type == "赠送课时(主页)"{ |
| | | JQ_currentViewController().jq_push(vc: WelfareWeeklyListVC(page: 1)) |
| | | } |
| | | if type == "指定折扣"{ |
| | |
| | | |
| | | case "探索玩湃": |
| | | if page == "门店列表"{ |
| | | |
| | | // let vc = SearchStoreListVC() |
| | | // JQ_currentViewController().jq_push(vc: vc) |
| | | JQ_currentViewController().navigationController?.popToRootViewController(animated: true) |
| | | DispatchQueue.main.asyncAfter(deadline: .now()+0.5) { |
| | | JQ_currentViewController().tabBarController?.selectedIndex = 3 |
| | | } |
| | | } |
| | | |
| | | if page == "常见问题"{ |
| | |
| | | var typeId = 0 |
| | | var state = 0 |
| | | var name = "" |
| | | var model = "" |
| | | } |
| | | |
| | | |
| | |
| | | |
| | | #if DEBUG |
| | | //let All_Url = "https://ds867zleb4ow.xiaomiqiu.com" |
| | | let All_Url = "http://192.168.110.27:56666" |
| | | //let All_Url = "http://192.168.110.27:56666" |
| | | let All_Url = "http://8.137.22.229:56666" |
| | | let Game_Url = "https://try.daowepark.com" |
| | | //let All_Url = "https://console-mock.apipost.cn/mock/b5b2dee0-5564-40ae-f082-a352d502a153" |
| | | //let All_Url = "http://192.168.110.165:10393/mock/b5b2dee0-5564-40ae-f082-a352d502a153" |
| | | #else |
| | | let All_Url = "http://8.137.22.229:56666" |
| | | let Game_Url = "https://port.daowepark.com" |
| | | let All_Url = "http://8.137.22.229:56666" //正式地址 |
| | | //let Game_Url = "https://port.daowepark.com"//正式地址 |
| | | let Game_Url = "https://try.daowepark.com" //测试地址 |
| | | #endif |
| | | |
| | | class Services: NSObject { |
| | |
| | | |
| | | // MARK: -- 游戏 |
| | | extension Services{ |
| | | |
| | | class func updateInfo(birthday:String?,gender:Int?,name:String?)->Observable<BaseResponse<SimpleModel>>{ |
| | | let params = ParamsAppender.build(url: All_Url) |
| | | .interface(url: "/account/api/appUser/updateInfo") |
| | | .append(key: "birthday", value: birthday) |
| | | .append(key: "gender", value: gender) |
| | | .append(key: "name", value: name) |
| | | return NetworkRequest.request(params: params, method: .post, progress: false) |
| | | } |
| | | |
| | | /// 本地离线游戏 |
| | | class func game_gameList(spaceId:Int,storeId:Int)->Observable<BaseResponse<[GameListModel]>>{ |
| | |
| | | return NetworkRequest.request(params: params, method: .post, progress: true) |
| | | } |
| | | |
| | | class func wxPhoneBind(phone:String,code:String,openId:String,invitePhone:String? = nil)->Observable<BaseResponse<SimpleModel>>{ |
| | | class func wxPhoneBind(phone:String,code:String,openId:String,invitePhone:String? = nil)->Observable<BaseResponse<LoginModel>>{ |
| | | let params = ParamsAppender.build(url: All_Url) |
| | | .interface(url: "/account/base/appUser/bind") |
| | | .append(key: "phone", value: phone) |
| | | .append(key: "openId", value: openId) |
| | | .append(key: "code", value: code) |
| | | .append(key: "invitePhone", value: invitePhone) |
| | | .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: true) |
| | | } |
| | | |
| | |
| | | .append(key: "password", value: password.jq_md5String().lowercased()) |
| | | .append(key: "code", value: code) |
| | | .append(key: "invitePhone", value: invitePhone) |
| | | .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: true) |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | /// 获取参赛人员列表 |
| | | class func queryParticipantList()->Observable<BaseResponse<[ActivityDetailPartModel]>>{ |
| | | class func queryParticipantList(isAuth:Int? = nil)->Observable<BaseResponse<[ActivityDetailPartModel]>>{ |
| | | let params = ParamsAppender.build(url: All_Url) |
| | | .interface(url: "competition/api/participant/queryParticipantList") |
| | | .append(key: "isPre", value: isAuth) |
| | | return NetworkRequest.request(params: params, method: .post, progress: false) |
| | | } |
| | | |
| | |
| | | alertError(msg: "请至少选择一位参赛人员");return |
| | | } |
| | | |
| | | StoresInfoView.show(activityDetailModel) { [weak self] status in |
| | | StoresInfoView.show(activityDetailModel.storeInfos.first!) { [weak self] status in |
| | | guard let weakSelf = self else { return } |
| | | |
| | | let price = weakSelf.activityDetailModel.cashPrice * Double(weakSelf.students.count) |
| | |
| | | <rect key="frame" x="0.0" y="59" width="393" height="711"/> |
| | | <subviews> |
| | | <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="XMe-LD-M9B"> |
| | | <rect key="frame" x="0.0" y="0.0" width="393" height="971.33333333333337"/> |
| | | <rect key="frame" x="0.0" y="0.0" width="393" height="985.66666666666663"/> |
| | | <subviews> |
| | | <stackView opaque="NO" contentMode="scaleToFill" axis="vertical" translatesAutoresizingMaskIntoConstraints="NO" id="fI5-pl-psr"> |
| | | <rect key="frame" x="0.0" y="220.00000000000006" width="393" height="751.33333333333348"/> |
| | | <rect key="frame" x="0.0" y="219.99999999999994" width="393" height="765.66666666666652"/> |
| | | <subviews> |
| | | <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="y11-gN-dh6"> |
| | | <rect key="frame" x="0.0" y="0.0" width="393" height="52"/> |
| | |
| | | </userDefinedRuntimeAttributes> |
| | | </view> |
| | | <stackView opaque="NO" contentMode="scaleToFill" axis="vertical" translatesAutoresizingMaskIntoConstraints="NO" id="sei-fq-5Wo"> |
| | | <rect key="frame" x="0.0" y="52" width="393" height="320"/> |
| | | <rect key="frame" x="0.0" y="52" width="393" height="334.33333333333331"/> |
| | | <subviews> |
| | | <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="jIC-yz-bTR"> |
| | | <rect key="frame" x="0.0" y="0.0" width="393" height="60"/> |
| | |
| | | </constraints> |
| | | </view> |
| | | <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="CDe-Ud-awC"> |
| | | <rect key="frame" x="0.0" y="198" width="393" height="46"/> |
| | | <rect key="frame" x="0.0" y="198" width="393" height="60.333333333333314"/> |
| | | <subviews> |
| | | <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="QYt-ST-Wg9"> |
| | | <rect key="frame" x="14" y="11" width="4" height="4"/> |
| | |
| | | <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="0.5" colorSpace="custom" customColorSpace="sRGB"/> |
| | | <nil key="highlightedColor"/> |
| | | </label> |
| | | <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="--" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="w7l-Hs-7EQ"> |
| | | <rect key="frame" x="22" y="28.333333333333368" width="11.666666666666664" height="14.333333333333332"/> |
| | | <label opaque="NO" userInteractionEnabled="NO" contentMode="left" verticalHuggingPriority="251" text="--" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="w7l-Hs-7EQ"> |
| | | <rect key="frame" x="22" y="28.333333333333371" width="335.33333333333331" height="28.666666666666671"/> |
| | | <fontDescription key="fontDescription" type="system" weight="medium" pointSize="12"/> |
| | | <nil key="textColor"/> |
| | | <nil key="highlightedColor"/> |
| | | </label> |
| | | <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="--" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="gQe-UF-wHC"> |
| | | <rect key="frame" x="367.33333333333331" y="28.333333333333368" width="11.666666666666686" height="14.333333333333332"/> |
| | | <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" horizontalCompressionResistancePriority="1000" text="--" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="gQe-UF-wHC"> |
| | | <rect key="frame" x="367.33333333333331" y="35.666666666666629" width="11.666666666666686" height="14.333333333333336"/> |
| | | <fontDescription key="fontDescription" type="system" weight="medium" pointSize="12"/> |
| | | <nil key="textColor"/> |
| | | <nil key="highlightedColor"/> |
| | |
| | | <color key="backgroundColor" systemColor="systemBackgroundColor"/> |
| | | <constraints> |
| | | <constraint firstItem="QYt-ST-Wg9" firstAttribute="top" secondItem="CDe-Ud-awC" secondAttribute="top" constant="11" id="79c-gM-Cco"/> |
| | | <constraint firstAttribute="bottom" secondItem="w7l-Hs-7EQ" secondAttribute="bottom" constant="3.3300000000000001" id="7zV-PP-5Xp"/> |
| | | <constraint firstItem="gQe-UF-wHC" firstAttribute="centerY" secondItem="w7l-Hs-7EQ" secondAttribute="centerY" id="AkY-4n-dpj"/> |
| | | <constraint firstAttribute="trailing" secondItem="gQe-UF-wHC" secondAttribute="trailing" constant="14" id="CQy-cv-X3i"/> |
| | | <constraint firstItem="JYO-In-OJe" firstAttribute="leading" secondItem="QYt-ST-Wg9" secondAttribute="trailing" constant="4" id="Esv-Mf-s1F"/> |
| | | <constraint firstItem="JYO-In-OJe" firstAttribute="centerY" secondItem="QYt-ST-Wg9" secondAttribute="centerY" id="Qw2-HO-ScI"/> |
| | | <constraint firstAttribute="height" constant="46" id="iEL-sX-OiD"/> |
| | | <constraint firstAttribute="height" relation="greaterThanOrEqual" constant="46" id="iEL-sX-OiD"/> |
| | | <constraint firstItem="gQe-UF-wHC" firstAttribute="leading" secondItem="w7l-Hs-7EQ" secondAttribute="trailing" constant="10" id="ioB-m2-iAM"/> |
| | | <constraint firstItem="w7l-Hs-7EQ" firstAttribute="leading" secondItem="JYO-In-OJe" secondAttribute="leading" id="nH1-D1-y3r"/> |
| | | <constraint firstItem="w7l-Hs-7EQ" firstAttribute="top" secondItem="JYO-In-OJe" secondAttribute="bottom" constant="8" id="sMB-C1-OxX"/> |
| | | <constraint firstItem="QYt-ST-Wg9" firstAttribute="leading" secondItem="CDe-Ud-awC" secondAttribute="leading" constant="14" id="zN5-NS-Q4I"/> |
| | | </constraints> |
| | | </view> |
| | | <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="pab-I9-at1"> |
| | | <rect key="frame" x="0.0" y="244" width="393" height="76"/> |
| | | <rect key="frame" x="0.0" y="258.33333333333337" width="393" height="76"/> |
| | | <subviews> |
| | | <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="ZWf-WG-HMN"> |
| | | <rect key="frame" x="14" y="11" width="4" height="4"/> |
| | |
| | | <nil key="highlightedColor"/> |
| | | </label> |
| | | <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="--" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="2" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="aqQ-TW-QWs"> |
| | | <rect key="frame" x="22" y="28.333333333333371" width="285" height="28.666666666666671"/> |
| | | <rect key="frame" x="22" y="28.333333333333258" width="285" height="28.666666666666671"/> |
| | | <fontDescription key="fontDescription" type="system" weight="medium" pointSize="12"/> |
| | | <nil key="textColor"/> |
| | | <nil key="highlightedColor"/> |
| | |
| | | </subviews> |
| | | </stackView> |
| | | <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="oxi-DH-KVR"> |
| | | <rect key="frame" x="0.0" y="372" width="393" height="115"/> |
| | | <rect key="frame" x="0.0" y="386.33333333333337" width="393" height="115"/> |
| | | <subviews> |
| | | <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="8N9-5a-Lyf"> |
| | | <rect key="frame" x="13" y="0.0" width="380" height="1"/> |
| | |
| | | </constraints> |
| | | </view> |
| | | <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="w7j-PS-NjY"> |
| | | <rect key="frame" x="0.0" y="487" width="393" height="115"/> |
| | | <rect key="frame" x="0.0" y="501.33333333333337" width="393" height="115"/> |
| | | <subviews> |
| | | <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="kpL-cg-Mmm"> |
| | | <rect key="frame" x="13" y="0.0" width="380" height="1"/> |
| | |
| | | </constraints> |
| | | </view> |
| | | <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="HJQ-FF-uCj"> |
| | | <rect key="frame" x="0.0" y="602" width="393" height="149.33333333333337"/> |
| | | <rect key="frame" x="0.0" y="616.33333333333337" width="393" height="149.33333333333337"/> |
| | | <subviews> |
| | | <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="tyD-F3-iK7"> |
| | | <rect key="frame" x="13" y="0.0" width="380" height="1"/> |
| | |
| | | </connections> |
| | | </button> |
| | | <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="UEA-WV-jZV"> |
| | | <rect key="frame" x="0.0" y="49.333333333333371" width="393" height="100"/> |
| | | <rect key="frame" x="0.0" y="49.333333333333258" width="393" height="100"/> |
| | | <color key="backgroundColor" systemColor="systemBackgroundColor"/> |
| | | <constraints> |
| | | <constraint firstAttribute="height" constant="100" id="E7r-ch-NFQ"/> |
| | |
| | | <rect key="frame" x="0.0" y="59" width="393" height="711"/> |
| | | <subviews> |
| | | <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="L7Z-R8-Jpz"> |
| | | <rect key="frame" x="0.0" y="0.0" width="393" height="971.33333333333337"/> |
| | | <rect key="frame" x="0.0" y="0.0" width="393" height="985.33333333333337"/> |
| | | <subviews> |
| | | <stackView opaque="NO" contentMode="scaleToFill" axis="vertical" translatesAutoresizingMaskIntoConstraints="NO" id="HXl-f8-gCo"> |
| | | <rect key="frame" x="0.0" y="220.00000000000006" width="393" height="751.33333333333348"/> |
| | | <rect key="frame" x="0.0" y="220.00000000000006" width="393" height="765.33333333333348"/> |
| | | <subviews> |
| | | <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="SAx-1o-0mX"> |
| | | <rect key="frame" x="0.0" y="0.0" width="393" height="52"/> |
| | |
| | | </userDefinedRuntimeAttributes> |
| | | </view> |
| | | <stackView opaque="NO" contentMode="scaleToFill" axis="vertical" translatesAutoresizingMaskIntoConstraints="NO" id="U7K-JT-5nW"> |
| | | <rect key="frame" x="0.0" y="52" width="393" height="244"/> |
| | | <rect key="frame" x="0.0" y="52" width="393" height="258"/> |
| | | <subviews> |
| | | <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="uhl-1b-oQQ"> |
| | | <rect key="frame" x="0.0" y="0.0" width="393" height="60"/> |
| | |
| | | </constraints> |
| | | </view> |
| | | <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="6rj-zE-gaO"> |
| | | <rect key="frame" x="0.0" y="198" width="393" height="46"/> |
| | | <rect key="frame" x="0.0" y="198" width="393" height="60"/> |
| | | <subviews> |
| | | <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="22y-iZ-rPZ"> |
| | | <rect key="frame" x="14" y="11" width="4" height="4"/> |
| | |
| | | <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="0.5" colorSpace="custom" customColorSpace="sRGB"/> |
| | | <nil key="highlightedColor"/> |
| | | </label> |
| | | <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="--" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="bbY-Kb-C5z"> |
| | | <rect key="frame" x="22" y="28.333333333333368" width="11.666666666666664" height="14.333333333333332"/> |
| | | <label opaque="NO" userInteractionEnabled="NO" contentMode="left" verticalHuggingPriority="251" text="--" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="bbY-Kb-C5z"> |
| | | <rect key="frame" x="22" y="28.333333333333371" width="335.33333333333331" height="28.666666666666671"/> |
| | | <fontDescription key="fontDescription" type="system" weight="medium" pointSize="12"/> |
| | | <nil key="textColor"/> |
| | | <nil key="highlightedColor"/> |
| | | </label> |
| | | <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="--" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="NBi-eH-iIS"> |
| | | <rect key="frame" x="367.33333333333331" y="28.333333333333368" width="11.666666666666686" height="14.333333333333332"/> |
| | | <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" horizontalCompressionResistancePriority="1000" text="--" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="NBi-eH-iIS"> |
| | | <rect key="frame" x="367.33333333333331" y="35.333333333333371" width="11.666666666666686" height="14.333333333333336"/> |
| | | <fontDescription key="fontDescription" type="system" weight="medium" pointSize="12"/> |
| | | <nil key="textColor"/> |
| | | <nil key="highlightedColor"/> |
| | |
| | | <constraint firstItem="QkB-qj-0gR" firstAttribute="centerY" secondItem="22y-iZ-rPZ" secondAttribute="centerY" id="79m-iZ-Y8b"/> |
| | | <constraint firstAttribute="trailing" secondItem="NBi-eH-iIS" secondAttribute="trailing" constant="14" id="8p3-jn-6eo"/> |
| | | <constraint firstItem="NBi-eH-iIS" firstAttribute="centerY" secondItem="bbY-Kb-C5z" secondAttribute="centerY" id="C1u-t1-DZ7"/> |
| | | <constraint firstItem="NBi-eH-iIS" firstAttribute="leading" secondItem="bbY-Kb-C5z" secondAttribute="trailing" constant="10" id="Chh-Wl-TSs"/> |
| | | <constraint firstItem="bbY-Kb-C5z" firstAttribute="top" secondItem="QkB-qj-0gR" secondAttribute="bottom" constant="8" id="D7q-Tn-b1k"/> |
| | | <constraint firstItem="bbY-Kb-C5z" firstAttribute="leading" secondItem="QkB-qj-0gR" secondAttribute="leading" id="H2Z-Pr-J9m"/> |
| | | <constraint firstAttribute="height" constant="46" id="LYd-LK-fL0"/> |
| | | <constraint firstAttribute="height" relation="greaterThanOrEqual" constant="46" id="LYd-LK-fL0"/> |
| | | <constraint firstItem="QkB-qj-0gR" firstAttribute="leading" secondItem="22y-iZ-rPZ" secondAttribute="trailing" constant="4" id="OdG-X5-NoK"/> |
| | | <constraint firstAttribute="bottom" secondItem="bbY-Kb-C5z" secondAttribute="bottom" constant="3" id="oZo-QW-Zgm"/> |
| | | <constraint firstItem="22y-iZ-rPZ" firstAttribute="top" secondItem="6rj-zE-gaO" secondAttribute="top" constant="11" id="znr-kQ-cHs"/> |
| | | </constraints> |
| | | </view> |
| | | </subviews> |
| | | </stackView> |
| | | <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="zH8-Qr-0vY"> |
| | | <rect key="frame" x="0.0" y="296" width="393" height="76"/> |
| | | <rect key="frame" x="0.0" y="310" width="393" height="76"/> |
| | | <subviews> |
| | | <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Doo-bg-XfQ"> |
| | | <rect key="frame" x="14" y="11" width="4" height="4"/> |
| | |
| | | </constraints> |
| | | </view> |
| | | <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="U3c-u6-JHg"> |
| | | <rect key="frame" x="0.0" y="372" width="393" height="115"/> |
| | | <rect key="frame" x="0.0" y="386" width="393" height="115"/> |
| | | <subviews> |
| | | <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="vfd-ih-YL5"> |
| | | <rect key="frame" x="13" y="0.0" width="380" height="1"/> |
| | |
| | | </constraints> |
| | | </view> |
| | | <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Jja-qF-gfn"> |
| | | <rect key="frame" x="0.0" y="487" width="393" height="115"/> |
| | | <rect key="frame" x="0.0" y="501" width="393" height="115"/> |
| | | <subviews> |
| | | <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="rk4-aZ-B6H"> |
| | | <rect key="frame" x="13" y="0.0" width="380" height="1"/> |
| | |
| | | </constraints> |
| | | </view> |
| | | <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="89v-i4-b0B"> |
| | | <rect key="frame" x="0.0" y="602" width="393" height="149.33333333333337"/> |
| | | <rect key="frame" x="0.0" y="616" width="393" height="149.33333333333337"/> |
| | | <subviews> |
| | | <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="aLI-Yu-lpC"> |
| | | <rect key="frame" x="13" y="0.0" width="380" height="1"/> |
| | |
| | | <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="0.5" colorSpace="custom" customColorSpace="sRGB"/> |
| | | <nil key="highlightedColor"/> |
| | | </label> |
| | | <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="--" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="XP0-t1-ig8"> |
| | | <rect key="frame" x="22" y="28.333333333333368" width="11.666666666666664" height="14.333333333333332"/> |
| | | <label opaque="NO" userInteractionEnabled="NO" contentMode="left" verticalHuggingPriority="251" text="--" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="XP0-t1-ig8"> |
| | | <rect key="frame" x="22" y="28.333333333333368" width="335.33333333333331" height="14.333333333333332"/> |
| | | <fontDescription key="fontDescription" type="system" weight="medium" pointSize="12"/> |
| | | <nil key="textColor"/> |
| | | <nil key="highlightedColor"/> |
| | | </label> |
| | | <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="--" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="lA2-Dx-e7N"> |
| | | <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" horizontalCompressionResistancePriority="1000" text="--" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="lA2-Dx-e7N"> |
| | | <rect key="frame" x="367.33333333333331" y="28.333333333333368" width="11.666666666666686" height="14.333333333333332"/> |
| | | <fontDescription key="fontDescription" type="system" weight="medium" pointSize="12"/> |
| | | <nil key="textColor"/> |
| | |
| | | </subviews> |
| | | <color key="backgroundColor" systemColor="systemBackgroundColor"/> |
| | | <constraints> |
| | | <constraint firstItem="lA2-Dx-e7N" firstAttribute="leading" secondItem="XP0-t1-ig8" secondAttribute="trailing" constant="10" id="4yB-r1-G8d"/> |
| | | <constraint firstItem="XP0-t1-ig8" firstAttribute="leading" secondItem="NB2-bd-teu" secondAttribute="leading" id="Hrv-h0-kUc"/> |
| | | <constraint firstItem="lA2-Dx-e7N" firstAttribute="centerY" secondItem="XP0-t1-ig8" secondAttribute="centerY" id="IBR-D0-WiZ"/> |
| | | <constraint firstItem="NB2-bd-teu" firstAttribute="leading" secondItem="9pI-Ea-HrZ" secondAttribute="trailing" constant="4" id="MWw-ze-4uJ"/> |
| | |
| | | <constraint firstAttribute="trailing" secondItem="lA2-Dx-e7N" secondAttribute="trailing" constant="14" id="VbE-QD-aGe"/> |
| | | <constraint firstItem="9pI-Ea-HrZ" firstAttribute="top" secondItem="a9Z-e0-RVA" secondAttribute="top" constant="11" id="WUE-kR-Zwp"/> |
| | | <constraint firstItem="NB2-bd-teu" firstAttribute="centerY" secondItem="9pI-Ea-HrZ" secondAttribute="centerY" id="d2o-7r-jSu"/> |
| | | <constraint firstAttribute="bottom" secondItem="XP0-t1-ig8" secondAttribute="bottom" constant="3.3300000000000001" id="hee-kB-Iij"/> |
| | | <constraint firstAttribute="height" constant="46" id="ra4-t0-Ub3"/> |
| | | <constraint firstItem="XP0-t1-ig8" firstAttribute="top" secondItem="NB2-bd-teu" secondAttribute="bottom" constant="8" id="uqo-b4-a0W"/> |
| | | </constraints> |
| | |
| | | } |
| | | } |
| | | |
| | | static func show(_ activityModel:ActivityDetailModel,clouse:@escaping (Bool)->Void){ |
| | | static func show(_ activityModel:ActivityDetailStoreModel,clouse:@escaping (Bool)->Void){ |
| | | let storesView = StoresInfoView.jq_loadNibView() |
| | | storesView.frame = sceneDelegate?.window?.frame ?? .zero |
| | | storesView.label_topTitle.text = "请确认预约门店" |
| | | storesView.img_logo.sd_setImage(with: URL(string: activityModel.storeCoverDrawing)) |
| | | storesView.label_title.text = activityModel.storeName |
| | | storesView.label_address.text = activityModel.storeAddress |
| | | storesView.label_title.text = activityModel.name |
| | | storesView.label_address.text = activityModel.address |
| | | storesView.label_distance.text = String(format: "距你%.2lfkm", activityModel.distance) |
| | | storesView.clouse = clouse |
| | | sceneDelegate?.window?.addSubview(storesView) |
| | |
| | | |
| | | var times = [OpenDoorTimeModel]() |
| | | times.append(OpenDoorTimeModel(start_time: startDateTime, end_time: endDateTime)) |
| | | let openDoorModel = OpenDoorModel(sid: [studentAppointModel.siteId], rid: studentAppointModel.rid , uid: studentAppointModel.userId, time: times, type: 2) |
| | | let openDoorModel = OpenDoorModel(sid: studentAppointModel.sid, rid: studentAppointModel.rid , uid: studentAppointModel.userId, time: times, type: 2) |
| | | if let modelStr = openDoorModel.toJSONString(){ |
| | | QRPreview.show(modelStr) |
| | | } |
| | |
| | | |
| | | |
| | | if let m = detailModel{ |
| | | let vc = CourseDetailApplyVC(detailModel: m,isExtend: true) |
| | | let vc = CourseDetailApplyVC(detailModel: m) |
| | | push(vc: vc) |
| | | } |
| | | } |
| | |
| | | var page = "" //页面 |
| | | var type:String = "" //类型 |
| | | var turnId:Int? |
| | | var model = "" |
| | | |
| | | |
| | | var cellHeight:Double = 270 |
| | |
| | | if let models = data.data{ |
| | | let imgs = models.compactMap({$0.img}) |
| | | self?.view_banner.setImages(images: imgs, type: .URL) { index in |
| | | jumpPage(name: models[index].name, page: models[index].page, type: models[index].type, id: models[index].turnId) |
| | | jumpPage(model: models[index].model, page: models[index].page, type: models[index].type, id: models[index].turnId) |
| | | } |
| | | } |
| | | }) { error in |
| | |
| | | } |
| | | |
| | | if let m = item as? HomeStoreTopBannerModel{ |
| | | jumpPage(name: m.name, page: m.page, type: m.type,id: m.turnId) |
| | | jumpPage(model: m.name, page: m.page, type: m.type,id: m.turnId) |
| | | } |
| | | } |
| | | |
| | |
| | | |
| | | override func viewDidLoad() { |
| | | super.viewDidLoad() |
| | | title = "绑定手机号" |
| | | title = "绑定手机" |
| | | } |
| | | |
| | | init(wxUserInfoModel:WechatUserInfoModel,token:String) { |
| | |
| | | } |
| | | } |
| | | |
| | | invitePhone = tf_invitePhone.text! |
| | | |
| | | Services.wxPhoneBind(phone: tf_phone.text!, code: tf_code.text!, openId: wxUserInfoModel.openid,invitePhone: invitePhone).subscribe(onNext: {[weak self] data in |
| | | guard let weakSelf = self else { return } |
| | | if data.code == 200{ |
| | | alertSuccess(msg: "绑定成功") |
| | | UserViewModel.saveToken(weakSelf.token) |
| | | if let info = data.data,info.token.isEmpty == false{ |
| | | UserViewModel.saveToken(info.token) |
| | | } |
| | | alertSuccess(msg: "绑定成功") |
| | | app.registerAndLoginSuccess() |
| | | }else{ |
| | | alert(msg: data.msg) |
| | |
| | | </userDefinedRuntimeAttributes> |
| | | </view> |
| | | <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="E2r-yp-uyh"> |
| | | <rect key="frame" x="40" y="768" width="313" height="40"/> |
| | | <rect key="frame" x="100" y="410" width="193" height="40"/> |
| | | <color key="backgroundColor" name="FE6E0D"/> |
| | | <constraints> |
| | | <constraint firstAttribute="height" constant="40" id="kGD-cK-owa"/> |
| | |
| | | <constraints> |
| | | <constraint firstItem="WPl-pn-8JJ" firstAttribute="top" secondItem="7pY-Sh-GDo" secondAttribute="bottom" constant="30" id="0pd-fR-HyH"/> |
| | | <constraint firstItem="mwx-FU-gHa" firstAttribute="trailing" secondItem="7iL-m6-Iwb" secondAttribute="trailing" id="8GK-7D-hNR"/> |
| | | <constraint firstItem="E2r-yp-uyh" firstAttribute="top" secondItem="mwx-FU-gHa" secondAttribute="bottom" constant="39" id="E6m-Ha-Zp2"/> |
| | | <constraint firstItem="7iL-m6-Iwb" firstAttribute="top" secondItem="WPl-pn-8JJ" secondAttribute="bottom" constant="20" id="EUo-p4-szH"/> |
| | | <constraint firstItem="fnl-2z-Ty3" firstAttribute="trailing" secondItem="E2r-yp-uyh" secondAttribute="trailing" constant="40" id="VGa-zn-Nhc"/> |
| | | <constraint firstItem="fnl-2z-Ty3" firstAttribute="trailing" secondItem="E2r-yp-uyh" secondAttribute="trailing" constant="100" id="VGa-zn-Nhc"/> |
| | | <constraint firstItem="WPl-pn-8JJ" firstAttribute="leading" secondItem="fnl-2z-Ty3" secondAttribute="leading" constant="40" id="a84-vJ-qRX"/> |
| | | <constraint firstItem="7pY-Sh-GDo" firstAttribute="top" secondItem="fnl-2z-Ty3" secondAttribute="top" constant="20" id="bSg-Zi-eW3"/> |
| | | <constraint firstItem="mwx-FU-gHa" firstAttribute="leading" secondItem="7iL-m6-Iwb" secondAttribute="leading" id="eI6-Nw-SFE"/> |
| | | <constraint firstItem="E2r-yp-uyh" firstAttribute="leading" secondItem="fnl-2z-Ty3" secondAttribute="leading" constant="40" id="fKj-JO-wQI"/> |
| | | <constraint firstItem="E2r-yp-uyh" firstAttribute="leading" secondItem="fnl-2z-Ty3" secondAttribute="leading" constant="100" id="fKj-JO-wQI"/> |
| | | <constraint firstItem="mwx-FU-gHa" firstAttribute="top" secondItem="7iL-m6-Iwb" secondAttribute="bottom" constant="20" id="g4a-Vp-qHi"/> |
| | | <constraint firstItem="7iL-m6-Iwb" firstAttribute="leading" secondItem="fnl-2z-Ty3" secondAttribute="leading" constant="40" id="iCb-l2-b9e"/> |
| | | <constraint firstItem="fnl-2z-Ty3" firstAttribute="trailing" secondItem="WPl-pn-8JJ" secondAttribute="trailing" constant="40" id="qSE-TR-Ja9"/> |
| | | <constraint firstItem="fnl-2z-Ty3" firstAttribute="bottom" secondItem="E2r-yp-uyh" secondAttribute="bottom" constant="10" id="tWf-9w-2cf"/> |
| | | <constraint firstItem="7pY-Sh-GDo" firstAttribute="centerX" secondItem="fnl-2z-Ty3" secondAttribute="centerX" id="uYe-yB-GjD"/> |
| | | <constraint firstAttribute="trailing" secondItem="7iL-m6-Iwb" secondAttribute="trailing" constant="40" id="uno-ol-igV"/> |
| | | </constraints> |
| | |
| | | |
| | | |
| | | textView_treaty.isEditable = false |
| | | textView_treaty.linkTextAttributes = [.foregroundColor:UIColor.black.withAlphaComponent(0.8)] |
| | | let paragraphStyle = NSMutableParagraphStyle() |
| | | paragraphStyle.lineBreakMode = NSLineBreakMode.byCharWrapping |
| | | paragraphStyle.lineSpacing = 3 |
| | |
| | | let attribute = NSMutableAttributedString(string: content) |
| | | attribute.addAttribute(.foregroundColor, value: UIColor.black.withAlphaComponent(0.6), range: NSRange(location: 0, length: content.count)) |
| | | attribute.addAttribute(.font, value: UIFont.systemFont(ofSize: 12, weight: .medium), range: NSRange(location: 0, length: content.count)) |
| | | attribute.addAttributes([NSAttributedString.Key.link:URL(string: "tip://treaty")!,.foregroundColor:UIColor(hexStr: "0078CD")], range: content.jq_subRange("《隐私协议》")!) |
| | | attribute.addAttributes([NSAttributedString.Key.link:URL(string: "tip://treaty")!], range: content.jq_subRange("《隐私协议》")!) |
| | | attribute.addAttributes([NSAttributedString.Key.link:URL(string: "tip://user")!], range: content.jq_subRange("《用户协议》")!) |
| | | attribute.addAttributes([NSAttributedString.Key.link:URL(string: "tip://sportSafety")!], range: content.jq_subRange("《运动安全告知书》")!) |
| | | attribute.addAttributes([.paragraphStyle:paragraphStyle], range: _NSRange(location: 0, length: content.count)) |
| | |
| | | |
| | | class ProfileVC: BaseVC { |
| | | @IBOutlet weak var btn_userProfile: UIButton! |
| | | @IBOutlet weak var label_username: UILabel! |
| | | @IBOutlet weak var tf_username: UITextField! |
| | | @IBOutlet weak var label_contact: UILabel! |
| | | @IBOutlet weak var label_gender: UILabel! |
| | | @IBOutlet weak var label_birthday: UILabel! |
| | | @IBOutlet weak var tf_gender: UITextField! |
| | | @IBOutlet weak var tf_birthday: UITextField! |
| | | @IBOutlet weak var label_address: UILabel! |
| | | @IBOutlet weak var label_vipDutime: UILabel! |
| | | @IBOutlet weak var view_vipExpired: UIView! |
| | |
| | | super.viewDidLoad() |
| | | |
| | | title = "个人信息" |
| | | |
| | | tf_gender.delegate = self |
| | | tf_birthday.delegate = self |
| | | |
| | | Services.userDetails().subscribe(onNext: {[weak self] data in |
| | | if let model = data.data{ |
| | | self?.label_username.text = model.userName |
| | | self?.tf_username.text = model.userName |
| | | self?.label_contact.text = model.userPhone |
| | | self?.label_gender.text = model.sex == .man ? "男":"女" |
| | | self?.label_birthday.text = model.birthday |
| | | self?.tf_gender.text = model.sex == .man ? "男":"女" |
| | | self?.tf_birthday.text = model.birthday |
| | | self?.label_address.text = model.address |
| | | self?.label_vipDutime.text = model.memberLifespan |
| | | self?.btn_userProfile.sd_setImage(with: URL(string: model.userImage), for: .normal,placeholderImage: UIImage(named: "btn_userProfile")) |
| | |
| | | |
| | | }).disposed(by: disposeBag) |
| | | } |
| | | |
| | | override func setRx() { |
| | | tf_username.rx.controlEvent(.editingDidEnd).subscribe(onNext: {[weak self] () in |
| | | guard let weakSelf = self else { return } |
| | | if weakSelf.tf_username.isEmpty{ |
| | | alertError(msg: "请输入用户名称");return |
| | | } |
| | | |
| | | Services.updateInfo(birthday: nil, gender: nil, name: weakSelf.tf_username.text).subscribe(onNext: {[weak self] data in |
| | | self?.updateUserInfo() |
| | | }).disposed(by: weakSelf.disposeBag) |
| | | }).disposed(by: disposeBag) |
| | | } |
| | | |
| | | private func updateUserInfo(){ |
| | | Services.userDetails().subscribe(onNext: {data in |
| | | if let m = data.data{m.save()} |
| | | alertSuccess(msg: "修改成功") |
| | | NotificationCenter.default.post(name: UpdateWelfare_Noti, object: nil) |
| | | }) { error in |
| | | |
| | | }.disposed(by: disposeBag) |
| | | } |
| | | |
| | | @IBAction func logoutAction(_ sender: UIButton) { |
| | | CommonAlertView.show(title: "提示", content: "确认退出当前账号?") { status in |
| | |
| | | }, clipSize: CGSize(width: JQ_ScreenW, height: JQ_ScreenW)) |
| | | } |
| | | |
| | | |
| | | @IBAction func dismissAccountAction(_ sender: UIButton) { |
| | | |
| | | } |
| | | } |
| | | |
| | | extension ProfileVC:UITextFieldDelegate{ |
| | | func textFieldShouldBeginEditing(_ textField: UITextField) -> Bool { |
| | | view.endEditing(true) |
| | | if textField == tf_gender{ |
| | | let items = ["男","女"] |
| | | CommonAlertSheetView.show(items: items) {[weak self] index in |
| | | guard let weakSelf = self else { return } |
| | | guard textField.text != items[index] else {return} |
| | | textField.text = items[index] |
| | | var gender:GenderType! |
| | | |
| | | if index == 0{ |
| | | gender = .man |
| | | }else{ |
| | | gender = .woman |
| | | } |
| | | |
| | | Services.updateInfo(birthday: nil, gender: gender.rawValue, name: nil).subscribe(onNext: {[weak self] data in |
| | | self?.updateUserInfo() |
| | | }).disposed(by: weakSelf.disposeBag) |
| | | } |
| | | } |
| | | |
| | | if textField == tf_birthday{ |
| | | CommonDatePickerView.show(before: 60, after: 0, type: .YMD) {[weak self] year, month, day, _, _ in |
| | | guard let weakSelf = self else { return } |
| | | let date = String(format: "%ld-%02ld-%02ld", year!,month!,day!) |
| | | guard textField.text != date else {return} |
| | | textField.text = date |
| | | Services.updateInfo(birthday: textField.text, gender: nil, name: nil).subscribe(onNext: {[weak self] data in |
| | | self?.updateUserInfo() |
| | | }).disposed(by: weakSelf.disposeBag) |
| | | } |
| | | } |
| | | return false |
| | | } |
| | | } |
| | |
| | | <connections> |
| | | <outlet property="btn_userProfile" destination="DAK-PF-zJB" id="nEH-tc-Bcw"/> |
| | | <outlet property="label_address" destination="KeY-Wp-GF3" id="yeU-Zs-Eyj"/> |
| | | <outlet property="label_birthday" destination="UxX-uD-G2b" id="dlU-zJ-BIp"/> |
| | | <outlet property="label_contact" destination="Ec9-N9-5yO" id="Di4-et-GO3"/> |
| | | <outlet property="label_gender" destination="BV9-ZD-gTd" id="Dkl-IE-bSw"/> |
| | | <outlet property="label_username" destination="eQF-2k-COB" id="5jd-xX-OHH"/> |
| | | <outlet property="label_vipDutime" destination="Xkh-Hd-htf" id="bim-Pe-zm1"/> |
| | | <outlet property="tf_birthday" destination="yvE-PF-kOr" id="8AC-B0-ai9"/> |
| | | <outlet property="tf_gender" destination="0Ca-pS-Hc6" id="fSD-9B-0c7"/> |
| | | <outlet property="tf_username" destination="Hv3-2p-Y2p" id="mej-8I-3qQ"/> |
| | | <outlet property="view" destination="i5M-Pr-FkT" id="sfx-zR-JGt"/> |
| | | <outlet property="view_vipExpired" destination="2K0-H1-xLC" id="4Ve-Pj-Dog"/> |
| | | </connections> |
| | |
| | | <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="0.80000000000000004" colorSpace="custom" customColorSpace="sRGB"/> |
| | | <nil key="highlightedColor"/> |
| | | </label> |
| | | <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="--" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="eQF-2k-COB"> |
| | | <rect key="frame" x="362.66666666666669" y="17" width="13.333333333333314" height="17"/> |
| | | <textField opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="248" contentHorizontalAlignment="left" contentVerticalAlignment="center" text="--" textAlignment="right" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="Hv3-2p-Y2p"> |
| | | <rect key="frame" x="81.333333333333343" y="16.333333333333314" width="294.66666666666663" height="18.666666666666671"/> |
| | | <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"/> |
| | | </label> |
| | | <textInputTraits key="textInputTraits"/> |
| | | </textField> |
| | | </subviews> |
| | | <color key="backgroundColor" systemColor="systemBackgroundColor"/> |
| | | <constraints> |
| | | <constraint firstItem="Hv3-2p-Y2p" firstAttribute="leading" secondItem="p1h-rL-UFE" secondAttribute="trailing" constant="10" id="5ta-tU-Hc1"/> |
| | | <constraint firstAttribute="bottom" secondItem="vAy-G7-z7P" secondAttribute="bottom" id="GI1-cv-eE2"/> |
| | | <constraint firstItem="eQF-2k-COB" firstAttribute="centerY" secondItem="p1h-rL-UFE" secondAttribute="centerY" id="MR9-Zb-QdJ"/> |
| | | <constraint firstItem="vAy-G7-z7P" firstAttribute="leading" secondItem="b2k-2V-k9C" secondAttribute="leading" constant="14" id="NsJ-TV-WEK"/> |
| | | <constraint firstItem="Hv3-2p-Y2p" firstAttribute="centerY" secondItem="p1h-rL-UFE" secondAttribute="centerY" id="Yze-58-o2M"/> |
| | | <constraint firstAttribute="trailing" secondItem="Hv3-2p-Y2p" secondAttribute="trailing" constant="17" id="boO-W9-SJP"/> |
| | | <constraint firstAttribute="height" constant="51" id="mb3-Lu-vBK"/> |
| | | <constraint firstItem="p1h-rL-UFE" firstAttribute="leading" secondItem="b2k-2V-k9C" secondAttribute="leading" constant="14" id="nAZ-DK-56m"/> |
| | | <constraint firstAttribute="trailing" secondItem="vAy-G7-z7P" secondAttribute="trailing" constant="14" id="sOJ-L7-0Zl"/> |
| | | <constraint firstItem="p1h-rL-UFE" firstAttribute="centerY" secondItem="b2k-2V-k9C" secondAttribute="centerY" id="ze5-YL-hOl"/> |
| | | <constraint firstAttribute="trailing" secondItem="eQF-2k-COB" secondAttribute="trailing" constant="17" id="zqK-XQ-8yO"/> |
| | | </constraints> |
| | | </view> |
| | | <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="iPt-bU-TRd"> |
| | |
| | | <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="0.80000000000000004" colorSpace="custom" customColorSpace="sRGB"/> |
| | | <nil key="highlightedColor"/> |
| | | </label> |
| | | <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="--" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="BV9-ZD-gTd"> |
| | | <rect key="frame" x="362.66666666666669" y="17" width="13.333333333333314" height="17"/> |
| | | <textField opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="248" contentHorizontalAlignment="left" contentVerticalAlignment="center" text="--" textAlignment="right" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="0Ca-pS-Hc6"> |
| | | <rect key="frame" x="52.666666666666657" y="16.333333333333314" width="323.33333333333337" height="18.666666666666671"/> |
| | | <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"/> |
| | | </label> |
| | | <textInputTraits key="textInputTraits"/> |
| | | </textField> |
| | | </subviews> |
| | | <color key="backgroundColor" systemColor="systemBackgroundColor"/> |
| | | <constraints> |
| | | <constraint firstItem="BV9-ZD-gTd" firstAttribute="centerY" secondItem="Cbg-dh-tEs" secondAttribute="centerY" id="2bH-1P-DZc"/> |
| | | <constraint firstItem="0Ca-pS-Hc6" firstAttribute="centerY" secondItem="mCJ-rn-t8T" secondAttribute="centerY" id="1iz-RF-m5t"/> |
| | | <constraint firstAttribute="height" constant="51" id="5Ax-vc-Jq2"/> |
| | | <constraint firstItem="Cbg-dh-tEs" firstAttribute="leading" secondItem="mCJ-rn-t8T" secondAttribute="leading" constant="14" id="9Is-NY-Rfj"/> |
| | | <constraint firstItem="W8Y-Oy-amf" firstAttribute="leading" secondItem="mCJ-rn-t8T" secondAttribute="leading" constant="14" id="A8V-2Q-OkG"/> |
| | | <constraint firstAttribute="bottom" secondItem="W8Y-Oy-amf" secondAttribute="bottom" id="IfV-KU-7Uw"/> |
| | | <constraint firstAttribute="trailing" secondItem="W8Y-Oy-amf" secondAttribute="trailing" constant="14" id="Xeg-eH-YdH"/> |
| | | <constraint firstAttribute="trailing" secondItem="BV9-ZD-gTd" secondAttribute="trailing" constant="17" id="sx0-yJ-T5r"/> |
| | | <constraint firstAttribute="trailing" secondItem="0Ca-pS-Hc6" secondAttribute="trailing" constant="17" id="m7L-nB-dNl"/> |
| | | <constraint firstItem="0Ca-pS-Hc6" firstAttribute="leading" secondItem="Cbg-dh-tEs" secondAttribute="trailing" constant="10" id="pnQ-ND-x8x"/> |
| | | <constraint firstItem="Cbg-dh-tEs" firstAttribute="centerY" secondItem="mCJ-rn-t8T" secondAttribute="centerY" id="yWX-ky-P9t"/> |
| | | </constraints> |
| | | </view> |
| | |
| | | <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="0.80000000000000004" colorSpace="custom" customColorSpace="sRGB"/> |
| | | <nil key="highlightedColor"/> |
| | | </label> |
| | | <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="--" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="UxX-uD-G2b"> |
| | | <rect key="frame" x="362.66666666666669" y="17" width="13.333333333333314" height="17"/> |
| | | <textField opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="248" contentHorizontalAlignment="left" contentVerticalAlignment="center" text="--" textAlignment="right" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="yvE-PF-kOr"> |
| | | <rect key="frame" x="52.666666666666629" y="16.333333333333314" width="323.33333333333337" height="18.666666666666671"/> |
| | | <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"/> |
| | | </label> |
| | | <textInputTraits key="textInputTraits"/> |
| | | </textField> |
| | | </subviews> |
| | | <color key="backgroundColor" systemColor="systemBackgroundColor"/> |
| | | <constraints> |
| | | <constraint firstItem="UxX-uD-G2b" firstAttribute="centerY" secondItem="WTO-bR-h4Z" secondAttribute="centerY" id="0As-pd-nQj"/> |
| | | <constraint firstAttribute="trailing" secondItem="yvE-PF-kOr" secondAttribute="trailing" constant="17" id="Dus-An-dJ6"/> |
| | | <constraint firstAttribute="height" constant="51" id="EWY-q4-QLf"/> |
| | | <constraint firstAttribute="trailing" secondItem="UxX-uD-G2b" secondAttribute="trailing" constant="17" id="K8F-Qv-APj"/> |
| | | <constraint firstAttribute="bottom" secondItem="Knb-gk-eBK" secondAttribute="bottom" id="Ngh-sd-5Pb"/> |
| | | <constraint firstItem="yvE-PF-kOr" firstAttribute="centerY" secondItem="Jsd-mD-Qt3" secondAttribute="centerY" id="XpD-h6-noL"/> |
| | | <constraint firstItem="yvE-PF-kOr" firstAttribute="leading" secondItem="WTO-bR-h4Z" secondAttribute="trailing" constant="10" id="f9a-pl-fCn"/> |
| | | <constraint firstItem="Knb-gk-eBK" firstAttribute="leading" secondItem="Jsd-mD-Qt3" secondAttribute="leading" constant="14" id="ipI-UQ-pKG"/> |
| | | <constraint firstItem="WTO-bR-h4Z" firstAttribute="leading" secondItem="Jsd-mD-Qt3" secondAttribute="leading" constant="14" id="m7i-iB-HpR"/> |
| | | <constraint firstAttribute="trailing" secondItem="Knb-gk-eBK" secondAttribute="trailing" constant="14" id="q4i-PG-Eid"/> |
| | |
| | | |
| | | class ActivityViewModel:RefreshModel<ActivityDetailPartModel>{ |
| | | override func api() -> (Observable<BaseResponse<[ActivityDetailPartModel]>>)? { |
| | | return Services.queryParticipantList() |
| | | return Services.queryParticipantList(isAuth: 1) |
| | | } |
| | | |
| | | } |
| | |
| | | pageMenu.delegate = self |
| | | pageViewController.delegate = self |
| | | |
| | | pageViewController.scroll(toPage: toPage, animation: false) |
| | | pageMenu.selectedItemIndex = toPage |
| | | |
| | | DispatchQueue.main.asyncAfter(deadline: .now()+0.3) { |
| | | self.pageViewController.scroll(toPage: self.toPage, animation: false) |
| | | self.pageMenu.selectedItemIndex = self.toPage |
| | | } |
| | | } |
| | | |
| | | override func setUI() { |
| | |
| | | self?.tableView.tableHeaderView = bannberView |
| | | bannberView.setImages(images: models.map({$0.img}), type: .URL) { index in |
| | | let model = models[index] |
| | | jumpPage(name: model.name, page: model.page, type: model.type, id: model.turnId) |
| | | jumpPage(model: model.model, page: model.page, type: model.type, id: model.turnId) |
| | | } |
| | | self?.tableView.reloadData() |
| | | } |
| | |
| | | override func viewDidLoad() { |
| | | super.viewDidLoad() |
| | | title = "充值中心" |
| | | cellW = (view.size.width - 88.0) / 3.0 |
| | | cellH = (view.size.width - 88.0) / 3.0 * 0.5148 |
| | | cellW = (view.size.width - 100.0) / 3.0 |
| | | cellH = (view.size.width - 100.0) / 3.0 * 0.5148 |
| | | |
| | | Services.benefitHome().subscribe(onNext: {[weak self] data in |
| | | if let m = data.data{ |
| | |
| | | guard let weakSelf = self else { return } |
| | | for v in data.data ?? []{ |
| | | weakSelf.items.append(RechargeItem(coin: v.wpGold, money: v.amount)) |
| | | weakSelf.items.append(RechargeItem(coin: v.wpGold, money: v.amount)) |
| | | } |
| | | |
| | | let h = ceil(Double(weakSelf.items.count) / 3.0) * weakSelf.cellH + (floor(Double(weakSelf.items.count) / 3.0) - 1) * 18.0 |
| | |
| | | override func viewDidLayoutSubviews() { |
| | | super.viewDidLayoutSubviews() |
| | | let colors = [UIColor(hexStr: "#FD8C02").cgColor, |
| | | UIColor(hexStr: "#FD7202").cgColor,] |
| | | UIColor(hexStr: "#FD7202").cgColor] |
| | | view_topBg.jq_gradientColor(colorArr: colors,bounds: CGRect(x: 0, y: 0, width: JQ_ScreenW, height: JQ_ScreenW * 0.5923)) |
| | | btn_rechange.jq_gradientNibColor(colorArr: colors, cornerRadius: 20) |
| | | } |
| | |
| | | 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 |
| | | CommonAlertView.show(title: "提示", content: "兑换成功!") {[weak self] _ in |
| | | self?.exchangeSuccessUI() |
| | | NotificationCenter.default.post(name: UpdateWelfare_Noti, object: nil) |
| | | } |
| | | },onError: { error in |
| | | if let er = error as? NetworkRequest.NetRequestError{ |
| | |
| | | case .success: |
| | | CommonAlertView.show(title: "提示", content: "兑换成功!") {[weak self] _ in |
| | | self?.exchangeSuccessUI() |
| | | NotificationCenter.default.post(name: UpdateWelfare_Noti, object: nil) |
| | | } |
| | | case .cancel: |
| | | alert(msg: "已取消兑换") |
| | |
| | | case .integral:break |
| | | } |
| | | |
| | | self?.label_bookingTime.text = Date.jq_format(TimeInterval(model.startTime / 1000), formatter: "yyyy-MM-dd HH:mm") |
| | | self?.label_bookingTime.text = model.times |
| | | self?.label_usedState.text = model.status.titleRaw |
| | | self?.label_paymentTime.text = Date.jq_format(TimeInterval(model.payTime / 1000), formatter: "yyyy-MM-dd HH:mm") |
| | | |
| | |
| | | } |
| | | |
| | | if let m = yardBookingDetailDataModel{ |
| | | let t = OpenDoorTimeModel(start_time: TimeInterval(model.startTime / 1000), end_time: TimeInterval(model.endTime / 1000)) |
| | | let date = m.times.components(separatedBy: " ").first! |
| | | let time = m.times.components(separatedBy: " ").last! |
| | | |
| | | let firstTime = time.components(separatedBy: "-").first! |
| | | let lastTime = time.components(separatedBy: "-").last! |
| | | |
| | | let formatFirstTime = Date.jq_StringToTimeInterval(String(format: "%@ %@", date,firstTime), "yyyy-MM-dd HH:mm") |
| | | let formatLastTime = Date.jq_StringToTimeInterval(String(format: "%@ %@", date,lastTime), "yyyy-MM-dd HH:mm") |
| | | |
| | | let t = OpenDoorTimeModel(start_time: formatFirstTime, end_time: formatLastTime) |
| | | let openDoorModel = OpenDoorModel(sid: m.sid, rid: m.rid, uid: m.appUserId, time: [t], type: 2) |
| | | if let modelStr = openDoorModel.toJSONString(){ |
| | | img_QRCode.image = QRCodeImage(string: modelStr, size: 132 * sceneDelegate!.window!.screen.scale) |