OKProject.xcodeproj/project.pbxproj
@@ -118,6 +118,10 @@ 138047F72828F856008FE45E /* HomeItemMoreView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 138047F62828F856008FE45E /* HomeItemMoreView.xib */; }; 13896A2F282907460032210D /* PublishSaleCarVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 13896A2D282907460032210D /* PublishSaleCarVC.swift */; }; 13896A30282907460032210D /* PublishSaleCarVC.xib in Resources */ = {isa = PBXBuildFile; fileRef = 13896A2E282907460032210D /* PublishSaleCarVC.xib */; }; 138987E829E930D900ED0EAC /* Reason_Content_TCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 138987E629E930D900ED0EAC /* Reason_Content_TCell.swift */; }; 138987E929E930D900ED0EAC /* Reason_Content_TCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 138987E729E930D900ED0EAC /* Reason_Content_TCell.xib */; }; 138987EC29ECDC0D00ED0EAC /* OfficialCharterVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 138987EA29ECDC0D00ED0EAC /* OfficialCharterVC.swift */; }; 138987ED29ECDC0E00ED0EAC /* OfficialCharterVC.xib in Resources */ = {isa = PBXBuildFile; fileRef = 138987EB29ECDC0D00ED0EAC /* OfficialCharterVC.xib */; }; 1389D7A4283B2000009FE908 /* SearchAddressDragVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1389D7A2283B2000009FE908 /* SearchAddressDragVC.swift */; }; 1389D7A5283B2000009FE908 /* SearchAddressDragVC.xib in Resources */ = {isa = PBXBuildFile; fileRef = 1389D7A3283B2000009FE908 /* SearchAddressDragVC.xib */; }; 138A1873282A52A0004705F5 /* PublishSellCarSuccessVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 138A1871282A52A0004705F5 /* PublishSellCarSuccessVC.swift */; }; @@ -171,6 +175,8 @@ 13B69FE327B9F18300489BA6 /* MerchantModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 13B69FE227B9F18300489BA6 /* MerchantModel.swift */; }; 13B69FE627B9FB2200489BA6 /* BusinessSubmitSuccessVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 13B69FE427B9FB2200489BA6 /* BusinessSubmitSuccessVC.swift */; }; 13B69FE727B9FB2200489BA6 /* BusinessSubmitSuccessVC.xib in Resources */ = {isa = PBXBuildFile; fileRef = 13B69FE527B9FB2200489BA6 /* BusinessSubmitSuccessVC.xib */; }; 13B75D9629F0DCC400C57B59 /* OfficialCharterPassengerTCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 13B75D9429F0DCC400C57B59 /* OfficialCharterPassengerTCell.swift */; }; 13B75D9729F0DCC400C57B59 /* OfficialCharterPassengerTCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 13B75D9529F0DCC400C57B59 /* OfficialCharterPassengerTCell.xib */; }; 13B96B4D29E3ECE000EEF378 /* EnterpriseMembersVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 13B96B4B29E3ECE000EEF378 /* EnterpriseMembersVC.swift */; }; 13B96B4E29E3ECE000EEF378 /* EnterpriseMembersVC.xib in Resources */ = {isa = PBXBuildFile; fileRef = 13B96B4C29E3ECE000EEF378 /* EnterpriseMembersVC.xib */; }; 13B96B5129E3F01400EEF378 /* EnterpriseMembersTCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 13B96B4F29E3F01400EEF378 /* EnterpriseMembersTCell.swift */; }; @@ -210,6 +216,8 @@ 13F6D5A529E50051003FDF28 /* MineBusinessCreditVC.xib in Resources */ = {isa = PBXBuildFile; fileRef = 13F6D5A329E50051003FDF28 /* MineBusinessCreditVC.xib */; }; 13FBA19B27BD30CB00893CC9 /* ObtainCouponView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 13FBA19A27BD30CB00893CC9 /* ObtainCouponView.swift */; }; 13FBA19D27BD30D300893CC9 /* ObtainCouponView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 13FBA19C27BD30D300893CC9 /* ObtainCouponView.xib */; }; 13FFAF9D29E8EE23003089D7 /* ReasonforTravelVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 13FFAF9B29E8EE23003089D7 /* ReasonforTravelVC.swift */; }; 13FFAF9E29E8EE23003089D7 /* ReasonforTravelVC.xib in Resources */ = {isa = PBXBuildFile; fileRef = 13FFAF9C29E8EE23003089D7 /* ReasonforTravelVC.xib */; }; 3D745012253828F700C5D8A3 /* YYSpecialCarCanceledNoDriverViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3D745011253828F700C5D8A3 /* YYSpecialCarCanceledNoDriverViewController.swift */; }; 3D7450172538299600C5D8A3 /* YYSpecialCarCanceledNoDriverViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3D7450152538299600C5D8A3 /* YYSpecialCarCanceledNoDriverViewCell.swift */; }; 3D7450182538299600C5D8A3 /* YYSpecialCarCanceledNoDriverViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 3D7450162538299600C5D8A3 /* YYSpecialCarCanceledNoDriverViewCell.xib */; }; @@ -775,6 +783,10 @@ 138047F62828F856008FE45E /* HomeItemMoreView.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = HomeItemMoreView.xib; sourceTree = "<group>"; }; 13896A2D282907460032210D /* PublishSaleCarVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PublishSaleCarVC.swift; sourceTree = "<group>"; }; 13896A2E282907460032210D /* PublishSaleCarVC.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = PublishSaleCarVC.xib; sourceTree = "<group>"; }; 138987E629E930D900ED0EAC /* Reason_Content_TCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Reason_Content_TCell.swift; sourceTree = "<group>"; }; 138987E729E930D900ED0EAC /* Reason_Content_TCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = Reason_Content_TCell.xib; sourceTree = "<group>"; }; 138987EA29ECDC0D00ED0EAC /* OfficialCharterVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OfficialCharterVC.swift; sourceTree = "<group>"; }; 138987EB29ECDC0D00ED0EAC /* OfficialCharterVC.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = OfficialCharterVC.xib; sourceTree = "<group>"; }; 1389D7A2283B2000009FE908 /* SearchAddressDragVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SearchAddressDragVC.swift; sourceTree = "<group>"; }; 1389D7A3283B2000009FE908 /* SearchAddressDragVC.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = SearchAddressDragVC.xib; sourceTree = "<group>"; }; 138A1871282A52A0004705F5 /* PublishSellCarSuccessVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PublishSellCarSuccessVC.swift; sourceTree = "<group>"; }; @@ -832,6 +844,8 @@ 13B69FE227B9F18300489BA6 /* MerchantModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MerchantModel.swift; sourceTree = "<group>"; }; 13B69FE427B9FB2200489BA6 /* BusinessSubmitSuccessVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BusinessSubmitSuccessVC.swift; sourceTree = "<group>"; }; 13B69FE527B9FB2200489BA6 /* BusinessSubmitSuccessVC.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = BusinessSubmitSuccessVC.xib; sourceTree = "<group>"; }; 13B75D9429F0DCC400C57B59 /* OfficialCharterPassengerTCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OfficialCharterPassengerTCell.swift; sourceTree = "<group>"; }; 13B75D9529F0DCC400C57B59 /* OfficialCharterPassengerTCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = OfficialCharterPassengerTCell.xib; sourceTree = "<group>"; }; 13B96B4B29E3ECE000EEF378 /* EnterpriseMembersVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EnterpriseMembersVC.swift; sourceTree = "<group>"; }; 13B96B4C29E3ECE000EEF378 /* EnterpriseMembersVC.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = EnterpriseMembersVC.xib; sourceTree = "<group>"; }; 13B96B4F29E3F01400EEF378 /* EnterpriseMembersTCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EnterpriseMembersTCell.swift; sourceTree = "<group>"; }; @@ -871,6 +885,8 @@ 13F6D5A329E50051003FDF28 /* MineBusinessCreditVC.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = MineBusinessCreditVC.xib; sourceTree = "<group>"; }; 13FBA19A27BD30CB00893CC9 /* ObtainCouponView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ObtainCouponView.swift; sourceTree = "<group>"; }; 13FBA19C27BD30D300893CC9 /* ObtainCouponView.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = ObtainCouponView.xib; sourceTree = "<group>"; }; 13FFAF9B29E8EE23003089D7 /* ReasonforTravelVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ReasonforTravelVC.swift; sourceTree = "<group>"; }; 13FFAF9C29E8EE23003089D7 /* ReasonforTravelVC.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = ReasonforTravelVC.xib; sourceTree = "<group>"; }; 3D745011253828F700C5D8A3 /* YYSpecialCarCanceledNoDriverViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YYSpecialCarCanceledNoDriverViewController.swift; sourceTree = "<group>"; }; 3D7450152538299600C5D8A3 /* YYSpecialCarCanceledNoDriverViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YYSpecialCarCanceledNoDriverViewCell.swift; sourceTree = "<group>"; }; 3D7450162538299600C5D8A3 /* YYSpecialCarCanceledNoDriverViewCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = YYSpecialCarCanceledNoDriverViewCell.xib; sourceTree = "<group>"; }; @@ -1594,6 +1610,10 @@ 1365117529E409410051C926 /* LinesOfCreditListVC.swift */, 1365117D29E40BD10051C926 /* LineOfCreditDetailVC.swift */, 1365117E29E40BD10051C926 /* LineOfCreditDetailVC.xib */, 13FFAF9B29E8EE23003089D7 /* ReasonforTravelVC.swift */, 13FFAF9C29E8EE23003089D7 /* ReasonforTravelVC.xib */, 138987EA29ECDC0D00ED0EAC /* OfficialCharterVC.swift */, 138987EB29ECDC0D00ED0EAC /* OfficialCharterVC.xib */, ); path = Controller; sourceTree = "<group>"; @@ -1753,6 +1773,10 @@ 137C479529E3FDFA00EFA96D /* OrderReviewTCell.xib */, 1365117929E409C50051C926 /* LineOfCredictTCell.swift */, 1365117A29E409C50051C926 /* LineOfCredictTCell.xib */, 138987E629E930D900ED0EAC /* Reason_Content_TCell.swift */, 138987E729E930D900ED0EAC /* Reason_Content_TCell.xib */, 13B75D9429F0DCC400C57B59 /* OfficialCharterPassengerTCell.swift */, 13B75D9529F0DCC400C57B59 /* OfficialCharterPassengerTCell.xib */, ); path = View; sourceTree = "<group>"; @@ -3074,6 +3098,7 @@ D94983D22494C9B50057F5D5 /* MineInfoVC.xib in Resources */, F3830812255932620060BA72 /* blank_button@2x.png in Resources */, F3210B2B25864DF500A6B775 /* CarModelsTableViewCell.xib in Resources */, 138987ED29ECDC0E00ED0EAC /* OfficialCharterVC.xib in Resources */, D983827625135C0D00E607EB /* YYTravelInfosView.xib in Resources */, D9119FA8247E4C3E004FD68D /* BindPhoneVC.xib in Resources */, 130B330827BA2E4B001FC50A /* MerchantCouponTCell.xib in Resources */, @@ -3141,6 +3166,7 @@ F36CF5C325359239003EF42A /* TravelAddressCell.xib in Resources */, D9E4E0E824986A340052CA69 /* ScanTravelVC.xib in Resources */, D953BB1E2499C3E2002BA5EF /* MineFeedbackVC.xib in Resources */, 13FFAF9E29E8EE23003089D7 /* ReasonforTravelVC.xib in Resources */, D9119FB3247E60F8004FD68D /* HomeTitleView.xib in Resources */, F34494CD2546663C009891D0 /* TravelChooseEndAddressVC.xib in Resources */, 13CB991427BCFD9F003B3110 /* ThanksDriverView.xib in Resources */, @@ -3164,6 +3190,7 @@ 139F887228446B9100D8C4BA /* InvoiceViewController.xib in Resources */, D9ED9F3924AED36F00B7D753 /* MineWithdrawalRecordCell.xib in Resources */, D927C4672490E270002BB108 /* TravelServicePayVC.xib in Resources */, 138987E929E930D900ED0EAC /* Reason_Content_TCell.xib in Resources */, D94983DE2494D1B00057F5D5 /* MineInfoView.xib in Resources */, D9142F0824C7043F0076DE26 /* YYCostDetailViewController.xib in Resources */, F3830814255932620060BA72 /* blank_button@3x.png in Resources */, @@ -3212,6 +3239,7 @@ D9F44E272519E351004FE9D0 /* YYAlertViewController.xib in Resources */, 1389D7A5283B2000009FE908 /* SearchAddressDragVC.xib in Resources */, 138A1886282A7672004705F5 /* CarDetailCarCommentVC.xib in Resources */, 13B75D9729F0DCC400C57B59 /* OfficialCharterPassengerTCell.xib in Resources */, D953BB4C249A0EC6002BA5EF /* MineSetUpPasswordVC.xib in Resources */, 13330EBA2828E8A6009DC6A3 /* CarSaleListVC.xib in Resources */, D99E2D1324ADBF24005E147E /* AlipaySDK.bundle in Resources */, @@ -3357,8 +3385,10 @@ D9CB224C2500CA3D005E97C2 /* YYCarTypeModel.swift in Sources */, F3830811255932620060BA72 /* FOREmptyAssistantConfiger.m in Sources */, 138A188B282B4A2C004705F5 /* CommentReplyTCell.swift in Sources */, 138987EC29ECDC0D00ED0EAC /* OfficialCharterVC.swift in Sources */, D99BBBC9247510AC0054BD52 /* YYViewModel.swift in Sources */, 138A1876282A5412004705F5 /* CarDetailVC.swift in Sources */, 13B75D9629F0DCC400C57B59 /* OfficialCharterPassengerTCell.swift in Sources */, D99BBBC724750E980054BD52 /* Check.swift in Sources */, 13C9099C2775AECB00DDFBEF /* UIDevice+Extension.swift.swift in Sources */, D9119FAD247E4F78004FD68D /* AgreementView.swift in Sources */, @@ -3532,6 +3562,7 @@ D953BB5A249A235C002BA5EF /* SystemMessageViewModel.swift in Sources */, 1327631427B3C29A0039C712 /* Common_SingleImg_CCell.swift in Sources */, D953BB62249A2995002BA5EF /* PlatformMessageVC.swift in Sources */, 138987E829E930D900ED0EAC /* Reason_Content_TCell.swift in Sources */, F36CF58E25358390003EF42A /* AgreementAlert.swift in Sources */, D92307F9251C96790045EA9D /* YYSpecialCarAppointmentViewController.swift in Sources */, 13134E9627BE29A00084937E /* CouponAtPaymentVC.swift in Sources */, @@ -3701,6 +3732,7 @@ D94664B724930D9000A3F53E /* QueryBalanceModel.swift in Sources */, D982D5AA2474CDD500FB5A09 /* StringExtension.swift in Sources */, 1365117729E409410051C926 /* LinesOfCreditListVC.swift in Sources */, 13FFAF9D29E8EE23003089D7 /* ReasonforTravelVC.swift in Sources */, D953BB4E249A10CD002BA5EF /* MineSetUpPasswordViewModel.swift in Sources */, F3BD2079252DACF50058D0AF /* TravelChooseCarVC.swift in Sources */, F3B4DFFD25962C7B007F3C5E /* PointsDeatilVC.swift in Sources */, OKProject/API/API.swift
@@ -690,7 +690,7 @@ #if DEBUG return URL(string: "http://39.108.171.31:5000/user")! //测试服务器) #else return URL(string: "https://39.108.171.31:5000/user")! return URL(string: "http://39.108.171.31:5000/user")! #endif } OKProject/Assets.xcassets/btn_add.imageset/Contents.json
New file @@ -0,0 +1,22 @@ { "images" : [ { "idiom" : "universal", "scale" : "1x" }, { "filename" : "btn_add@2x.png", "idiom" : "universal", "scale" : "2x" }, { "filename" : "btn_add@3x.png", "idiom" : "universal", "scale" : "3x" } ], "info" : { "author" : "xcode", "version" : 1 } } OKProject/Assets.xcassets/btn_add.imageset/btn_add@2x.png
OKProject/Assets.xcassets/btn_add.imageset/btn_add@3x.png
OKProject/Assets.xcassets/btn_add_circle.imageset/Contents.json
New file @@ -0,0 +1,22 @@ { "images" : [ { "idiom" : "universal", "scale" : "1x" }, { "filename" : "btn_add_circle@2x.png", "idiom" : "universal", "scale" : "2x" }, { "filename" : "btn_add_circle@3x.png", "idiom" : "universal", "scale" : "3x" } ], "info" : { "author" : "xcode", "version" : 1 } } OKProject/Assets.xcassets/btn_add_circle.imageset/btn_add_circle@2x.png
OKProject/Assets.xcassets/btn_add_circle.imageset/btn_add_circle@3x.png
OKProject/Assets.xcassets/btn_delete_cell.imageset/Contents.json
New file @@ -0,0 +1,22 @@ { "images" : [ { "idiom" : "universal", "scale" : "1x" }, { "filename" : "btn_delete_cell@2x.png", "idiom" : "universal", "scale" : "2x" }, { "filename" : "btn_delete_cell@3x.png", "idiom" : "universal", "scale" : "3x" } ], "info" : { "author" : "xcode", "version" : 1 } } OKProject/Assets.xcassets/btn_delete_cell.imageset/btn_delete_cell@2x.png
OKProject/Assets.xcassets/btn_delete_cell.imageset/btn_delete_cell@3x.png
OKProject/Assets.xcassets/icon_delete.imageset/Contents.json
New file @@ -0,0 +1,22 @@ { "images" : [ { "idiom" : "universal", "scale" : "1x" }, { "filename" : "icon_delete@2x.png", "idiom" : "universal", "scale" : "2x" }, { "filename" : "icon_delete@3x.png", "idiom" : "universal", "scale" : "3x" } ], "info" : { "author" : "xcode", "version" : 1 } } OKProject/Assets.xcassets/icon_delete.imageset/icon_delete@2x.png
OKProject/Assets.xcassets/icon_delete.imageset/icon_delete@3x.png
OKProject/Assets.xcassets/icon_end point.imageset/Contents.json
@@ -1,17 +1,16 @@ { "images" : [ { "filename" : "Oval 3.png", "idiom" : "universal", "scale" : "1x" }, { "filename" : "Oval 3@2x.png", "filename" : "icon_end point@2x.png", "idiom" : "universal", "scale" : "2x" }, { "filename" : "Oval 3@3x.png", "filename" : "icon_end point@3x.png", "idiom" : "universal", "scale" : "3x" } OKProject/Assets.xcassets/icon_end point.imageset/Oval 3.pngBinary files differ
OKProject/Assets.xcassets/icon_end point.imageset/Oval 3@2x.pngBinary files differ
OKProject/Assets.xcassets/icon_end point.imageset/Oval 3@3x.pngBinary files differ
OKProject/Assets.xcassets/icon_end point.imageset/icon_end point@2x.png
OKProject/Assets.xcassets/icon_end point.imageset/icon_end point@3x.png
OKProject/Assets.xcassets/icon_more_gray.imageset/Contents.json
New file @@ -0,0 +1,22 @@ { "images" : [ { "idiom" : "universal", "scale" : "1x" }, { "filename" : "icon_more_gray@2x.png", "idiom" : "universal", "scale" : "2x" }, { "filename" : "icon_more_gray@3x.png", "idiom" : "universal", "scale" : "3x" } ], "info" : { "author" : "xcode", "version" : 1 } } OKProject/Assets.xcassets/icon_more_gray.imageset/icon_more_gray@2x.png
OKProject/Assets.xcassets/icon_more_gray.imageset/icon_more_gray@3x.png
OKProject/Assets.xcassets/icon_starting point.imageset/Contents.json
@@ -1,17 +1,16 @@ { "images" : [ { "filename" : "Oval 3.png", "idiom" : "universal", "scale" : "1x" }, { "filename" : "Oval 3@2x.png", "filename" : "icon_starting point@2x.png", "idiom" : "universal", "scale" : "2x" }, { "filename" : "Oval 3@3x.png", "filename" : "icon_starting point@3x.png", "idiom" : "universal", "scale" : "3x" } OKProject/Assets.xcassets/icon_starting point.imageset/Oval 3.pngBinary files differ
OKProject/Assets.xcassets/icon_starting point.imageset/Oval 3@2x.pngBinary files differ
OKProject/Assets.xcassets/icon_starting point.imageset/Oval 3@3x.pngBinary files differ
OKProject/Assets.xcassets/icon_starting point.imageset/icon_starting point@2x.png
OKProject/Assets.xcassets/icon_starting point.imageset/icon_starting point@3x.png
OKProject/Class/Home/Controller/HomeVC.swift
@@ -697,7 +697,21 @@ let vc = TravelVC(orderType: .special) vc.showCar = showCar return vc case "跨城出行","机场专线","景区直通车": case "公务出行": let vc = TravelVC.init(orderType: .business) vc.showCar = showCar vc.officialCharterClouse = { [weak self] in let officialCharterVC = OfficialCharterVC() officialCharterVC.view.frame = CGRect(x: 0, y: ScreenHeight, width: ScreenWidth, height: self?.view.height ?? 0) self?.view.addSubview(officialCharterVC.view) self?.addChild(officialCharterVC) UIView.animate(withDuration: 0.6) { officialCharterVC.view.frame = CGRect(x: 0, y: 0, width: ScreenWidth, height: self?.view.height ?? 0) } } return vc case "机场专线","景区直通车": var vc: TravelCityHomeVC! = magicView.dequeueReusablePage(withIdentifier: String(describing: name)) as? TravelCityHomeVC if vc == nil { vc = TravelCityHomeVC() @@ -709,34 +723,6 @@ } vc.showCar = showCar return vc // case "同城小件物流": // var vc: SmallLogisticsHomeVC! = magicView.dequeueReusablePage(withIdentifier: String(describing: name)) as? SmallLogisticsHomeVC // if vc == nil { // vc = SmallLogisticsHomeVC() // } // vc.showCar = showCar // vc.orderType.accept(.cityLogistics) // return vc // case "跨城小件物流": // var vc: SmallLogisticsHomeVC! = magicView.dequeueReusablePage(withIdentifier: String(describing: name)) as? SmallLogisticsHomeVC // if vc == nil { // vc = SmallLogisticsHomeVC() // } // vc.showCar = showCar // vc.orderType.accept(.acrossLogistics) // return vc // case "包车": // var vc: CharterHomeVC! = magicView.dequeueReusablePage(withIdentifier: String(describing: name)) as? CharterHomeVC // if vc == nil { // vc = CharterHomeVC() // } // return vc // case "助老模式": // var vc:CallByCarVC! = magicView.dequeueReusablePage(withIdentifier: String(name)) as? CallByCarVC // if vc == nil{ // vc = CallByCarVC() // } // return vc default: return UIViewController() } OKProject/Class/Home/Controller/OfficialCharterVC.swift
New file @@ -0,0 +1,81 @@ // // OfficialCharterVC.swift // OKProject // // Created by 无故事王国 on 2023/4/17. // Copyright © 2023 yangwang. All rights reserved. // import UIKit import QMUIKit class OfficialCharterVC: YYViewController { @IBOutlet weak var btn_starttime: QMUIButton! @IBOutlet weak var btn_endtime: QMUIButton! @IBOutlet weak var label_usedtime: UILabel! @IBOutlet weak var label_startaddress: UILabel! @IBOutlet weak var label_endaddress: UILabel! @IBOutlet weak var switch_notice: UISwitch! @IBOutlet weak var btn_addPassenger: QMUIButton! @IBOutlet weak var label_passengerNum: UILabel! @IBOutlet weak var label_contact: UILabel! @IBOutlet weak var label_contactPhone: UILabel! @IBOutlet weak var tableView: UITableView! @IBOutlet weak var tableViewHeiCons: NSLayoutConstraint! var test_num = 1 override func viewDidLoad() { super.viewDidLoad() tableView.delegate = self tableView.dataSource = self tableView.register(UINib(nibName: "OfficialCharterPassengerTCell", bundle: nil), forCellReuseIdentifier: "_OfficialCharterPassengerTCell") } override func setupViews() { super.setupViews() btn_starttime.imagePosition = .right btn_endtime.imagePosition = .right btn_addPassenger.imagePosition = .right btn_addPassenger.spacingBetweenImageAndTitle = 6 btn_starttime.spacingBetweenImageAndTitle = 9 btn_endtime.spacingBetweenImageAndTitle = 9 } @IBAction func singleAction(_ sender: UIButton) { UIView.animate(withDuration: 0.6) { self.view.y = screenH } completion: { _ in self.removeFromParent() } } @IBAction func addPassengerAction(_ sender: UIButton) { test_num += 1 tableView.reloadData {[weak self] in guard let weakSelf = self else { return } weakSelf.tableViewHeiCons.constant = 100.0 * Double(weakSelf.test_num) } } } extension OfficialCharterVC:UITableViewDelegate{ } extension OfficialCharterVC:UITableViewDataSource{ func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { let cell = tableView.dequeueReusableCell(withIdentifier: "_OfficialCharterPassengerTCell") as! OfficialCharterPassengerTCell cell.indexPath = indexPath cell.listener.bind { indexPath in print("--->\(indexPath)") } return cell } func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { return test_num } } OKProject/Class/Home/Controller/OfficialCharterVC.xib
New file @@ -0,0 +1,528 @@ <?xml version="1.0" encoding="UTF-8"?> <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="21678"/> <capability name="Named colors" minToolsVersion="9.0"/> <capability name="Safe area layout guides" minToolsVersion="9.0"/> <capability name="System colors in document resources" minToolsVersion="11.0"/> <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/> </dependencies> <objects> <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="OfficialCharterVC" customModule="OK出行" customModuleProvider="target"> <connections> <outlet property="btn_addPassenger" destination="aYl-jb-HJb" id="YBQ-ff-yXP"/> <outlet property="btn_endtime" destination="oEN-RO-mbq" id="wGA-dr-aL7"/> <outlet property="btn_starttime" destination="WUL-jD-Jy6" id="6HE-00-hke"/> <outlet property="label_contact" destination="m9e-Fj-Y2g" id="YUA-SK-XZY"/> <outlet property="label_contactPhone" destination="ea9-Zg-xbL" id="rh5-Xo-PBB"/> <outlet property="label_endaddress" destination="bgC-Cv-ZBT" id="IC9-dh-gbV"/> <outlet property="label_passengerNum" destination="h5d-86-rIz" id="pyj-SZ-TEm"/> <outlet property="label_startaddress" destination="yjm-bu-np7" id="YBP-Hb-Lbz"/> <outlet property="label_usedtime" destination="Tcq-Zg-GsJ" id="Iia-ZZ-eUp"/> <outlet property="switch_notice" destination="63w-lM-ulF" id="WMy-tc-niZ"/> <outlet property="tableView" destination="WQg-5W-omG" id="3S1-TQ-Nf6"/> <outlet property="tableViewHeiCons" destination="8ic-Iu-QHw" id="KCV-SE-Dh4"/> <outlet property="view" destination="i5M-Pr-FkT" id="sfx-zR-JGt"/> </connections> </placeholder> <placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/> <view clearsContextBeforeDrawing="NO" contentMode="scaleToFill" id="i5M-Pr-FkT"> <rect key="frame" x="0.0" y="0.0" width="393" height="852"/> <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> <subviews> <scrollView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="gFH-Z9-ppp"> <rect key="frame" x="0.0" y="59" width="393" height="759"/> <subviews> <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="UOi-uH-w8O"> <rect key="frame" x="0.0" y="0.0" width="393" height="878"/> <subviews> <stackView opaque="NO" contentMode="scaleToFill" axis="vertical" translatesAutoresizingMaskIntoConstraints="NO" id="Nm4-Gx-uZU"> <rect key="frame" x="0.0" y="0.0" width="393" height="878"/> <subviews> <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="JTA-6s-isv"> <rect key="frame" x="0.0" y="0.0" width="393" height="40"/> <subviews> <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="p0D-fG-iZT"> <rect key="frame" x="21" y="0.0" width="30" height="40"/> <fontDescription key="fontDescription" type="system" weight="medium" pointSize="13"/> <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/> <state key="normal" title="单程"> <color key="titleColor" red="0.31372549019607843" green="0.38823529411764707" blue="0.54117647058823526" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> </state> <connections> <action selector="singleAction:" destination="-1" eventType="touchUpInside" id="TJd-mY-eNE"/> </connections> </button> <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Z8a-4f-Ict"> <rect key="frame" x="92" y="0.0" width="30" height="40"/> <fontDescription key="fontDescription" type="system" weight="medium" pointSize="13"/> <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/> <state key="normal" title="包车"> <color key="titleColor" name="Color"/> </state> </button> </subviews> <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> <constraints> <constraint firstItem="Z8a-4f-Ict" firstAttribute="top" secondItem="JTA-6s-isv" secondAttribute="top" id="EBS-Di-asD"/> <constraint firstAttribute="height" constant="40" id="GYp-In-CWa"/> <constraint firstItem="Z8a-4f-Ict" firstAttribute="leading" secondItem="p0D-fG-iZT" secondAttribute="trailing" constant="41" id="NIa-Zg-Jmj"/> <constraint firstAttribute="bottom" secondItem="p0D-fG-iZT" secondAttribute="bottom" id="Pcc-4M-NeU"/> <constraint firstItem="p0D-fG-iZT" firstAttribute="leading" secondItem="JTA-6s-isv" secondAttribute="leading" constant="21" id="TZg-EE-dUD"/> <constraint firstItem="p0D-fG-iZT" firstAttribute="top" secondItem="JTA-6s-isv" secondAttribute="top" id="Usz-hA-ceM"/> <constraint firstAttribute="bottom" secondItem="Z8a-4f-Ict" secondAttribute="bottom" id="Waw-Vw-fM6"/> </constraints> </view> <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="nFH-Hi-ggZ"> <rect key="frame" x="0.0" y="40" width="393" height="52"/> <subviews> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="选择时间:" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="rvD-tD-FqK"> <rect key="frame" x="14" y="22.666666666666671" width="81.666666666666671" height="19.333333333333329"/> <fontDescription key="fontDescription" type="system" weight="medium" pointSize="16"/> <color key="textColor" red="0.031372549019607843" green="0.16862745098039217" blue="0.29411764705882354" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <nil key="highlightedColor"/> </label> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="(选择时长最短不能低于0.5天)" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="hsF-2H-dbw"> <rect key="frame" x="95.666666666666671" y="25.666666666666668" width="162.66666666666663" height="14.333333333333332"/> <fontDescription key="fontDescription" type="system" weight="medium" pointSize="12"/> <color key="textColor" red="0.31372549019607843" green="0.38823529411764707" blue="0.54117647058823526" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <nil key="highlightedColor"/> </label> </subviews> <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> <constraints> <constraint firstAttribute="height" constant="52" id="ZM7-tH-MQE"/> <constraint firstItem="rvD-tD-FqK" firstAttribute="leading" secondItem="nFH-Hi-ggZ" secondAttribute="leading" constant="14" id="el0-Gi-Vai"/> <constraint firstAttribute="bottom" secondItem="rvD-tD-FqK" secondAttribute="bottom" constant="10" id="gPv-bN-8FO"/> <constraint firstItem="hsF-2H-dbw" firstAttribute="leading" secondItem="rvD-tD-FqK" secondAttribute="trailing" id="nbw-cG-6z3"/> <constraint firstItem="hsF-2H-dbw" firstAttribute="bottom" secondItem="rvD-tD-FqK" secondAttribute="bottom" constant="-2" id="rm0-E7-RLN"/> </constraints> </view> <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="yNE-U3-gRV"> <rect key="frame" x="0.0" y="92" width="393" height="150"/> <subviews> <stackView opaque="NO" contentMode="scaleToFill" axis="vertical" translatesAutoresizingMaskIntoConstraints="NO" id="wnY-4n-nyq"> <rect key="frame" x="0.0" y="0.0" width="393" height="150"/> <subviews> <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Tsj-CI-iht"> <rect key="frame" x="0.0" y="0.0" 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="szC-0d-HO4"> <rect key="frame" x="14" y="16.666666666666657" width="86" height="17"/> <fontDescription key="fontDescription" type="system" weight="medium" pointSize="14"/> <color key="textColor" red="0.31372549019607843" green="0.38823529411764707" blue="0.54117647058823526" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <nil key="highlightedColor"/> </label> <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="WUL-jD-Jy6" customClass="QMUIButton"> <rect key="frame" x="271" y="16.666666666666657" width="108" height="17"/> <fontDescription key="fontDescription" type="system" weight="medium" pointSize="14"/> <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/> <state key="normal" title="请选择用车时间" image="icon_more_gray"> <color key="titleColor" red="0.0" green="0.0" blue="0.0" alpha="0.29999999999999999" colorSpace="custom" customColorSpace="sRGB"/> </state> </button> </subviews> <color key="backgroundColor" systemColor="systemBackgroundColor"/> <constraints> <constraint firstItem="szC-0d-HO4" firstAttribute="centerY" secondItem="Tsj-CI-iht" secondAttribute="centerY" id="75H-J8-614"/> <constraint firstItem="szC-0d-HO4" firstAttribute="leading" secondItem="Tsj-CI-iht" secondAttribute="leading" constant="14" id="Dy7-jH-uXs"/> <constraint firstItem="WUL-jD-Jy6" firstAttribute="centerY" secondItem="Tsj-CI-iht" secondAttribute="centerY" id="ccm-ag-ebu"/> <constraint firstAttribute="trailing" secondItem="WUL-jD-Jy6" secondAttribute="trailing" constant="14" id="dJj-ew-pta"/> <constraint firstAttribute="height" constant="50" id="gVM-QR-Vc2"/> </constraints> </view> <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="NZM-jq-lfp"> <rect key="frame" x="0.0" y="50" 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="Dk5-iR-q4o"> <rect key="frame" x="14" y="16.666666666666657" width="86" height="17"/> <fontDescription key="fontDescription" type="system" weight="medium" pointSize="14"/> <color key="textColor" red="0.31372549020000001" green="0.38823529410000002" blue="0.54117647059999996" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <nil key="highlightedColor"/> </label> <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="oEN-RO-mbq" customClass="QMUIButton"> <rect key="frame" x="271" y="16.666666666666657" width="108" height="17"/> <fontDescription key="fontDescription" type="system" weight="medium" pointSize="14"/> <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/> <state key="normal" title="请选择结束时间" image="icon_more_gray"> <color key="titleColor" red="0.0" green="0.0" blue="0.0" alpha="0.29999999999999999" colorSpace="custom" customColorSpace="sRGB"/> </state> </button> </subviews> <color key="backgroundColor" systemColor="systemBackgroundColor"/> <constraints> <constraint firstAttribute="trailing" secondItem="oEN-RO-mbq" secondAttribute="trailing" constant="14" id="0Po-wK-8Gb"/> <constraint firstItem="Dk5-iR-q4o" firstAttribute="centerY" secondItem="NZM-jq-lfp" secondAttribute="centerY" id="a6z-Gf-lae"/> <constraint firstItem="oEN-RO-mbq" firstAttribute="centerY" secondItem="NZM-jq-lfp" secondAttribute="centerY" id="bI6-OP-xNO"/> <constraint firstItem="Dk5-iR-q4o" firstAttribute="leading" secondItem="NZM-jq-lfp" secondAttribute="leading" constant="14" id="rSW-zm-vaY"/> <constraint firstAttribute="height" constant="50" id="w6B-8h-V4b"/> </constraints> </view> <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Ci7-Tv-lXz"> <rect key="frame" x="0.0" y="100" 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="Gyg-M7-Kdk"> <rect key="frame" x="14.000000000000004" y="16.666666666666686" width="57.333333333333343" height="17"/> <fontDescription key="fontDescription" type="system" weight="medium" pointSize="14"/> <color key="textColor" red="0.31372549020000001" green="0.38823529410000002" blue="0.54117647059999996" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <nil key="highlightedColor"/> </label> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="0天" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Tcq-Zg-GsJ"> <rect key="frame" x="355.66666666666669" y="16.666666666666686" width="23.333333333333314" height="17"/> <fontDescription key="fontDescription" type="system" weight="medium" pointSize="14"/> <color key="textColor" name="Color-1"/> <nil key="highlightedColor"/> </label> </subviews> <color key="backgroundColor" systemColor="systemBackgroundColor"/> <constraints> <constraint firstItem="Tcq-Zg-GsJ" firstAttribute="centerY" secondItem="Ci7-Tv-lXz" secondAttribute="centerY" id="178-CA-1qo"/> <constraint firstAttribute="height" constant="50" id="Cb5-6c-e1V"/> <constraint firstAttribute="trailing" secondItem="Tcq-Zg-GsJ" secondAttribute="trailing" constant="14" id="NPM-DW-T38"/> <constraint firstItem="Gyg-M7-Kdk" firstAttribute="centerY" secondItem="Ci7-Tv-lXz" secondAttribute="centerY" id="WwR-Bz-TNk"/> <constraint firstItem="Gyg-M7-Kdk" firstAttribute="leading" secondItem="Ci7-Tv-lXz" secondAttribute="leading" constant="14" id="dHM-HF-vFF"/> </constraints> </view> </subviews> </stackView> </subviews> <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> <constraints> <constraint firstAttribute="trailing" secondItem="wnY-4n-nyq" secondAttribute="trailing" id="DNk-nn-Crs"/> <constraint firstAttribute="bottom" secondItem="wnY-4n-nyq" secondAttribute="bottom" id="NyP-Kf-bhC"/> <constraint firstItem="wnY-4n-nyq" firstAttribute="top" secondItem="yNE-U3-gRV" secondAttribute="top" id="k6r-sx-3On"/> <constraint firstItem="wnY-4n-nyq" firstAttribute="leading" secondItem="yNE-U3-gRV" secondAttribute="leading" id="pCW-Jg-Rr3"/> </constraints> </view> <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="NCD-Wa-eqM"> <rect key="frame" x="0.0" y="242" width="393" height="52"/> <subviews> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="选择地址:" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="9J1-Rg-Jut"> <rect key="frame" x="14" y="22.666666666666686" width="81.666666666666671" height="19.333333333333329"/> <fontDescription key="fontDescription" type="system" weight="medium" pointSize="16"/> <color key="textColor" red="0.031372549020000001" green="0.16862745100000001" blue="0.29411764709999999" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <nil key="highlightedColor"/> </label> </subviews> <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> <constraints> <constraint firstAttribute="height" constant="52" id="0tC-Fl-qal"/> <constraint firstAttribute="bottom" secondItem="9J1-Rg-Jut" secondAttribute="bottom" constant="10" id="Hc5-X0-RYg"/> <constraint firstItem="9J1-Rg-Jut" firstAttribute="leading" secondItem="NCD-Wa-eqM" secondAttribute="leading" constant="14" id="b5z-fl-NH6"/> </constraints> </view> <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="UEl-Ik-TPL"> <rect key="frame" x="0.0" y="294" width="393" height="101"/> <subviews> <stackView opaque="NO" contentMode="scaleToFill" axis="vertical" translatesAutoresizingMaskIntoConstraints="NO" id="G09-cE-z2s"> <rect key="frame" x="0.0" y="0.0" width="393" height="101"/> <subviews> <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="11D-eD-flN"> <rect key="frame" x="0.0" y="0.0" width="393" height="51"/> <subviews> <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="icon_starting point" translatesAutoresizingMaskIntoConstraints="NO" id="zYe-Or-0zd"> <rect key="frame" x="3" y="18.666666666666686" width="14" height="14"/> <constraints> <constraint firstAttribute="height" constant="14" id="CJN-nF-Nzz"/> <constraint firstAttribute="width" constant="14" id="EN4-1B-csQ"/> </constraints> </imageView> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="--" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="yjm-bu-np7"> <rect key="frame" x="21" y="17" width="368" height="17"/> <fontDescription key="fontDescription" type="system" weight="medium" pointSize="14"/> <color key="textColor" red="0.031372549019607843" green="0.16862745098039217" blue="0.29411764705882354" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <nil key="highlightedColor"/> </label> <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="eR3-ZQ-Ama"> <rect key="frame" x="21" y="50.333333333333314" width="365" height="0.6666666666666643"/> <color key="backgroundColor" red="0.15294117647058825" green="0.15686274509803921" blue="0.1764705882352941" alpha="0.059999999999999998" colorSpace="custom" customColorSpace="sRGB"/> <constraints> <constraint firstAttribute="height" constant="0.59999999999999998" id="oad-7a-edd"/> </constraints> </view> </subviews> <color key="backgroundColor" systemColor="systemBackgroundColor"/> <constraints> <constraint firstItem="eR3-ZQ-Ama" firstAttribute="leading" secondItem="11D-eD-flN" secondAttribute="leading" constant="21" id="57B-rN-Fjy"/> <constraint firstItem="yjm-bu-np7" firstAttribute="leading" secondItem="zYe-Or-0zd" secondAttribute="trailing" constant="4" id="9XK-be-TjE"/> <constraint firstAttribute="trailing" secondItem="eR3-ZQ-Ama" secondAttribute="trailing" constant="7" id="Cre-EL-cdC"/> <constraint firstAttribute="bottom" secondItem="eR3-ZQ-Ama" secondAttribute="bottom" id="DAz-Ff-Ups"/> <constraint firstAttribute="trailing" secondItem="yjm-bu-np7" secondAttribute="trailing" constant="4" id="GgU-nf-itZ"/> <constraint firstItem="zYe-Or-0zd" firstAttribute="leading" secondItem="11D-eD-flN" secondAttribute="leading" constant="3" id="M92-4a-Jue"/> <constraint firstItem="zYe-Or-0zd" firstAttribute="centerY" secondItem="11D-eD-flN" secondAttribute="centerY" id="OhR-py-kqo"/> <constraint firstAttribute="height" constant="51" id="s5F-A2-aLt"/> <constraint firstItem="yjm-bu-np7" firstAttribute="centerY" secondItem="zYe-Or-0zd" secondAttribute="centerY" id="yDK-FE-8CX"/> </constraints> </view> <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="0aW-Il-Xgv"> <rect key="frame" x="0.0" y="51" width="393" height="50"/> <subviews> <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="icon_end point" translatesAutoresizingMaskIntoConstraints="NO" id="Ee6-dl-vEt"> <rect key="frame" x="3" y="18" width="14" height="14"/> <constraints> <constraint firstAttribute="height" constant="14" id="bcJ-I2-Nn2"/> <constraint firstAttribute="width" constant="14" id="euJ-Bm-9Og"/> </constraints> </imageView> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="--" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="bgC-Cv-ZBT"> <rect key="frame" x="21" y="16.666666666666686" width="368" height="17"/> <fontDescription key="fontDescription" type="system" weight="medium" pointSize="14"/> <color key="textColor" red="0.031372549020000001" green="0.16862745100000001" blue="0.29411764709999999" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <nil key="highlightedColor"/> </label> </subviews> <color key="backgroundColor" systemColor="systemBackgroundColor"/> <constraints> <constraint firstItem="bgC-Cv-ZBT" firstAttribute="leading" secondItem="Ee6-dl-vEt" secondAttribute="trailing" constant="4" id="CZz-OU-t39"/> <constraint firstItem="Ee6-dl-vEt" firstAttribute="leading" secondItem="0aW-Il-Xgv" secondAttribute="leading" constant="3" id="Cch-RZ-feO"/> <constraint firstItem="Ee6-dl-vEt" firstAttribute="centerY" secondItem="0aW-Il-Xgv" secondAttribute="centerY" id="KzH-bN-kQT"/> <constraint firstAttribute="height" constant="50" id="SMt-U0-xkt"/> <constraint firstItem="bgC-Cv-ZBT" firstAttribute="centerY" secondItem="Ee6-dl-vEt" secondAttribute="centerY" id="aTC-Bw-Um5"/> <constraint firstAttribute="trailing" secondItem="bgC-Cv-ZBT" secondAttribute="trailing" constant="4" id="pKZ-Np-1Uj"/> </constraints> </view> </subviews> </stackView> </subviews> <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> <constraints> <constraint firstItem="G09-cE-z2s" firstAttribute="leading" secondItem="UEl-Ik-TPL" secondAttribute="leading" id="NjQ-Zx-jNE"/> <constraint firstAttribute="trailing" secondItem="G09-cE-z2s" secondAttribute="trailing" id="jj4-W8-Ovp"/> <constraint firstAttribute="bottom" secondItem="G09-cE-z2s" secondAttribute="bottom" id="rqz-K1-5Rs"/> <constraint firstItem="G09-cE-z2s" firstAttribute="top" secondItem="UEl-Ik-TPL" secondAttribute="top" id="wfC-8F-qpT"/> </constraints> </view> <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="aaW-qo-CbK"> <rect key="frame" x="0.0" y="395" width="393" height="92"/> <subviews> <switch opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="750" verticalHuggingPriority="750" contentHorizontalAlignment="center" contentVerticalAlignment="center" on="YES" translatesAutoresizingMaskIntoConstraints="NO" id="63w-lM-ulF"> <rect key="frame" x="332" y="16.666666666666686" width="51" height="31"/> </switch> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="是否需要提醒乘车人?" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="sR9-vq-v5x"> <rect key="frame" x="204.33333333333334" y="24.999999999999996" width="122.66666666666666" height="14.333333333333332"/> <fontDescription key="fontDescription" type="system" weight="medium" pointSize="12"/> <color key="textColor" red="0.031372549019607843" green="0.16862745098039217" blue="0.29411764705882354" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <nil key="highlightedColor"/> </label> <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="aYl-jb-HJb" customClass="QMUIButton"> <rect key="frame" x="299" y="60" width="82" height="20"/> <fontDescription key="fontDescription" type="system" weight="medium" pointSize="12"/> <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/> <state key="normal" title="新增乘车人" image="btn_add_circle"> <color key="titleColor" name="Color"/> </state> <connections> <action selector="addPassengerAction:" destination="-1" eventType="touchUpInside" id="L0S-wC-Dv2"/> </connections> </button> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="乘车人信息:" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="FVc-Jb-sZd"> <rect key="frame" x="14" y="62.666666666666636" width="98" height="19.333333333333336"/> <fontDescription key="fontDescription" type="system" weight="medium" pointSize="16"/> <nil key="textColor"/> <nil key="highlightedColor"/> </label> </subviews> <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> <constraints> <constraint firstItem="63w-lM-ulF" firstAttribute="leading" secondItem="sR9-vq-v5x" secondAttribute="trailing" constant="5" id="04R-Lb-9gK"/> <constraint firstItem="sR9-vq-v5x" firstAttribute="top" secondItem="aaW-qo-CbK" secondAttribute="top" constant="25" id="0kZ-Bq-mlL"/> <constraint firstAttribute="trailing" secondItem="aYl-jb-HJb" secondAttribute="trailing" constant="12" id="5Dt-vr-Q3D"/> <constraint firstItem="FVc-Jb-sZd" firstAttribute="leading" secondItem="aaW-qo-CbK" secondAttribute="leading" constant="14" id="AXr-F9-6RD"/> <constraint firstAttribute="bottom" secondItem="aYl-jb-HJb" secondAttribute="bottom" constant="12" id="IfJ-tN-R2s"/> <constraint firstAttribute="bottom" secondItem="FVc-Jb-sZd" secondAttribute="bottom" constant="10" id="mdV-dd-cru"/> <constraint firstAttribute="height" constant="92" id="wKs-Jr-qiB"/> <constraint firstAttribute="trailing" secondItem="63w-lM-ulF" secondAttribute="trailing" constant="12" id="xBt-UW-tp0"/> <constraint firstItem="63w-lM-ulF" firstAttribute="centerY" secondItem="sR9-vq-v5x" secondAttribute="centerY" id="xeN-Ko-xfC"/> </constraints> </view> <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="iiP-yj-aFz"> <rect key="frame" x="0.0" y="487" 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="Bu6-yO-14L"> <rect key="frame" x="14.000000000000004" y="16.666666666666629" width="57.333333333333343" height="17"/> <fontDescription key="fontDescription" type="system" weight="medium" pointSize="14"/> <color key="textColor" red="0.31372549019607843" green="0.38823529411764707" blue="0.54117647058823526" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <nil key="highlightedColor"/> </label> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="0" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="h5d-86-rIz"> <rect key="frame" x="372" y="16.666666666666629" width="9" height="17"/> <fontDescription key="fontDescription" type="system" weight="medium" pointSize="14"/> <color key="textColor" red="0.31372549020000001" green="0.38823529410000002" blue="0.54117647059999996" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <nil key="highlightedColor"/> </label> <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="uAl-72-xkO"> <rect key="frame" x="14" y="49.333333333333371" 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="PAr-OP-loa"/> </constraints> </view> </subviews> <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> <constraints> <constraint firstItem="Bu6-yO-14L" firstAttribute="centerY" secondItem="iiP-yj-aFz" secondAttribute="centerY" id="NN4-KE-ile"/> <constraint firstAttribute="height" constant="50" id="U3V-Kj-HMD"/> <constraint firstAttribute="bottom" secondItem="uAl-72-xkO" secondAttribute="bottom" id="aK8-us-fpB"/> <constraint firstAttribute="trailing" secondItem="h5d-86-rIz" secondAttribute="trailing" constant="12" id="c6i-6f-Cf0"/> <constraint firstItem="Bu6-yO-14L" firstAttribute="leading" secondItem="iiP-yj-aFz" secondAttribute="leading" constant="14" id="d1s-2t-krt"/> <constraint firstAttribute="trailing" secondItem="uAl-72-xkO" secondAttribute="trailing" constant="14" id="vHv-oK-AOK"/> <constraint firstItem="uAl-72-xkO" firstAttribute="leading" secondItem="iiP-yj-aFz" secondAttribute="leading" constant="14" id="vOp-pm-Hb1"/> <constraint firstItem="h5d-86-rIz" firstAttribute="centerY" secondItem="Bu6-yO-14L" secondAttribute="centerY" id="xbD-8V-Fxh"/> </constraints> </view> <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="M56-rH-hch"> <rect key="frame" x="0.0" y="537" 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="hMh-eL-UlR"> <rect key="frame" x="14" y="16.666666666666629" width="43" height="17"/> <fontDescription key="fontDescription" type="system" weight="medium" pointSize="14"/> <color key="textColor" red="0.31372549019607843" green="0.38823529411764707" blue="0.54117647058823526" alpha="1" 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="m9e-Fj-Y2g"> <rect key="frame" x="367.66666666666669" y="16.666666666666629" width="13.333333333333314" height="17"/> <fontDescription key="fontDescription" type="system" weight="medium" pointSize="14"/> <color key="textColor" red="0.31372549020000001" green="0.38823529410000002" blue="0.54117647059999996" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <nil key="highlightedColor"/> </label> </subviews> <color key="backgroundColor" systemColor="systemBackgroundColor"/> <constraints> <constraint firstAttribute="trailing" secondItem="m9e-Fj-Y2g" secondAttribute="trailing" constant="12" id="EaS-VA-FTM"/> <constraint firstItem="hMh-eL-UlR" firstAttribute="centerY" secondItem="M56-rH-hch" secondAttribute="centerY" id="Sux-Cp-67Q"/> <constraint firstItem="hMh-eL-UlR" firstAttribute="leading" secondItem="M56-rH-hch" secondAttribute="leading" constant="14" id="a9Q-0a-HWZ"/> <constraint firstItem="m9e-Fj-Y2g" firstAttribute="centerY" secondItem="hMh-eL-UlR" secondAttribute="centerY" id="aEj-0Z-Zse"/> <constraint firstAttribute="height" constant="50" id="dl0-2s-tol"/> </constraints> </view> <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Lgj-pw-1Fh"> <rect key="frame" x="0.0" y="587" 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="nZj-iT-KzX"> <rect key="frame" x="14.000000000000004" y="16.666666666666629" width="57.333333333333343" height="17"/> <fontDescription key="fontDescription" type="system" weight="medium" pointSize="14"/> <color key="textColor" red="0.31372549020000001" green="0.38823529410000002" blue="0.54117647059999996" alpha="1" 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="ea9-Zg-xbL"> <rect key="frame" x="367.66666666666669" y="16.666666666666629" width="13.333333333333314" height="17"/> <fontDescription key="fontDescription" type="system" weight="medium" pointSize="14"/> <color key="textColor" red="0.31372549020000001" green="0.38823529410000002" blue="0.54117647059999996" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <nil key="highlightedColor"/> </label> </subviews> <color key="backgroundColor" systemColor="systemBackgroundColor"/> <constraints> <constraint firstAttribute="trailing" secondItem="ea9-Zg-xbL" secondAttribute="trailing" constant="12" id="Ds0-2C-Ko8"/> <constraint firstItem="ea9-Zg-xbL" firstAttribute="centerY" secondItem="nZj-iT-KzX" secondAttribute="centerY" id="Rbu-eJ-0jO"/> <constraint firstItem="nZj-iT-KzX" firstAttribute="leading" secondItem="Lgj-pw-1Fh" secondAttribute="leading" constant="14" id="VkH-Gh-5Rv"/> <constraint firstAttribute="height" constant="50" id="pqZ-kL-uMG"/> <constraint firstItem="nZj-iT-KzX" firstAttribute="centerY" secondItem="Lgj-pw-1Fh" secondAttribute="centerY" id="qFK-vI-cMC"/> </constraints> </view> <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="fss-T2-1HC"> <rect key="frame" x="0.0" y="637" width="393" height="6"/> <color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.059999999999999998" colorSpace="custom" customColorSpace="sRGB"/> <constraints> <constraint firstAttribute="height" constant="6" id="Hd9-El-xZj"/> </constraints> </view> <tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" scrollEnabled="NO" showsHorizontalScrollIndicator="NO" showsVerticalScrollIndicator="NO" style="plain" separatorStyle="default" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="-1" estimatedSectionHeaderHeight="-1" sectionFooterHeight="-1" estimatedSectionFooterHeight="-1" translatesAutoresizingMaskIntoConstraints="NO" id="WQg-5W-omG"> <rect key="frame" x="0.0" y="643" width="393" height="100"/> <color key="backgroundColor" systemColor="systemBackgroundColor"/> <constraints> <constraint firstAttribute="height" constant="100" id="8ic-Iu-QHw"/> </constraints> </tableView> <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="VaR-Xb-oJA"> <rect key="frame" x="0.0" y="743" width="393" height="135"/> <subviews> <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="9Ab-PU-Cys"> <rect key="frame" x="14" y="80" width="365" height="40"/> <color key="backgroundColor" name="Color"/> <constraints> <constraint firstAttribute="height" constant="40" id="3do-QJ-mJU"/> </constraints> <fontDescription key="fontDescription" type="system" weight="medium" pointSize="14"/> <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/> <state key="normal" title="提交"/> <userDefinedRuntimeAttributes> <userDefinedRuntimeAttribute type="number" keyPath="cornerRadius"> <real key="value" value="4"/> </userDefinedRuntimeAttribute> </userDefinedRuntimeAttributes> </button> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="包车调度电话:--" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="AFH-Ri-HOt"> <rect key="frame" x="140" y="20" width="113" height="17"/> <fontDescription key="fontDescription" type="system" weight="medium" pointSize="14"/> <color key="textColor" red="0.031372549019607843" green="0.16862745098039217" blue="0.29411764705882354" alpha="1" 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="fJ3-UE-bQR"> <rect key="frame" x="61" y="41" width="271.33333333333331" height="17"/> <fontDescription key="fontDescription" type="system" weight="semibold" pointSize="14"/> <color key="textColor" red="0.031372549020000001" green="0.16862745100000001" blue="0.29411764709999999" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <nil key="highlightedColor"/> </label> </subviews> <color key="backgroundColor" systemColor="systemBackgroundColor"/> <constraints> <constraint firstAttribute="trailing" secondItem="9Ab-PU-Cys" secondAttribute="trailing" constant="14" id="Auh-Tk-CeR"/> <constraint firstItem="fJ3-UE-bQR" firstAttribute="top" secondItem="AFH-Ri-HOt" secondAttribute="bottom" constant="4" id="HWn-dp-8nM"/> <constraint firstAttribute="height" constant="135" id="Rl0-jQ-2Bf"/> <constraint firstItem="9Ab-PU-Cys" firstAttribute="leading" secondItem="VaR-Xb-oJA" secondAttribute="leading" constant="14" id="dPS-mQ-QL1"/> <constraint firstItem="AFH-Ri-HOt" firstAttribute="top" secondItem="VaR-Xb-oJA" secondAttribute="top" constant="20" id="fjx-va-DkU"/> <constraint firstAttribute="bottom" secondItem="9Ab-PU-Cys" secondAttribute="bottom" constant="15" id="l5X-FS-ASm"/> <constraint firstItem="fJ3-UE-bQR" firstAttribute="centerX" secondItem="VaR-Xb-oJA" secondAttribute="centerX" id="muS-Fw-v74"/> <constraint firstItem="AFH-Ri-HOt" firstAttribute="centerX" secondItem="VaR-Xb-oJA" secondAttribute="centerX" id="rGO-iX-wAU"/> </constraints> </view> </subviews> </stackView> </subviews> <constraints> <constraint firstItem="Nm4-Gx-uZU" firstAttribute="top" secondItem="UOi-uH-w8O" secondAttribute="top" id="2jA-w4-GCn"/> <constraint firstAttribute="bottom" secondItem="Nm4-Gx-uZU" secondAttribute="bottom" id="KJO-Dw-yUe"/> <constraint firstAttribute="trailing" secondItem="Nm4-Gx-uZU" secondAttribute="trailing" id="lhg-uX-4eo"/> <constraint firstItem="Nm4-Gx-uZU" firstAttribute="leading" secondItem="UOi-uH-w8O" secondAttribute="leading" id="p7I-Nc-TOl"/> </constraints> </view> </subviews> <constraints> <constraint firstAttribute="trailing" secondItem="UOi-uH-w8O" secondAttribute="trailing" id="Evg-zr-fEK"/> <constraint firstItem="UOi-uH-w8O" firstAttribute="leading" secondItem="gFH-Z9-ppp" secondAttribute="leading" id="TeN-TW-ZTx"/> <constraint firstItem="UOi-uH-w8O" firstAttribute="top" secondItem="gFH-Z9-ppp" secondAttribute="top" id="c7I-q5-DwA"/> <constraint firstAttribute="bottom" secondItem="UOi-uH-w8O" secondAttribute="bottom" id="prg-QX-fnv"/> <constraint firstItem="UOi-uH-w8O" firstAttribute="centerX" secondItem="gFH-Z9-ppp" secondAttribute="centerX" id="sv2-Rf-AKz"/> </constraints> </scrollView> </subviews> <viewLayoutGuide key="safeArea" id="fnl-2z-Ty3"/> <color key="backgroundColor" systemColor="systemBackgroundColor"/> <constraints> <constraint firstItem="fnl-2z-Ty3" firstAttribute="bottom" secondItem="gFH-Z9-ppp" secondAttribute="bottom" id="3oQ-yc-KMk"/> <constraint firstItem="gFH-Z9-ppp" firstAttribute="top" secondItem="fnl-2z-Ty3" secondAttribute="top" id="FKI-E9-FLA"/> <constraint firstItem="gFH-Z9-ppp" firstAttribute="leading" secondItem="fnl-2z-Ty3" secondAttribute="leading" id="Xmj-SF-YNy"/> <constraint firstItem="fnl-2z-Ty3" firstAttribute="trailing" secondItem="gFH-Z9-ppp" secondAttribute="trailing" id="gMn-ll-W7p"/> </constraints> <point key="canvasLocation" x="136.64122137404578" y="20.422535211267608"/> </view> </objects> <resources> <image name="btn_add_circle" width="20" height="20"/> <image name="icon_end point" width="14" height="14"/> <image name="icon_more_gray" width="8" height="13"/> <image name="icon_starting point" width="14" height="14"/> <namedColor name="Color"> <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"/> </namedColor> <systemColor name="systemBackgroundColor"> <color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> </systemColor> </resources> </document> OKProject/Class/Home/Controller/ReasonforTravelVC.swift
New file @@ -0,0 +1,174 @@ // // ReasonforTravelVC.swift // OKProject // // Created by 无故事王国 on 2023/4/14. // Copyright © 2023 yangwang. All rights reserved. // import UIKit import QMUIKit class ReasonforTravelVC: YYViewController { class PassengerInfo{ var name = "" var phone:String? convenience init(name:String,phone:String? = nil){ self.init() self.name = name self.phone = phone } } @IBOutlet weak var scrollButtomCons: NSLayoutConstraint! @IBOutlet weak var tableView: UITableView! @IBOutlet weak var tableViewHeiCons: NSLayoutConstraint! @IBOutlet weak var collectViewHeiCons: NSLayoutConstraint! @IBOutlet weak var collectionView: UICollectionView! @IBOutlet weak var btn_cost: QMUIButton! @IBOutlet weak var btn_companyCost: QMUIButton! @IBOutlet weak var textView: QMUITextView! @IBOutlet weak var label_limit: UILabel! @IBOutlet weak var tf_passenger: UITextField! @IBOutlet weak var tf_passengerPhone: UITextField! @IBOutlet weak var view_addPassenger: UIView! var passengers = [PassengerInfo]() var selectIndex = 0 override func viewDidLoad() { super.viewDidLoad() btn_cost.spacingBetweenImageAndTitle = 7 btn_companyCost.spacingBetweenImageAndTitle = 7 tableView.delegate = self tableView.dataSource = self tableView.separatorStyle = .none tableView.register(UINib(nibName: "Reason_Content_TCell", bundle: nil), forCellReuseIdentifier: "_Reason_Content_TCell") collectionView.delegate = self collectionView.dataSource = self collectionView.contentInset = UIEdgeInsets(top: 0, left: 20, bottom: 0, right: 20) collectionView.register(UINib(nibName: "Common_SingleText_CCell", bundle: nil), forCellWithReuseIdentifier: "_Common_SingleText_CCell") scrollButtomCons.constant = app.window?.safeAreaInsets.bottom ?? 0 let h = ceil(8 / 4.0) * 30.0 + floor(8 / 4.0) * 10.0 collectViewHeiCons.constant = h passengers.append(PassengerInfo(name: "杨锴", phone: "18111223301")) tableViewHeiCons.constant = 40 * Double(passengers.count) } override func bindRx() { super.bindRx() textView.rx.text.changed.subscribe(onNext: {text in self.label_limit.text = "\(text?.count ?? 0)/50" }).disposed(by: disposeBag) } @IBAction func paymentTypeAction(_ sender: UIButton) { btn_cost.isSelected = btn_cost.tag == sender.tag btn_companyCost.isSelected = btn_companyCost.tag == sender.tag } @IBAction func addPassengerAction(_ sender: UIButton) { guard !tf_passenger.isEmpty else { alert(text: "请输入或选择出行人");return } guard !tf_passengerPhone.isEmpty else { alert(text: "请输入或选择出行人的电话号码");return } guard passengers.filter({$0.name == tf_passenger.text && $0.phone == tf_passengerPhone.text}).count == 0 else { alert(text: "重复出行人");return } passengers.append(PassengerInfo(name: tf_passenger.text!, phone: tf_passengerPhone.text!)) tableViewHeiCons.constant = 40 * Double(passengers.count) tableView.reloadData() view_addPassenger.isHidden = passengers.count >= 4 } @IBAction func closeAction(_ sender: Any) { self.removeViewAndControllerFromParentViewController() } } extension ReasonforTravelVC:UITableViewDelegate{ } extension ReasonforTravelVC:UITableViewDataSource{ func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { let cell = tableView.dequeueReusableCell(withIdentifier: "_Reason_Content_TCell") as! Reason_Content_TCell cell.index = indexPath cell.label_name.text = passengers[indexPath.row].name cell.tf_phone.text = passengers[indexPath.row].phone cell.tf_phone.rx.text.changed.subscribe(onNext: { [weak self] text in self?.passengers[indexPath.row].phone = text }).disposed(by: disposeBag) cell.deleteComplete { [weak self] index in guard let weakSelf = self else { return } weakSelf.passengers.remove(at: index.row) weakSelf.tableView.reloadData() weakSelf.view_addPassenger.isHidden = weakSelf.passengers.count >= 4 } return cell } func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { return passengers.count } func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat { return 40 } } extension ReasonforTravelVC:UICollectionViewDelegate{ func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) { selectIndex = indexPath.row collectionView.reloadData() } } extension ReasonforTravelVC:UICollectionViewDataSource{ func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell { let cell = collectionView.dequeueReusableCell(withReuseIdentifier: "_Common_SingleText_CCell", for: indexPath) as! Common_SingleText_CCell cell.titleL.text = "测试" cell.titleL.borderWidth = 1 cell.titleL.cornerRadius = 2 cell.titleL.backgroundColor = .white cell.titleL.font = UIFont.systemFont(ofSize: 12, weight: .medium) if selectIndex == indexPath.row{ cell.titleL.borderColor = UIColor(hexString: "#FF884D")! cell.titleL.textColor = UIColor(hexString: "#FF884D")! }else{ cell.titleL.borderColor = UIColor(hexString: "#90A1B1")! cell.titleL.textColor = UIColor(hexString: "#90A1B1")! } return cell } func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int { return 8 } } extension ReasonforTravelVC:UICollectionViewDelegateFlowLayout{ func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, minimumLineSpacingForSectionAt section: Int) -> CGFloat { return 10 } func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, minimumInteritemSpacingForSectionAt section: Int) -> CGFloat { return 10 } func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, sizeForItemAt indexPath: IndexPath) -> CGSize { return CGSizeMake(70, 30) } } OKProject/Class/Home/Controller/ReasonforTravelVC.xib
New file @@ -0,0 +1,345 @@ <?xml version="1.0" encoding="UTF-8"?> <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="21678"/> <capability name="Named colors" minToolsVersion="9.0"/> <capability name="System colors in document resources" minToolsVersion="11.0"/> <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/> </dependencies> <objects> <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="ReasonforTravelVC" customModule="OK出行" customModuleProvider="target"> <connections> <outlet property="btn_companyCost" destination="9Nw-Sf-DWr" id="FJJ-Bx-mZX"/> <outlet property="btn_cost" destination="oO8-VV-ZQe" id="S7u-fv-Dth"/> <outlet property="collectViewHeiCons" destination="e7F-uA-FOt" id="cyW-GN-Wvk"/> <outlet property="collectionView" destination="APN-Uk-xlb" id="sBV-eq-qNs"/> <outlet property="label_limit" destination="XFP-vx-uY8" id="Cfd-Sg-Ypm"/> <outlet property="scrollButtomCons" destination="AXO-WC-gpl" id="fAF-aV-ev4"/> <outlet property="tableView" destination="Ypo-vh-eFs" id="QqV-93-68s"/> <outlet property="tableViewHeiCons" destination="YVm-v0-FlQ" id="BYg-tT-Eic"/> <outlet property="textView" destination="0eF-nL-Bg3" id="I5P-f6-cCx"/> <outlet property="tf_passenger" destination="vjs-Ix-YHU" id="j8n-Lv-mOg"/> <outlet property="tf_passengerPhone" destination="SzE-pN-Tgb" id="NLG-7A-vgG"/> <outlet property="view" destination="i5M-Pr-FkT" id="sfx-zR-JGt"/> <outlet property="view_addPassenger" destination="cC2-x4-ivw" id="fve-a3-kPF"/> </connections> </placeholder> <placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/> <view clearsContextBeforeDrawing="NO" contentMode="scaleToFill" id="i5M-Pr-FkT"> <rect key="frame" x="0.0" y="0.0" width="414" height="896"/> <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> <subviews> <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="btb-wc-XlG"> <rect key="frame" x="0.0" y="0.0" width="414" height="896"/> <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/> <connections> <action selector="closeAction:" destination="-1" eventType="touchUpInside" id="7FE-lO-NzO"/> </connections> </button> <scrollView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" showsHorizontalScrollIndicator="NO" showsVerticalScrollIndicator="NO" translatesAutoresizingMaskIntoConstraints="NO" id="tSy-Vf-mxg"> <rect key="frame" x="10" y="362" width="394" height="534"/> <subviews> <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="qyb-rN-fg8"> <rect key="frame" x="0.0" y="0.0" width="394" height="577"/> <subviews> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="出行人数 1" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="nTg-hg-GYI"> <rect key="frame" x="20" y="20" width="77" height="22"/> <constraints> <constraint firstAttribute="height" constant="22" id="Jew-H3-JaR"/> </constraints> <fontDescription key="fontDescription" type="system" weight="semibold" pointSize="16"/> <nil key="textColor"/> <nil key="highlightedColor"/> </label> <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="Ypo-vh-eFs"> <rect key="frame" x="0.0" y="52" width="394" height="100"/> <color key="backgroundColor" systemColor="systemBackgroundColor"/> <constraints> <constraint firstAttribute="height" constant="100" id="YVm-v0-FlQ"/> </constraints> </tableView> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="选择出行事由" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="L47-P9-vRr"> <rect key="frame" x="20" y="196" width="98" height="22"/> <constraints> <constraint firstAttribute="height" constant="22" id="MWR-LI-3DK"/> </constraints> <fontDescription key="fontDescription" type="system" weight="semibold" pointSize="16"/> <nil key="textColor"/> <nil key="highlightedColor"/> </label> <collectionView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" dataMode="none" translatesAutoresizingMaskIntoConstraints="NO" id="APN-Uk-xlb"> <rect key="frame" x="0.0" y="228" width="394" height="50"/> <color key="backgroundColor" systemColor="systemBackgroundColor"/> <constraints> <constraint firstAttribute="height" constant="50" id="e7F-uA-FOt"/> </constraints> <collectionViewFlowLayout key="collectionViewLayout" minimumLineSpacing="10" minimumInteritemSpacing="10" id="EhF-3m-ZqJ"> <size key="itemSize" width="128" height="128"/> <size key="headerReferenceSize" width="0.0" height="0.0"/> <size key="footerReferenceSize" width="0.0" height="0.0"/> <inset key="sectionInset" minX="0.0" minY="0.0" maxX="0.0" maxY="0.0"/> </collectionViewFlowLayout> </collectionView> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="付费方式" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="ay2-8d-Dr9"> <rect key="frame" x="20" y="287" width="65.5" height="22"/> <constraints> <constraint firstAttribute="height" constant="22" id="TUC-sa-xGE"/> </constraints> <fontDescription key="fontDescription" type="system" weight="semibold" pointSize="16"/> <nil key="textColor"/> <nil key="highlightedColor"/> </label> <button opaque="NO" tag="10" contentMode="scaleToFill" selected="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="oO8-VV-ZQe" customClass="QMUIButton"> <rect key="frame" x="25" y="321" width="53" height="20"/> <constraints> <constraint firstAttribute="height" constant="20" id="HOO-MW-7Rt"/> </constraints> <fontDescription key="fontDescription" type="system" pointSize="16"/> <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/> <state key="normal" title="自费" image="icon_raidobutton"> <color key="titleColor" red="0.031372549020000001" green="0.16862745100000001" blue="0.29411764709999999" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> </state> <state key="selected" image="icon_raidobutton_selected"/> <connections> <action selector="paymentTypeAction:" destination="-1" eventType="touchUpInside" id="AaL-5U-7i6"/> </connections> </button> <button opaque="NO" tag="11" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="9Nw-Sf-DWr" customClass="QMUIButton"> <rect key="frame" x="112" y="321" width="86" height="20"/> <fontDescription key="fontDescription" type="system" pointSize="16"/> <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/> <state key="normal" title="企业支付" image="icon_raidobutton"> <color key="titleColor" red="0.031372549020000001" green="0.16862745100000001" blue="0.29411764709999999" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> </state> <state key="selected" image="icon_raidobutton_selected"/> <connections> <action selector="paymentTypeAction:" destination="-1" eventType="touchUpInside" id="yw8-eV-jB4"/> </connections> </button> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="具体内容" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="1SA-8r-eba"> <rect key="frame" x="20" y="360" width="65.5" height="22"/> <constraints> <constraint firstAttribute="height" constant="22" id="QqD-Dw-YDP"/> </constraints> <fontDescription key="fontDescription" type="system" weight="semibold" pointSize="16"/> <nil key="textColor"/> <nil key="highlightedColor"/> </label> <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="goG-hx-hQV"> <rect key="frame" x="20" y="392" width="354" height="115"/> <subviews> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="0/50" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="XFP-vx-uY8"> <rect key="frame" x="315" y="90.5" width="34" height="19.5"/> <fontDescription key="fontDescription" type="system" pointSize="16"/> <color key="textColor" red="0.56470588239999997" green="0.63137254899999995" blue="0.69411764710000001" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <nil key="highlightedColor"/> </label> <textView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" textAlignment="natural" translatesAutoresizingMaskIntoConstraints="NO" id="0eF-nL-Bg3" customClass="QMUITextView"> <rect key="frame" x="10" y="10" width="334" height="75.5"/> <color key="backgroundColor" systemColor="systemBackgroundColor"/> <color key="textColor" systemColor="labelColor"/> <fontDescription key="fontDescription" type="system" pointSize="14"/> <textInputTraits key="textInputTraits" autocapitalizationType="sentences"/> <userDefinedRuntimeAttributes> <userDefinedRuntimeAttribute type="string" keyPath="placeholder" value="在这儿输入详细描述"/> <userDefinedRuntimeAttribute type="color" keyPath="placeholderColor"> <color key="value" red="0.67450980392156867" green="0.70980392156862748" blue="0.73725490196078436" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> </userDefinedRuntimeAttribute> <userDefinedRuntimeAttribute type="number" keyPath="maximumTextLength"> <integer key="value" value="50"/> </userDefinedRuntimeAttribute> </userDefinedRuntimeAttributes> </textView> </subviews> <color key="backgroundColor" systemColor="systemBackgroundColor"/> <constraints> <constraint firstAttribute="trailing" secondItem="0eF-nL-Bg3" secondAttribute="trailing" constant="10" id="0cl-Y9-xmD"/> <constraint firstAttribute="bottom" secondItem="XFP-vx-uY8" secondAttribute="bottom" constant="5" id="1qZ-6l-uHL"/> <constraint firstItem="0eF-nL-Bg3" firstAttribute="leading" secondItem="goG-hx-hQV" secondAttribute="leading" constant="10" id="81Z-kK-qnV"/> <constraint firstAttribute="trailing" secondItem="XFP-vx-uY8" secondAttribute="trailing" constant="5" id="L2M-HV-NaM"/> <constraint firstAttribute="height" constant="115" id="Ubp-yx-08Q"/> <constraint firstItem="XFP-vx-uY8" firstAttribute="top" secondItem="0eF-nL-Bg3" secondAttribute="bottom" constant="5" id="hGT-m5-vRD"/> <constraint firstItem="0eF-nL-Bg3" firstAttribute="top" secondItem="goG-hx-hQV" secondAttribute="top" constant="10" id="lY0-vq-QjC"/> </constraints> <userDefinedRuntimeAttributes> <userDefinedRuntimeAttribute type="number" keyPath="borderWidth"> <real key="value" value="1"/> </userDefinedRuntimeAttribute> <userDefinedRuntimeAttribute type="color" keyPath="borderColor"> <color key="value" red="0.56470588235294117" green="0.63137254901960782" blue="0.69411764705882351" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> </userDefinedRuntimeAttribute> <userDefinedRuntimeAttribute type="number" keyPath="cornerRadius"> <real key="value" value="4"/> </userDefinedRuntimeAttribute> </userDefinedRuntimeAttributes> </view> <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Kun-1m-eaf"> <rect key="frame" x="41" y="517" width="312" height="40"/> <color key="backgroundColor" name="Color"/> <constraints> <constraint firstAttribute="height" constant="40" id="5fv-9G-0ju"/> </constraints> <fontDescription key="fontDescription" type="system" weight="medium" pointSize="15"/> <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/> <state key="normal" title="确认"/> <userDefinedRuntimeAttributes> <userDefinedRuntimeAttribute type="number" keyPath="cornerRadius"> <real key="value" value="4"/> </userDefinedRuntimeAttribute> </userDefinedRuntimeAttributes> </button> <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="cC2-x4-ivw"> <rect key="frame" x="0.0" y="157" width="394" height="30"/> <subviews> <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="8L8-qr-k5L"> <rect key="frame" x="102" y="0.0" width="234" height="30"/> <subviews> <textField opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="248" contentHorizontalAlignment="left" contentVerticalAlignment="center" placeholder="请输入电话号码" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="SzE-pN-Tgb" customClass="QMUITextField"> <rect key="frame" x="22" y="0.0" width="212" height="30"/> <fontDescription key="fontDescription" type="system" pointSize="14"/> <textInputTraits key="textInputTraits" keyboardType="numberPad"/> <userDefinedRuntimeAttributes> <userDefinedRuntimeAttribute type="number" keyPath="maximumTextLength"> <integer key="value" value="11"/> </userDefinedRuntimeAttribute> </userDefinedRuntimeAttributes> </textField> </subviews> <color key="backgroundColor" systemColor="systemBackgroundColor"/> <constraints> <constraint firstAttribute="trailing" secondItem="SzE-pN-Tgb" secondAttribute="trailing" id="1Y8-Pe-FbZ"/> <constraint firstAttribute="bottom" secondItem="SzE-pN-Tgb" secondAttribute="bottom" id="Gkf-po-QoB"/> <constraint firstItem="SzE-pN-Tgb" firstAttribute="leading" secondItem="8L8-qr-k5L" secondAttribute="leading" constant="22" id="cWR-sp-8t9"/> <constraint firstItem="SzE-pN-Tgb" firstAttribute="top" secondItem="8L8-qr-k5L" secondAttribute="top" id="sPW-td-N2l"/> </constraints> <userDefinedRuntimeAttributes> <userDefinedRuntimeAttribute type="number" keyPath="cornerRadius"> <real key="value" value="4"/> </userDefinedRuntimeAttribute> <userDefinedRuntimeAttribute type="color" keyPath="borderColor"> <color key="value" red="0.67450980390000004" green="0.70980392160000005" blue="0.73725490199999999" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> </userDefinedRuntimeAttribute> <userDefinedRuntimeAttribute type="number" keyPath="borderWidth"> <real key="value" value="1"/> </userDefinedRuntimeAttribute> </userDefinedRuntimeAttributes> </view> <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="4Os-jc-NZE"> <rect key="frame" x="358" y="4" width="16" height="22"/> <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/> <state key="normal" image="btn_add"/> <connections> <action selector="addPassengerAction:" destination="-1" eventType="touchUpInside" id="Stl-7i-2TZ"/> </connections> </button> <textField opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="248" contentHorizontalAlignment="left" contentVerticalAlignment="center" placeholder="添加" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="vjs-Ix-YHU"> <rect key="frame" x="20" y="0.0" width="65" height="30"/> <constraints> <constraint firstAttribute="width" constant="65" id="NxI-Tv-din"/> </constraints> <fontDescription key="fontDescription" type="system" weight="medium" pointSize="14"/> <textInputTraits key="textInputTraits"/> </textField> <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="icon_arrow_down" translatesAutoresizingMaskIntoConstraints="NO" id="Rbp-vA-dXj"> <rect key="frame" x="85" y="12" width="10" height="6"/> </imageView> </subviews> <color key="backgroundColor" systemColor="systemBackgroundColor"/> <constraints> <constraint firstItem="Rbp-vA-dXj" firstAttribute="centerY" secondItem="vjs-Ix-YHU" secondAttribute="centerY" id="3Ud-WM-Rsc"/> <constraint firstItem="Rbp-vA-dXj" firstAttribute="leading" secondItem="vjs-Ix-YHU" secondAttribute="trailing" id="47q-Lu-U4N"/> <constraint firstItem="vjs-Ix-YHU" firstAttribute="top" secondItem="cC2-x4-ivw" secondAttribute="top" id="B3h-7H-8O8"/> <constraint firstAttribute="trailing" secondItem="8L8-qr-k5L" secondAttribute="trailing" constant="58" id="Mlq-4h-aGE"/> <constraint firstAttribute="bottom" secondItem="vjs-Ix-YHU" secondAttribute="bottom" id="RmP-9b-YbL"/> <constraint firstItem="4Os-jc-NZE" firstAttribute="centerY" secondItem="cC2-x4-ivw" secondAttribute="centerY" id="UK2-XF-02z"/> <constraint firstAttribute="bottom" secondItem="8L8-qr-k5L" secondAttribute="bottom" id="a5y-LA-EZy"/> <constraint firstAttribute="height" constant="30" id="aqc-NA-tQU"/> <constraint firstItem="8L8-qr-k5L" firstAttribute="leading" secondItem="cC2-x4-ivw" secondAttribute="leading" constant="102" id="eje-1z-MNT"/> <constraint firstItem="8L8-qr-k5L" firstAttribute="top" secondItem="cC2-x4-ivw" secondAttribute="top" id="esJ-My-LLI"/> <constraint firstItem="vjs-Ix-YHU" firstAttribute="leading" secondItem="cC2-x4-ivw" secondAttribute="leading" constant="20" id="i3c-3C-unt"/> <constraint firstAttribute="trailing" secondItem="4Os-jc-NZE" secondAttribute="trailing" constant="20" id="qGh-H7-sZP"/> </constraints> </view> </subviews> <color key="backgroundColor" systemColor="systemBackgroundColor"/> <constraints> <constraint firstItem="9Nw-Sf-DWr" firstAttribute="leading" secondItem="oO8-VV-ZQe" secondAttribute="trailing" constant="34" id="0rT-DI-a9X"/> <constraint firstItem="L47-P9-vRr" firstAttribute="top" secondItem="cC2-x4-ivw" secondAttribute="bottom" constant="9" id="50U-5D-9WI"/> <constraint firstAttribute="bottom" secondItem="Kun-1m-eaf" secondAttribute="bottom" constant="20" id="8xn-7l-SnR"/> <constraint firstAttribute="trailing" secondItem="Kun-1m-eaf" secondAttribute="trailing" constant="41" id="9Tz-2h-EHr"/> <constraint firstItem="nTg-hg-GYI" firstAttribute="top" secondItem="qyb-rN-fg8" secondAttribute="top" constant="20" id="Gxv-Ad-ABM"/> <constraint firstItem="APN-Uk-xlb" firstAttribute="leading" secondItem="qyb-rN-fg8" secondAttribute="leading" id="Ieb-Bi-JJw"/> <constraint firstItem="oO8-VV-ZQe" firstAttribute="leading" secondItem="qyb-rN-fg8" secondAttribute="leading" constant="25" id="JHg-lj-wjv"/> <constraint firstItem="1SA-8r-eba" firstAttribute="leading" secondItem="qyb-rN-fg8" secondAttribute="leading" constant="20" id="MJJ-qV-CoC"/> <constraint firstItem="oO8-VV-ZQe" firstAttribute="top" secondItem="ay2-8d-Dr9" secondAttribute="bottom" constant="12" id="Pfb-fH-vtK"/> <constraint firstItem="goG-hx-hQV" firstAttribute="top" secondItem="1SA-8r-eba" secondAttribute="bottom" constant="10" id="SYl-jn-avl"/> <constraint firstAttribute="trailing" secondItem="cC2-x4-ivw" secondAttribute="trailing" id="bNm-Ua-ikr"/> <constraint firstItem="ay2-8d-Dr9" firstAttribute="leading" secondItem="qyb-rN-fg8" secondAttribute="leading" constant="20" id="cvx-D1-XzB"/> <constraint firstItem="ay2-8d-Dr9" firstAttribute="top" secondItem="APN-Uk-xlb" secondAttribute="bottom" constant="9" id="dZW-2o-rgS"/> <constraint firstItem="Ypo-vh-eFs" firstAttribute="leading" secondItem="qyb-rN-fg8" secondAttribute="leading" id="e2e-kF-lUm"/> <constraint firstItem="Kun-1m-eaf" firstAttribute="top" secondItem="goG-hx-hQV" secondAttribute="bottom" constant="10" id="e8O-ad-3W5"/> <constraint firstItem="nTg-hg-GYI" firstAttribute="leading" secondItem="qyb-rN-fg8" secondAttribute="leading" constant="20" id="eNt-SY-NdY"/> <constraint firstItem="L47-P9-vRr" firstAttribute="leading" secondItem="qyb-rN-fg8" secondAttribute="leading" constant="20" id="eUT-sU-YyS"/> <constraint firstItem="9Nw-Sf-DWr" firstAttribute="centerY" secondItem="oO8-VV-ZQe" secondAttribute="centerY" id="ead-WD-SwM"/> <constraint firstItem="cC2-x4-ivw" firstAttribute="top" secondItem="Ypo-vh-eFs" secondAttribute="bottom" constant="5" id="hRj-eW-zzg"/> <constraint firstItem="1SA-8r-eba" firstAttribute="top" secondItem="oO8-VV-ZQe" secondAttribute="bottom" constant="19" id="hcO-ub-xGq"/> <constraint firstItem="goG-hx-hQV" firstAttribute="leading" secondItem="qyb-rN-fg8" secondAttribute="leading" constant="20" id="hzs-1p-X0h"/> <constraint firstItem="Kun-1m-eaf" firstAttribute="leading" secondItem="qyb-rN-fg8" secondAttribute="leading" constant="41" id="sZi-lz-eKK"/> <constraint firstItem="cC2-x4-ivw" firstAttribute="leading" secondItem="qyb-rN-fg8" secondAttribute="leading" id="tBF-BP-IjX"/> <constraint firstItem="APN-Uk-xlb" firstAttribute="top" secondItem="L47-P9-vRr" secondAttribute="bottom" constant="10" id="vYw-JD-7Y2"/> <constraint firstAttribute="trailing" secondItem="goG-hx-hQV" secondAttribute="trailing" constant="20" id="wxl-op-2Uf"/> <constraint firstItem="Ypo-vh-eFs" firstAttribute="top" secondItem="nTg-hg-GYI" secondAttribute="bottom" constant="10" id="xpo-Fn-bbp"/> <constraint firstAttribute="trailing" secondItem="APN-Uk-xlb" secondAttribute="trailing" id="xvL-QN-UGd"/> <constraint firstAttribute="trailing" secondItem="Ypo-vh-eFs" secondAttribute="trailing" id="z1B-6N-Rev"/> </constraints> <userDefinedRuntimeAttributes> <userDefinedRuntimeAttribute type="number" keyPath="cornerRadius"> <real key="value" value="6"/> </userDefinedRuntimeAttribute> </userDefinedRuntimeAttributes> </view> </subviews> <constraints> <constraint firstItem="qyb-rN-fg8" firstAttribute="centerX" secondItem="tSy-Vf-mxg" secondAttribute="centerX" id="7ND-7N-09o"/> <constraint firstAttribute="trailing" secondItem="qyb-rN-fg8" secondAttribute="trailing" id="7ls-1Y-ou3"/> <constraint firstAttribute="bottom" secondItem="qyb-rN-fg8" secondAttribute="bottom" id="AXO-WC-gpl"/> <constraint firstItem="qyb-rN-fg8" firstAttribute="leading" secondItem="tSy-Vf-mxg" secondAttribute="leading" id="Ivi-kT-Fk7"/> <constraint firstAttribute="height" constant="534" id="g8v-H0-9D6"/> <constraint firstItem="qyb-rN-fg8" firstAttribute="top" secondItem="tSy-Vf-mxg" secondAttribute="top" id="xWw-cC-LvJ"/> </constraints> <userDefinedRuntimeAttributes> <userDefinedRuntimeAttribute type="boolean" keyPath="maskToBounds" value="NO"/> </userDefinedRuntimeAttributes> </scrollView> </subviews> <color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.5" colorSpace="custom" customColorSpace="sRGB"/> <constraints> <constraint firstItem="btb-wc-XlG" firstAttribute="leading" secondItem="i5M-Pr-FkT" secondAttribute="leading" id="2Oo-bK-QB7"/> <constraint firstItem="tSy-Vf-mxg" firstAttribute="leading" secondItem="i5M-Pr-FkT" secondAttribute="leading" constant="10" id="LFO-ko-XEz"/> <constraint firstAttribute="trailing" secondItem="tSy-Vf-mxg" secondAttribute="trailing" constant="10" id="e6l-Zb-HME"/> <constraint firstAttribute="bottom" secondItem="btb-wc-XlG" secondAttribute="bottom" id="egI-Lg-Q1V"/> <constraint firstItem="btb-wc-XlG" firstAttribute="top" secondItem="i5M-Pr-FkT" secondAttribute="top" id="hgL-tm-Lwd"/> <constraint firstAttribute="trailing" secondItem="btb-wc-XlG" secondAttribute="trailing" id="keS-HH-OXj"/> <constraint firstItem="tSy-Vf-mxg" firstAttribute="bottom" secondItem="btb-wc-XlG" secondAttribute="bottom" id="q6i-Hq-ksh"/> </constraints> <point key="canvasLocation" x="78.260869565217391" y="20.758928571428569"/> </view> </objects> <resources> <image name="btn_add" width="16" height="16"/> <image name="icon_arrow_down" width="10" height="6"/> <image name="icon_raidobutton" width="20" height="20"/> <image name="icon_raidobutton_selected" width="20" height="20"/> <namedColor name="Color"> <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"/> </systemColor> <systemColor name="systemBackgroundColor"> <color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> </systemColor> </resources> </document> OKProject/Class/Home/Controller/TravelVC.swift
@@ -25,6 +25,9 @@ case acrossLogistics = 5 /// 包车 case charter = 6 //公务用车 case business = 8 func parame() -> Int { switch self { @@ -38,6 +41,8 @@ return 5 case .charter: return 6 case .business: return 8 default: return 1 } @@ -55,6 +60,8 @@ return .acrossLogistics case 6: return .charter case 8: return .business default: return .special } @@ -92,9 +99,11 @@ /// 开始滑动之前的偏移量 private var beforeOffsetY = screenH - navH - 168 - yy_bottomH - 30 /// 附近车辆 private var view_carNum = CarNumView.instance() var officialCharterClouse:(()->Void)? lazy var label_desc: UILabel = { let label = UILabel() @@ -132,6 +141,8 @@ YYMapViewManager.share.orderType.accept(viewModel.orderType.value) cell.setupView() cell.bindRx() //74067 【特惠购卡】需根据返回的状态,是否显示 购卡模块、 我的商家中心模块 buyCardHeight = showCar == true ? 42:0 cell.buyCardBtn.isHidden = !showCar @@ -226,10 +237,42 @@ }) return } if self.viewModel.orderType.value == .business{ let view = TaxiReservationView() view.show(intervalMinute:20) view.complete.delegate(on: self) { (self, timeStamp) in if timeStamp == nil{ YYMapViewManager.share.timeStamp.accept(nil) cell.button_date.setTitle("现在", for: .normal) }else{ YYMapViewManager.share.timeStamp.accept(timeStamp) cell.button_date.setTitle(timeStamp!.toFormat(format: "M月d日 HH:mm"), for: .normal) } } } } // 时间 cell.passenger.delegate(on: self) { (self, _) in //公务车出行事由 if self.viewModel.orderType.value == .business{ let vc = ReasonforTravelVC() vc.view.backgroundColor = UIColor.black.withAlphaComponent(0) vc.view.frame = CGRect(x: 0, y: screenH, width: ScreenWidth, height: ScreenHeight) self.navigationController?.addChild(vc) self.navigationController?.view.addSubview(vc.view) UIView.animate(withDuration: 0.5) { vc.view.frame = app.window?.frame ?? .zero vc.view.backgroundColor = UIColor.black.withAlphaComponent(0.5) } completion: { _ in } return } let view = TaxiReservationView() view.show(intervalMinute:20) view.complete.delegate(on: self) { (self, timeStamp) in @@ -248,6 +291,19 @@ // 添加小费 cell.tip.delegate(on: self) { (self, _) in //公务车计费方式 if self.viewModel.orderType.value == .business{ MineInfoView.instance(data: ["单程计费","包车计费"]).show { (row) in if row == 0{ }else{ self.officialCharterClouse?() let vc = OfficialCharterVC() } } return } let view = TipView.instance() view.show() view.complete.delegate(on: self) { (self, string) in @@ -332,6 +388,10 @@ init(orderType: OrderType) { super.init(nibName: nil, bundle: nil) viewModel.orderType.accept(orderType) if orderType == .business{ YYMapViewManager.share.state.accept(.appointment) } } required init?(coder: NSCoder) { @@ -385,11 +445,6 @@ super.viewWillAppear(animated) setupMapView() viewModel.queryServingOrder() // if self.viewModel.orderType.value == .taxi{ // self.cell_address.button_passenger.setTitle("更换乘车人", for: .normal) // }else{ // self.cell_address.button_passenger.setTitle("选乘车人", for: .normal) // } } //MARK: - UI @@ -495,12 +550,10 @@ let vc = YYSpecialCarViewController.init(orderId: self.viewModel.orderId.value) self.yy_push(vc: vc) break case .cityLogistics: break case .acrossLogistics: break case .charter: break case .business: let vc = TravelServiceVC.init(orderId: self.viewModel.orderId.value, orderType: self.viewModel.orderType.value) self.yy_push(vc: vc) default:break } break @@ -532,14 +585,11 @@ let vc = YYSpecialCarViewController.init(orderId: self.viewModel.currentOrderId.value,isCarpool: isCarpool) self.yy_push(vc: vc) case .business: break case .travel: break case .cityLogistics: break case .acrossLogistics: break case .charter: break default:break } } @@ -560,6 +610,12 @@ }else{ self.offset = 0 } if viewModel.orderType.value == .business{ self.cellHeight = 280 } self.tableView.contentInset.top = self.OffsetY self.tableView.reloadSections(IndexSet.init(integer: 0), with: .automatic) self.tableView.layoutIfNeeded() OKProject/Class/Home/View/OfficialCharterPassengerTCell.swift
New file @@ -0,0 +1,28 @@ // // OfficialCharterPassengerTCell.swift // OKProject // // Created by 无故事王国 on 2023/4/20. // Copyright © 2023 yangwang. All rights reserved. // import UIKit import QMUIKit class OfficialCharterPassengerTCell: UITableViewCell { @IBOutlet weak var tf_contact: UITextField! @IBOutlet weak var tf_contactPhone: QMUITextField! var indexPath:IndexPath! var listener = Box<IndexPath>(nil) override func awakeFromNib() { super.awakeFromNib() } @IBAction func deleAction(_ sender: UIButton) { listener.value = indexPath } } OKProject/Class/Home/View/OfficialCharterPassengerTCell.xib
New file @@ -0,0 +1,117 @@ <?xml version="1.0" encoding="UTF-8"?> <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="21678"/> <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"/> </dependencies> <objects> <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/> <placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/> <tableViewCell contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" reuseIdentifier="_OfficialCharterPassengerTCell" rowHeight="105" id="KGk-i7-Jjw" customClass="OfficialCharterPassengerTCell" customModule="OK出行" customModuleProvider="target"> <rect key="frame" x="0.0" y="0.0" width="510" height="105"/> <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/> <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="KGk-i7-Jjw" id="H2p-sc-9uM"> <rect key="frame" x="0.0" y="0.0" width="510" height="105"/> <autoresizingMask key="autoresizingMask"/> <subviews> <stackView opaque="NO" contentMode="scaleToFill" axis="vertical" translatesAutoresizingMaskIntoConstraints="NO" id="Is1-T4-MQ4"> <rect key="frame" x="0.0" y="0.0" width="510" height="100"/> <subviews> <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="aYi-QL-I0A"> <rect key="frame" x="0.0" y="0.0" width="510" 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="niR-jy-dfq"> <rect key="frame" x="14" y="16.666666666666668" width="43" height="17.000000000000004"/> <fontDescription key="fontDescription" type="system" weight="medium" pointSize="14"/> <color key="textColor" red="0.31372549019607843" green="0.38823529411764707" blue="0.54117647058823526" alpha="0.80000000000000004" colorSpace="custom" customColorSpace="sRGB"/> <nil key="highlightedColor"/> </label> <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="W9z-wn-1Ra"> <rect key="frame" x="477" y="13.666666666666664" width="22" height="23"/> <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/> <state key="normal" image="btn_delete_cell"/> <connections> <action selector="deleAction:" destination="KGk-i7-Jjw" eventType="touchUpInside" id="EsD-Qo-7XE"/> </connections> </button> <textField opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="248" contentHorizontalAlignment="left" contentVerticalAlignment="center" placeholder="请输入联系人" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="LS3-UE-GoH"> <rect key="frame" x="153" y="0.0" width="314" height="50"/> <fontDescription key="fontDescription" type="system" weight="medium" pointSize="14"/> <textInputTraits key="textInputTraits"/> </textField> </subviews> <color key="backgroundColor" systemColor="systemBackgroundColor"/> <constraints> <constraint firstAttribute="height" constant="50" id="Gqv-1J-lMN"/> <constraint firstItem="LS3-UE-GoH" firstAttribute="leading" secondItem="aYi-QL-I0A" secondAttribute="leading" constant="153" id="Mvi-ND-5lW"/> <constraint firstAttribute="bottom" secondItem="LS3-UE-GoH" secondAttribute="bottom" id="TDz-kp-F3m"/> <constraint firstItem="W9z-wn-1Ra" firstAttribute="leading" secondItem="LS3-UE-GoH" secondAttribute="trailing" constant="10" id="TSq-qo-K0z"/> <constraint firstAttribute="trailing" secondItem="W9z-wn-1Ra" secondAttribute="trailing" constant="11" id="V3D-qV-eq5"/> <constraint firstItem="niR-jy-dfq" firstAttribute="leading" secondItem="aYi-QL-I0A" secondAttribute="leading" constant="14" id="Xzw-97-ja0"/> <constraint firstItem="W9z-wn-1Ra" firstAttribute="centerY" secondItem="niR-jy-dfq" secondAttribute="centerY" id="cAe-Lv-hfM"/> <constraint firstItem="LS3-UE-GoH" firstAttribute="top" secondItem="aYi-QL-I0A" secondAttribute="top" id="wda-8i-OGi"/> <constraint firstItem="niR-jy-dfq" firstAttribute="centerY" secondItem="aYi-QL-I0A" secondAttribute="centerY" id="wjw-uC-Ppa"/> </constraints> </view> <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="kJv-cb-GEc"> <rect key="frame" x="0.0" y="50" width="510" 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="pcn-uH-V4r"> <rect key="frame" x="14.000000000000004" y="16.666666666666671" width="57.333333333333343" height="17"/> <fontDescription key="fontDescription" type="system" weight="medium" pointSize="14"/> <color key="textColor" red="0.31372549020000001" green="0.38823529410000002" blue="0.54117647059999996" alpha="0.80000000000000004" colorSpace="custom" customColorSpace="sRGB"/> <nil key="highlightedColor"/> </label> <textField opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="248" contentHorizontalAlignment="left" contentVerticalAlignment="center" placeholder="请输入联系电话" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="RTG-OZ-79Y" customClass="QMUITextField"> <rect key="frame" x="153" y="0.0" width="347" height="50"/> <fontDescription key="fontDescription" type="system" weight="medium" pointSize="14"/> <textInputTraits key="textInputTraits" keyboardType="numberPad"/> <userDefinedRuntimeAttributes> <userDefinedRuntimeAttribute type="number" keyPath="maximumTextLength"> <integer key="value" value="11"/> </userDefinedRuntimeAttribute> </userDefinedRuntimeAttributes> </textField> </subviews> <color key="backgroundColor" systemColor="systemBackgroundColor"/> <constraints> <constraint firstAttribute="height" constant="50" id="FML-s3-2UR"/> <constraint firstAttribute="trailing" secondItem="RTG-OZ-79Y" secondAttribute="trailing" constant="10" id="OwR-HN-ejy"/> <constraint firstItem="pcn-uH-V4r" firstAttribute="centerY" secondItem="kJv-cb-GEc" secondAttribute="centerY" id="QmG-6V-HHg"/> <constraint firstItem="RTG-OZ-79Y" firstAttribute="leading" secondItem="kJv-cb-GEc" secondAttribute="leading" constant="153" id="aer-Cd-lJv"/> <constraint firstItem="RTG-OZ-79Y" firstAttribute="top" secondItem="kJv-cb-GEc" secondAttribute="top" id="dwn-MN-NbF"/> <constraint firstItem="pcn-uH-V4r" firstAttribute="leading" secondItem="kJv-cb-GEc" secondAttribute="leading" constant="14" id="hYV-0q-C05"/> <constraint firstAttribute="bottom" secondItem="RTG-OZ-79Y" secondAttribute="bottom" id="qHR-Vx-sVS"/> <constraint firstItem="RTG-OZ-79Y" firstAttribute="centerY" secondItem="kJv-cb-GEc" secondAttribute="centerY" id="sbD-jA-OIs"/> </constraints> </view> </subviews> <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> </stackView> </subviews> <constraints> <constraint firstAttribute="bottom" secondItem="Is1-T4-MQ4" secondAttribute="bottom" priority="750" id="7yL-H0-PH4"/> <constraint firstItem="Is1-T4-MQ4" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" id="823-CS-tEy"/> <constraint firstAttribute="trailing" secondItem="Is1-T4-MQ4" secondAttribute="trailing" id="Dkb-mA-0M1"/> <constraint firstItem="Is1-T4-MQ4" firstAttribute="top" secondItem="H2p-sc-9uM" secondAttribute="top" id="bTa-N6-u1h"/> </constraints> </tableViewCellContentView> <viewLayoutGuide key="safeArea" id="njF-e1-oar"/> <connections> <outlet property="tf_contact" destination="LS3-UE-GoH" id="1NX-qE-RGs"/> <outlet property="tf_contactPhone" destination="RTG-OZ-79Y" id="hJI-2H-Fm3"/> </connections> <point key="canvasLocation" x="222.90076335877862" y="41.197183098591552"/> </tableViewCell> </objects> <resources> <image name="btn_delete_cell" width="22" height="23"/> <systemColor name="systemBackgroundColor"> <color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> </systemColor> </resources> </document> OKProject/Class/Home/View/Reason_Content_TCell.swift
New file @@ -0,0 +1,31 @@ // // Reason_Content_TCell.swift // OKProject // // Created by 无故事王国 on 2023/4/14. // Copyright © 2023 yangwang. All rights reserved. // import UIKit import QMUIKit class Reason_Content_TCell: UITableViewCell { @IBOutlet weak var label_name: UILabel! @IBOutlet weak var tf_phone: QMUITextField! var index:IndexPath! var clouse:((IndexPath)->Void)? override func awakeFromNib() { super.awakeFromNib() selectionStyle = .none } @IBAction func deleteAction(_ sender: UIButton) { clouse?(index) } func deleteComplete(_ clouse:@escaping (IndexPath)->Void){ self.clouse = clouse } } OKProject/Class/Home/View/Reason_Content_TCell.xib
New file @@ -0,0 +1,100 @@ <?xml version="1.0" encoding="UTF-8"?> <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="21678"/> <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"/> </dependencies> <objects> <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/> <placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/> <tableViewCell contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" reuseIdentifier="_Reason_Content_TCell" rowHeight="44" id="KGk-i7-Jjw" customClass="Reason_Content_TCell" customModule="OK出行" customModuleProvider="target"> <rect key="frame" x="0.0" y="0.0" width="416" height="44"/> <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/> <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="KGk-i7-Jjw" id="H2p-sc-9uM"> <rect key="frame" x="0.0" y="0.0" width="416" height="44"/> <autoresizingMask key="autoresizingMask"/> <subviews> <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="dor-aF-bsf"> <rect key="frame" x="102" y="5" width="256" height="34"/> <subviews> <textField opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="248" contentHorizontalAlignment="left" contentVerticalAlignment="center" placeholder="电话号码" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="wzT-Yj-6VN" customClass="QMUITextField"> <rect key="frame" x="22" y="0.0" width="234" height="34"/> <fontDescription key="fontDescription" type="system" weight="medium" pointSize="14"/> <textInputTraits key="textInputTraits" keyboardType="numberPad"/> <userDefinedRuntimeAttributes> <userDefinedRuntimeAttribute type="number" keyPath="maximumTextLength"> <integer key="value" value="11"/> </userDefinedRuntimeAttribute> </userDefinedRuntimeAttributes> </textField> </subviews> <color key="backgroundColor" systemColor="systemBackgroundColor"/> <constraints> <constraint firstAttribute="bottom" secondItem="wzT-Yj-6VN" secondAttribute="bottom" id="Pv0-Hp-1Vd"/> <constraint firstAttribute="trailing" secondItem="wzT-Yj-6VN" secondAttribute="trailing" id="aho-mo-pdA"/> <constraint firstItem="wzT-Yj-6VN" firstAttribute="top" secondItem="dor-aF-bsf" secondAttribute="top" id="dkw-aN-G1j"/> <constraint firstItem="wzT-Yj-6VN" firstAttribute="leading" secondItem="dor-aF-bsf" secondAttribute="leading" constant="22" id="pxt-ma-voz"/> </constraints> <userDefinedRuntimeAttributes> <userDefinedRuntimeAttribute type="boolean" keyPath="maskToBounds" value="YES"/> <userDefinedRuntimeAttribute type="number" keyPath="cornerRadius"> <real key="value" value="4"/> </userDefinedRuntimeAttribute> <userDefinedRuntimeAttribute type="number" keyPath="borderWidth"> <real key="value" value="1"/> </userDefinedRuntimeAttribute> <userDefinedRuntimeAttribute type="color" keyPath="borderColor"> <color key="value" red="0.67450980392156867" green="0.70980392156862748" blue="0.73725490196078436" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> </userDefinedRuntimeAttribute> </userDefinedRuntimeAttributes> </view> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="nRL-CF-GJN"> <rect key="frame" x="20" y="13.666666666666664" width="72" height="17"/> <fontDescription key="fontDescription" type="system" weight="medium" pointSize="14"/> <color key="textColor" red="0.31372549019607843" green="0.38823529411764707" blue="0.54117647058823526" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <nil key="highlightedColor"/> </label> <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="oly-Lw-XJB"> <rect key="frame" x="378" y="13" width="18" height="18"/> <constraints> <constraint firstAttribute="width" constant="18" id="Ssi-ow-5mw"/> <constraint firstAttribute="height" constant="18" id="Ve1-kf-e0r"/> </constraints> <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/> <state key="normal" image="icon_delete"/> <connections> <action selector="deleteAction:" destination="KGk-i7-Jjw" eventType="touchUpInside" id="hzT-wz-rIB"/> </connections> </button> </subviews> <constraints> <constraint firstItem="nRL-CF-GJN" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" constant="20" id="KZB-mg-V5X"/> <constraint firstAttribute="trailing" secondItem="oly-Lw-XJB" secondAttribute="trailing" constant="20" id="N5x-CB-kqQ"/> <constraint firstItem="dor-aF-bsf" firstAttribute="top" secondItem="H2p-sc-9uM" secondAttribute="top" constant="5" id="PT4-kZ-m31"/> <constraint firstItem="dor-aF-bsf" firstAttribute="leading" secondItem="nRL-CF-GJN" secondAttribute="trailing" constant="10" id="QZV-if-NzD"/> <constraint firstItem="nRL-CF-GJN" firstAttribute="centerY" secondItem="H2p-sc-9uM" secondAttribute="centerY" id="RXj-k6-o0T"/> <constraint firstItem="oly-Lw-XJB" firstAttribute="centerY" secondItem="nRL-CF-GJN" secondAttribute="centerY" id="YWb-YE-xv6"/> <constraint firstAttribute="trailing" secondItem="dor-aF-bsf" secondAttribute="trailing" constant="58" id="fOW-ej-Ni4"/> <constraint firstAttribute="bottom" secondItem="dor-aF-bsf" secondAttribute="bottom" constant="5" id="kP2-LF-bza"/> <constraint firstItem="dor-aF-bsf" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" constant="102" id="uGS-Xo-BDK"/> </constraints> </tableViewCellContentView> <viewLayoutGuide key="safeArea" id="njF-e1-oar"/> <connections> <outlet property="label_name" destination="nRL-CF-GJN" id="b3h-ym-YKi"/> <outlet property="tf_phone" destination="wzT-Yj-6VN" id="uAC-HN-J6C"/> </connections> <point key="canvasLocation" x="151.14503816793894" y="20.422535211267608"/> </tableViewCell> </objects> <resources> <image name="icon_delete" width="18" height="18"/> <systemColor name="systemBackgroundColor"> <color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> </systemColor> </resources> </document> OKProject/Class/Home/View/TripAddressCell.swift
@@ -60,7 +60,8 @@ /// 现在 @IBOutlet weak var button_now: UIButton! /// 预约 @IBOutlet weak var view_now: UIView! /// 预约 @IBOutlet weak var button_appointment: UIButton! /// 特惠购卡 @IBOutlet weak var buyCardBtn: UIView! @@ -369,6 +370,9 @@ self.button_tip.isHidden = false if YYMapViewManager.share.orderType.value == .taxi{ self.button_date.setTitle(YYMapViewManager.share.timeStamp.value == nil ? "选择时间" : "\(YYMapViewManager.share.timeStamp.value?.toFormat(format: "M月d日 HH:mm") ?? "选择时间")", for: .normal) }else if YYMapViewManager.share.orderType.value == .business{ self.button_date.setTitle(YYMapViewManager.share.timeStamp.value == nil ? "时间" : "\(YYMapViewManager.share.timeStamp.value?.toFormat(format: "M月d日 HH:mm") ?? "时间")", for: .normal) self.button_passenger.setTitle(YYMapViewManager.share.passenger.value == nil ? "事由出行" : "\(YYMapViewManager.share.passenger.value?.name ?? "事由出行")", for: .normal) }else{ self.button_date.setTitle(YYMapViewManager.share.timeStamp.value == nil ? "现在" : "\(YYMapViewManager.share.timeStamp.value?.toFormat(format: "M月d日 HH:mm") ?? "现在")", for: .normal) } @@ -405,6 +409,15 @@ self.sitTogetherView.isHidden = true self.sitSingleView.isHidden = true self.onePriceView.isHidden = true if YYMapViewManager.share.orderType.value == .business{ self.view_now.isHidden = true self.view_call.isHidden = false self.view_taxi.isHidden = true self.button_more.isHidden = true self.button_tip.setTitle("计费方式", for: .normal) } break case .called: self.button_more.isHidden = true @@ -436,10 +449,17 @@ self.button_tip.isHidden = true self.queryServerCarModel() } let title = YYMapViewManager.share.orderType.value == .taxi ? "呼叫出租车" : "呼叫快车/专车" self.button_submit.setTitle(title, for: .normal) var title = "" if YYMapViewManager.share.orderType.value == .taxi{ title = "呼叫出租车" }else if YYMapViewManager.share.orderType.value == .special { title = "呼叫快车/专车" }else if YYMapViewManager.share.orderType.value == .business{ title = "预约出行" } self.button_submit.setTitle(title, for: .normal) break } }).disposed(by: rx.disposeBag) @@ -454,7 +474,12 @@ YYMapViewManager.share.tip .subscribeOn(MainScheduler.instance) .subscribe(onNext: {[unowned self] (string) in self.button_tip.setTitle(string == nil ? "小费" : string, for: .normal) if YYMapViewManager.share.orderType.value == .business{ self.button_tip.setTitle(string == nil ? "计费方式" : string, for: .normal) }else{ self.button_tip.setTitle(string == nil ? "小费" : string, for: .normal) } }).disposed(by: rx.disposeBag) sitTogetherChooseBtn.rx.tap.subscribe(onNext: {[unowned self](_) in OKProject/Class/Home/View/TripAddressCell.xib
@@ -1,9 +1,9 @@ <?xml version="1.0" encoding="UTF-8"?> <document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="20037" 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="20020"/> <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="21678"/> <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"/> @@ -12,11 +12,11 @@ <objects> <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/> <placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/> <tableViewCell contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" rowHeight="741" id="KGk-i7-Jjw" customClass="TripAddressCell" customModule="OK出行" customModuleProvider="target"> <rect key="frame" x="0.0" y="0.0" width="512" height="741"/> <tableViewCell contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" rowHeight="783" id="KGk-i7-Jjw" customClass="TripAddressCell" customModule="OK出行" customModuleProvider="target"> <rect key="frame" x="0.0" y="0.0" width="512" height="783"/> <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/> <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="KGk-i7-Jjw" id="H2p-sc-9uM"> <rect key="frame" x="0.0" y="0.0" width="512" height="741"/> <rect key="frame" x="0.0" y="0.0" width="512" height="783"/> <autoresizingMask key="autoresizingMask"/> <subviews> <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="vqa-iA-4Sz" customClass="YYView" customModule="OK出行" customModuleProvider="target"> @@ -513,6 +513,7 @@ <constraints> <constraint firstItem="wCY-v0-Wi7" firstAttribute="leading" secondItem="SWW-gm-mGK" secondAttribute="leading" id="2g7-jA-ayX"/> <constraint firstAttribute="bottom" secondItem="wCY-v0-Wi7" secondAttribute="bottom" id="8BR-rU-aTx"/> <constraint firstAttribute="height" constant="116" id="9ET-28-dYL"/> <constraint firstAttribute="trailing" secondItem="wCY-v0-Wi7" secondAttribute="trailing" id="Vcq-ve-C4w"/> <constraint firstItem="wCY-v0-Wi7" firstAttribute="top" secondItem="SWW-gm-mGK" secondAttribute="top" id="X4N-RP-eLq"/> </constraints> @@ -653,6 +654,7 @@ </subviews> <color key="backgroundColor" systemColor="systemBackgroundColor"/> <constraints> <constraint firstAttribute="height" constant="42" id="2Hx-0B-YNj"/> <constraint firstAttribute="trailing" secondItem="yVB-Py-nRf" secondAttribute="trailing" id="6KW-Va-8ns"/> <constraint firstItem="zw2-Lr-ac8" firstAttribute="centerY" secondItem="Nfa-CI-ZQh" secondAttribute="centerY" id="6ms-lF-Cw8"/> <constraint firstItem="NXb-36-xGe" firstAttribute="centerY" secondItem="U7F-zx-qFn" secondAttribute="centerY" id="GNB-1H-CJI"/> @@ -772,10 +774,11 @@ <outlet property="view_address" destination="SWW-gm-mGK" id="MQO-iX-6Sk"/> <outlet property="view_call" destination="8ms-GK-c9W" id="hnh-Fq-4SG"/> <outlet property="view_carType" destination="3ET-Sf-0yl" id="EsV-Hv-oG9"/> <outlet property="view_now" destination="lYH-73-OsI" id="2Eu-3b-Orj"/> <outlet property="view_state" destination="TeM-FR-fGP" id="eXH-4X-na2"/> <outlet property="view_taxi" destination="V2n-pd-KWo" id="bxV-8f-9aL"/> </connections> <point key="canvasLocation" x="89.855072463768124" y="303.68303571428572"/> <point key="canvasLocation" x="89.855072463768124" y="317.74553571428572"/> </tableViewCell> </objects> <designables> @@ -792,15 +795,15 @@ <resources> <image name="icon_check" width="16" height="16"/> <image name="icon_check_un" width="18" height="18"/> <image name="icon_end point" width="10" height="10"/> <image name="icon_end point" width="14" height="14"/> <image name="icon_fire" width="16" height="21"/> <image name="icon_more_black" width="8" height="13"/> <image name="icon_starting point" width="20" height="20"/> <image name="icon_starting point" width="14" height="14"/> <image name="notice-2" width="10" height="11"/> <image name="taxi" width="68" height="33"/> <image name="top_corner_bg" width="78" height="21"/> <namedColor name="Color"> <color red="0.0" green="0.74900001287460327" blue="0.18799999356269836" 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"/> OKProject/Class/TravelAcrossCity(跨城)/Models/TravleCityModel.swift
@@ -24,6 +24,7 @@ var name = "" var id = "" var city = "" var cityCode = 0 } class AddressModel: NSObject ,HandyJSON { override required init() { OKProject/Tools/LD_Def.swift
@@ -52,3 +52,26 @@ class TapButton:UIButton{ } final class Box<T> { // 声明一个别名 typealias Listener = (T) -> Void var listener: Listener? var value: T? { didSet { guard let v = value else { return } listener?(v) } } init(_ value: T? = nil){ self.value = value } func bind(listener: Listener?) { self.listener = listener guard let v = value else { return } listener?(v) } }