| | |
| | | |
| | | case queryCompany |
| | | |
| | | case submitCompany(id:Int? = nil,name:String,mailbox:String,legalName:String,legalPhone:String,identifier:String,contactAddress:String,businessLicense:String) |
| | | case submitCompany(id:Int? = nil,name:String,mailbox:String,legalName:String,legalPhone:String,identifier:String,contactAddress:String,businessLicense:String,pwd:String) |
| | | |
| | | case queryStaffList(pageNum:Int,staffName:String?) |
| | | |
| | |
| | | let params = APIParamsAppender() |
| | | return .requestParameters(parameters: params.done(), encoding: URLEncoding.queryString) |
| | | |
| | | case .submitCompany(let id, let name, let mailbox, let legalName, let legalPhone, let identifier, let contactAddress, let businessLicense): |
| | | case .submitCompany(let id, let name, let mailbox, let legalName, let legalPhone, let identifier, let contactAddress, let businessLicense,let pwd): |
| | | let params = APIParamsAppender() |
| | | .append(key: "id", value: id) |
| | | .append(key: "name", value: name) |
| | |
| | | .append(key: "identifier", value: identifier) |
| | | .append(key: "contactAddress", value: contactAddress) |
| | | .append(key: "businessLicense", value: businessLicense) |
| | | .append(key: "password", value: pwd) |
| | | return .requestParameters(parameters: params.done(), encoding: URLEncoding.queryString) |
| | | |
| | | case .queryStaffList(let pageNum, let staffName): |
New file |
| | |
| | | { |
| | | "images" : [ |
| | | { |
| | | "idiom" : "universal", |
| | | "scale" : "1x" |
| | | }, |
| | | { |
| | | "filename" : "icon_voice@2x.png", |
| | | "idiom" : "universal", |
| | | "scale" : "2x" |
| | | }, |
| | | { |
| | | "filename" : "icon_voice@3x.png", |
| | | "idiom" : "universal", |
| | | "scale" : "3x" |
| | | } |
| | | ], |
| | | "info" : { |
| | | "author" : "xcode", |
| | | "version" : 1 |
| | | } |
| | | } |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="21507" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES"> |
| | | <document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="21701" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES"> |
| | | <device id="retina6_1" orientation="portrait" appearance="light"/> |
| | | <dependencies> |
| | | <deployment version="4352" identifier="iOS"/> |
| | | <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="21505"/> |
| | | <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="21679"/> |
| | | <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"/> |
| | |
| | | <constraint firstAttribute="height" constant="21" id="PMv-Uq-RbG"/> |
| | | </constraints> |
| | | <fontDescription key="fontDescription" type="system" weight="medium" pointSize="14"/> |
| | | <state key="normal" title="点击提交则表示同意《宽窄出行包车规则》"> |
| | | <state key="normal" title="点击提交则表示同意《宽窄优行包车规则》"> |
| | | <color key="titleColor" red="0.40000000000000002" green="0.40000000000000002" blue="0.40000000000000002" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> |
| | | </state> |
| | | <connections> |
| | |
| | | <resources> |
| | | <image name="icon_more_black" width="8" height="13"/> |
| | | <namedColor name="Color"> |
| | | <color red="0.27058823529411763" green="0.70588235294117641" blue="0.58039215686274503" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> |
| | | <color red="0.27099999785423279" green="0.70599997043609619" blue="0.57999998331069946" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> |
| | | </namedColor> |
| | | <namedColor name="Color-1"> |
| | | <color red="0.94099998474121094" green="0.44699999690055847" blue="0.027000000700354576" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> |
| | |
| | | @IBOutlet weak var tf_address: QMUITextField! |
| | | @IBOutlet weak var btn_submit: UIButton! |
| | | @IBOutlet weak var lb_uploadAuth: UILabel! |
| | | @IBOutlet weak var tf_pwd: QMUITextField! |
| | | |
| | | private var viewModel = EnterpriseViewModel() |
| | | private var uploadImgUrl = "" |
| | |
| | | tf_legalPersonPhone.text = m.legalPhone |
| | | tf_code.text = m.identifier |
| | | tf_address.text = m.contactAddress |
| | | tf_pwd.text = m.password |
| | | uploadImgUrl = m.businessLicense |
| | | lb_uploadAuth.isHidden = m.businessLicense.isEmpty |
| | | btn_submit.setTitle("修改", for: .normal) |
| | |
| | | alert(text: tf_address.placeholder ?? "");return |
| | | } |
| | | |
| | | guard !tf_pwd.text!.isEmpty else { |
| | | alert(text: tf_pwd.placeholder ?? "");return |
| | | } |
| | | |
| | | guard !uploadImgUrl.isEmpty else { |
| | | alert(text: "请上传三证合一");return |
| | | } |
| | | |
| | | viewModel.submitEnterprise(id:model?.id,name: tf_enterprise.text!, mailbox: tf_mail.text!, legalName: tf_legalPerson.text!, legalPhone: tf_legalPersonPhone.text!, identifier: tf_code.text!, contactAddress: tf_address.text!, businessLicense: uploadImgUrl) { response in |
| | | viewModel.submitEnterprise(id:model?.id,name: tf_enterprise.text!, mailbox: tf_mail.text!, legalName: tf_legalPerson.text!, legalPhone: tf_legalPersonPhone.text!, identifier: tf_code.text!, contactAddress: tf_address.text!, businessLicense: uploadImgUrl, pwd: tf_pwd.text!) { response in |
| | | switch response { |
| | | case .success(_): |
| | | |
| | |
| | | |
| | | |
| | | private func check(){ |
| | | let sequece = Observable.combineLatest(tf_enterprise.rx.text.orEmpty,tf_mail.rx.text.orEmpty,tf_legalPerson.rx.text.orEmpty,tf_legalPersonPhone.rx.text.orEmpty,tf_code.rx.text.orEmpty,tf_address.rx.text.orEmpty) |
| | | let sequece = Observable.combineLatest(tf_enterprise.rx.text.orEmpty,tf_mail.rx.text.orEmpty,tf_legalPerson.rx.text.orEmpty,tf_legalPersonPhone.rx.text.orEmpty,tf_code.rx.text.orEmpty,tf_address.rx.text.orEmpty,tf_pwd.rx.text.orEmpty) |
| | | |
| | | sequece.subscribe {[weak self] v1,v2,v3,v4,v5,v6 in |
| | | let status = !(v1.isEmpty || v2.isEmpty || v3.isEmpty || v4.isEmpty || v5.isEmpty || v6.isEmpty) |
| | | sequece.subscribe {[weak self] v1,v2,v3,v4,v5,v6,v7 in |
| | | let status = !(v1.isEmpty || v2.isEmpty || v3.isEmpty || v4.isEmpty || v5.isEmpty || v6.isEmpty || v7.isEmpty) |
| | | self?.btn_submit.isEnabled = status |
| | | if status{ |
| | | self?.btn_submit.backgroundColor = UIColor(hexString: "#45B494") |
| | |
| | | <device id="retina6_12" orientation="portrait" appearance="light"/> |
| | | <dependencies> |
| | | <deployment identifier="iOS"/> |
| | | <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="21678"/> |
| | | <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="21679"/> |
| | | <capability name="Safe area layout guides" minToolsVersion="9.0"/> |
| | | <capability name="System colors in document resources" minToolsVersion="11.0"/> |
| | | <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/> |
| | |
| | | <outlet property="tf_legalPerson" destination="d3E-nD-JwH" id="Vye-38-IHM"/> |
| | | <outlet property="tf_legalPersonPhone" destination="P5C-1s-1jc" id="3Dq-To-I8T"/> |
| | | <outlet property="tf_mail" destination="RGK-YQ-tT4" id="Iri-Si-xgE"/> |
| | | <outlet property="tf_pwd" destination="A8O-Op-A55" id="UC0-6E-2sA"/> |
| | | <outlet property="view" destination="i5M-Pr-FkT" id="sfx-zR-JGt"/> |
| | | </connections> |
| | | </placeholder> |
| | |
| | | <rect key="frame" x="0.0" y="59" width="393" height="759"/> |
| | | <subviews> |
| | | <stackView opaque="NO" contentMode="scaleToFill" axis="vertical" translatesAutoresizingMaskIntoConstraints="NO" id="aPa-1W-UtJ"> |
| | | <rect key="frame" x="0.0" y="0.0" width="393" height="350"/> |
| | | <rect key="frame" x="0.0" y="0.0" width="393" height="400"/> |
| | | <subviews> |
| | | <view tag="14" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="UG8-1r-Avj"> |
| | | <rect key="frame" x="0.0" y="0.0" width="393" height="50"/> |
| | |
| | | <constraint firstAttribute="height" constant="50" id="xYf-F8-RTs"/> |
| | | </constraints> |
| | | </view> |
| | | <view tag="14" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="22h-PG-uHh" customClass="TapButton" customModule="OK出行" customModuleProvider="target"> |
| | | <view tag="14" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Dx5-it-nqg"> |
| | | <rect key="frame" x="0.0" y="300" width="393" height="50"/> |
| | | <subviews> |
| | | <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="后台登录密码" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="nbm-Ge-zrI"> |
| | | <rect key="frame" x="14" y="16.666666666666686" width="86" height="17"/> |
| | | <fontDescription key="fontDescription" type="system" weight="medium" pointSize="14"/> |
| | | <color key="textColor" red="0.20000000000000001" green="0.20000000000000001" blue="0.20000000000000001" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> |
| | | <nil key="highlightedColor"/> |
| | | </label> |
| | | <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="tlH-rh-jmK"> |
| | | <rect key="frame" x="14" y="49.333333333333314" width="365" height="0.6666666666666643"/> |
| | | <color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.059999999999999998" colorSpace="custom" customColorSpace="sRGB"/> |
| | | <constraints> |
| | | <constraint firstAttribute="height" constant="0.59999999999999998" id="Bqc-e3-4xc"/> |
| | | </constraints> |
| | | </view> |
| | | <textField opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="248" contentHorizontalAlignment="left" contentVerticalAlignment="center" placeholder="请输入登录密码" textAlignment="right" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="A8O-Op-A55" customClass="QMUITextField"> |
| | | <rect key="frame" x="110" y="16.666666666666686" width="270" height="17"/> |
| | | <fontDescription key="fontDescription" type="system" pointSize="14"/> |
| | | <textInputTraits key="textInputTraits" secureTextEntry="YES"/> |
| | | </textField> |
| | | </subviews> |
| | | <color key="backgroundColor" systemColor="systemBackgroundColor"/> |
| | | <constraints> |
| | | <constraint firstItem="tlH-rh-jmK" firstAttribute="leading" secondItem="Dx5-it-nqg" secondAttribute="leading" constant="14" id="Bzf-Xs-CLc"/> |
| | | <constraint firstItem="nbm-Ge-zrI" firstAttribute="leading" secondItem="Dx5-it-nqg" secondAttribute="leading" constant="14" id="IBS-rV-Aly"/> |
| | | <constraint firstItem="A8O-Op-A55" firstAttribute="centerY" secondItem="nbm-Ge-zrI" secondAttribute="centerY" id="KeE-dw-cUa"/> |
| | | <constraint firstAttribute="bottom" secondItem="tlH-rh-jmK" secondAttribute="bottom" id="NbI-s3-2td"/> |
| | | <constraint firstAttribute="trailing" secondItem="tlH-rh-jmK" secondAttribute="trailing" constant="14" id="STM-K4-FEQ"/> |
| | | <constraint firstItem="A8O-Op-A55" firstAttribute="leading" secondItem="nbm-Ge-zrI" secondAttribute="trailing" constant="10" id="bE5-Af-f6W"/> |
| | | <constraint firstAttribute="height" constant="50" id="dg6-V2-KwG"/> |
| | | <constraint firstItem="nbm-Ge-zrI" firstAttribute="centerY" secondItem="Dx5-it-nqg" secondAttribute="centerY" id="gLB-D5-xpE"/> |
| | | <constraint firstAttribute="trailing" secondItem="A8O-Op-A55" secondAttribute="trailing" constant="13" id="w2l-ao-D5m"/> |
| | | </constraints> |
| | | </view> |
| | | <view tag="14" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="22h-PG-uHh" customClass="TapButton" customModule="OK出行" customModuleProvider="target"> |
| | | <rect key="frame" x="0.0" y="350" width="393" height="50"/> |
| | | <subviews> |
| | | <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="三证合一" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="8FS-2H-hPY"> |
| | | <rect key="frame" x="14.000000000000004" y="16.666666666666686" width="57.333333333333343" height="17"/> |
| | | <fontDescription key="fontDescription" type="system" weight="medium" pointSize="14"/> |
| | |
| | | if sender.tag == 10{ |
| | | |
| | | switch model.authStatus{ |
| | | case .Pending: |
| | | case .Pending,.Reject: |
| | | let vc = EnterpriseAuthApplyVC() |
| | | vc.model = model |
| | | yy_push(vc: vc) |
| | | case .Review: |
| | | alert(popup: .single, title: "提示", text: "请耐心等待,审核通过后会通过短信的形式通知", submitTitle: "确定",cancelTitle: nil) { |
| | |
| | | return btn |
| | | }() |
| | | |
| | | // private let button_more:UIButton = { |
| | | // let btn = UIButton.init(type: .custom) |
| | | // btn.isHidden = true |
| | | // btn.setImage(UIImage.init(named: "btn_more")!, for: .normal) |
| | | // btn.setTitle("", for: .normal) |
| | | // btn.backgroundColor = .white |
| | | // btn.addShadow(ofColor: UIColor(hexString: "#E6E6E6")!.withAlphaComponent(0.5), radius: 4, offset: CGSize(width: -1, height: 0), opacity: 1) |
| | | // return btn |
| | | // }() |
| | | private let button_more:UIButton = { |
| | | let btn = UIButton.init(type: .custom) |
| | | btn.isHidden = true |
| | | btn.setImage(UIImage.init(named: "btn_more")!, for: .normal) |
| | | btn.setTitle("", for: .normal) |
| | | btn.backgroundColor = .white |
| | | btn.addShadow(ofColor: UIColor(hexString: "#E6E6E6")!.withAlphaComponent(0.5), radius: 4, offset: CGSize(width: -1, height: 0), opacity: 1) |
| | | return btn |
| | | }() |
| | | |
| | | /// VTMagicController |
| | | private lazy var vtmagic: VTMagicController = { |
| | |
| | | collectionView.backgroundColor = UIColor.color(light: UIColor.color(hexString: "#FFFFFF"), dark: UIColor.color(hexString: "#191919")) |
| | | view.addSubview(collectionView) |
| | | app.window?.addSubview(leftMenu) |
| | | leftMenu.didSelectRow.delegate(on: self) { (self, row) in |
| | | leftMenu.didSelectRow.delegate(on: self) { (self, name) in |
| | | DispatchQueue.main.async { [self] in |
| | | switch row{ |
| | | case 0://我的订单 |
| | | |
| | | if name.contains("企业认证"){ |
| | | let vc = EnterpriseAuthVC() |
| | | self.yy_push(vc: vc) |
| | | return |
| | | } |
| | | |
| | | if name.contains("订单审核"){ |
| | | let vc = OrderReviewListVC() |
| | | self.yy_push(vc: vc) |
| | | return |
| | | } |
| | | |
| | | switch name{ |
| | | case "我的订单"://我的订单 |
| | | let vc = MyOrderListVC() |
| | | self.yy_push(vc: vc) |
| | | break |
| | | case 1: // 优惠券 |
| | | case "优惠券": // 优惠券 |
| | | let vc = MineCouponsVC() |
| | | self.yy_push(vc: vc) |
| | | break |
| | | case 2: //企业认证 |
| | | let vc = EnterpriseAuthVC() |
| | | case "我的卡包": //卡包 |
| | | let vc = TravelCardVC() |
| | | self.yy_push(vc: vc) |
| | | break |
| | | case 3: //钱包 |
| | | case "钱包": //开发票 |
| | | let vc = MineWalletVC() |
| | | self.yy_push(vc: vc) |
| | | break |
| | | case 4: //订单审核 |
| | | let vc = OrderReviewListVC() |
| | | case "亲密账户": //亲密账户 |
| | | self.show() |
| | | APIManager.shared.provider.rx.request(.getUserUserList).map(YYModel<[UserRelationModel]>.self).validate().subscribe(onSuccess: {data in |
| | | self.hide() |
| | | if data.data!.count > 0{ |
| | | let vc = BindRelationVC() |
| | | vc.relationM = data.data ?? [] |
| | | self.yy_push(vc: vc) |
| | | |
| | | // self.show() |
| | | // APIManager.shared.provider.rx.request(.getUserUserList).map(YYModel<[UserRelationModel]>.self).validate().subscribe(onSuccess: {data in |
| | | // self.hide() |
| | | // if data.data!.count > 0{ |
| | | // let vc = BindRelationVC() |
| | | // vc.relationM = data.data ?? [] |
| | | // self.yy_push(vc: vc) |
| | | // }else{ |
| | | // let vc = BindRelationAgreementVC() |
| | | // self.yy_push(vc: vc) |
| | | // } |
| | | // }) { error in |
| | | // self.hide() |
| | | // alert(text: error.localizedDescription) |
| | | // }.disposed(by: self.disposeBag) |
| | | }else{ |
| | | let vc = BindRelationAgreementVC() |
| | | self.yy_push(vc: vc) |
| | | } |
| | | }) { error in |
| | | self.hide() |
| | | alert(text: error.localizedDescription) |
| | | }.disposed(by: self.disposeBag) |
| | | break |
| | | case 5: //开发票 |
| | | case "开发票": //开发票 |
| | | let vc = InvoiceViewController() |
| | | self.yy_push(vc: vc) |
| | | break |
| | | case 6: //意见反馈 |
| | | case "入驻成为商家": |
| | | APIManager.shared.provider.rx.request(.getMerchant).map(YYModel<MerchantInfoModel>.self).subscribe { model in |
| | | self.hide() |
| | | if model.data?.state == .delete || model.data?.state == .freeze{ |
| | | alert(text: String(format: "您的商家账号已%@,请联系平台:%@", model.data!.state.rawStr,self.customerViewModel.platform.value)) |
| | | return |
| | | } |
| | | |
| | | if model.data?.auditStatus == .waiting{ |
| | | let vc = BusinessSubmitSuccessVC() |
| | | self.yy_push(vc: vc) |
| | | }else if model.data?.auditStatus == .agreent{ |
| | | let vc = MerchantVC() |
| | | vc.merchantInfoModel = model.data |
| | | self.yy_push(vc: vc) |
| | | }else{ |
| | | let vc = BusinessVC() |
| | | vc.merchantInfoModel = model.data |
| | | self.yy_push(vc: vc) |
| | | } |
| | | } onError: { error in |
| | | |
| | | }.disposed(by: self.rx.disposeBag) |
| | | |
| | | case "我的评论": //分享 |
| | | let vc = MineCommoentVC() |
| | | self.yy_push(vc: vc) |
| | | break |
| | | case "我发布的": // 意见反馈 |
| | | let vc = MinePublishVC() |
| | | self.yy_push(vc: vc) |
| | | case "安全": //客服 |
| | | let vc = MineSafeVC() |
| | | self.yy_push(vc: vc) |
| | | break |
| | | case "意见反馈": //设置 |
| | | let vc = MineFeedbackVC() |
| | | self.yy_push(vc: vc) |
| | | // self.show() |
| | | // APIManager.shared.provider.rx.request(.getMerchant).map(YYModel<MerchantInfoModel>.self).subscribe { model in |
| | | // self.hide() |
| | | // if model.data?.state == .delete || model.data?.state == .freeze{ |
| | | // alert(text: String(format: "您的商家账号已%@,请联系平台:%@", model.data!.state.rawStr,self.customerViewModel.platform.value)) |
| | | // return |
| | | // } |
| | | // |
| | | // if model.data?.auditStatus == .waiting{ |
| | | // let vc = BusinessSubmitSuccessVC() |
| | | // self.yy_push(vc: vc) |
| | | // }else if model.data?.auditStatus == .agreent{ |
| | | // let vc = MerchantVC() |
| | | // vc.merchantInfoModel = model.data |
| | | // self.yy_push(vc: vc) |
| | | // }else{ |
| | | // let vc = BusinessVC() |
| | | // vc.merchantInfoModel = model.data |
| | | // self.yy_push(vc: vc) |
| | | // } |
| | | // } onError: { error in |
| | | // |
| | | // }.disposed(by: self.rx.disposeBag) |
| | | break |
| | | case 7: //客服 |
| | | let vc = MineCustomerServiceVC() |
| | | self.yy_push(vc: vc) |
| | | // let vc = MineCommoentVC() |
| | | // self.yy_push(vc: vc) |
| | | break |
| | | case 8://设置 |
| | | let vc = MineSetUpVC() |
| | | self.yy_push(vc: vc) |
| | | // let vc = MinePublishVC() |
| | | // self.yy_push(vc: vc) |
| | | case 9: //分享 |
| | | let vc = MineShareVC() |
| | | self.yy_push(vc: vc) |
| | | // let vc = MineSafeVC() |
| | | // self.yy_push(vc: vc) |
| | | break |
| | | case 10: // 意见反馈 |
| | | let vc = MineFeedbackVC() |
| | | self.yy_push(vc: vc) |
| | | case 11: //客服 |
| | | case "客服": //分享 |
| | | let vc = MineCustomerServiceVC() |
| | | self.yy_push(vc: vc) |
| | | break |
| | | case 12: //设置 |
| | | case "设置": |
| | | let vc = MineSetUpVC() |
| | | self.yy_push(vc: vc) |
| | | break |
| | | case 13: //分享 |
| | | case "分享": |
| | | let vc = MineShareVC() |
| | | self.yy_push(vc: vc) |
| | | break |
| | |
| | | } |
| | | vtmagic.magicView.reloadData() |
| | | |
| | | // view.addSubview(button_more) |
| | | // button_more.addTarget(self, action: #selector(itemMoreAction), for: .touchUpInside) |
| | | // button_more.snp.makeConstraints { make in |
| | | // make.top.equalToSuperview() |
| | | // make.right.equalToSuperview() |
| | | // make.width.equalTo(54) |
| | | // make.height.equalTo(36) |
| | | // } |
| | | view.addSubview(button_more) |
| | | button_more.addTarget(self, action: #selector(itemMoreAction), for: .touchUpInside) |
| | | button_more.snp.makeConstraints { make in |
| | | make.top.equalToSuperview() |
| | | make.right.equalToSuperview() |
| | | make.width.equalTo(54) |
| | | make.height.equalTo(36) |
| | | } |
| | | } |
| | | |
| | | deinit { |
| | |
| | | return false |
| | | }).count == 0 |
| | | |
| | | // self.button_more.isHidden = hidden |
| | | self.button_more.isHidden = hidden |
| | | |
| | | if let modularArray = model as? [ShowModularModel],modularArray.count > 0{ |
| | | |
| | |
| | | @IBAction func submitAction(_ sender: UIButton) { |
| | | |
| | | guard agreenTreatyBtn.isSelected else { |
| | | alert(text: "请先阅读并同意《宽窄出行汽车出租协议》");return |
| | | alert(text: "请先阅读并同意《宽窄优行汽车出租协议》");return |
| | | } |
| | | |
| | | guard rentCarReqModel.checkInputValue() else {return} |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="21507" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES"> |
| | | <document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="21701" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES"> |
| | | <device id="retina6_1" orientation="portrait" appearance="light"/> |
| | | <dependencies> |
| | | <deployment identifier="iOS"/> |
| | | <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="21505"/> |
| | | <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="21679"/> |
| | | <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"/> |
| | |
| | | <rect key="frame" x="170" y="12" width="148" height="27"/> |
| | | <fontDescription key="fontDescription" type="system" pointSize="12"/> |
| | | <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/> |
| | | <state key="normal" title="《宽窄出行汽车出租协议》"> |
| | | <state key="normal" title="《宽窄优行汽车出租协议》"> |
| | | <color key="titleColor" red="0.0" green="0.74901960779999999" blue="0.18823529410000001" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> |
| | | </state> |
| | | <connections> |
| | |
| | | <image name="icon_raidobutton" width="20" height="20"/> |
| | | <image name="icon_raidobutton_selected" width="20" height="20"/> |
| | | <namedColor name="Color"> |
| | | <color red="0.27058823529411763" green="0.70588235294117641" blue="0.58039215686274503" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> |
| | | <color red="0.27099999785423279" green="0.70599997043609619" blue="0.57999998331069946" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> |
| | | </namedColor> |
| | | <systemColor name="labelColor"> |
| | | <color red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> |
| | |
| | | sellCarReqModel?.mortgage = havePledgeBtn.isSelected ? 1:2 |
| | | |
| | | guard agreenTreatyBtn.isSelected else { |
| | | alert(text: "请先阅读并同意《宽窄出行汽车售卖协议》");return |
| | | alert(text: "请先阅读并同意《宽窄优行汽车售卖协议》");return |
| | | } |
| | | |
| | | guard sellCarReqModel.checkInputValue() == true else {return} |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="21507" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES"> |
| | | <document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="21701" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES"> |
| | | <device id="retina6_1" orientation="portrait" appearance="light"/> |
| | | <dependencies> |
| | | <deployment identifier="iOS"/> |
| | | <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="21505"/> |
| | | <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="21679"/> |
| | | <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"/> |
| | |
| | | <rect key="frame" x="170" y="12" width="148" height="27"/> |
| | | <fontDescription key="fontDescription" type="system" pointSize="12"/> |
| | | <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/> |
| | | <state key="normal" title="《宽窄出行汽车售卖协议》"> |
| | | <state key="normal" title="《宽窄优行汽车售卖协议》"> |
| | | <color key="titleColor" red="0.0" green="0.74901960779999999" blue="0.18823529410000001" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> |
| | | </state> |
| | | <connections> |
| | |
| | | <image name="icon_raidobutton" width="20" height="20"/> |
| | | <image name="icon_raidobutton_selected" width="20" height="20"/> |
| | | <namedColor name="Color"> |
| | | <color red="0.27058823529411763" green="0.70588235294117641" blue="0.58039215686274503" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> |
| | | <color red="0.27099999785423279" green="0.70599997043609619" blue="0.57999998331069946" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> |
| | | </namedColor> |
| | | <systemColor name="labelColor"> |
| | | <color red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> |
| | |
| | | advertViewModel.advertType.accept(2) |
| | | advertViewModel.getAdvertising() |
| | | cell_address.queryServerCarModel() |
| | | } |
| | | |
| | | //MARK: - viewWillAppear |
| | | override func viewWillAppear(_ animated: Bool) { |
| | | super.viewWillAppear(animated) |
| | | setupMapView() |
| | | viewModel.queryServingOrder() |
| | | |
| | | |
| | | if viewModel.orderType.value == .offical{ |
| | | //公务车,当审核状态为false时,查询一次,直到为true后不在查询 |
| | | if viewModel.orderType.value == .offical && self.viewModel.authStatus.value == false{ |
| | | APIManager.shared.provider.rx.request(.validPermission).mapThenValidate(AuthStatusModel.self).subscribe { restult in |
| | | switch restult{ |
| | | case .success(let m): |
| | |
| | | alert(text: error.localizedDescription) |
| | | }.disposed(by: disposeBag) |
| | | } |
| | | } |
| | | |
| | | //MARK: - viewWillAppear |
| | | override func viewWillAppear(_ animated: Bool) { |
| | | super.viewWillAppear(animated) |
| | | setupMapView() |
| | | viewModel.queryServingOrder() |
| | | } |
| | | |
| | | //MARK: - UI |
| | |
| | | var moneyLimit: Int = 0 |
| | | var moneyLimitCount: Int = 0 |
| | | var name: String = "" |
| | | var password:String = "" |
| | | } |
| | | |
| | | struct EnterpriseMembersModel:HandyJSON{ |
| | |
| | | /// 座位号 |
| | | var seatNumber = "" |
| | | |
| | | var sound = 0 //1录音 0不录音 |
| | | |
| | | var orderAdditionalFeeWarpper = [FeeWarpper]() |
| | | } |
| | | |
| | |
| | | |
| | | /// 紧急联系人电话 |
| | | var emergencyContactNumber: String = "" |
| | | |
| | | var approveOrder:Int = 0 // 1:有 |
| | | |
| | | /// 主键 |
| | | var id: Int = 0 |
| | |
| | | alert(text: "正在加载数据,请重试");return |
| | | } |
| | | |
| | | if (item.type == 5 || item.type == 4) && !mineRealNameViewModel.idcode.value.isEmpty{ |
| | | if (item.type == 5 || item.type == 4) && mineRealNameViewModel.idcode.value.isEmpty{ |
| | | alert(popup: .single, title: "您未实名认证!", text: "", submitTitle: "确定", cancelTitle: nil) { |
| | | self.hidden() |
| | | self.authdelegate.call() |
| | |
| | | var data = [HomeLeftMenuModel.init(image: "icon_me_order", name: "我的订单"), |
| | | HomeLeftMenuModel.init(image: "icon_me_coupons", name: "优惠券"), |
| | | HomeLeftMenuModel.init(image: "icon_me_card", name: "企业认证(\(app.userInfo.companyCount))"), |
| | | // HomeLeftMenuModel.init(image: "icon_me_card", name: "我的卡包"), |
| | | HomeLeftMenuModel.init(image: "icon_me_card", name: "我的卡包"), |
| | | HomeLeftMenuModel.init(image: "icon_me_wallet", name: "钱包"), |
| | | // HomeLeftMenuModel.init(image: "icon_me_wallet", name: "订单审核(\(app.userInfo.orderCount))"), |
| | | // HomeLeftMenuModel.init(image: "icon_me_close", name: "亲密账户"), |
| | | HomeLeftMenuModel.init(image: "icon_me_close", name: "亲密账户"), |
| | | HomeLeftMenuModel.init(image: "icon_me_invoice", name: "开发票"), |
| | | // HomeLeftMenuModel.init(image: "icon_me_service-1", name: "入驻成为商家"), |
| | | // HomeLeftMenuModel.init(image: "icon_me_comment", name: "我的评论"), |
| | | // HomeLeftMenuModel.init(image: "icon_me_publish", name: "我发布的") |
| | | HomeLeftMenuModel.init(image: "icon_me_service-1", name: "入驻成为商家"), |
| | | HomeLeftMenuModel.init(image: "icon_me_comment", name: "我的评论"), |
| | | HomeLeftMenuModel.init(image: "icon_me_publish", name: "我发布的"), |
| | | ] |
| | | |
| | | let data1 = [HomeLeftMenuModel.init(image: "icon_me_safety", name: "安全"), |
| | | HomeLeftMenuModel.init(image: "icon_me_opinion", name: "意见反馈"), |
| | | HomeLeftMenuModel.init(image: "icon_me_service", name: "客服"), |
| | | HomeLeftMenuModel.init(image: "icon_me_set", name: "设置"), |
| | | HomeLeftMenuModel.init(image: "icon_me_share", name: "分享") |
| | | ] |
| | | |
| | | // let data1 = [HomeLeftMenuModel.init(image: "icon_me_safety", name: "安全"), |
| | | // HomeLeftMenuModel.init(image: "icon_me_opinion", name: "意见反馈"), |
| | | // HomeLeftMenuModel.init(image: "icon_me_service", name: "客服"), |
| | | // HomeLeftMenuModel.init(image: "icon_me_set", name: "设置"), |
| | | // HomeLeftMenuModel.init(image: "icon_me_share", name: "分享")] |
| | | |
| | | // let data1 = [] |
| | | |
| | | |
| | | HomeLeftMenuModel.init(image: "icon_me_share", name: "分享")] |
| | | |
| | | /// 点击事件 |
| | | let didSelectRow = Delegate<Int,Void>() |
| | | let didSelectRow = Delegate<String,Void>() |
| | | |
| | | /// 点击事件 |
| | | let didSelectMineInfo = Delegate<Void,Void>() |
| | |
| | | }else{ |
| | | // self.data[6].name = "入驻成为商家" |
| | | } |
| | | |
| | | if data.approveOrder == 1 && !self.data.contains(where: {$0.name.contains("订单审核")}){ |
| | | let m = HomeLeftMenuModel.init(image: "icon_me_wallet", name: "订单审核(\(app.userInfo.orderCount))") |
| | | self.data.insert(m, at: 4) |
| | | }else if data.approveOrder == 0 && self.data.contains(where: {$0.name.contains("订单审核")}){ |
| | | self.data.remove(at: 4) |
| | | } |
| | | |
| | | self.tableView.reloadData() |
| | | break |
| | | case .error(let error): |
| | |
| | | |
| | | /// 显示 |
| | | func show() { |
| | | //73699 【我的评论】有人回复我的评论:我的评论未显示数量 |
| | | viewModel.queryUserInfo() |
| | | enterpriseViewModel.queryEnterpriseInfo { status in |
| | | switch status { |
| | | case .success(let m): |
| | | if m?.authStatus == .Pass && !self.data.contains(where: {$0.name.contains("订单审核")}){ |
| | | let m = HomeLeftMenuModel.init(image: "icon_me_wallet", name: "订单审核(\(app.userInfo.orderCount))") |
| | | self.data.insert(m, at: 4) |
| | | self.tableView.reloadData() |
| | | } |
| | | break |
| | | case .error(let _):break |
| | | } |
| | | } |
| | | // if !self.data.contains(where: {$0.name.contains("订单审核")}){ |
| | | // enterpriseViewModel.queryEnterpriseInfo(needShow: false) { status in |
| | | // switch status { |
| | | // case .success(let m): |
| | | // if m?.authStatus == .Pass { |
| | | // let m = HomeLeftMenuModel.init(image: "icon_me_wallet", name: "订单审核(\(app.userInfo.orderCount))") |
| | | // self.data.insert(m, at: 4) |
| | | // self.tableView.reloadData() |
| | | // } |
| | | // break |
| | | // case .error(let _):break |
| | | // } |
| | | // } |
| | | // } |
| | | |
| | | viewModel.queryMessNum { [weak self]m in |
| | | self?.data[7].num = m.commentNum |
| | | self?.data[8].num = m.carRental + m.sellingCarNum |
| | |
| | | |
| | | func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { |
| | | dismiss { [unowned self] in |
| | | self.didSelectRow.call(indexPath.row) |
| | | self.didSelectRow.call(data[indexPath.row].name) |
| | | } |
| | | } |
| | | } |
| | |
| | | extension HomeLeftMenuView:UICollectionViewDelegate{ |
| | | func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) { |
| | | dismiss { [unowned self] in |
| | | self.didSelectRow.call(indexPath.row + 9) |
| | | self.didSelectRow.call(data1[indexPath.row].name) |
| | | } |
| | | } |
| | | } |
| | | |
| | | extension HomeLeftMenuView:UICollectionViewDataSource{ |
| | | func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int { |
| | | return 0 |
| | | return data1.count |
| | | } |
| | | |
| | | func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell { |
| | | let cell = collectionView.dequeueReusableCell(withReuseIdentifier: "_Common_SingleImg_CCell", for: indexPath) as! Common_SingleImg_CCell |
| | | // let data = data1[indexPath.row] |
| | | // cell.img.image = UIImage(named: data.image) |
| | | // cell.titleL.text = data.name |
| | | let data = data1[indexPath.row] |
| | | cell.img.image = UIImage(named: data.image) |
| | | cell.titleL.text = data.name |
| | | return cell |
| | | } |
| | | |
| | |
| | | }).disposed(by: rx.disposeBag) |
| | | |
| | | button_qq.rx.tap.subscribe(onNext: {[unowned self] (_) in |
| | | self.sharedPubilcManger(shareObjType: .QQ, messageObjText: self.content, descr: self.content, title: "宽窄出行", thumbImage: icon_image, url: self.url) |
| | | self.sharedPubilcManger(shareObjType: .QQ, messageObjText: self.content, descr: self.content, title: "宽窄优行", thumbImage: icon_image, url: self.url) |
| | | }).disposed(by: rx.disposeBag) |
| | | |
| | | |
| | | button_wechat.rx.tap.subscribe(onNext: {[unowned self] (_) in |
| | | self.sharedPubilcManger(shareObjType: .wechatSession, messageObjText: self.content, descr: self.content, title: "宽窄出行", thumbImage: icon_image, url: self.url) |
| | | self.sharedPubilcManger(shareObjType: .wechatSession, messageObjText: self.content, descr: self.content, title: "宽窄优行", thumbImage: icon_image, url: self.url) |
| | | }).disposed(by: rx.disposeBag) |
| | | |
| | | button_message.rx.tap.subscribe(onNext: {[unowned self] (_) in |
| | |
| | | import RxCocoa |
| | | |
| | | class EnterpriseViewModel:YYViewModel{ |
| | | func queryEnterpriseInfo(_ clouse:@escaping (ResponseStatus<EnterpriseInfoModel>)->Void){ |
| | | func queryEnterpriseInfo(needShow:Bool = true,clouse:@escaping (ResponseStatus<EnterpriseInfoModel>)->Void){ |
| | | if needShow{ |
| | | show() |
| | | } |
| | | APIManager.shared.provider.rx.request(.queryCompany).mapTravelThenValidate(EnterpriseInfoModel.self).subscribe { result in |
| | | self.hidden() |
| | | switch result { |
| | |
| | | }.disposed(by: disposeBag) |
| | | } |
| | | |
| | | func submitEnterprise(id:Int? = nil,name:String,mailbox:String,legalName:String,legalPhone:String,identifier:String,contactAddress:String,businessLicense:String,clouse: @escaping (ResponseStatus<Nothing>)->Void){ |
| | | func submitEnterprise(id:Int? = nil,name:String,mailbox:String,legalName:String,legalPhone:String,identifier:String,contactAddress:String,businessLicense:String,pwd:String,clouse: @escaping (ResponseStatus<Nothing>)->Void){ |
| | | show() |
| | | APIManager.shared.provider.rx.request(.submitCompany(name: name, mailbox: mailbox, legalName: legalName, legalPhone: legalPhone, identifier: identifier, contactAddress: contactAddress, businessLicense: businessLicense)).mapTravelThenValidate(Nothing.self).subscribe { result in |
| | | APIManager.shared.provider.rx.request(.submitCompany(name: name, mailbox: mailbox, legalName: legalName, legalPhone: legalPhone, identifier: identifier, contactAddress: contactAddress, businessLicense: businessLicense,pwd: pwd)).mapTravelThenValidate(Nothing.self).subscribe { result in |
| | | self.hidden() |
| | | switch result { |
| | | case .success(_): |
| | |
| | | lazy var queryShowModularSubject = PublishSubject<RequestStatus>() |
| | | |
| | | /// 获取用户详情 |
| | | func queryUserInfo() { |
| | | func queryUserInfo(_ clouse:(()->Void)? = nil) { |
| | | APIManager.shared.provider.rx |
| | | .request(.queryUserInfo) |
| | | .map(YYModel<UserInfoModel>.self) |
| | |
| | | .subscribe(onSuccess: { [unowned self] (model) in |
| | | guard let data = model.data else{return} |
| | | app.userInfo.save(model: data) |
| | | clouse?() |
| | | }) { (error) in |
| | | } |
| | | .disposed(by: disposeBag) |
| | |
| | | super.bindRx() |
| | | |
| | | button_share.rx.tap.subscribe(onNext: {[unowned self] (_) in |
| | | ShareView.share(controller: self, title: nil, content: "新版“宽窄出行”隆重上线,下载注册即送打车券。", url: "\(share_url)/share/shareIndex.html?uid=\(app.userInfo.id)&type=1",hiddenMessage: true).show { |
| | | ShareView.share(controller: self, title: nil, content: "新版“宽窄优行”隆重上线,下载注册即送打车券。", url: "\(share_url)/share/shareIndex.html?uid=\(app.userInfo.id)&type=1",hiddenMessage: true).show { |
| | | |
| | | } |
| | | }).disposed(by: disposeBag) |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="21507" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES"> |
| | | <document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="21701" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES"> |
| | | <device id="retina6_12" orientation="portrait" appearance="light"/> |
| | | <dependencies> |
| | | <deployment identifier="iOS"/> |
| | | <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="21505"/> |
| | | <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="21679"/> |
| | | <capability name="Safe area layout guides" minToolsVersion="9.0"/> |
| | | <capability name="System colors in document resources" minToolsVersion="11.0"/> |
| | | <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/> |
| | |
| | | </userDefinedRuntimeAttribute> |
| | | </userDefinedRuntimeAttributes> |
| | | </view> |
| | | <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="为保障您的出行安全,宽窄出行建议您全程开启车内录音" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="ZiK-RA-oUN"> |
| | | <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="为保障您的出行安全,宽窄优行建议您全程开启车内录音" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="ZiK-RA-oUN"> |
| | | <rect key="frame" x="16" y="69" width="306.33333333333331" height="14.333333333333329"/> |
| | | <fontDescription key="fontDescription" type="system" weight="medium" pointSize="12"/> |
| | | <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="0.5" colorSpace="custom" customColorSpace="sRGB"/> |
| | |
| | | case .question: |
| | | return "常见问题" |
| | | case .scenic: |
| | | return "景区直通车须知" |
| | | return "景区直通车乘车须知" |
| | | case .plane: |
| | | return "机场专线须知" |
| | | case .vioceRecord: |
| | |
| | | button_forgotPassword.setTitleColor(UIColor.color(light: UIColor.color(hexString: "#666666"), dark: UIColor.color(hexString: "#FFFFFF")), for: .normal) |
| | | view.addSubview(view_slider) |
| | | let paragraph1 = "我已阅读并同意" |
| | | let paragraph2 = "《宽窄出行用户服务协议》" |
| | | let paragraph2 = "《宽窄优行用户服务协议》" |
| | | label_agreement.text = paragraph1 + paragraph2 |
| | | label_agreement.textColor = UIColor.color(light: UIColor.color(hexString: "#333333"), dark: UIColor.color(hexString: "#FAFAFA")) |
| | | label_otherLogin.textColor = UIColor.color(light: UIColor.color(hexString: "#666666"), dark: UIColor.color(hexString: "#FAFAFA")) |
| | |
| | | /// 登录 |
| | | func login() { |
| | | do { |
| | | try agreement.value?.checkAgreement(agreementName: "宽窄出行用户服务协议") |
| | | try agreement.value?.checkAgreement(agreementName: "宽窄优行用户服务协议") |
| | | try phoneNumber.value.checkPhoneNumber() |
| | | if type.value == .code{ |
| | | try password.value.checkSMSCode() |
| | |
| | | |
| | | var seletedIndex = 0 |
| | | /// 菜单 |
| | | private let menu = ["快车/专车","出租车","机场专线","景区直通车","公务用车"] |
| | | private let menu = ["快车/专车","出租车","机场专线","跨城出行","景区直通车","公务用车"] |
| | | |
| | | /// VTMagicController |
| | | private lazy var vtmagic: VTMagicController = { |
| | |
| | | case "机场专线": |
| | | let vc = TaxiOrderListVC.init(orderType: .plane) |
| | | return vc |
| | | case "跨城出行": |
| | | let vc = TaxiOrderListVC.init(orderType: .travel) |
| | | return vc |
| | | case "景区直通车": |
| | | //LogisticsListVC |
| | | var vc:TaxiOrderListVC? |
| | |
| | | /// 开发票 |
| | | @objc func invoice() |
| | | { |
| | | let vc = InvoiceApplyViewController(orderId: viewModel.orderId.value) |
| | | // let vc = InvoiceApplyViewController(orderId: viewModel.orderId.value) |
| | | let vc = InvoiceViewController() |
| | | yy_push(vc: vc) |
| | | } |
| | | |
| | |
| | | if data.amount != 0{ |
| | | alert(popup: .double, title: "提示", text: "分享APP给好友可以获得\(data.amount)元打车红包", submitTitle: "去分享", cancelTitle: "不分享", submitClick: {[unowned self] in |
| | | // 弹出分享框 |
| | | ShareView.share(controller: self, title: nil, content: "新版“宽窄出行”隆重上线,下载注册即送打车券。", url: "\(share_url)/share/shareIndex.html?uid=\(app.userInfo.id)&type=1",hiddenMessage: true).show(success: { |
| | | ShareView.share(controller: self, title: nil, content: "新版“宽窄优行”隆重上线,下载注册即送打车券。", url: "\(share_url)/share/shareIndex.html?uid=\(app.userInfo.id)&type=1",hiddenMessage: true).show(success: { |
| | | self.viewModel.shareRedEnvelope() |
| | | }) |
| | | }) {} |
| | |
| | | @IBOutlet weak var maxmumField: UITextField! |
| | | @IBOutlet weak var orderTypeCollectionView: UICollectionView! |
| | | private var selectIndex = -1 |
| | | private var items = ["快车/专车","出租车","跨城出行","跨城小件出行","同城小件物流"] |
| | | private var items = ["快车/专车","出租车","跨城出行","景区直通车","机场专线","公务用车"] |
| | | var viewMoel:InvoiceOrderViewModel? |
| | | var completeClouse:(()->Void)? |
| | | var minDate:Date? |
| | |
| | | func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) { |
| | | selectIndex = indexPath.row |
| | | collectionView.reloadData() |
| | | viewMoel?.orderType.accept(OrderType(rawValue: indexPath.row + 1)) |
| | | |
| | | var orderType:OrderType = .special |
| | | switch indexPath.row{ |
| | | case 0:orderType = .special |
| | | case 1:orderType = .taxi |
| | | case 2:orderType = .travel |
| | | case 3:orderType = .scenic |
| | | case 4:orderType = .plane |
| | | case 5:orderType = .offical |
| | | default:break |
| | | } |
| | | viewMoel?.orderType.accept(orderType) |
| | | } |
| | | } |
| | | |
| | |
| | | self.viewModel.shareRedEnvelopeAmount.accept(data.amount) |
| | | alert(popup: .double, title: "提示", text: "分享APP给好友可以获得\(data.amount)元打车红包", submitTitle: "去分享", cancelTitle: "不分享", submitClick: { [unowned self] in |
| | | // 弹出分享框 |
| | | ShareView.share(controller: self, title: nil, content: "新版“宽窄出行”隆重上线,下载注册即送打车券。", url: "\(share_url)/share/shareIndex.html?uid=\(app.userInfo.id)&type=1",hiddenMessage: true).show(success: { |
| | | ShareView.share(controller: self, title: nil, content: "新版“宽窄优行”隆重上线,下载注册即送打车券。", url: "\(share_url)/share/shareIndex.html?uid=\(app.userInfo.id)&type=1",hiddenMessage: true).show(success: { |
| | | self.shareRedEnvelope() |
| | | }) |
| | | }) {} |
| | |
| | | |
| | | func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { |
| | | |
| | | if indexPath.row == 0{return} |
| | | let data = adItems[indexPath.row - 1] |
| | | guard indexPath.row > 0,data.isJump == 1 else {return} |
| | | // if indexPath.row == 0{return} |
| | | let data = adItems[indexPath.row] |
| | | // guard indexPath.row > 0,data.isJump == 1 else {return} |
| | | if data.isJump == 1{ |
| | | switch data.jumpType { |
| | | case 1:// 外部 |
| | |
| | | .rx.tap |
| | | .subscribe(onNext: { (_) in |
| | | // 弹出分享框 |
| | | ShareView.share(controller: self, title: "分享行程", content: "你的好友(\(app.userInfo.phone))正在使用宽窄出行快车(\(self.viewModel.dataSource.value?.licensePlate ?? ""))。", url: "\(share_url)/orderShare/index.html?orderId=\(self.viewModel.orderId.value)&orderType=\(self.viewModel.orderType.value.rawValue)",hiddenMessage: false).show(success: { |
| | | ShareView.share(controller: self, title: "分享行程", content: "你的好友(\(app.userInfo.phone))正在使用宽窄优行快车(\(self.viewModel.dataSource.value?.licensePlate ?? ""))。", url: "\(share_url)/orderShare/index.html?orderId=\(self.viewModel.orderId.value)&orderType=\(self.viewModel.orderType.value.rawValue)",hiddenMessage: false).show(success: { |
| | | |
| | | }) |
| | | }).disposed(by: disposeBag) |
| | |
| | | self.view_travel.view_travelInfos.isHidden = false |
| | | self.view_state.view_state.isHidden = false |
| | | self.vc_mapView.setAnnotation(startLocation: self.viewModel.dataSource.value?.startCoordinate(),title: self.viewModel.dataSource.value?.startAddress ?? "") |
| | | self.view_service.button_voice.isHidden = self.viewModel.dataSource.value?.sound == 0 |
| | | |
| | | case .serving, .waitingForConfirmCost: |
| | | self.button_share.isHidden = false |
| | | self.view_travel.view_driverInfos.isHidden = false |
| | |
| | | .rx.tap |
| | | .subscribe(onNext: { (_) in |
| | | // 弹出分享框 |
| | | ShareView.share(controller: self, title: "分享行程", content: "你的好友(\(app.userInfo.phone))正在使用宽窄出行快车(\(self.viewModel.dataSource.value?.licensePlate ?? ""))。", url: "\(share_url)/orderShare/index.html?orderId=\(self.viewModel.orderId.value)&orderType=\(self.viewModel.orderType.value.rawValue)",hiddenMessage: false).show(success: { |
| | | ShareView.share(controller: self, title: "分享行程", content: "你的好友(\(app.userInfo.phone))正在使用宽窄优行快车(\(self.viewModel.dataSource.value?.licensePlate ?? ""))。", url: "\(share_url)/orderShare/index.html?orderId=\(self.viewModel.orderId.value)&orderType=\(self.viewModel.orderType.value.rawValue)",hiddenMessage: false).show(success: { |
| | | |
| | | }) |
| | | }).disposed(by: disposeBag) |
| | |
| | | var fareTypeNote2:String = "" //独享 |
| | | var fareTypeNote3:String = "" //一口价 |
| | | |
| | | var sound = 0 //1录音 0不录音 |
| | | |
| | | /// 备注 |
| | | var remark = "" |
| | | func startCoordinate() -> CLLocationCoordinate2D { |
| | |
| | | /// 客服 |
| | | @IBOutlet weak var button_customerService: YYButton! |
| | | |
| | | @IBOutlet weak var button_voice: UIButton! |
| | | /// 定位 |
| | | @IBOutlet weak var button_position: UIButton! |
| | | |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="17156" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES"> |
| | | <document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="21701" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES"> |
| | | <device id="retina6_1" orientation="portrait" appearance="light"/> |
| | | <dependencies> |
| | | <deployment identifier="iOS"/> |
| | | <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="17125"/> |
| | | <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="21679"/> |
| | | <capability name="Safe area layout guides" minToolsVersion="9.0"/> |
| | | <capability name="System colors in document resources" minToolsVersion="11.0"/> |
| | | <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/> |
| | |
| | | <constraint firstItem="ats-R0-Z4C" firstAttribute="top" secondItem="y0u-2E-5uI" secondAttribute="top" constant="4" id="sTk-1O-Xsq"/> |
| | | </constraints> |
| | | </view> |
| | | <button hidden="YES" opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="fjL-v8-9Um"> |
| | | <rect key="frame" x="0.0" y="76" width="32" height="32"/> |
| | | <constraints> |
| | | <constraint firstAttribute="width" constant="32" id="gTj-8u-Z6e"/> |
| | | <constraint firstAttribute="height" constant="32" id="n3G-qf-4KG"/> |
| | | </constraints> |
| | | <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/> |
| | | <state key="normal" image="icon_voice"/> |
| | | </button> |
| | | </subviews> |
| | | </stackView> |
| | | </subviews> |
| | |
| | | <outlet property="button_customerService" destination="y0u-2E-5uI" id="U8v-IP-Kqx"/> |
| | | <outlet property="button_police" destination="X3R-E8-H6h" id="YDg-jA-jhO"/> |
| | | <outlet property="button_position" destination="vNf-iy-zvy" id="Il3-r7-I1o"/> |
| | | <outlet property="button_voice" destination="fjL-v8-9Um" id="SuE-CP-Gw0"/> |
| | | </connections> |
| | | <point key="canvasLocation" x="84.782608695652186" y="322.76785714285711"/> |
| | | </view> |
| | |
| | | <resources> |
| | | <image name="icon_110" width="20" height="18"/> |
| | | <image name="icon_service" width="14" height="14"/> |
| | | <image name="icon_voice" width="40" height="40"/> |
| | | <image name="map_position" width="32" height="32"/> |
| | | <systemColor name="systemBackgroundColor"> |
| | | <color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> |
| | |
| | | super.setupViews() |
| | | view.backgroundColor = UIColor.color(hexString: "#F3F4F5") |
| | | navigationItem.title = "乘车人信息" |
| | | button_agreement.setTitle(orderType.value == .taxi ? "《宽窄出行服务协议》" : "《宽窄出行服务协议》", for: .normal) |
| | | button_agreement.setTitle(orderType.value == .taxi ? "《宽窄优行服务协议》" : "《宽窄优行服务协议》", for: .normal) |
| | | } |
| | | |
| | | //MARK: - Rx |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="21507" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES"> |
| | | <document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="21701" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES"> |
| | | <device id="retina6_1" orientation="portrait" appearance="light"/> |
| | | <dependencies> |
| | | <deployment version="4352" identifier="iOS"/> |
| | | <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="21505"/> |
| | | <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="21679"/> |
| | | <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"/> |
| | |
| | | <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Ht0-Xh-EPC"> |
| | | <rect key="frame" x="121" y="767" width="172" height="29"/> |
| | | <fontDescription key="fontDescription" type="system" weight="medium" pointSize="14"/> |
| | | <state key="normal" title="《宽窄出行快车服务协议》"> |
| | | <state key="normal" title="《宽窄优行快车服务协议》"> |
| | | <color key="titleColor" red="0.40000000000000002" green="0.40000000000000002" blue="0.40000000000000002" alpha="1" colorSpace="calibratedRGB"/> |
| | | </state> |
| | | </button> |
| | |
| | | <resources> |
| | | <image name="icon_more_black" width="8" height="13"/> |
| | | <namedColor name="Color"> |
| | | <color red="0.27058823529411763" green="0.70588235294117641" blue="0.58039215686274503" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> |
| | | <color red="0.27099999785423279" green="0.70599997043609619" blue="0.57999998331069946" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> |
| | | </namedColor> |
| | | <systemColor name="systemBackgroundColor"> |
| | | <color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> |
| | |
| | | return image |
| | | }() |
| | | |
| | | let mapView = YYMapViewManager.share.mapView |
| | | let mapView: MAMapView = { |
| | | let view = MAMapView() |
| | | view.mapType = .standard |
| | | view.showsUserLocation = true // YES 为打开定位,NO为关闭定位 |
| | | view.zoomLevel = 17 |
| | | view.isRotateCameraEnabled = false |
| | | view.isRotateEnabled = false |
| | | view.userTrackingMode = .follow |
| | | view.pausesLocationUpdatesAutomatically = false |
| | | view.allowsBackgroundLocationUpdates = true |
| | | view.isRotateEnabled = false |
| | | view.showsCompass = false |
| | | view.showsScale = false |
| | | return view |
| | | }() |
| | | |
| | | private var manager: LocationSearchManager = LocationSearchManager() |
| | | |
| | |
| | | super.viewDidLoad() |
| | | textField_search.delegate = self |
| | | manager.searchDelegate = self |
| | | view_desc.isHidden = !origin.value |
| | | mapView.delegate = self |
| | | } |
| | | |
| | | //MARK: - Rx |
| | |
| | | |
| | | YYMapViewManager.share.originInfo.subscribe(onNext: {[unowned self]info in |
| | | if let name = info?.name{ |
| | | self.textField_search.text = name |
| | | self.manager.startPoiSearch(keyword: name, city: self.cityName) |
| | | // self.textField_search.text = name |
| | | // self.manager.startPoiSearch(keyword: name, city: self.cityName) |
| | | } |
| | | }).disposed(by: rx.disposeBag) |
| | | } |
| | |
| | | return true |
| | | } |
| | | } |
| | | |
| | | //MARK: - MAMapViewDelegate |
| | | extension SearchAddressDragVC: MAMapViewDelegate |
| | | { |
| | | // func mapView(_ mapView: MAMapView!, regionDidChangeAnimated animated: Bool) { |
| | | // |
| | | // } |
| | | |
| | | func mapView(_ mapView: MAMapView!, mapWillMoveByUser wasUserAction: Bool) { |
| | | |
| | | } |
| | | |
| | | func mapView(_ mapView: MAMapView!, mapDidMoveByUser wasUserAction: Bool) { |
| | | guard wasUserAction else {return} |
| | | let coordinate = mapView.centerCoordinate |
| | | manager.startReverseSearch(lat: coordinate.latitude, lng: coordinate.longitude) |
| | | } |
| | | } |
| | | |
| | | |
| | |
| | | /// 分享 |
| | | button_share.rx.tap.subscribe(onNext: { (_) in |
| | | // 弹出分享框 |
| | | ShareView.share(controller: self, title: "分享行程", content: "你的好友(\(app.userInfo.phone))正在使用宽窄出行出租车(\(self.dataSource?.licensePlate ?? ""))。", url: "\(share_url)/orderShare/index.html?orderId=\(self.viewModel.orderId.value)&orderType=\(self.viewModel.orderType.value.rawValue)",hiddenMessage: false).show(success: { |
| | | ShareView.share(controller: self, title: "分享行程", content: "你的好友(\(app.userInfo.phone))正在使用宽窄优行出租车(\(self.dataSource?.licensePlate ?? ""))。", url: "\(share_url)/orderShare/index.html?orderId=\(self.viewModel.orderId.value)&orderType=\(self.viewModel.orderType.value.rawValue)",hiddenMessage: false).show(success: { |
| | | |
| | | }) |
| | | }).disposed(by: disposeBag) |
| | |
| | | self.viewModel.shareRedEnvelopeAmount.accept(data.amount) |
| | | alert(popup: .double, title: "提示", text: "分享APP给好友可以获得\(data.amount)元打车红包", submitTitle: "去分享", cancelTitle: "不分享", submitClick: { [unowned self] in |
| | | // 弹出分享框 |
| | | ShareView.share(controller: self, title: nil, content: "新版“宽窄出行”隆重上线,下载注册即送打车券。", url: "\(share_url)/share/shareIndex.html?uid=\(app.userInfo.id)&type=1").show(success: { |
| | | ShareView.share(controller: self, title: nil, content: "新版“宽窄优行”隆重上线,下载注册即送打车券。", url: "\(share_url)/share/shareIndex.html?uid=\(app.userInfo.id)&type=1").show(success: { |
| | | self.viewModel.shareRedEnvelope() |
| | | }) |
| | | }) {} |
| | |
| | | |
| | | func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { |
| | | |
| | | if indexPath.row == 0{return} |
| | | let data = adItems[indexPath.row - 1] |
| | | guard indexPath.row > 0,data.isJump == 1 else {return} |
| | | // if indexPath.row == 0{return} |
| | | let data = adItems[indexPath.row] |
| | | // guard indexPath.row > 0,data.isJump == 1 else {return} |
| | | if data.isJump == 1{ |
| | | switch data.jumpType { |
| | | case 1:// 外部 |
| | |
| | | <key>CFBundleDevelopmentRegion</key> |
| | | <string>$(DEVELOPMENT_LANGUAGE)</string> |
| | | <key>CFBundleDisplayName</key> |
| | | <string>宽窄出行</string> |
| | | <string>宽窄优行</string> |
| | | <key>CFBundleExecutable</key> |
| | | <string>$(EXECUTABLE_NAME)</string> |
| | | <key>CFBundleIdentifier</key> |
| | |
| | | <true/> |
| | | </dict> |
| | | <key>NSCameraUsageDescription</key> |
| | | <string>宽窄出行需要访问您的相机为您更换头像</string> |
| | | <string>宽窄优行需要访问您的相机为您更换头像</string> |
| | | <key>NSLocationAlwaysAndWhenInUseUsageDescription</key> |
| | | <string>宽窄出行需要访问您的位置获取附近司机</string> |
| | | <string>宽窄优行需要访问您的位置获取附近司机</string> |
| | | <key>NSLocationUsageDescription</key> |
| | | <string>宽窄出行需要访问您的位置获取附近司机</string> |
| | | <string>宽窄优行需要访问您的位置获取附近司机</string> |
| | | <key>NSLocationWhenInUseUsageDescription</key> |
| | | <string>宽窄出行需要访问您的位置获取附近司机</string> |
| | | <string>宽窄优行需要访问您的位置获取附近司机</string> |
| | | <key>NSPhotoLibraryAddUsageDescription</key> |
| | | <string>宽窄出行需要访问您的相册添加在APP拍摄的照片</string> |
| | | <string>宽窄优行需要访问您的相册添加在APP拍摄的照片</string> |
| | | <key>NSPhotoLibraryUsageDescription</key> |
| | | <string>宽窄出行需要访问您的相册为你更换头像</string> |
| | | <string>宽窄优行需要访问您的相册为你更换头像</string> |
| | | <key>UIBackgroundModes</key> |
| | | <array> |
| | | <string>location</string> |
| | |
| | | </array> |
| | | <key>UISupportedInterfaceOrientations~ipad</key> |
| | | <array> |
| | | <string>UIInterfaceOrientationPortrait</string> |
| | | <string>UIInterfaceOrientationPortraitUpsideDown</string> |
| | | <string>UIInterfaceOrientationLandscapeLeft</string> |
| | | <string>UIInterfaceOrientationLandscapeRight</string> |
| | | <string>UIInterfaceOrientationPortrait</string> |
| | | <string>UIInterfaceOrientationPortraitUpsideDown</string> |
| | | </array> |
| | | <key>UIUserInterfaceStyle</key> |
| | | <string>Light</string> |
| | |
| | | func yy_openURL(_ type: YYpermissionsType? = nil) { |
| | | let title = "访问受限" |
| | | var message = "请点击“前往”,允许访问权限" |
| | | let appName: String = "宽窄出行" //App 名称 |
| | | let appName: String = "宽窄优行" //App 名称 |
| | | if type == .camera { // 相机 |
| | | message = "请在iPhone的\"设置-隐私-相机\"选项中,允许\"\(appName)\"访问你的相机" |
| | | } else if type == .photo { // 相册 |