From d23fce7c9da9f47cb4bb4630c3b428b12ce1c7eb Mon Sep 17 00:00:00 2001 From: Robert <Robert@qq.com> Date: 星期四, 21 八月 2025 21:36:29 +0800 Subject: [PATCH] 会员 --- WanPai/Assets.xcassets/Bg/MemberBackground2.imageset/MemberBackground2@2x.png | 0 WanPai/Root/Home/CCell/CouponCell.xib | 215 ++++++++ WanPai/Assets.xcassets/Bg/Rectangle.imageset/Rectangle@2x.png | 0 WanPai/Root/Home/VC/JoinMemberVC.xib | 227 +++++++++ WanPai/Root/Home/CCell/CouponCellTwo.swift | 34 + WanPai/Root/Home/CCell/MemberCell.xib | 87 +++ WanPai/Root/Search/VC/MatchDetailVC.swift | 10 WanPai/Assets.xcassets/Bg/imgGrouptwo.imageset/imgGrouptwo@3x.png | 0 WanPai/Common/View/WorldCupListRankView.xib | 15 WanPai/Assets.xcassets/Bg/imgGroup.imageset/imgGroup@2x.png | 0 WanPai/Root/Home/VC/HomeVC.xib | 10 WanPai/Assets.xcassets/Bg/Rectangle.imageset/Contents.json | 22 WanPai/Network/Services.swift | 21 WanPai/Root/Home/VC/HomeVC.swift | 2 WanPai/Assets.xcassets/Bg/MemberBackground.imageset/MemberBackground@3x.png | 0 WanPai/Assets.xcassets/Bg/MemberBackground2.imageset/MemberBackground2@3x.png | 0 WanPai/Assets.xcassets/Bg/Rectangle.imageset/Rectangle@3x.png | 0 WanPai/Root/Home/VC/JoinMemberVC.swift | 171 ++++++ WanPai/Assets.xcassets/Bg/imgGrouptwo.imageset/Contents.json | 22 WanPai/Common/View/WorldCupListRankView.swift | 8 WanPai/Model/CommonModels.swift | 39 + WanPai/Root/Home/CCell/CouponCell.swift | 43 + WanPai/Assets.xcassets/Bg/imgGroup.imageset/Contents.json | 22 WanPai.xcodeproj/project.pbxproj | 40 + WanPai/Root/Home/CCell/MemberCell.swift | 53 ++ WanPai/Root/Home/CCell/CouponCellThree.xib | 101 ++++ WanPai/Assets.xcassets/Bg/MemberBackground.imageset/MemberBackground@2x.png | 0 WanPai/Root/Search/VC/WorldCupContentApplyInputVC.swift | 2 WanPai/Assets.xcassets/Bg/imgGrouptwo.imageset/imgGrouptwo@2x.png | 0 WanPai/Assets.xcassets/Bg/MemberBackground.imageset/Contents.json | 50 ++ WanPai/Root/Home/CCell/CouponCellThree.swift | 82 +++ WanPai/Root/Welfare/VC/WelfareCouponsListVC.swift | 4 WanPai/Assets.xcassets/Bg/MemberBackground2.imageset/Contents.json | 50 ++ WanPai/Assets.xcassets/Bg/imgGroup.imageset/imgGroup@3x.png | 0 WanPai/Config/Def.swift | 4 WanPai/Root/Home/CCell/CouponCellTwo.xib | 126 +++++ WanPai/Root/Search/VC/WorldCupContentApplyInputVC.xib | 32 WanPai/Root/Home/VC/JoinMemberIntroduceVC.swift | 2 WanPai/Root/Search/VC/SearchVC.swift | 4 39 files changed, 1,462 insertions(+), 36 deletions(-) diff --git a/WanPai.xcodeproj/project.pbxproj b/WanPai.xcodeproj/project.pbxproj index be7af81..16a9f1d 100644 --- a/WanPai.xcodeproj/project.pbxproj +++ b/WanPai.xcodeproj/project.pbxproj @@ -378,6 +378,10 @@ 8DFA9B8C2A317DAA00E99281 /* CourseVC.xib in Resources */ = {isa = PBXBuildFile; fileRef = 8DFA9B8A2A317DAA00E99281 /* CourseVC.xib */; }; 8DFA9B912A317DE900E99281 /* WelfareVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8DFA9B8F2A317DE900E99281 /* WelfareVC.swift */; }; 8DFA9B922A317DE900E99281 /* WelfareVC.xib in Resources */ = {isa = PBXBuildFile; fileRef = 8DFA9B902A317DE900E99281 /* WelfareVC.xib */; }; + 8E6D0BBE2E54B3B300617372 /* JoinMemberVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8E6D0BBC2E54B3B300617372 /* JoinMemberVC.swift */; }; + 8E6D0BBF2E54B3B300617372 /* JoinMemberVC.xib in Resources */ = {isa = PBXBuildFile; fileRef = 8E6D0BBD2E54B3B300617372 /* JoinMemberVC.xib */; }; + 8E6D0BC22E54BDF700617372 /* CouponCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8E6D0BC02E54BDF700617372 /* CouponCell.swift */; }; + 8E6D0BC32E54BDF700617372 /* CouponCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 8E6D0BC12E54BDF700617372 /* CouponCell.xib */; }; 8E75A6BA2E52078A00D0DC4C /* WorldCupListRankView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8E75A6B92E52078A00D0DC4C /* WorldCupListRankView.swift */; }; 8E75A6BC2E52079D00D0DC4C /* WorldCupListRankView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 8E75A6BB2E52079D00D0DC4C /* WorldCupListRankView.xib */; }; 8E75A6BF2E5209EE00D0DC4C /* WorldCupListRankViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 8E75A6BE2E5209EE00D0DC4C /* WorldCupListRankViewCell.xib */; }; @@ -389,6 +393,12 @@ 8E7A1F252E4DC26400E7164F /* WorldCupCodeListModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8E7A1F242E4DC26400E7164F /* WorldCupCodeListModel.swift */; }; 8E7A1F272E4DEA9700E7164F /* EndGameAlertView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8E7A1F262E4DEA9700E7164F /* EndGameAlertView.swift */; }; 8E7A1F292E4DEAA900E7164F /* EndGameAlertView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 8E7A1F282E4DEAA900E7164F /* EndGameAlertView.xib */; }; + 8E9836F02E54C944007127C9 /* CouponCellTwo.xib in Resources */ = {isa = PBXBuildFile; fileRef = 8E9836EF2E54C944007127C9 /* CouponCellTwo.xib */; }; + 8E9836F12E54C944007127C9 /* CouponCellTwo.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8E9836EE2E54C944007127C9 /* CouponCellTwo.swift */; }; + 8E9836F42E54CA19007127C9 /* CouponCellThree.xib in Resources */ = {isa = PBXBuildFile; fileRef = 8E9836F32E54CA19007127C9 /* CouponCellThree.xib */; }; + 8E9836F52E54CA19007127C9 /* CouponCellThree.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8E9836F22E54CA19007127C9 /* CouponCellThree.swift */; }; + 8EC8A9482E5544A4004EBEF3 /* MemberCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8EC8A9462E5544A4004EBEF3 /* MemberCell.swift */; }; + 8EC8A9492E5544A4004EBEF3 /* MemberCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 8EC8A9472E5544A4004EBEF3 /* MemberCell.xib */; }; /* End PBXBuildFile section */ /* Begin PBXFileReference section */ @@ -769,6 +779,10 @@ 8DFA9B8A2A317DAA00E99281 /* CourseVC.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = CourseVC.xib; sourceTree = "<group>"; }; 8DFA9B8F2A317DE900E99281 /* WelfareVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WelfareVC.swift; sourceTree = "<group>"; }; 8DFA9B902A317DE900E99281 /* WelfareVC.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = WelfareVC.xib; sourceTree = "<group>"; }; + 8E6D0BBC2E54B3B300617372 /* JoinMemberVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = JoinMemberVC.swift; sourceTree = "<group>"; }; + 8E6D0BBD2E54B3B300617372 /* JoinMemberVC.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = JoinMemberVC.xib; sourceTree = "<group>"; }; + 8E6D0BC02E54BDF700617372 /* CouponCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CouponCell.swift; sourceTree = "<group>"; }; + 8E6D0BC12E54BDF700617372 /* CouponCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = CouponCell.xib; sourceTree = "<group>"; }; 8E75A6B92E52078A00D0DC4C /* WorldCupListRankView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WorldCupListRankView.swift; sourceTree = "<group>"; }; 8E75A6BB2E52079D00D0DC4C /* WorldCupListRankView.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = WorldCupListRankView.xib; sourceTree = "<group>"; }; 8E75A6BD2E5209EE00D0DC4C /* WorldCupListRankViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WorldCupListRankViewCell.swift; sourceTree = "<group>"; }; @@ -780,6 +794,12 @@ 8E7A1F242E4DC26400E7164F /* WorldCupCodeListModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WorldCupCodeListModel.swift; sourceTree = "<group>"; }; 8E7A1F262E4DEA9700E7164F /* EndGameAlertView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EndGameAlertView.swift; sourceTree = "<group>"; }; 8E7A1F282E4DEAA900E7164F /* EndGameAlertView.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = EndGameAlertView.xib; sourceTree = "<group>"; }; + 8E9836EE2E54C944007127C9 /* CouponCellTwo.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CouponCellTwo.swift; sourceTree = "<group>"; }; + 8E9836EF2E54C944007127C9 /* CouponCellTwo.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = CouponCellTwo.xib; sourceTree = "<group>"; }; + 8E9836F22E54CA19007127C9 /* CouponCellThree.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CouponCellThree.swift; sourceTree = "<group>"; }; + 8E9836F32E54CA19007127C9 /* CouponCellThree.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = CouponCellThree.xib; sourceTree = "<group>"; }; + 8EC8A9462E5544A4004EBEF3 /* MemberCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MemberCell.swift; sourceTree = "<group>"; }; + 8EC8A9472E5544A4004EBEF3 /* MemberCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = MemberCell.xib; sourceTree = "<group>"; }; F12BCB644B5E0392E2BFF8C7 /* Pods_WanPai.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_WanPai.framework; sourceTree = BUILT_PRODUCTS_DIR; }; /* End PBXFileReference section */ @@ -1175,6 +1195,14 @@ children = ( 8D4905A72A31A6EC00E38513 /* HomeCCell.swift */, 8D4905A82A31A6EC00E38513 /* HomeCCell.xib */, + 8E6D0BC02E54BDF700617372 /* CouponCell.swift */, + 8E6D0BC12E54BDF700617372 /* CouponCell.xib */, + 8E9836EE2E54C944007127C9 /* CouponCellTwo.swift */, + 8E9836EF2E54C944007127C9 /* CouponCellTwo.xib */, + 8E9836F22E54CA19007127C9 /* CouponCellThree.swift */, + 8E9836F32E54CA19007127C9 /* CouponCellThree.xib */, + 8EC8A9462E5544A4004EBEF3 /* MemberCell.swift */, + 8EC8A9472E5544A4004EBEF3 /* MemberCell.xib */, ); path = CCell; sourceTree = "<group>"; @@ -1540,6 +1568,8 @@ 8D4905AC2A31AE7100E38513 /* JoinMemberIntroduceVC.xib */, 13F88B032B8F46EA0055317B /* WorldCupListVC.swift */, 13F88B042B8F46EA0055317B /* WorldCupListVC.xib */, + 8E6D0BBC2E54B3B300617372 /* JoinMemberVC.swift */, + 8E6D0BBD2E54B3B300617372 /* JoinMemberVC.xib */, ); path = VC; sourceTree = "<group>"; @@ -1825,6 +1855,7 @@ 137801A02A3BF98900414959 /* CourseOnlineTCell.xib in Resources */, 13EAF37E2AB42CFD000A6F07 /* GamesTCell.xib in Resources */, 8D86DE872A3307B700A754EF /* CourseSubTypeView.xib in Resources */, + 8E6D0BBF2E54B3B300617372 /* JoinMemberVC.xib in Resources */, 130E402C2A4EC342003A3D75 /* SearchStoreDetailHeadView.xib in Resources */, 13B6BB9E2ABAE000006D0C0E /* SignUpCourseVC.xib in Resources */, 138D4CFC2A47ECAC005233E7 /* CourseInfoScheduleVC.xib in Resources */, @@ -1838,6 +1869,7 @@ 13477DC32B8C9F28002E69FB /* MeQRCodeVC.xib in Resources */, 13EAF3822AB43657000A6F07 /* GamesIntruduceView.xib in Resources */, 8DFA9B922A317DE900E99281 /* WelfareVC.xib in Resources */, + 8E6D0BC32E54BDF700617372 /* CouponCell.xib in Resources */, 13240EED2D94F197008944A0 /* StudentInfo_6_TCell.xib in Resources */, 13F88B062B8F46EA0055317B /* WorldCupListVC.xib in Resources */, 1371CD072BA3E7F2007E0849 /* StudentInfo_2_1_TCell.xib in Resources */, @@ -1852,6 +1884,7 @@ 8DF184452A332CCD0095687B /* StudentInfoTCell.xib in Resources */, 13D7BA962A4BD4760007E4B7 /* BillInfoTCell.xib in Resources */, 1381BBA42DB21BB9000717EB /* CardCenterTopQRCodeTCell.xib in Resources */, + 8EC8A9492E5544A4004EBEF3 /* MemberCell.xib in Resources */, 132876632A49A18700FC9122 /* StudentExchangeVC.xib in Resources */, 132876692A49A4CB00FC9122 /* StudentReportVC.xib in Resources */, 138D4D002A47EF4C005233E7 /* CourseDatetimeCCell.xib in Resources */, @@ -1865,6 +1898,7 @@ 8D6D58D52A3997250003CFE6 /* StoresInfoView.xib in Resources */, 13477DCB2B8CA1C1002E69FB /* MyQRCodeTCell.xib in Resources */, 8D5C150C2A31885B00A8BCC9 /* CommonAlertView.xib in Resources */, + 8E9836F02E54C944007127C9 /* CouponCellTwo.xib in Resources */, 1376A6A22A4A7E1E00D4C851 /* CourseChargeTCell.xib in Resources */, 13E82AAF2D93CE32006116E3 /* CardCenterTCell.xib in Resources */, 130A59322D9406AB0094D92D /* CardCenterSheetView.xib in Resources */, @@ -1880,6 +1914,7 @@ 138A25A92B91CC2300B2EE49 /* StudentsManagerListVC.xib in Resources */, 13D7BA902A4BC3E90007E4B7 /* CommonSingleImgCCell.xib in Resources */, 130CE4582A4925AB00394384 /* StudentVideoCCell.xib in Resources */, + 8E9836F42E54CA19007127C9 /* CouponCellThree.xib in Resources */, 8D6E54D22A381CB000D750CE /* ActivityDetailVC.xib in Resources */, 13272DD12A4034A300AC6481 /* YardDetailVC.xib in Resources */, 137B866B2AB3F03F00C4D01B /* GamesVC.xib in Resources */, @@ -2026,6 +2061,7 @@ 1387B6662A4AB66300BF2F2E /* CourseBookingListVC.swift in Sources */, 8DAEB54E2A305A0100814766 /* Colors.swift in Sources */, 130A59302D9406A40094D92D /* CardCenterSheetView.swift in Sources */, + 8E6D0BBE2E54B3B300617372 /* JoinMemberVC.swift in Sources */, 132876682A49A4CB00FC9122 /* StudentReportVC.swift in Sources */, 13426D672B8F20AB0032338B /* WorldCupContentDetailVC.swift in Sources */, 133A61882A4E7A200066C4E6 /* CustomerSubListVC.swift in Sources */, @@ -2051,13 +2087,16 @@ 137546432A57F56F001FA77A /* CommonModels.swift in Sources */, 1393B3962A4AD03A00B73072 /* CourseExerciseTCell.swift in Sources */, 13B2DEFC2AE12A7E00FCD31E /* LaunchImageHelper.swift in Sources */, + 8E9836F12E54C944007127C9 /* CouponCellTwo.swift in Sources */, 137546402A57F545001FA77A /* UserModel.swift in Sources */, 13240EF02D94F8AD008944A0 /* StudentChoose3View.swift in Sources */, 13019C7D2A42ADA2004880CD /* CourseInfoVC.swift in Sources */, 138D8B8E2A3FFE36009DCA9E /* YardListVC.swift in Sources */, 13A9F8B12B0F2DC400ADF402 /* TransitionUtil.swift in Sources */, 139402422AB4588F003CF61E /* PaymentCourseTCell.swift in Sources */, + 8E6D0BC22E54BDF700617372 /* CouponCell.swift in Sources */, 13BEEAEA2A4D92A200685667 /* ExchangeRecordTCell.swift in Sources */, + 8E9836F52E54CA19007127C9 /* CouponCellThree.swift in Sources */, 1387B6622A4A969700BF2F2E /* CommonDatePickerView.swift in Sources */, 8DAEB5522A305B2D00814766 /* Fronts.swift in Sources */, 13B6BB9D2ABAE000006D0C0E /* SignUpCourseVC.swift in Sources */, @@ -2158,6 +2197,7 @@ 13801CC72A4D294D0041454D /* ChooseNumberView.swift in Sources */, 138A25A82B91CC2300B2EE49 /* StudentsManagerListVC.swift in Sources */, 8D79A58F2A3957420029874B /* StudentInfo_2_TCell.swift in Sources */, + 8EC8A9482E5544A4004EBEF3 /* MemberCell.swift in Sources */, 131732BA2A405EF800F722AF /* CalendarDateTimeTCell.swift in Sources */, 8D6C50232A372B21007EC2D9 /* IDCardView.swift in Sources */, 1353D5752A56CA0A00539FCA /* Services.swift in Sources */, diff --git a/WanPai/Assets.xcassets/Bg/MemberBackground.imageset/Contents.json b/WanPai/Assets.xcassets/Bg/MemberBackground.imageset/Contents.json new file mode 100644 index 0000000..76978b6 --- /dev/null +++ b/WanPai/Assets.xcassets/Bg/MemberBackground.imageset/Contents.json @@ -0,0 +1,50 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "MemberBackground@2x.png", + "idiom" : "universal", + "resizing" : { + "cap-insets" : { + "bottom" : 28, + "left" : 32, + "right" : 34, + "top" : 29 + }, + "center" : { + "height" : 1, + "mode" : "tile", + "width" : 2 + }, + "mode" : "9-part" + }, + "scale" : "2x" + }, + { + "filename" : "MemberBackground@3x.png", + "idiom" : "universal", + "resizing" : { + "cap-insets" : { + "bottom" : 39, + "left" : 44, + "right" : 39, + "top" : 41 + }, + "center" : { + "height" : 2, + "mode" : "tile", + "width" : 1 + }, + "mode" : "9-part" + }, + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/WanPai/Assets.xcassets/Bg/MemberBackground.imageset/MemberBackground@2x.png b/WanPai/Assets.xcassets/Bg/MemberBackground.imageset/MemberBackground@2x.png new file mode 100644 index 0000000..061e01f --- /dev/null +++ b/WanPai/Assets.xcassets/Bg/MemberBackground.imageset/MemberBackground@2x.png Binary files differ diff --git a/WanPai/Assets.xcassets/Bg/MemberBackground.imageset/MemberBackground@3x.png b/WanPai/Assets.xcassets/Bg/MemberBackground.imageset/MemberBackground@3x.png new file mode 100644 index 0000000..c1e282a --- /dev/null +++ b/WanPai/Assets.xcassets/Bg/MemberBackground.imageset/MemberBackground@3x.png Binary files differ diff --git a/WanPai/Assets.xcassets/Bg/MemberBackground2.imageset/Contents.json b/WanPai/Assets.xcassets/Bg/MemberBackground2.imageset/Contents.json new file mode 100644 index 0000000..f4d9bc6 --- /dev/null +++ b/WanPai/Assets.xcassets/Bg/MemberBackground2.imageset/Contents.json @@ -0,0 +1,50 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "MemberBackground2@2x.png", + "idiom" : "universal", + "resizing" : { + "cap-insets" : { + "bottom" : 28, + "left" : 31, + "right" : 26, + "top" : 29 + }, + "center" : { + "height" : 1, + "mode" : "tile", + "width" : 1 + }, + "mode" : "9-part" + }, + "scale" : "2x" + }, + { + "filename" : "MemberBackground2@3x.png", + "idiom" : "universal", + "resizing" : { + "cap-insets" : { + "bottom" : 32, + "left" : 42, + "right" : 37, + "top" : 34 + }, + "center" : { + "height" : 2, + "mode" : "tile", + "width" : 3 + }, + "mode" : "9-part" + }, + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/WanPai/Assets.xcassets/Bg/MemberBackground2.imageset/MemberBackground2@2x.png b/WanPai/Assets.xcassets/Bg/MemberBackground2.imageset/MemberBackground2@2x.png new file mode 100644 index 0000000..ec366f5 --- /dev/null +++ b/WanPai/Assets.xcassets/Bg/MemberBackground2.imageset/MemberBackground2@2x.png Binary files differ diff --git a/WanPai/Assets.xcassets/Bg/MemberBackground2.imageset/MemberBackground2@3x.png b/WanPai/Assets.xcassets/Bg/MemberBackground2.imageset/MemberBackground2@3x.png new file mode 100644 index 0000000..363640a --- /dev/null +++ b/WanPai/Assets.xcassets/Bg/MemberBackground2.imageset/MemberBackground2@3x.png Binary files differ diff --git a/WanPai/Assets.xcassets/Bg/Rectangle.imageset/Contents.json b/WanPai/Assets.xcassets/Bg/Rectangle.imageset/Contents.json new file mode 100644 index 0000000..798426a --- /dev/null +++ b/WanPai/Assets.xcassets/Bg/Rectangle.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "Rectangle@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "Rectangle@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/WanPai/Assets.xcassets/Bg/Rectangle.imageset/Rectangle@2x.png b/WanPai/Assets.xcassets/Bg/Rectangle.imageset/Rectangle@2x.png new file mode 100644 index 0000000..40230a1 --- /dev/null +++ b/WanPai/Assets.xcassets/Bg/Rectangle.imageset/Rectangle@2x.png Binary files differ diff --git a/WanPai/Assets.xcassets/Bg/Rectangle.imageset/Rectangle@3x.png b/WanPai/Assets.xcassets/Bg/Rectangle.imageset/Rectangle@3x.png new file mode 100644 index 0000000..d7e69ba --- /dev/null +++ b/WanPai/Assets.xcassets/Bg/Rectangle.imageset/Rectangle@3x.png Binary files differ diff --git a/WanPai/Assets.xcassets/Bg/imgGroup.imageset/Contents.json b/WanPai/Assets.xcassets/Bg/imgGroup.imageset/Contents.json new file mode 100644 index 0000000..4f899ce --- /dev/null +++ b/WanPai/Assets.xcassets/Bg/imgGroup.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "imgGroup@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "imgGroup@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/WanPai/Assets.xcassets/Bg/imgGroup.imageset/imgGroup@2x.png b/WanPai/Assets.xcassets/Bg/imgGroup.imageset/imgGroup@2x.png new file mode 100644 index 0000000..ec9e165 --- /dev/null +++ b/WanPai/Assets.xcassets/Bg/imgGroup.imageset/imgGroup@2x.png Binary files differ diff --git a/WanPai/Assets.xcassets/Bg/imgGroup.imageset/imgGroup@3x.png b/WanPai/Assets.xcassets/Bg/imgGroup.imageset/imgGroup@3x.png new file mode 100644 index 0000000..f3c7a6b --- /dev/null +++ b/WanPai/Assets.xcassets/Bg/imgGroup.imageset/imgGroup@3x.png Binary files differ diff --git a/WanPai/Assets.xcassets/Bg/imgGrouptwo.imageset/Contents.json b/WanPai/Assets.xcassets/Bg/imgGrouptwo.imageset/Contents.json new file mode 100644 index 0000000..44af89b --- /dev/null +++ b/WanPai/Assets.xcassets/Bg/imgGrouptwo.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "imgGrouptwo@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "imgGrouptwo@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/WanPai/Assets.xcassets/Bg/imgGrouptwo.imageset/imgGrouptwo@2x.png b/WanPai/Assets.xcassets/Bg/imgGrouptwo.imageset/imgGrouptwo@2x.png new file mode 100644 index 0000000..d34f207 --- /dev/null +++ b/WanPai/Assets.xcassets/Bg/imgGrouptwo.imageset/imgGrouptwo@2x.png Binary files differ diff --git a/WanPai/Assets.xcassets/Bg/imgGrouptwo.imageset/imgGrouptwo@3x.png b/WanPai/Assets.xcassets/Bg/imgGrouptwo.imageset/imgGrouptwo@3x.png new file mode 100644 index 0000000..62e235a --- /dev/null +++ b/WanPai/Assets.xcassets/Bg/imgGrouptwo.imageset/imgGrouptwo@3x.png Binary files differ diff --git a/WanPai/Common/View/WorldCupListRankView.swift b/WanPai/Common/View/WorldCupListRankView.swift index 84d0666..28c0673 100644 --- a/WanPai/Common/View/WorldCupListRankView.swift +++ b/WanPai/Common/View/WorldCupListRankView.swift @@ -78,6 +78,14 @@ alertView.tabview.reloadData() } + @IBAction func dimissAction(_ sender: Any) { + UIView.animate(withDuration: 0.4) { + self.alpha = 0 + self.layoutIfNeeded() + } completion: { _ in + self.removeFromSuperview() + } + } @IBAction func sureAction(_ sender: Any) { if dataSoure?.count == 0 { return diff --git a/WanPai/Common/View/WorldCupListRankView.xib b/WanPai/Common/View/WorldCupListRankView.xib index 9726553..73a42a8 100644 --- a/WanPai/Common/View/WorldCupListRankView.xib +++ b/WanPai/Common/View/WorldCupListRankView.xib @@ -59,14 +59,28 @@ <constraint firstItem="lQm-gr-7GQ" firstAttribute="top" secondItem="SQe-pF-bBN" secondAttribute="top" id="xrU-b5-Ofh"/> </constraints> </view> + <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="9kw-Hl-SfO"> + <rect key="frame" x="343" y="2" width="40" height="40"/> + <constraints> + <constraint firstAttribute="width" constant="40" id="7ZO-gM-hXk"/> + <constraint firstAttribute="height" constant="40" id="J01-P8-YCC"/> + </constraints> + <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/> + <state key="normal" image="btn_close_2"/> + <connections> + <action selector="dimissAction:" destination="iN0-l3-epB" eventType="touchUpInside" id="hU7-2k-Mtu"/> + </connections> + </button> </subviews> <color key="backgroundColor" systemColor="systemBackgroundColor"/> <constraints> <constraint firstItem="SQe-pF-bBN" firstAttribute="leading" secondItem="iMw-ow-gwQ" secondAttribute="leading" id="Aev-IP-Lc2"/> <constraint firstItem="bvP-Ur-pcZ" firstAttribute="centerX" secondItem="iMw-ow-gwQ" secondAttribute="centerX" id="DQK-Uk-u1l"/> <constraint firstItem="rbv-aM-DoE" firstAttribute="top" secondItem="SQe-pF-bBN" secondAttribute="bottom" constant="10" id="FVg-Sf-PIH"/> + <constraint firstItem="9kw-Hl-SfO" firstAttribute="centerY" secondItem="bvP-Ur-pcZ" secondAttribute="centerY" id="JyR-Mp-f6k"/> <constraint firstItem="bvP-Ur-pcZ" firstAttribute="top" secondItem="iMw-ow-gwQ" secondAttribute="top" constant="10" id="KAz-Ac-2lb"/> <constraint firstAttribute="trailing" secondItem="SQe-pF-bBN" secondAttribute="trailing" id="SBC-86-E6J"/> + <constraint firstAttribute="trailing" secondItem="9kw-Hl-SfO" secondAttribute="trailing" constant="10" id="TRb-Lx-eXh"/> <constraint firstItem="SQe-pF-bBN" firstAttribute="top" secondItem="bvP-Ur-pcZ" secondAttribute="bottom" constant="10" id="efi-tp-QCo"/> <constraint firstItem="rbv-aM-DoE" firstAttribute="centerX" secondItem="iMw-ow-gwQ" secondAttribute="centerX" id="uIw-nY-nQK"/> <constraint firstAttribute="height" constant="600" id="xY4-s8-y4s"/> @@ -89,6 +103,7 @@ </view> </objects> <resources> + <image name="btn_close_2" width="20" height="20"/> <namedColor name="FE6E0D"> <color red="0.99199998378753662" green="0.53299999237060547" blue="0.0080000003799796104" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> </namedColor> diff --git a/WanPai/Config/Def.swift b/WanPai/Config/Def.swift index 8210bbb..b18b9cb 100644 --- a/WanPai/Config/Def.swift +++ b/WanPai/Config/Def.swift @@ -147,13 +147,13 @@ switch model { case "加入会员": if page == "成为会员"{ - let vc = JoinMemberIntroduceVC() + let vc = JoinMemberVC() JQ_currentViewController().jq_push(vc:vc) } case "首页banner": if page == "成为会员"{ - let vc = JoinMemberIntroduceVC() + let vc = JoinMemberVC() JQ_currentViewController().jq_push(vc:vc) } case "首页": diff --git a/WanPai/Model/CommonModels.swift b/WanPai/Model/CommonModels.swift index 68c73e2..95b4b1f 100644 --- a/WanPai/Model/CommonModels.swift +++ b/WanPai/Model/CommonModels.swift @@ -1086,5 +1086,44 @@ } +struct TicketModel:HandyJSON { + var count:Int = 0 + var name:String = "" + var time: Int = 0 +} + +struct VipModel:HandyJSON { + var couponJson: String = "" + var couponList = [CouponModel]() + var id: Int = 0 + var insertTime: String = "" + var price: NSNumber? + var status: Int = 0 + var ticketJson: String = "" + var time: Int = 0 + var timeType: Int = 0 + var vipName:String = "" + var ticketList = [TicketModel]() +} + +//struct CouponTwoModel:HandyJSON { +// var available: String = "" +// var cityOrStore: String = "" +// var effectiveTime: String = "" +// var id: Int = 0 +// var instructionsForUse: String = "" +// var name: String = "" +// var ruleModel: CouponModelRuleModel? +// var type:CouponType = .discount +// var useCondition: CouponConditionType = .nationwide +//} + +struct VipDataModel:HandyJSON { + var agreement: String = "" + var headImg: String = "" + var isVip: Int = 0 + var name: String = "" + var vipList = [VipModel]() +} diff --git a/WanPai/Network/Services.swift b/WanPai/Network/Services.swift index 35e5f5d..ea218e3 100644 --- a/WanPai/Network/Services.swift +++ b/WanPai/Network/Services.swift @@ -14,8 +14,13 @@ #if DEBUG //let All_Url = "http://192.168.110.80:56666" //正式地址 //let All_Url = "http://vbef9arg13uu.guyubao.com" -let All_Url = "http://221.182.45.100:1234" //正式地址 -let Game_Url = "http://221.182.45.100:1234" +//let All_Url = "http://221.182.45.100:1234" //正式地址 +//let Game_Url = "http://221.182.45.100:1234" + + +let All_Url = "https://y6cgd7wo3ooa.guyubao.com" //正式地址 +let Game_Url = "https://y6cgd7wo3ooa.guyubao.com" + //let Socket_Url = "192.168.110.22" #else let All_Url = "http://8.137.22.229:56666" //正式地址 @@ -326,6 +331,13 @@ return NetworkRequest.request(params: params, method: .post, progress: false) } + /// + class func vipPayment()->Observable<BaseResponse<VipDataModel>>{ + let params = ParamsAppender.build(url: All_Url) + .interface(url: "/account/api/appUser/vipPayment") + return NetworkRequest.request(params: params, method: .post, progress: true) + } + /// 充值列表 class func voucherCenter()->Observable<BaseResponse<[CoinExchangeModel]>>{ @@ -1207,10 +1219,11 @@ return NetworkRequest.request(params: params, method: .post, progress: false) } - class func enrollMember(paytype:PayType)->Observable<BaseResponse<PaymentModel>>{ + class func enrollMember(paytype:PayType,id:Int)->Observable<BaseResponse<PaymentModel>>{ let params = ParamsAppender.build(url: All_Url) .interface(url: "/account/api/appUser/addVipPayment") .append(key: "payType", value: paytype.rawValue) + .append(key: "id", value: id) return NetworkRequest.request(params: params, method: .post, progress: true) } @@ -1439,7 +1452,7 @@ return NetworkRequest.request(params: params, method: .post, progress: true) } - class func startWorldCup(code:String,people:String,worldCupId:Int)->Observable<BaseResponse<SimpleModel>>{ + class func startWorldCup(code:String,people:String,worldCupId:Int)->Observable<BaseResponse<String>>{ let params = ParamsAppender.build(url: All_Url) .interface(url: "/communityWorldCup/api/worldCup/startWorldCup") .append(key: "code", value: code) diff --git a/WanPai/Root/Home/CCell/CouponCell.swift b/WanPai/Root/Home/CCell/CouponCell.swift new file mode 100644 index 0000000..e92e181 --- /dev/null +++ b/WanPai/Root/Home/CCell/CouponCell.swift @@ -0,0 +1,43 @@ +// +// CouponCell.swift +// WanPai +// +// Created by Robert on 2025/8/19. +// + +import UIKit + +class CouponCell: UITableViewCell { + + @IBOutlet weak var moneyLab: UILabel! + + @IBOutlet weak var remarksLab: UILabel! + + @IBOutlet weak var nameLab: UILabel! + + @IBOutlet weak var timeLab: UILabel! + + @IBOutlet weak var contentLab: UILabel! + + @IBOutlet weak var chooseImg: UIImageView! + + + + + + override func awakeFromNib() { + super.awakeFromNib() + // Initialization code + } + + override func setSelected(_ selected: Bool, animated: Bool) { + super.setSelected(selected, animated: animated) + + // Configure the view for the selected state + } + @IBAction func lookContentLab(_ sender: Any) { + } + @IBAction func lookxqAction(_ sender: Any) { + } + +} diff --git a/WanPai/Root/Home/CCell/CouponCell.xib b/WanPai/Root/Home/CCell/CouponCell.xib new file mode 100644 index 0000000..51e0f23 --- /dev/null +++ b/WanPai/Root/Home/CCell/CouponCell.xib @@ -0,0 +1,215 @@ +<?xml version="1.0" encoding="UTF-8"?> +<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="23504" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES"> + <device id="retina6_12" orientation="portrait" appearance="light"/> + <dependencies> + <deployment identifier="iOS"/> + <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="23506"/> + <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" restorationIdentifier="CouponCellId" selectionStyle="default" indentationWidth="10" rowHeight="119" id="KGk-i7-Jjw" customClass="CouponCell" customModule="WanPai" customModuleProvider="target"> + <rect key="frame" x="0.0" y="0.0" width="429" height="160"/> + <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="429" height="160"/> + <autoresizingMask key="autoresizingMask"/> + <subviews> + <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="QnQ-Ce-kcp"> + <rect key="frame" x="10" y="10" width="409" height="140"/> + <subviews> + <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="MemberBackground" translatesAutoresizingMaskIntoConstraints="NO" id="WDh-UO-2Ju"> + <rect key="frame" x="0.0" y="0.0" width="100" height="140"/> + <constraints> + <constraint firstAttribute="width" constant="100" id="34v-Sh-zUR"/> + </constraints> + </imageView> + <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="MemberBackground2" translatesAutoresizingMaskIntoConstraints="NO" id="w5d-0C-Y7j"> + <rect key="frame" x="100" y="0.0" width="309" height="140"/> + </imageView> + <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="xG9-6p-Rbi"> + <rect key="frame" x="0.0" y="0.0" width="100" height="140"/> + <subviews> + <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="满50可用" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="QIL-CB-RH2"> + <rect key="frame" x="25.333333333333339" y="116.66666666666667" width="49.666666666666657" height="13.333333333333329"/> + <fontDescription key="fontDescription" type="system" pointSize="11"/> + <color key="textColor" red="1" green="1" blue="1" alpha="1" colorSpace="calibratedRGB"/> + <nil key="highlightedColor"/> + </label> + <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="¥120" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="WAi-qa-OjM"> + <rect key="frame" x="21.666666666666668" y="55.666666666666664" width="56.666666666666657" height="28.666666666666664"/> + <fontDescription key="fontDescription" type="system" weight="semibold" pointSize="24"/> + <color key="textColor" red="1" green="1" blue="1" alpha="1" colorSpace="calibratedRGB"/> + <nil key="highlightedColor"/> + </label> + </subviews> + <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> + <constraints> + <constraint firstItem="QIL-CB-RH2" firstAttribute="centerX" secondItem="WAi-qa-OjM" secondAttribute="centerX" id="1LR-ei-K0u"/> + <constraint firstAttribute="bottom" secondItem="QIL-CB-RH2" secondAttribute="bottom" constant="10" id="Fq6-i0-MLt"/> + <constraint firstItem="WAi-qa-OjM" firstAttribute="centerY" secondItem="xG9-6p-Rbi" secondAttribute="centerY" id="d4u-bA-qQT"/> + <constraint firstItem="WAi-qa-OjM" firstAttribute="centerX" secondItem="xG9-6p-Rbi" secondAttribute="centerX" id="ixQ-sq-R99"/> + </constraints> + </view> + <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="cHy-yY-H15"> + <rect key="frame" x="115" y="0.0" width="294" height="140"/> + <subviews> + <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="优惠券名称" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="3nh-Ef-jHr"> + <rect key="frame" x="0.0" y="5" width="84.333333333333329" height="21"/> + <fontDescription key="fontDescription" type="system" weight="medium" pointSize="17"/> + <nil key="textColor"/> + <nil key="highlightedColor"/> + </label> + <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="有效期至2023-09-08" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="U9T-J6-sUk"> + <rect key="frame" x="0.0" y="30.999999999999996" width="120.66666666666667" height="14.333333333333332"/> + <fontDescription key="fontDescription" type="system" pointSize="12"/> + <nil key="textColor"/> + <nil key="highlightedColor"/> + </label> + <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="指定门店可用" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="MvO-Y8-1bo"> + <rect key="frame" x="0.0" y="50.333333333333336" width="71.666666666666671" height="14.333333333333336"/> + <fontDescription key="fontDescription" type="system" pointSize="12"/> + <nil key="textColor"/> + <nil key="highlightedColor"/> + </label> + <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="mUr-Fv-Y8g"> + <rect key="frame" x="71.666666666666657" y="43" width="56" height="29"/> + <fontDescription key="fontDescription" type="system" pointSize="14"/> + <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.0" green="0.28235294117647058" blue="1" alpha="1" colorSpace="calibratedRGB"/> + </state> + <connections> + <action selector="lookxqAction:" destination="KGk-i7-Jjw" eventType="touchUpInside" id="l1Z-Hb-S43"/> + </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="jCR-HM-1UO"> + <rect key="frame" x="0.0" y="75" width="59.666666666666664" height="14.333333333333329"/> + <fontDescription key="fontDescription" type="system" pointSize="12"/> + <nil key="textColor"/> + <nil key="highlightedColor"/> + </label> + <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="icon_down_arrow" translatesAutoresizingMaskIntoConstraints="NO" id="vpC-Gx-nQJ"> + <rect key="frame" x="59.666666666666657" y="74.666666666666671" width="15" height="15"/> + <constraints> + <constraint firstAttribute="width" constant="15" id="Nv0-EV-re0"/> + <constraint firstAttribute="height" constant="15" id="iIv-VQ-4JV"/> + </constraints> + </imageView> + <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="ocU-b8-EYi"> + <rect key="frame" x="0.0" y="94.666666666666671" width="294" height="55.000000000000014"/> + <subviews> + <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="CQo-B4-4n9"> + <rect key="frame" x="0.0" y="0.0" width="294" height="0.66666666666666663"/> + <color key="backgroundColor" systemColor="systemGray5Color"/> + <constraints> + <constraint firstAttribute="height" constant="0.5" id="Yzy-Tq-cGF"/> + </constraints> + </view> + <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="优惠说明" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="r6K-gp-WHU"> + <rect key="frame" x="0.0" y="5.6666666666666572" width="294" height="49.333333333333336"/> + <fontDescription key="fontDescription" type="system" pointSize="12"/> + <nil key="textColor"/> + <nil key="highlightedColor"/> + </label> + </subviews> + <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> + <constraints> + <constraint firstItem="r6K-gp-WHU" firstAttribute="leading" secondItem="ocU-b8-EYi" secondAttribute="leading" id="73S-9v-1pO"/> + <constraint firstAttribute="trailing" secondItem="CQo-B4-4n9" secondAttribute="trailing" id="7To-9d-mBw"/> + <constraint firstAttribute="trailing" secondItem="r6K-gp-WHU" secondAttribute="trailing" id="EBQ-np-LFW"/> + <constraint firstAttribute="height" constant="55" id="P9Z-wA-vrO"/> + <constraint firstItem="r6K-gp-WHU" firstAttribute="top" secondItem="CQo-B4-4n9" secondAttribute="bottom" constant="5" id="WRD-j1-zhy"/> + <constraint firstItem="CQo-B4-4n9" firstAttribute="top" secondItem="ocU-b8-EYi" secondAttribute="top" id="ld1-je-ed7"/> + <constraint firstAttribute="bottom" secondItem="r6K-gp-WHU" secondAttribute="bottom" id="v0W-PK-HsH"/> + <constraint firstItem="CQo-B4-4n9" firstAttribute="leading" secondItem="ocU-b8-EYi" secondAttribute="leading" id="yuI-lP-s0l"/> + </constraints> + </view> + <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="gah-Je-grE"> + <rect key="frame" x="0.0" y="69.666666666666671" width="84" height="25"/> + <constraints> + <constraint firstAttribute="width" constant="84" id="HS2-zQ-erf"/> + <constraint firstAttribute="height" constant="25" id="hdZ-JA-lZC"/> + </constraints> + <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/> + <connections> + <action selector="lookContentLab:" destination="KGk-i7-Jjw" eventType="touchUpInside" id="DHL-Ch-BR4"/> + </connections> + </button> + </subviews> + <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> + <constraints> + <constraint firstItem="U9T-J6-sUk" firstAttribute="leading" secondItem="3nh-Ef-jHr" secondAttribute="leading" id="1oC-yP-kLb"/> + <constraint firstItem="jCR-HM-1UO" firstAttribute="leading" secondItem="MvO-Y8-1bo" secondAttribute="leading" id="ARJ-Xh-nGT"/> + <constraint firstItem="gah-Je-grE" firstAttribute="top" secondItem="MvO-Y8-1bo" secondAttribute="bottom" constant="5" id="C6U-ei-2SO"/> + <constraint firstItem="U9T-J6-sUk" firstAttribute="top" secondItem="3nh-Ef-jHr" secondAttribute="bottom" constant="5" id="Fkx-EE-jhh"/> + <constraint firstItem="MvO-Y8-1bo" firstAttribute="leading" secondItem="U9T-J6-sUk" secondAttribute="leading" id="FsU-xY-6eB"/> + <constraint firstItem="vpC-Gx-nQJ" firstAttribute="centerY" secondItem="jCR-HM-1UO" secondAttribute="centerY" id="LKM-f8-FQx"/> + <constraint firstItem="ocU-b8-EYi" firstAttribute="top" secondItem="vpC-Gx-nQJ" secondAttribute="bottom" constant="5" id="Map-uX-xBd"/> + <constraint firstItem="MvO-Y8-1bo" firstAttribute="top" secondItem="U9T-J6-sUk" secondAttribute="bottom" constant="5" id="QA3-ek-ww0"/> + <constraint firstItem="mUr-Fv-Y8g" firstAttribute="centerY" secondItem="MvO-Y8-1bo" secondAttribute="centerY" id="Rll-u9-ehZ"/> + <constraint firstItem="jCR-HM-1UO" firstAttribute="top" secondItem="mUr-Fv-Y8g" secondAttribute="bottom" constant="3" id="Ucl-dB-PDZ"/> + <constraint firstItem="gah-Je-grE" firstAttribute="leading" secondItem="cHy-yY-H15" secondAttribute="leading" id="bFR-5j-lpL"/> + <constraint firstAttribute="trailing" secondItem="ocU-b8-EYi" secondAttribute="trailing" id="c2T-Ql-khM"/> + <constraint firstItem="mUr-Fv-Y8g" firstAttribute="leading" secondItem="MvO-Y8-1bo" secondAttribute="trailing" id="e2c-7J-oWN"/> + <constraint firstItem="3nh-Ef-jHr" firstAttribute="top" secondItem="cHy-yY-H15" secondAttribute="top" constant="5" id="eh5-M6-51a"/> + <constraint firstItem="ocU-b8-EYi" firstAttribute="leading" secondItem="jCR-HM-1UO" secondAttribute="leading" id="uTu-p9-xSb"/> + <constraint firstItem="3nh-Ef-jHr" firstAttribute="leading" secondItem="cHy-yY-H15" secondAttribute="leading" id="ueZ-Bi-P22"/> + <constraint firstItem="vpC-Gx-nQJ" firstAttribute="leading" secondItem="jCR-HM-1UO" secondAttribute="trailing" id="wui-Uh-7Ac"/> + </constraints> + </view> + </subviews> + <color key="backgroundColor" systemColor="systemBackgroundColor"/> + <constraints> + <constraint firstAttribute="bottom" secondItem="WDh-UO-2Ju" secondAttribute="bottom" id="7xr-s4-0i9"/> + <constraint firstItem="w5d-0C-Y7j" firstAttribute="leading" secondItem="WDh-UO-2Ju" secondAttribute="trailing" id="8XY-hw-53f"/> + <constraint firstItem="cHy-yY-H15" firstAttribute="bottom" secondItem="w5d-0C-Y7j" secondAttribute="bottom" id="AAW-Yl-mz5"/> + <constraint firstAttribute="bottom" secondItem="w5d-0C-Y7j" secondAttribute="bottom" id="IfC-SK-EVT"/> + <constraint firstItem="xG9-6p-Rbi" firstAttribute="trailing" secondItem="WDh-UO-2Ju" secondAttribute="trailing" id="LCB-3i-j9l"/> + <constraint firstAttribute="trailing" secondItem="w5d-0C-Y7j" secondAttribute="trailing" id="Ndn-oY-zrx"/> + <constraint firstItem="xG9-6p-Rbi" firstAttribute="top" secondItem="WDh-UO-2Ju" secondAttribute="top" id="RfC-Hq-u1J"/> + <constraint firstItem="WDh-UO-2Ju" firstAttribute="leading" secondItem="QnQ-Ce-kcp" secondAttribute="leading" id="b8h-Vf-iub"/> + <constraint firstItem="WDh-UO-2Ju" firstAttribute="top" secondItem="QnQ-Ce-kcp" secondAttribute="top" id="bbZ-e9-C6G"/> + <constraint firstItem="cHy-yY-H15" firstAttribute="trailing" secondItem="w5d-0C-Y7j" secondAttribute="trailing" id="cpA-eN-Mgl"/> + <constraint firstItem="cHy-yY-H15" firstAttribute="top" secondItem="w5d-0C-Y7j" secondAttribute="top" id="eb9-ma-ZAr"/> + <constraint firstItem="cHy-yY-H15" firstAttribute="leading" secondItem="w5d-0C-Y7j" secondAttribute="leading" constant="15" id="kbq-4P-EGm"/> + <constraint firstItem="xG9-6p-Rbi" firstAttribute="leading" secondItem="WDh-UO-2Ju" secondAttribute="leading" id="m3C-IM-UpR"/> + <constraint firstItem="xG9-6p-Rbi" firstAttribute="bottom" secondItem="WDh-UO-2Ju" secondAttribute="bottom" id="maC-Nj-f4F"/> + <constraint firstItem="w5d-0C-Y7j" firstAttribute="top" secondItem="QnQ-Ce-kcp" secondAttribute="top" id="vd0-i0-xZp"/> + </constraints> + </view> + </subviews> + <constraints> + <constraint firstAttribute="trailing" secondItem="QnQ-Ce-kcp" secondAttribute="trailing" constant="10" id="lja-li-Zog"/> + <constraint firstItem="QnQ-Ce-kcp" firstAttribute="top" secondItem="H2p-sc-9uM" secondAttribute="top" constant="10" id="rHm-DQ-H81"/> + <constraint firstItem="QnQ-Ce-kcp" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" constant="10" id="rlQ-tm-Pm3"/> + <constraint firstAttribute="bottom" secondItem="QnQ-Ce-kcp" secondAttribute="bottom" constant="10" id="sQk-zV-PK5"/> + </constraints> + </tableViewCellContentView> + <viewLayoutGuide key="safeArea" id="njF-e1-oar"/> + <connections> + <outlet property="chooseImg" destination="vpC-Gx-nQJ" id="O4L-oj-6UA"/> + <outlet property="contentLab" destination="r6K-gp-WHU" id="OGc-au-xwC"/> + <outlet property="moneyLab" destination="WAi-qa-OjM" id="dUO-0U-kJt"/> + <outlet property="nameLab" destination="3nh-Ef-jHr" id="wiZ-TI-3Es"/> + <outlet property="remarksLab" destination="QIL-CB-RH2" id="Z6q-RI-QLV"/> + <outlet property="timeLab" destination="U9T-J6-sUk" id="WoQ-za-YZH"/> + </connections> + <point key="canvasLocation" x="203.81679389312976" y="7.746478873239437"/> + </tableViewCell> + </objects> + <resources> + <image name="MemberBackground" width="28" height="27.333333969116211"/> + <image name="MemberBackground2" width="27.333333969116211" height="22.666666030883789"/> + <image name="icon_down_arrow" width="13" height="8"/> + <systemColor name="systemBackgroundColor"> + <color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> + </systemColor> + <systemColor name="systemGray5Color"> + <color red="0.8980392157" green="0.8980392157" blue="0.91764705879999997" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> + </systemColor> + </resources> +</document> diff --git a/WanPai/Root/Home/CCell/CouponCellThree.swift b/WanPai/Root/Home/CCell/CouponCellThree.swift new file mode 100644 index 0000000..69d539c --- /dev/null +++ b/WanPai/Root/Home/CCell/CouponCellThree.swift @@ -0,0 +1,82 @@ +// +// CouponCellThree.swift +// WanPai +// +// Created by Robert on 2025/8/19. +// + +import UIKit + +class CouponCellThree: UITableViewCell { + private var collectionView: UICollectionView! + @IBOutlet weak var collectionBackView: UIView! + + @IBOutlet weak var imgView: UIView! + var selectIndex = 0 + var selectBlock :((Int) -> Void)? + var vipList : [VipModel]?{ + willSet{ + + collectionView.reloadData() + } + } + override func awakeFromNib() { + super.awakeFromNib() + setupCollectionView() + } + + override func setSelected(_ selected: Bool, animated: Bool) { + super.setSelected(selected, animated: animated) + + // Configure the view for the selected state + } + + + private func setupCollectionView() { + // Create layout + let layout = UICollectionViewFlowLayout() + layout.scrollDirection = .vertical + layout.itemSize = CGSize(width: (UIScreen.main.bounds.size.width - 40) / 3, height: 155) + layout.minimumLineSpacing = 10 + layout.minimumInteritemSpacing = 10 + // layout.sectionInset = UIEdgeInsets(top: 10, left: 10, bottom: 10, right: 10) + + // Initialize collection view + collectionView = UICollectionView(frame:CGRect.zero, collectionViewLayout: layout) + collectionView.autoresizingMask = [.flexibleWidth, .flexibleHeight] + collectionView.register(UINib(nibName: "MemberCell", bundle: nil), forCellWithReuseIdentifier: "MemberCellId") + // Set delegates + collectionView.delegate = self + collectionView.dataSource = self + + collectionBackView.addSubview(collectionView) + collectionView.snp.makeConstraints { make in + make.left.right.top.bottom.equalTo(0) + } + } + +} +// MARK: - UICollectionViewDataSource +extension CouponCellThree: UICollectionViewDataSource,UICollectionViewDelegate{ + func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int { + return vipList?.count ?? 0 + } + + func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell { + let cell = collectionView.dequeueReusableCell(withReuseIdentifier: "MemberCellId", for: indexPath) as! MemberCell + cell.nameLab.text = vipList?[indexPath.row].vipName + cell.moneyLab.text = "¥\(vipList?[indexPath.row].price?.doubleValue ?? 0)" + cell.timeLab.text = "有效期\(vipList?[indexPath.row].time ?? 0)天" + if indexPath.row == selectIndex { + cell.seleceltView() + }else{ + cell.noSeleceltView() + } + return cell + } + func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) { + selectIndex = indexPath.row + selectBlock?(indexPath.row) + collectionView.reloadData() + } +} diff --git a/WanPai/Root/Home/CCell/CouponCellThree.xib b/WanPai/Root/Home/CCell/CouponCellThree.xib new file mode 100644 index 0000000..145c989 --- /dev/null +++ b/WanPai/Root/Home/CCell/CouponCellThree.xib @@ -0,0 +1,101 @@ +<?xml version="1.0" encoding="UTF-8"?> +<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="23504" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES"> + <device id="retina6_12" orientation="portrait" appearance="light"/> + <dependencies> + <deployment identifier="iOS"/> + <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="23506"/> + <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" restorationIdentifier="CouponCellThreeId" selectionStyle="default" indentationWidth="10" rowHeight="296" id="KGk-i7-Jjw" customClass="CouponCellThree" customModule="WanPai" customModuleProvider="target"> + <rect key="frame" x="0.0" y="0.0" width="384" height="296"/> + <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="384" height="296"/> + <autoresizingMask key="autoresizingMask"/> + <subviews> + <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="lw4-zS-j4w"> + <rect key="frame" x="0.0" y="256" width="384" height="40"/> + <constraints> + <constraint firstAttribute="height" constant="40" id="fmZ-C8-8tQ"/> + </constraints> + </imageView> + <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="CH1-fh-Bfr"> + <rect key="frame" x="0.0" y="256" width="384" height="40"/> + <color key="backgroundColor" systemColor="systemBackgroundColor"/> + </view> + <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="会员权益" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="cFe-QT-z6U"> + <rect key="frame" x="158.33333333333334" y="265.66666666666669" width="67.666666666666657" height="21"/> + <fontDescription key="fontDescription" type="system" weight="semibold" pointSize="17"/> + <color key="textColor" red="0.99215686270000003" green="0.50196078430000002" blue="0.18823529410000001" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> + <nil key="highlightedColor"/> + </label> + <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="imgGroup" translatesAutoresizingMaskIntoConstraints="NO" id="mVC-X7-7ub"> + <rect key="frame" x="120.33333333333331" y="274" width="28" height="4"/> + <constraints> + <constraint firstAttribute="width" constant="28" id="0JG-bn-nsb"/> + <constraint firstAttribute="height" constant="4" id="Qdz-fO-zzK"/> + </constraints> + </imageView> + <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="imgGrouptwo" translatesAutoresizingMaskIntoConstraints="NO" id="VcR-MK-LcK"> + <rect key="frame" x="236" y="274" width="28" height="4"/> + <constraints> + <constraint firstAttribute="width" constant="28" id="3ae-cc-sIs"/> + <constraint firstAttribute="height" constant="4" id="bkX-I7-lZc"/> + </constraints> + </imageView> + <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="6Aw-8k-Wqd"> + <rect key="frame" x="10" y="10" width="364" height="155"/> + <color key="backgroundColor" systemColor="systemBackgroundColor"/> + <constraints> + <constraint firstAttribute="height" constant="155" id="dw6-LL-Ndn"/> + </constraints> + </view> + <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="若已是会员,再次购买会员到期时间叠加" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Br8-sX-eZB"> + <rect key="frame" x="20" y="175" width="215" height="14.333333333333343"/> + <fontDescription key="fontDescription" type="system" pointSize="12"/> + <nil key="textColor"/> + <nil key="highlightedColor"/> + </label> + </subviews> + <constraints> + <constraint firstAttribute="bottom" secondItem="lw4-zS-j4w" secondAttribute="bottom" id="8m9-kS-VqK"/> + <constraint firstItem="mVC-X7-7ub" firstAttribute="centerY" secondItem="cFe-QT-z6U" secondAttribute="centerY" id="Aym-YT-3qO"/> + <constraint firstAttribute="trailing" secondItem="lw4-zS-j4w" secondAttribute="trailing" id="DC1-EH-CvZ"/> + <constraint firstItem="VcR-MK-LcK" firstAttribute="leading" secondItem="cFe-QT-z6U" secondAttribute="trailing" constant="10" id="GsL-WC-gL3"/> + <constraint firstItem="cFe-QT-z6U" firstAttribute="centerX" secondItem="lw4-zS-j4w" secondAttribute="centerX" id="N1X-Gd-37h"/> + <constraint firstItem="CH1-fh-Bfr" firstAttribute="leading" secondItem="lw4-zS-j4w" secondAttribute="leading" id="TOs-i8-oFP"/> + <constraint firstItem="6Aw-8k-Wqd" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" constant="10" id="TSg-y0-6wS"/> + <constraint firstItem="CH1-fh-Bfr" firstAttribute="bottom" secondItem="lw4-zS-j4w" secondAttribute="bottom" id="Xah-lD-EW0"/> + <constraint firstItem="CH1-fh-Bfr" firstAttribute="top" secondItem="lw4-zS-j4w" secondAttribute="top" id="YPD-iC-2wU"/> + <constraint firstItem="CH1-fh-Bfr" firstAttribute="trailing" secondItem="lw4-zS-j4w" secondAttribute="trailing" id="bww-nV-7hp"/> + <constraint firstItem="cFe-QT-z6U" firstAttribute="leading" secondItem="mVC-X7-7ub" secondAttribute="trailing" constant="10" id="cPz-WF-6rv"/> + <constraint firstItem="Br8-sX-eZB" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" constant="20" id="f0E-EL-AaP"/> + <constraint firstItem="lw4-zS-j4w" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" id="guV-gL-coo"/> + <constraint firstItem="Br8-sX-eZB" firstAttribute="top" secondItem="6Aw-8k-Wqd" secondAttribute="bottom" constant="10" id="hjF-Ke-Vnw"/> + <constraint firstItem="VcR-MK-LcK" firstAttribute="centerY" secondItem="cFe-QT-z6U" secondAttribute="centerY" id="kV4-ZP-2yb"/> + <constraint firstItem="6Aw-8k-Wqd" firstAttribute="top" secondItem="H2p-sc-9uM" secondAttribute="top" constant="10" id="tgY-pz-LHi"/> + <constraint firstAttribute="trailing" secondItem="6Aw-8k-Wqd" secondAttribute="trailing" constant="10" id="xQb-1W-VVc"/> + <constraint firstItem="cFe-QT-z6U" firstAttribute="centerY" secondItem="lw4-zS-j4w" secondAttribute="centerY" id="zbB-MH-y2i"/> + </constraints> + </tableViewCellContentView> + <viewLayoutGuide key="safeArea" id="njF-e1-oar"/> + <connections> + <outlet property="collectionBackView" destination="6Aw-8k-Wqd" id="NAd-it-9fi"/> + <outlet property="imgView" destination="CH1-fh-Bfr" id="kNO-3l-b5t"/> + </connections> + <point key="canvasLocation" x="190.83969465648855" y="-44.366197183098592"/> + </tableViewCell> + </objects> + <resources> + <image name="imgGroup" width="28" height="4"/> + <image name="imgGrouptwo" width="28" height="4"/> + <systemColor name="systemBackgroundColor"> + <color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> + </systemColor> + </resources> +</document> diff --git a/WanPai/Root/Home/CCell/CouponCellTwo.swift b/WanPai/Root/Home/CCell/CouponCellTwo.swift new file mode 100644 index 0000000..8ac781a --- /dev/null +++ b/WanPai/Root/Home/CCell/CouponCellTwo.swift @@ -0,0 +1,34 @@ +// +// CouponCellTwo.swift +// WanPai +// +// Created by Robert on 2025/8/19. +// + +import UIKit + +class CouponCellTwo: UITableViewCell { + + @IBOutlet weak var moneyLab: UILabel! + + @IBOutlet weak var remarksLab: UILabel! + + @IBOutlet weak var nameLab: UILabel! + + @IBOutlet weak var timeLab: UILabel! + + @IBOutlet weak var numberLab: UILabel! + + + override func awakeFromNib() { + super.awakeFromNib() + // Initialization code + } + + override func setSelected(_ selected: Bool, animated: Bool) { + super.setSelected(selected, animated: animated) + + // Configure the view for the selected state + } + +} diff --git a/WanPai/Root/Home/CCell/CouponCellTwo.xib b/WanPai/Root/Home/CCell/CouponCellTwo.xib new file mode 100644 index 0000000..1f74d12 --- /dev/null +++ b/WanPai/Root/Home/CCell/CouponCellTwo.xib @@ -0,0 +1,126 @@ +<?xml version="1.0" encoding="UTF-8"?> +<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="23504" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES"> + <device id="retina6_12" orientation="portrait" appearance="light"/> + <dependencies> + <deployment identifier="iOS"/> + <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="23506"/> + <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" restorationIdentifier="CouponCellTwoId" selectionStyle="default" indentationWidth="10" rowHeight="199" id="KGk-i7-Jjw" customClass="CouponCellTwo" customModule="WanPai" customModuleProvider="target"> + <rect key="frame" x="0.0" y="0.0" width="320" height="100"/> + <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="320" height="100"/> + <autoresizingMask key="autoresizingMask"/> + <subviews> + <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="W5m-6w-aau"> + <rect key="frame" x="10" y="0.0" width="300" height="90"/> + <subviews> + <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="MemberBackground" translatesAutoresizingMaskIntoConstraints="NO" id="tNv-oj-IEG"> + <rect key="frame" x="0.0" y="0.0" width="100" height="90"/> + <constraints> + <constraint firstAttribute="width" constant="100" id="naF-Ch-mMR"/> + </constraints> + </imageView> + <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="MemberBackground2" translatesAutoresizingMaskIntoConstraints="NO" id="dAY-wH-p8a"> + <rect key="frame" x="100" y="0.0" width="200" height="90"/> + </imageView> + <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="2xU-c5-qbv"> + <rect key="frame" x="0.0" y="0.0" width="100" height="90"/> + <subviews> + <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="门票" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="hYb-ej-IgM"> + <rect key="frame" x="27" y="30.666666666666664" width="46" height="28.666666666666664"/> + <fontDescription key="fontDescription" type="system" weight="semibold" pointSize="24"/> + <color key="textColor" red="1" green="1" blue="1" alpha="1" colorSpace="calibratedRGB"/> + <nil key="highlightedColor"/> + </label> + </subviews> + <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> + <constraints> + <constraint firstItem="hYb-ej-IgM" firstAttribute="centerY" secondItem="2xU-c5-qbv" secondAttribute="centerY" id="DC3-ib-x5s"/> + <constraint firstItem="hYb-ej-IgM" firstAttribute="centerX" secondItem="2xU-c5-qbv" secondAttribute="centerX" id="JG5-lW-42F"/> + </constraints> + </view> + <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="SSX-kA-h99"> + <rect key="frame" x="115" y="0.0" width="185" height="90"/> + <subviews> + <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="优惠券名称" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="MwK-vg-xjL"> + <rect key="frame" x="0.0" y="19.666666666666668" width="84.333333333333329" height="21.000000000000004"/> + <fontDescription key="fontDescription" type="system" weight="medium" pointSize="17"/> + <nil key="textColor"/> + <nil key="highlightedColor"/> + </label> + <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="有效期至2023-09-08" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="XKr-Ap-PzD"> + <rect key="frame" x="0.0" y="45.666666666666664" width="120.66666666666667" height="14.333333333333336"/> + <fontDescription key="fontDescription" type="system" pointSize="12"/> + <nil key="textColor"/> + <nil key="highlightedColor"/> + </label> + <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="8张" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="ZEZ-VJ-t0V"> + <rect key="frame" x="153.66666666666669" y="10" width="21.333333333333343" height="14.333333333333336"/> + <fontDescription key="fontDescription" type="system" pointSize="12"/> + <nil key="textColor"/> + <nil key="highlightedColor"/> + </label> + </subviews> + <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> + <constraints> + <constraint firstItem="XKr-Ap-PzD" firstAttribute="leading" secondItem="MwK-vg-xjL" secondAttribute="leading" id="7T8-vx-2bb"/> + <constraint firstItem="MwK-vg-xjL" firstAttribute="centerY" secondItem="SSX-kA-h99" secondAttribute="centerY" constant="-15" id="Bng-da-wKm"/> + <constraint firstItem="ZEZ-VJ-t0V" firstAttribute="top" secondItem="SSX-kA-h99" secondAttribute="top" constant="10" id="EHH-Vy-9me"/> + <constraint firstItem="XKr-Ap-PzD" firstAttribute="top" secondItem="MwK-vg-xjL" secondAttribute="bottom" constant="5" id="L9g-hv-Zru"/> + <constraint firstAttribute="trailing" secondItem="ZEZ-VJ-t0V" secondAttribute="trailing" constant="10" id="roA-ZU-Tgh"/> + <constraint firstItem="MwK-vg-xjL" firstAttribute="leading" secondItem="SSX-kA-h99" secondAttribute="leading" id="vXb-af-zJW"/> + </constraints> + </view> + </subviews> + <color key="backgroundColor" systemColor="systemBackgroundColor"/> + <constraints> + <constraint firstItem="2xU-c5-qbv" firstAttribute="top" secondItem="tNv-oj-IEG" secondAttribute="top" id="A6o-bT-f4S"/> + <constraint firstItem="SSX-kA-h99" firstAttribute="leading" secondItem="dAY-wH-p8a" secondAttribute="leading" constant="15" id="DLJ-VA-39j"/> + <constraint firstAttribute="trailing" secondItem="dAY-wH-p8a" secondAttribute="trailing" id="O9S-ii-D7q"/> + <constraint firstItem="2xU-c5-qbv" firstAttribute="bottom" secondItem="tNv-oj-IEG" secondAttribute="bottom" id="OpQ-Zj-AHk"/> + <constraint firstItem="dAY-wH-p8a" firstAttribute="top" secondItem="W5m-6w-aau" secondAttribute="top" id="Zhr-jL-M7C"/> + <constraint firstItem="2xU-c5-qbv" firstAttribute="trailing" secondItem="tNv-oj-IEG" secondAttribute="trailing" id="bSP-z1-fzA"/> + <constraint firstAttribute="bottom" secondItem="dAY-wH-p8a" secondAttribute="bottom" id="dRt-cp-wjk"/> + <constraint firstItem="tNv-oj-IEG" firstAttribute="top" secondItem="W5m-6w-aau" secondAttribute="top" id="isO-Va-wFT"/> + <constraint firstItem="SSX-kA-h99" firstAttribute="top" secondItem="dAY-wH-p8a" secondAttribute="top" id="kr5-Kf-5oE"/> + <constraint firstItem="2xU-c5-qbv" firstAttribute="leading" secondItem="tNv-oj-IEG" secondAttribute="leading" id="lxI-On-NI0"/> + <constraint firstItem="SSX-kA-h99" firstAttribute="bottom" secondItem="dAY-wH-p8a" secondAttribute="bottom" id="nHC-NX-u6J"/> + <constraint firstItem="tNv-oj-IEG" firstAttribute="leading" secondItem="W5m-6w-aau" secondAttribute="leading" id="pcy-YC-0Xz"/> + <constraint firstItem="dAY-wH-p8a" firstAttribute="leading" secondItem="tNv-oj-IEG" secondAttribute="trailing" id="rcI-O1-sVR"/> + <constraint firstItem="SSX-kA-h99" firstAttribute="trailing" secondItem="dAY-wH-p8a" secondAttribute="trailing" id="suR-bM-T5M"/> + <constraint firstAttribute="bottom" secondItem="tNv-oj-IEG" secondAttribute="bottom" id="yOd-WQ-H2j"/> + </constraints> + </view> + </subviews> + <constraints> + <constraint firstItem="W5m-6w-aau" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" constant="10" id="5Xy-X2-ekE"/> + <constraint firstAttribute="trailing" secondItem="W5m-6w-aau" secondAttribute="trailing" constant="10" id="CoK-at-vqL"/> + <constraint firstAttribute="bottom" secondItem="W5m-6w-aau" secondAttribute="bottom" constant="10" id="Yfk-LH-LDd"/> + <constraint firstItem="W5m-6w-aau" firstAttribute="top" secondItem="H2p-sc-9uM" secondAttribute="top" id="s1G-aF-T6p"/> + </constraints> + </tableViewCellContentView> + <viewLayoutGuide key="safeArea" id="njF-e1-oar"/> + <connections> + <outlet property="moneyLab" destination="hYb-ej-IgM" id="3mz-Rj-dc9"/> + <outlet property="nameLab" destination="MwK-vg-xjL" id="2gD-AC-x4M"/> + <outlet property="numberLab" destination="ZEZ-VJ-t0V" id="wY8-Dc-ZJi"/> + <outlet property="timeLab" destination="XKr-Ap-PzD" id="JT4-9q-AoH"/> + </connections> + <point key="canvasLocation" x="129.7709923664122" y="-35.211267605633807"/> + </tableViewCell> + </objects> + <resources> + <image name="MemberBackground" width="28" height="27.333333969116211"/> + <image name="MemberBackground2" width="27.333333969116211" height="22.666666030883789"/> + <systemColor name="systemBackgroundColor"> + <color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> + </systemColor> + </resources> +</document> diff --git a/WanPai/Root/Home/CCell/MemberCell.swift b/WanPai/Root/Home/CCell/MemberCell.swift new file mode 100644 index 0000000..4f475b5 --- /dev/null +++ b/WanPai/Root/Home/CCell/MemberCell.swift @@ -0,0 +1,53 @@ +// +// MemberCell.swift +// WanPai +// +// Created by Robert on 2025/8/20. +// + +import UIKit + +class MemberCell: UICollectionViewCell { + + @IBOutlet weak var nameLab: UILabel! + + @IBOutlet weak var moneyLab: UILabel! + + @IBOutlet weak var timeLab: UILabel! + + @IBOutlet weak var backView: UIView! + + + override func awakeFromNib() { + super.awakeFromNib() + backView.layer.shadowColor = UIColor.black.cgColor + backView.layer.shadowOffset = CGSize(width: 0, height: 2) // 阴影偏移量 + backView.layer.shadowOpacity = 0.25 // 阴影透明度 (0.0 - 1.0) + backView.layer.shadowRadius = 10 // 阴影模糊半径 + backView.layer.masksToBounds = false + backView.layer.cornerRadius = 10 + noSeleceltView() + } + + func seleceltView(){ + let color = UIColor(red: 255/250, green: 116/250, blue: 0, alpha: 1) + backView.layer.borderColor = color.cgColor + backView.layer.borderWidth = 2 + nameLab.textColor = color + moneyLab.textColor = color + timeLab.textColor = UIColor(red: 0, green: 0, blue: 0, alpha: 0.6) + } + + + func noSeleceltView(){ + + backView.layer.borderColor = UIColor.black.cgColor + backView.layer.borderWidth = 1 + nameLab.textColor = .black + moneyLab.textColor = .black + timeLab.textColor = UIColor(red: 0, green: 0, blue: 0, alpha: 0.4) + } + + + +} diff --git a/WanPai/Root/Home/CCell/MemberCell.xib b/WanPai/Root/Home/CCell/MemberCell.xib new file mode 100644 index 0000000..ea018b6 --- /dev/null +++ b/WanPai/Root/Home/CCell/MemberCell.xib @@ -0,0 +1,87 @@ +<?xml version="1.0" encoding="UTF-8"?> +<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="23504" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES"> + <device id="retina6_12" orientation="portrait" appearance="light"/> + <dependencies> + <deployment identifier="iOS"/> + <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="23506"/> + <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"/> + <collectionViewCell opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" restorationIdentifier="MemberCellId" id="gTV-IL-0wX" customClass="MemberCell" customModule="WanPai" customModuleProvider="target"> + <rect key="frame" x="0.0" y="0.0" width="175" height="188"/> + <autoresizingMask key="autoresizingMask"/> + <view key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center"> + <rect key="frame" x="0.0" y="0.0" width="175" height="188"/> + <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/> + <subviews> + <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="AK4-8R-yj7"> + <rect key="frame" x="0.0" y="0.0" width="175" height="188"/> + <subviews> + <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="会员卡名称" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="ppp-LP-H4z"> + <rect key="frame" x="47.666666666666664" y="30" width="79.666666666666686" height="22"/> + <constraints> + <constraint firstAttribute="height" constant="22" id="KNE-Gu-kUn"/> + </constraints> + <fontDescription key="fontDescription" type="system" weight="semibold" pointSize="16"/> + <color key="textColor" red="0.99199998379999998" green="0.50161166960000003" blue="0.18823529410000001" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> + <nil key="highlightedColor"/> + </label> + <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="¥888" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="khG-fB-3WK"> + <rect key="frame" x="56.666666666666671" y="59" width="61.666666666666671" height="50"/> + <constraints> + <constraint firstAttribute="height" constant="50" id="4m2-Id-DgE"/> + </constraints> + <fontDescription key="fontDescription" type="system" weight="semibold" pointSize="24"/> + <color key="textColor" red="0.99215686270000003" green="0.50196078430000002" blue="0.18823529410000001" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> + <nil key="highlightedColor"/> + </label> + <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="有效期30天" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="6t0-vR-Amh"> + <rect key="frame" x="51.666666666666664" y="120" width="71.666666666666686" height="22"/> + <constraints> + <constraint firstAttribute="height" constant="22" id="YJI-hN-C90"/> + </constraints> + <fontDescription key="fontDescription" type="system" weight="medium" pointSize="13"/> + <nil key="textColor"/> + <nil key="highlightedColor"/> + </label> + </subviews> + <color key="backgroundColor" systemColor="systemBackgroundColor"/> + <constraints> + <constraint firstItem="6t0-vR-Amh" firstAttribute="centerX" secondItem="khG-fB-3WK" secondAttribute="centerX" id="0CH-Sx-3gZ"/> + <constraint firstItem="6t0-vR-Amh" firstAttribute="top" secondItem="khG-fB-3WK" secondAttribute="bottom" constant="11" id="Cqa-84-6Gm"/> + <constraint firstItem="khG-fB-3WK" firstAttribute="top" secondItem="ppp-LP-H4z" secondAttribute="bottom" constant="7" id="EJr-RE-gdB"/> + <constraint firstItem="ppp-LP-H4z" firstAttribute="top" secondItem="AK4-8R-yj7" secondAttribute="top" constant="30" id="UKa-YA-IIh"/> + <constraint firstItem="khG-fB-3WK" firstAttribute="centerX" secondItem="ppp-LP-H4z" secondAttribute="centerX" id="bxE-xN-zzD"/> + <constraint firstItem="ppp-LP-H4z" firstAttribute="centerX" secondItem="AK4-8R-yj7" secondAttribute="centerX" id="ydX-Kg-hSL"/> + </constraints> + </view> + </subviews> + </view> + <viewLayoutGuide key="safeArea" id="ZTg-uK-7eu"/> + <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> + <constraints> + <constraint firstItem="AK4-8R-yj7" firstAttribute="leading" secondItem="gTV-IL-0wX" secondAttribute="leading" id="3mK-cd-Sqb"/> + <constraint firstAttribute="bottom" secondItem="AK4-8R-yj7" secondAttribute="bottom" id="Izh-zO-pLP"/> + <constraint firstItem="AK4-8R-yj7" firstAttribute="top" secondItem="gTV-IL-0wX" secondAttribute="top" id="M2i-N2-wNu"/> + <constraint firstAttribute="trailing" secondItem="AK4-8R-yj7" secondAttribute="trailing" id="qGl-Bt-Eiy"/> + </constraints> + <size key="customSize" width="175" height="188"/> + <connections> + <outlet property="backView" destination="AK4-8R-yj7" id="iSd-SG-1Nx"/> + <outlet property="moneyLab" destination="khG-fB-3WK" id="Fa4-ej-oPP"/> + <outlet property="nameLab" destination="ppp-LP-H4z" id="66W-I4-xrY"/> + <outlet property="timeLab" destination="6t0-vR-Amh" id="Bbf-Ze-w6V"/> + </connections> + <point key="canvasLocation" x="140" y="7"/> + </collectionViewCell> + </objects> + <resources> + <systemColor name="systemBackgroundColor"> + <color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> + </systemColor> + </resources> +</document> diff --git a/WanPai/Root/Home/VC/HomeVC.swift b/WanPai/Root/Home/VC/HomeVC.swift index b36857f..6abf2ea 100644 --- a/WanPai/Root/Home/VC/HomeVC.swift +++ b/WanPai/Root/Home/VC/HomeVC.swift @@ -302,7 +302,7 @@ @IBAction func joinMemberAction(_ sender: UIButton) { - let joinMemberVC = JoinMemberIntroduceVC() + let joinMemberVC = JoinMemberVC() push(vc: joinMemberVC) } diff --git a/WanPai/Root/Home/VC/HomeVC.xib b/WanPai/Root/Home/VC/HomeVC.xib index cb9eb99..356a65a 100644 --- a/WanPai/Root/Home/VC/HomeVC.xib +++ b/WanPai/Root/Home/VC/HomeVC.xib @@ -1,9 +1,9 @@ <?xml version="1.0" encoding="UTF-8"?> -<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="22505" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES"> +<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="23504" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES"> <device id="retina6_12" orientation="portrait" appearance="light"/> <dependencies> <deployment identifier="iOS"/> - <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="22504"/> + <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="23506"/> <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"/> @@ -94,7 +94,7 @@ </connections> </view> <label hidden="YES" opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="2" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Y4w-3W-3I4"> - <rect key="frame" x="18" y="126.66666666666669" width="206.33333333333334" height="43"/> + <rect key="frame" x="18" y="126.66666666666669" width="201" height="43"/> <string key="text">欢迎来到 快乐运动俱乐部 加入我们 成为会员</string> <fontDescription key="fontDescription" type="system" pointSize="18"/> @@ -111,7 +111,7 @@ <nil key="highlightedColor"/> </label> <button hidden="YES" opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="poJ-Yp-Ex1"> - <rect key="frame" x="18" y="126.66666666666669" width="206.33333333333334" height="43"/> + <rect key="frame" x="18" y="126.66666666666669" width="201" height="43"/> <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/> <connections> <action selector="joinMemberAction:" destination="-1" eventType="touchUpInside" id="wxy-tX-qp7"/> @@ -172,7 +172,7 @@ <constraint firstItem="fnl-2z-Ty3" firstAttribute="bottom" secondItem="ysy-N3-BCh" secondAttribute="bottom" id="jgP-5H-akR"/> <constraint firstItem="WGQ-UH-Uvg" firstAttribute="top" secondItem="i5M-Pr-FkT" secondAttribute="top" id="sgb-fE-wnZ"/> </constraints> - <point key="canvasLocation" x="29.770992366412212" y="20.422535211267608"/> + <point key="canvasLocation" x="-175" y="-61"/> </view> </objects> <resources> diff --git a/WanPai/Root/Home/VC/JoinMemberIntroduceVC.swift b/WanPai/Root/Home/VC/JoinMemberIntroduceVC.swift index 7c59e8e..71f0123 100644 --- a/WanPai/Root/Home/VC/JoinMemberIntroduceVC.swift +++ b/WanPai/Root/Home/VC/JoinMemberIntroduceVC.swift @@ -42,7 +42,7 @@ #endif PaymentView.show(enumType: .joinMember, money: (ali:price,wx:price,coin:nil,course:nil,integral:nil)) { type in - Services.enrollMember(paytype: type).subscribe(onNext: {data in + Services.enrollMember(paytype: type, id: 0).subscribe(onNext: {data in if let m = data.data{ switch type { case .aliPay: diff --git a/WanPai/Root/Home/VC/JoinMemberVC.swift b/WanPai/Root/Home/VC/JoinMemberVC.swift new file mode 100644 index 0000000..83b4677 --- /dev/null +++ b/WanPai/Root/Home/VC/JoinMemberVC.swift @@ -0,0 +1,171 @@ +// +// JoinMemberVC.swift +// WanPai +// +// Created by Robert on 2025/8/19. +// + +import UIKit + +class JoinMemberVC: BaseVC, UITableViewDelegate, UITableViewDataSource { + func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { + if let m = model { + return 1 + m.vipList[selectIndex].couponList.count + m.vipList[selectIndex].ticketList.count + }else{ + return 0 + } + } + + func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { + + if indexPath.row == 0 { + let cell = tableView.dequeueReusableCell(withIdentifier: "CouponCellThreeId", for: indexPath) as! CouponCellThree + cell.vipList = model?.vipList + cell.selectBlock = { index in + self.selectIndex = index + } + return cell + + }else if indexPath.row > 0 && indexPath.row < ((model?.vipList[selectIndex].couponList.count ?? 0) + 1) { + let cell = tableView.dequeueReusableCell(withIdentifier: "_WelfareCouponsTCell", for: indexPath) as! WelfareCouponsTCell +// cell.moneyLab.text = model?.vipList[selectIndex].couponList[indexPath.row - 1].ruleModel?.deductionAmount +// cell.remarksLab.text = model?.vipList[selectIndex].couponList[indexPath.row - 1].ruleModel?.conditionalAmount +// cell.nameLab.text = model?.vipList[selectIndex].couponList[indexPath.row - 1].name +// cell.timeLab.text = "有效期至\(model?.vipList[selectIndex].couponList[indexPath.row - 1].effectiveTime ?? "")" +// cell.contentLab.text = model?.vipList[selectIndex].couponList[indexPath.row - 1].instructionsForUse + if let m = model?.vipList[selectIndex].couponList[indexPath.row - 1] { + cell.couponModel = m + } + + return cell + }else{ + let cell = tableView.dequeueReusableCell(withIdentifier: "CouponCellTwoId", for: indexPath) as! CouponCellTwo + let index = indexPath.row - ((model?.vipList[selectIndex].couponList.count ?? 0) + 1) + cell.nameLab.text = model?.vipList[selectIndex].ticketList[index].name + cell.timeLab.text = "领取后\(model?.vipList[selectIndex].ticketList[index].time ?? 0)有效" + cell.numberLab.text = "\(model?.vipList[selectIndex].ticketList[index].count ?? 0)张" + return cell + } + + } + + func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat { + + if indexPath.row == 0 { + return 295 + + }else if indexPath.row > 0 && indexPath.row < ((model?.vipList[selectIndex].couponList.count ?? 0) + 1) { + return 170 + }else{ + return 110 + } + } + + @IBOutlet weak var tabView: UITableView! + @IBOutlet weak var scrBackView: UIView! + var model: VipDataModel? + var selectIndex: Int = 0 + + @IBOutlet weak var headerImg: UIImageView! + @IBOutlet weak var memberLab: UILabel! + @IBOutlet weak var nameLab: UILabel! + var acceptXy: Bool = false + override func viewDidLoad() { + super.viewDidLoad() + tabView.separatorStyle = .none + tabView.delegate = self + tabView.dataSource = self + tabView.register(UINib(nibName: "CouponCellThree", bundle: nil), forCellReuseIdentifier: "CouponCellThreeId") + tabView.register(UINib(nibName: "CouponCellTwo", bundle: nil), forCellReuseIdentifier: "CouponCellTwoId") + tabView.register(UINib(nibName: "WelfareCouponsTCell", bundle: nil), forCellReuseIdentifier: "_WelfareCouponsTCell") +// tabView.register(UINib(nibName: "CouponCell", bundle: nil), forCellReuseIdentifier: "CouponCellId") + Services.vipPayment().subscribe(onNext: { [weak self]data in + self?.model = data.data + self?.tabView.reloadData() + self?.nameLab.text = data.data?.name + if data.data?.isVip ?? 0 > 0 { + self?.memberLab.text = "当前暂未开通会员" + }else{ + self?.memberLab.text = "Vip" + } + self?.headerImg.sd_setImage(with: URL(string: self?.model?.headImg ?? "")) + }).disposed(by: disposeBag) + + } + + + @IBAction func selectAcceptAction(_ sender: UIButton) { + sender.isSelected = !sender.isSelected + acceptXy = sender.isSelected + } + + @IBAction func lookxyAction(_ sender: UIButton) { + if acceptXy == false { + alertError(msg: "请先同意会员协议") + }else{ + push(vc: CommonWebVC(type: .matchPoint,customTitle: "会员协议",content: "",needBackBtn: true)) + } + } + + + @IBAction func playAction(_ sender: Any) { + PaymentView.show(enumType: .joinMember, money: (ali:self.model?.vipList[self.selectIndex].price?.doubleValue ?? 0,wx:self.model?.vipList[self.selectIndex].price?.doubleValue ?? 0,coin:nil,course:nil,integral:nil)) { type in + Services.enrollMember(paytype: type,id: self.model?.vipList[self.selectIndex].id ?? 0).subscribe(onNext: {data in + if let m = data.data{ + switch type { + case .aliPay: + if let orderString = data.data?.orderString{ + YYPaymentManager.shared.sendPaymentRequest(YYAlipayRequest(orderString: orderString)) {[weak self] result in + guard let weakSelf = self else { return } + switch result { + case .success: + let vc = PaymentResultVC(result: .success, objType: .member, handleVC: nil, courseConfigId: nil, againClouse: nil) + weakSelf.push(vc: vc) + case .cancel: + let vc = PaymentResultVC(result: .fail("已取消支付", 0), objType: .member, handleVC: nil, courseConfigId: nil, againClouse: nil) + weakSelf.push(vc: vc) + case .failure(let error): + if let er = error as? NetworkRequest.NetRequestError{ + switch er { + case .Other(let code,let string): + let vc = PaymentResultVC(result: .fail(string,code), objType: .member) + weakSelf.push(vc: vc) + default: + let vc = PaymentResultVC(result: .fail("支付失败",0), objType: .member) + weakSelf.push(vc: vc) + } + } + } + } + } + case .wechat: + YYPaymentManager.shared.sendPaymentRequest(YYWeChatPayRequest(partnerId: m.partnerid, prepayId: m.prepayid, package: m.package, nonceStr: m.noncestr, timeStamp: m.timestamp, sign: m.sign)) {[weak self] result in + guard let weakSelf = self else { return } + switch result { + case .success: + let vc = PaymentResultVC(result: .success, objType: .member, handleVC: nil, courseConfigId: nil, againClouse: nil) + weakSelf.push(vc: vc) + case .cancel: + let vc = PaymentResultVC(result: .fail("已取消支付", 0), objType: .member, handleVC: nil, courseConfigId: nil, againClouse: nil) + weakSelf.push(vc: vc) + case .failure(let error): + if let er = error as? NetworkRequest.NetRequestError{ + switch er { + case .Other(let code,let string): + let vc = PaymentResultVC(result: .fail(string,code), objType: .member) + weakSelf.push(vc: vc) + default: + let vc = PaymentResultVC(result: .fail("支付失败",0), objType: .member) + weakSelf.push(vc: vc) + } + } + } + } + default:break + } + } + + }).disposed(by: self.disposeBag) + } + } +} diff --git a/WanPai/Root/Home/VC/JoinMemberVC.xib b/WanPai/Root/Home/VC/JoinMemberVC.xib new file mode 100644 index 0000000..199fe37 --- /dev/null +++ b/WanPai/Root/Home/VC/JoinMemberVC.xib @@ -0,0 +1,227 @@ +<?xml version="1.0" encoding="UTF-8"?> +<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="23504" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES"> + <device id="retina6_12" orientation="portrait" appearance="light"/> + <dependencies> + <deployment identifier="iOS"/> + <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="23506"/> + <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="JoinMemberVC" customModule="WanPai" customModuleProvider="target"> + <connections> + <outlet property="headerImg" destination="eXB-k6-87a" id="Crz-eh-yUL"/> + <outlet property="memberLab" destination="Tw7-eR-xfP" id="GTD-hb-t8w"/> + <outlet property="nameLab" destination="RjA-5O-ZqV" id="5n5-X3-mv2"/> + <outlet property="scrBackView" destination="oQI-rU-VGE" id="D4x-bE-BD5"/> + <outlet property="tabView" destination="WIB-0U-iRO" id="RkR-vX-TsL"/> + <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> + <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="yr9-3E-lu7"> + <rect key="frame" x="0.0" y="0.0" width="393" height="852"/> + <subviews> + <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="bY5-he-dlH"> + <rect key="frame" x="0.0" y="0.0" width="393" height="250"/> + <subviews> + <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="JCJ-e1-WjV"> + <rect key="frame" x="14" y="120" width="365" height="130"/> + <subviews> + <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="eXB-k6-87a"> + <rect key="frame" x="20" y="30" width="70" height="70"/> + <constraints> + <constraint firstAttribute="height" constant="70" id="Wh1-bt-uB8"/> + <constraint firstAttribute="width" constant="70" id="ZPD-dn-Kh8"/> + </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="RjA-5O-ZqV"> + <rect key="frame" x="100" y="40" width="34" height="21"/> + <fontDescription key="fontDescription" type="system" weight="semibold" pointSize="17"/> + <nil key="textColor"/> + <nil key="highlightedColor"/> + </label> + <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="当前暂未开通会员" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Tw7-eR-xfP"> + <rect key="frame" x="100" y="66" width="143" height="21"/> + <fontDescription key="fontDescription" type="system" pointSize="18"/> + <color key="textColor" red="0.31764705879999999" green="0.31799998880000002" blue="0.31799998880000002" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> + <nil key="highlightedColor"/> + </label> + </subviews> + <color key="backgroundColor" systemColor="systemBackgroundColor"/> + <constraints> + <constraint firstItem="RjA-5O-ZqV" firstAttribute="leading" secondItem="eXB-k6-87a" secondAttribute="trailing" constant="10" id="5Kn-a3-A2R"/> + <constraint firstItem="Tw7-eR-xfP" firstAttribute="leading" secondItem="RjA-5O-ZqV" secondAttribute="leading" id="POG-7g-XZs"/> + <constraint firstItem="Tw7-eR-xfP" firstAttribute="top" secondItem="RjA-5O-ZqV" secondAttribute="bottom" constant="5" id="byr-HY-cBT"/> + <constraint firstItem="eXB-k6-87a" firstAttribute="leading" secondItem="JCJ-e1-WjV" secondAttribute="leading" constant="20" id="e03-4T-J7h"/> + <constraint firstItem="eXB-k6-87a" firstAttribute="centerY" secondItem="JCJ-e1-WjV" secondAttribute="centerY" id="eIP-98-hya"/> + <constraint firstAttribute="height" constant="130" id="fQa-Oo-hgZ"/> + <constraint firstItem="RjA-5O-ZqV" firstAttribute="top" secondItem="eXB-k6-87a" secondAttribute="top" constant="10" id="yYe-PF-sgx"/> + </constraints> + </view> + </subviews> + <color key="backgroundColor" red="0.99215686274509807" green="0.50196078431372548" blue="0.18823529411764706" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> + <constraints> + <constraint firstItem="JCJ-e1-WjV" firstAttribute="centerX" secondItem="bY5-he-dlH" secondAttribute="centerX" id="EjB-DR-cvi"/> + <constraint firstItem="JCJ-e1-WjV" firstAttribute="leading" secondItem="bY5-he-dlH" secondAttribute="leading" constant="14" id="G2x-Fs-OmC"/> + <constraint firstAttribute="trailing" secondItem="JCJ-e1-WjV" secondAttribute="trailing" constant="14" id="aNd-c6-ML7"/> + <constraint firstAttribute="bottom" secondItem="JCJ-e1-WjV" secondAttribute="bottom" id="edm-sh-8R5"/> + <constraint firstAttribute="height" constant="250" id="mHJ-ba-9go"/> + </constraints> + </view> + <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="5T5-7V-4pt"> + <rect key="frame" x="0.0" y="230" width="393" height="200"/> + <subviews> + <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="Rectangle" translatesAutoresizingMaskIntoConstraints="NO" id="FgO-Un-GNg"> + <rect key="frame" x="0.0" y="0.0" width="393" height="200"/> + </imageView> + </subviews> + <color key="backgroundColor" systemColor="systemBackgroundColor"/> + <constraints> + <constraint firstItem="FgO-Un-GNg" firstAttribute="top" secondItem="5T5-7V-4pt" secondAttribute="top" id="HQu-XI-C2M"/> + <constraint firstAttribute="bottom" secondItem="FgO-Un-GNg" secondAttribute="bottom" id="NW9-QS-6qQ"/> + <constraint firstAttribute="trailing" secondItem="FgO-Un-GNg" secondAttribute="trailing" id="PDN-Q5-WcS"/> + <constraint firstAttribute="height" constant="200" id="dgJ-Gr-xcv"/> + <constraint firstItem="FgO-Un-GNg" firstAttribute="leading" secondItem="5T5-7V-4pt" secondAttribute="leading" id="ppW-1C-8KC"/> + </constraints> + </view> + <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="eLA-xc-jk8"> + <rect key="frame" x="0.0" y="736" width="393" height="116"/> + <subviews> + <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="f6n-Cv-r8I"> + <rect key="frame" x="15" y="15" width="20" height="20"/> + <constraints> + <constraint firstAttribute="width" constant="20" id="EHv-IQ-GMO"/> + <constraint firstAttribute="height" constant="20" id="JCL-ct-yji"/> + </constraints> + <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/> + <state key="normal" image="btn_choose_1"/> + <state key="selected" image="btn_choose_s"/> + <connections> + <action selector="selectAcceptAction:" destination="-1" eventType="touchUpInside" id="4vH-RP-iKE"/> + </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="p2I-Ng-EZy"> + <rect key="frame" x="39.999999999999993" y="16.666666666666629" width="97.333333333333314" height="17"/> + <fontDescription key="fontDescription" type="system" pointSize="14"/> + <nil key="textColor"/> + <nil key="highlightedColor"/> + </label> + <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="《会员协议》" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="oIl-O5-bRE"> + <rect key="frame" x="137.33333333333334" y="16.666666666666629" width="70" height="17"/> + <fontDescription key="fontDescription" type="system" pointSize="14"/> + <color key="textColor" red="0.62745098039215685" green="0.42745098039215684" blue="0.16470588235294117" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> + <nil key="highlightedColor"/> + </label> + <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="az9-cM-2MP"> + <rect key="frame" x="15" y="43.666666666666629" width="363" height="44"/> + <color key="backgroundColor" red="0.99199998379999998" green="0.50161166960000003" blue="0.18823529410000001" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> + <constraints> + <constraint firstAttribute="height" constant="44" id="32q-wu-8sh"/> + </constraints> + <fontDescription key="fontDescription" type="system" weight="semibold" pointSize="18"/> + <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/> + <state key="normal" title="立即开通"/> + <connections> + <action selector="playAction:" destination="-1" eventType="touchUpInside" id="zML-PY-bcd"/> + </connections> + </button> + <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="hQk-Gy-cR1"> + <rect key="frame" x="0.0" y="0.0" width="393" height="1"/> + <color key="backgroundColor" systemColor="systemGray6Color"/> + <constraints> + <constraint firstAttribute="height" constant="1" id="Xdb-EB-MzB"/> + </constraints> + </view> + <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="68a-V7-QyT"> + <rect key="frame" x="135" y="7.6666666666666288" width="75" height="35"/> + <constraints> + <constraint firstAttribute="height" constant="35" id="2xB-Z5-W3K"/> + <constraint firstAttribute="width" constant="75" id="Jx5-XY-rcp"/> + </constraints> + <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/> + <connections> + <action selector="lookxyAction:" destination="-1" eventType="touchUpInside" id="oiQ-XH-8Gm"/> + </connections> + </button> + </subviews> + <color key="backgroundColor" systemColor="systemBackgroundColor"/> + <constraints> + <constraint firstItem="p2I-Ng-EZy" firstAttribute="centerY" secondItem="f6n-Cv-r8I" secondAttribute="centerY" id="1yO-XI-hVq"/> + <constraint firstAttribute="height" constant="116" id="5P5-Fq-1G6"/> + <constraint firstItem="68a-V7-QyT" firstAttribute="centerY" secondItem="oIl-O5-bRE" secondAttribute="centerY" id="5WW-XX-0H0"/> + <constraint firstItem="oIl-O5-bRE" firstAttribute="centerY" secondItem="p2I-Ng-EZy" secondAttribute="centerY" id="CbA-eb-w1Q"/> + <constraint firstItem="hQk-Gy-cR1" firstAttribute="leading" secondItem="eLA-xc-jk8" secondAttribute="leading" id="H8E-o1-5aq"/> + <constraint firstAttribute="trailing" secondItem="hQk-Gy-cR1" secondAttribute="trailing" id="LhU-0Z-CEB"/> + <constraint firstItem="hQk-Gy-cR1" firstAttribute="top" secondItem="eLA-xc-jk8" secondAttribute="top" id="LiZ-ru-otf"/> + <constraint firstItem="az9-cM-2MP" firstAttribute="leading" secondItem="eLA-xc-jk8" secondAttribute="leading" constant="15" id="MQP-Ug-Zmo"/> + <constraint firstItem="f6n-Cv-r8I" firstAttribute="leading" secondItem="eLA-xc-jk8" secondAttribute="leading" constant="15" id="OBV-eD-ThG"/> + <constraint firstItem="68a-V7-QyT" firstAttribute="centerX" secondItem="oIl-O5-bRE" secondAttribute="centerX" id="RgA-Df-Z8P"/> + <constraint firstAttribute="trailing" secondItem="az9-cM-2MP" secondAttribute="trailing" constant="15" id="Zjb-R1-PSR"/> + <constraint firstItem="f6n-Cv-r8I" firstAttribute="top" secondItem="eLA-xc-jk8" secondAttribute="top" constant="15" id="dvX-Zn-9HS"/> + <constraint firstItem="oIl-O5-bRE" firstAttribute="leading" secondItem="p2I-Ng-EZy" secondAttribute="trailing" id="pG2-z3-mQ8"/> + <constraint firstItem="p2I-Ng-EZy" firstAttribute="leading" secondItem="f6n-Cv-r8I" secondAttribute="trailing" constant="5" id="vA6-qq-cEJ"/> + <constraint firstItem="az9-cM-2MP" firstAttribute="top" secondItem="p2I-Ng-EZy" secondAttribute="bottom" constant="10" id="xDZ-q1-JCN"/> + </constraints> + </view> + <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="oQI-rU-VGE"> + <rect key="frame" x="0.0" y="265" width="393" height="471"/> + <subviews> + <tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" style="plain" separatorStyle="default" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="-1" estimatedSectionHeaderHeight="-1" sectionFooterHeight="-1" estimatedSectionFooterHeight="-1" translatesAutoresizingMaskIntoConstraints="NO" id="WIB-0U-iRO"> + <rect key="frame" x="0.0" y="0.0" width="393" height="471"/> + <color key="backgroundColor" systemColor="systemBackgroundColor"/> + </tableView> + </subviews> + <color key="backgroundColor" systemColor="systemBackgroundColor"/> + <constraints> + <constraint firstAttribute="bottom" secondItem="WIB-0U-iRO" secondAttribute="bottom" id="VP6-52-PXG"/> + <constraint firstItem="WIB-0U-iRO" firstAttribute="leading" secondItem="oQI-rU-VGE" secondAttribute="leading" id="mrM-h5-sPY"/> + <constraint firstItem="WIB-0U-iRO" firstAttribute="top" secondItem="oQI-rU-VGE" secondAttribute="top" id="wSc-FS-csx"/> + <constraint firstAttribute="trailing" secondItem="WIB-0U-iRO" secondAttribute="trailing" id="xEy-AF-Vjf"/> + </constraints> + </view> + </subviews> + <color key="backgroundColor" systemColor="systemBackgroundColor"/> + <constraints> + <constraint firstAttribute="trailing" secondItem="5T5-7V-4pt" secondAttribute="trailing" id="3a5-bh-eJA"/> + <constraint firstItem="5T5-7V-4pt" firstAttribute="top" secondItem="yr9-3E-lu7" secondAttribute="top" constant="230" id="8cB-FU-qPz"/> + <constraint firstItem="eLA-xc-jk8" firstAttribute="leading" secondItem="yr9-3E-lu7" secondAttribute="leading" id="9MB-ZP-kJE"/> + <constraint firstItem="bY5-he-dlH" firstAttribute="top" secondItem="yr9-3E-lu7" secondAttribute="top" id="Aeq-Wv-SQ9"/> + <constraint firstAttribute="trailing" secondItem="bY5-he-dlH" secondAttribute="trailing" id="GE4-ea-9et"/> + <constraint firstAttribute="trailing" secondItem="oQI-rU-VGE" secondAttribute="trailing" id="ImU-wJ-MTj"/> + <constraint firstItem="oQI-rU-VGE" firstAttribute="leading" secondItem="yr9-3E-lu7" secondAttribute="leading" id="WPk-nn-9EO"/> + <constraint firstItem="5T5-7V-4pt" firstAttribute="leading" secondItem="yr9-3E-lu7" secondAttribute="leading" id="cLd-Ox-c56"/> + <constraint firstAttribute="trailing" secondItem="eLA-xc-jk8" secondAttribute="trailing" id="cQk-Gy-r4h"/> + <constraint firstItem="oQI-rU-VGE" firstAttribute="top" secondItem="bY5-he-dlH" secondAttribute="bottom" constant="15" id="ceB-Za-2kL"/> + <constraint firstItem="eLA-xc-jk8" firstAttribute="top" secondItem="oQI-rU-VGE" secondAttribute="bottom" id="d7M-73-8eU"/> + <constraint firstAttribute="bottom" secondItem="eLA-xc-jk8" secondAttribute="bottom" id="gvC-iV-Nzp"/> + <constraint firstItem="bY5-he-dlH" firstAttribute="leading" secondItem="yr9-3E-lu7" secondAttribute="leading" id="j9i-D8-fov"/> + </constraints> + </view> + </subviews> + <color key="backgroundColor" systemColor="systemBackgroundColor"/> + <constraints> + <constraint firstAttribute="bottom" secondItem="yr9-3E-lu7" secondAttribute="bottom" id="WQb-iA-szp"/> + <constraint firstAttribute="trailing" secondItem="yr9-3E-lu7" secondAttribute="trailing" id="dCo-35-DiH"/> + <constraint firstItem="yr9-3E-lu7" firstAttribute="top" secondItem="i5M-Pr-FkT" secondAttribute="top" id="fBf-Ce-XoR"/> + <constraint firstItem="yr9-3E-lu7" firstAttribute="leading" secondItem="i5M-Pr-FkT" secondAttribute="leading" id="rNm-wl-wa4"/> + </constraints> + <point key="canvasLocation" x="18" y="11"/> + </view> + </objects> + <resources> + <image name="Rectangle" width="390" height="379.66665649414062"/> + <image name="btn_choose_1" width="24" height="24"/> + <image name="btn_choose_s" width="25" height="25"/> + <systemColor name="systemBackgroundColor"> + <color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> + </systemColor> + <systemColor name="systemGray6Color"> + <color red="0.94901960780000005" green="0.94901960780000005" blue="0.96862745100000003" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> + </systemColor> + </resources> +</document> diff --git a/WanPai/Root/Search/VC/MatchDetailVC.swift b/WanPai/Root/Search/VC/MatchDetailVC.swift index 6cd4824..891d14e 100644 --- a/WanPai/Root/Search/VC/MatchDetailVC.swift +++ b/WanPai/Root/Search/VC/MatchDetailVC.swift @@ -213,7 +213,7 @@ if model.type != 2 { btn_handle.isSelected = deviceModel != nil }else { - btn_handle.isSelected = true + btn_handle.isSelected = false } } @@ -235,6 +235,8 @@ } @IBAction func handleAction(_ sender: UIButton) { + + if sender.titleLabel?.text == "结束比赛" { EndGameAlertView.show {[weak self] red, blue in @@ -291,15 +293,17 @@ if status{ Services.startWorldCup(code: devCode, people: tempArray.jq_toJson1(), worldCupId: weakSelf.model.id).subscribe(onNext: {data in if let _ = data.data{ - weakSelf.startModel = data.data + let m = JSONDeserializer<SimpleModel>.deserializeFrom(json: data.data) + weakSelf.startModel = m alert(msg: "比赛开始") sender.isSelected = true weakSelf.redTeamItems.removeAll() weakSelf.blueTeamItems.removeAll() + + weakSelf.updateUserView() if weakSelf.model.type == 2{ weakSelf.btn_handle.setTitle("结束比赛", for: .normal) } - weakSelf.updateUserView() } }).disposed(by: weakSelf.disposeBag) } diff --git a/WanPai/Root/Search/VC/SearchVC.swift b/WanPai/Root/Search/VC/SearchVC.swift index f6aff50..f966e1a 100644 --- a/WanPai/Root/Search/VC/SearchVC.swift +++ b/WanPai/Root/Search/VC/SearchVC.swift @@ -175,7 +175,7 @@ } @IBAction func becomeVIPAction(_ sender: Any) { - let vc = JoinMemberIntroduceVC() + let vc = JoinMemberVC() push(vc: vc) } @@ -235,6 +235,8 @@ case "我的二维码": let vc = MeQRCodeVC() push(vc: vc) +// let vc = JoinMemberVC() +// push(vc: vc) case "我的订场": let vc = YardBookingListVC() push(vc: vc) diff --git a/WanPai/Root/Search/VC/WorldCupContentApplyInputVC.swift b/WanPai/Root/Search/VC/WorldCupContentApplyInputVC.swift index 137dbbb..bfbd6bc 100644 --- a/WanPai/Root/Search/VC/WorldCupContentApplyInputVC.swift +++ b/WanPai/Root/Search/VC/WorldCupContentApplyInputVC.swift @@ -158,7 +158,7 @@ } @IBAction func webAction(_ sender: Any) { - let webVC = CommonWebVC(type: .matchStore,customTitle: "社区世界杯报名协议") + let webVC = CommonWebVC(type: .matchStore,customTitle: "参赛协议", content: "") push(vc: webVC) } diff --git a/WanPai/Root/Search/VC/WorldCupContentApplyInputVC.xib b/WanPai/Root/Search/VC/WorldCupContentApplyInputVC.xib index 5a57b0f..549aa3c 100644 --- a/WanPai/Root/Search/VC/WorldCupContentApplyInputVC.xib +++ b/WanPai/Root/Search/VC/WorldCupContentApplyInputVC.xib @@ -1,9 +1,9 @@ <?xml version="1.0" encoding="UTF-8"?> -<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="32700.99.1234" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES"> +<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="23504" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES"> <device id="retina6_12" orientation="portrait" appearance="light"/> <dependencies> <deployment identifier="iOS"/> - <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="22684"/> + <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="23506"/> <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"/> @@ -132,7 +132,7 @@ </userDefinedRuntimeAttributes> </view> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="截止报名时间" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="IrW-dH-dqc"> - <rect key="frame" x="22" y="13" width="73.666666666666671" height="14.333333333333336"/> + <rect key="frame" x="22" y="13" width="71.666666666666671" height="14.333333333333336"/> <fontDescription key="fontDescription" type="system" weight="semibold" pointSize="12"/> <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="0.5" colorSpace="custom" customColorSpace="sRGB"/> <nil key="highlightedColor"/> @@ -173,7 +173,7 @@ </userDefinedRuntimeAttributes> </view> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="开始时间" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="k0a-1L-bTy"> - <rect key="frame" x="22.000000000000004" y="6.0000000000000009" width="49.333333333333343" height="14.333333333333336"/> + <rect key="frame" x="22" y="6.0000000000000009" width="48" height="14.333333333333336"/> <fontDescription key="fontDescription" type="system" weight="semibold" pointSize="12"/> <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="0.5" colorSpace="custom" customColorSpace="sRGB"/> <nil key="highlightedColor"/> @@ -214,7 +214,7 @@ </userDefinedRuntimeAttributes> </view> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="结束时间" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="QGU-ac-iPD"> - <rect key="frame" x="22.000000000000004" y="6.0000000000000009" width="49.333333333333343" height="14.333333333333336"/> + <rect key="frame" x="22" y="6.0000000000000009" width="48" height="14.333333333333336"/> <fontDescription key="fontDescription" type="system" weight="semibold" pointSize="12"/> <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="0.5" colorSpace="custom" customColorSpace="sRGB"/> <nil key="highlightedColor"/> @@ -255,7 +255,7 @@ </userDefinedRuntimeAttributes> </view> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="报名年龄" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="vC4-SB-uvi"> - <rect key="frame" x="22.000000000000004" y="6.0000000000000009" width="49.333333333333343" height="14.333333333333336"/> + <rect key="frame" x="22" y="6.0000000000000009" width="48" height="14.333333333333336"/> <fontDescription key="fontDescription" type="system" weight="semibold" pointSize="12"/> <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="0.5" colorSpace="custom" customColorSpace="sRGB"/> <nil key="highlightedColor"/> @@ -296,7 +296,7 @@ </userDefinedRuntimeAttributes> </view> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="参赛者性别" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="H3I-yA-Bya"> - <rect key="frame" x="22.000000000000004" y="6.0000000000000009" width="61.333333333333343" height="14.333333333333336"/> + <rect key="frame" x="21.999999999999996" y="6.0000000000000009" width="59.666666666666657" height="14.333333333333336"/> <fontDescription key="fontDescription" type="system" weight="semibold" pointSize="12"/> <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="0.5" colorSpace="custom" customColorSpace="sRGB"/> <nil key="highlightedColor"/> @@ -337,7 +337,7 @@ </userDefinedRuntimeAttributes> </view> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="参赛地址" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="HZH-XR-Cyd"> - <rect key="frame" x="22.000000000000004" y="6.0000000000000009" width="49.333333333333343" height="14.333333333333336"/> + <rect key="frame" x="22" y="6.0000000000000009" width="48" height="14.333333333333336"/> <fontDescription key="fontDescription" type="system" weight="semibold" pointSize="12"/> <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="0.5" colorSpace="custom" customColorSpace="sRGB"/> <nil key="highlightedColor"/> @@ -388,7 +388,7 @@ </userDefinedRuntimeAttributes> </view> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="参赛赛点" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="WIP-Iv-LJH"> - <rect key="frame" x="22.000000000000004" y="6.0000000000000009" width="49.333333333333343" height="14.333333333333336"/> + <rect key="frame" x="22" y="6.0000000000000009" width="48" height="14.333333333333336"/> <fontDescription key="fontDescription" type="system" weight="semibold" pointSize="12"/> <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="0.5" colorSpace="custom" customColorSpace="sRGB"/> <nil key="highlightedColor"/> @@ -495,13 +495,13 @@ <rect key="frame" x="182.66666666666663" y="0.0" width="182.33333333333337" height="20"/> <subviews> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="玩湃币:" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="5zU-uC-sCE"> - <rect key="frame" x="0.0" y="1.6666666666666288" width="50.333333333333336" height="17"/> + <rect key="frame" x="0.0" y="1.6666666666666288" width="49" height="17"/> <fontDescription key="fontDescription" type="system" pointSize="14"/> <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="0.59999999999999998" 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="cVX-U3-mzN"> - <rect key="frame" x="50.333333333333343" y="1.6666666666666288" width="47.333333333333343" height="17"/> + <rect key="frame" x="49" y="1.6666666666666288" width="46.333333333333343" height="17"/> <fontDescription key="fontDescription" type="system" weight="medium" pointSize="14"/> <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="0.80000000000000004" colorSpace="custom" customColorSpace="sRGB"/> <nil key="highlightedColor"/> @@ -583,13 +583,13 @@ </constraints> </view> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="赛事人员" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="ldY-d5-HF6"> - <rect key="frame" x="14" y="15" width="65.333333333333329" height="29"/> + <rect key="frame" x="13.999999999999996" y="15" width="63.666666666666657" height="29"/> <fontDescription key="fontDescription" type="system" weight="semibold" pointSize="16"/> <nil key="textColor"/> <nil key="highlightedColor"/> </label> <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="J6G-ci-uFv" customClass="QMUIButton"> - <rect key="frame" x="305" y="21" width="74" height="17"/> + <rect key="frame" x="307" y="21" width="72" height="17"/> <fontDescription key="fontDescription" type="system" pointSize="14"/> <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/> <state key="normal" title="选择人员" image="btn_add_1"> @@ -635,16 +635,16 @@ </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="VLx-ri-X99"> - <rect key="frame" x="48" y="15" width="86" height="14.333333333333336"/> + <rect key="frame" x="48.000000000000007" y="15" width="83.666666666666686" height="14.333333333333336"/> <fontDescription key="fontDescription" type="system" weight="medium" pointSize="12"/> <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="0.59999999999999998" colorSpace="custom" customColorSpace="sRGB"/> <nil key="highlightedColor"/> </label> <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="hRB-z0-FaB"> - <rect key="frame" x="139" y="8.6666666666667425" width="123" height="27"/> + <rect key="frame" x="136.66666666666666" y="8.6666666666667425" width="60" height="27"/> <fontDescription key="fontDescription" type="system" weight="medium" pointSize="12"/> <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/> - <state key="normal" title="《社区世界杯报名协议》"> + <state key="normal" title="《参赛协议》"> <color key="titleColor" red="0.0" green="0.47058823529999999" blue="0.80392156859999997" alpha="0.80000000000000004" colorSpace="custom" customColorSpace="sRGB"/> </state> <connections> diff --git a/WanPai/Root/Welfare/VC/WelfareCouponsListVC.swift b/WanPai/Root/Welfare/VC/WelfareCouponsListVC.swift index 73ff663..9d5c61e 100644 --- a/WanPai/Root/Welfare/VC/WelfareCouponsListVC.swift +++ b/WanPai/Root/Welfare/VC/WelfareCouponsListVC.swift @@ -29,7 +29,7 @@ // item pageMenu.spacing = 20.0 pageMenu.permutationWay = .notScrollEqualWidths - pageMenu.setItems(["全部","满减券","代金券","体验券"], selectedItemIndex: 0) + pageMenu.setItems(["全部","满减券","代金券","体验券","抵扣券"], selectedItemIndex: 0) // 字体 pageMenu.selectedItemTitleFont = UIFont.systemFont(ofSize: 14, weight: .semibold) @@ -136,7 +136,7 @@ } func totalPagesOfpageViewController(_ pageViewConteoller: FFPageViewController) -> UInt { - return 4 + return 5 } func pageViewController(_ pageViewConteoller: FFPageViewController, controllerForPage page: Int) -> UIViewController { -- Gitblit v1.7.1