Commit b29075264747944a979e6a6d9f6a580843c7c17b
1 parent
88cbc550
证书详情页面
Showing
17 changed files
with
834 additions
and
3 deletions
metaCode.xcodeproj/project.pbxproj
| @@ -78,6 +78,11 @@ | @@ -78,6 +78,11 @@ | ||
| 78 | 192ED4672C4F47E50057244C /* CNLiveSelectHangYeController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 192ED4662C4F47E50057244C /* CNLiveSelectHangYeController.swift */; }; | 78 | 192ED4672C4F47E50057244C /* CNLiveSelectHangYeController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 192ED4662C4F47E50057244C /* CNLiveSelectHangYeController.swift */; }; |
| 79 | 192ED4692C4F77370057244C /* CNLiveHangYeFirCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 192ED4682C4F77370057244C /* CNLiveHangYeFirCell.swift */; }; | 79 | 192ED4692C4F77370057244C /* CNLiveHangYeFirCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 192ED4682C4F77370057244C /* CNLiveHangYeFirCell.swift */; }; |
| 80 | 192ED46B2C4F77450057244C /* CNLiveHangYeSecCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 192ED46A2C4F77450057244C /* CNLiveHangYeSecCell.swift */; }; | 80 | 192ED46B2C4F77450057244C /* CNLiveHangYeSecCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 192ED46A2C4F77450057244C /* CNLiveHangYeSecCell.swift */; }; |
| 81 | + 192ED46D2C51FA360057244C /* CNLiveVitaeVocationalCertificateController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 192ED46C2C51FA360057244C /* CNLiveVitaeVocationalCertificateController.swift */; }; | ||
| 82 | + 192ED4702C5217CF0057244C /* CNLiveVocationalCertificateFirCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 192ED46F2C5217CF0057244C /* CNLiveVocationalCertificateFirCell.swift */; }; | ||
| 83 | + 192ED4742C521F4D0057244C /* CNLiveVocationalCertifiteCollectionViewLayout.swift in Sources */ = {isa = PBXBuildFile; fileRef = 192ED4732C521F4D0057244C /* CNLiveVocationalCertifiteCollectionViewLayout.swift */; }; | ||
| 84 | + 192ED4762C524EA10057244C /* CNLiveVitaeCertificateModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 192ED4752C524EA10057244C /* CNLiveVitaeCertificateModel.swift */; }; | ||
| 85 | + 192ED4782C5339D50057244C /* CNLiveCertificateCollectionCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 192ED4772C5339D50057244C /* CNLiveCertificateCollectionCell.swift */; }; | ||
| 81 | 1938BD172B3D6C7F00390A34 /* CNLiveAuthViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1938BD162B3D6C7F00390A34 /* CNLiveAuthViewController.swift */; }; | 86 | 1938BD172B3D6C7F00390A34 /* CNLiveAuthViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1938BD162B3D6C7F00390A34 /* CNLiveAuthViewController.swift */; }; |
| 82 | 1938BD202B46799A00390A34 /* CNLivePlayletHomePageController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1938BD1F2B46799A00390A34 /* CNLivePlayletHomePageController.swift */; }; | 87 | 1938BD202B46799A00390A34 /* CNLivePlayletHomePageController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1938BD1F2B46799A00390A34 /* CNLivePlayletHomePageController.swift */; }; |
| 83 | 1938BD222B467C1700390A34 /* CNLivePlayletHomePageCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1938BD212B467C1700390A34 /* CNLivePlayletHomePageCell.swift */; }; | 88 | 1938BD222B467C1700390A34 /* CNLivePlayletHomePageCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1938BD212B467C1700390A34 /* CNLivePlayletHomePageCell.swift */; }; |
| @@ -398,6 +403,11 @@ | @@ -398,6 +403,11 @@ | ||
| 398 | 192ED4662C4F47E50057244C /* CNLiveSelectHangYeController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveSelectHangYeController.swift; sourceTree = "<group>"; }; | 403 | 192ED4662C4F47E50057244C /* CNLiveSelectHangYeController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveSelectHangYeController.swift; sourceTree = "<group>"; }; |
| 399 | 192ED4682C4F77370057244C /* CNLiveHangYeFirCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveHangYeFirCell.swift; sourceTree = "<group>"; }; | 404 | 192ED4682C4F77370057244C /* CNLiveHangYeFirCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveHangYeFirCell.swift; sourceTree = "<group>"; }; |
| 400 | 192ED46A2C4F77450057244C /* CNLiveHangYeSecCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveHangYeSecCell.swift; sourceTree = "<group>"; }; | 405 | 192ED46A2C4F77450057244C /* CNLiveHangYeSecCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveHangYeSecCell.swift; sourceTree = "<group>"; }; |
| 406 | + 192ED46C2C51FA360057244C /* CNLiveVitaeVocationalCertificateController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveVitaeVocationalCertificateController.swift; sourceTree = "<group>"; }; | ||
| 407 | + 192ED46F2C5217CF0057244C /* CNLiveVocationalCertificateFirCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveVocationalCertificateFirCell.swift; sourceTree = "<group>"; }; | ||
| 408 | + 192ED4732C521F4D0057244C /* CNLiveVocationalCertifiteCollectionViewLayout.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveVocationalCertifiteCollectionViewLayout.swift; sourceTree = "<group>"; }; | ||
| 409 | + 192ED4752C524EA10057244C /* CNLiveVitaeCertificateModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveVitaeCertificateModel.swift; sourceTree = "<group>"; }; | ||
| 410 | + 192ED4772C5339D50057244C /* CNLiveCertificateCollectionCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveCertificateCollectionCell.swift; sourceTree = "<group>"; }; | ||
| 401 | 1938BD162B3D6C7F00390A34 /* CNLiveAuthViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveAuthViewController.swift; sourceTree = "<group>"; }; | 411 | 1938BD162B3D6C7F00390A34 /* CNLiveAuthViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveAuthViewController.swift; sourceTree = "<group>"; }; |
| 402 | 1938BD1F2B46799A00390A34 /* CNLivePlayletHomePageController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLivePlayletHomePageController.swift; sourceTree = "<group>"; }; | 412 | 1938BD1F2B46799A00390A34 /* CNLivePlayletHomePageController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLivePlayletHomePageController.swift; sourceTree = "<group>"; }; |
| 403 | 1938BD212B467C1700390A34 /* CNLivePlayletHomePageCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLivePlayletHomePageCell.swift; sourceTree = "<group>"; }; | 413 | 1938BD212B467C1700390A34 /* CNLivePlayletHomePageCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLivePlayletHomePageCell.swift; sourceTree = "<group>"; }; |
| @@ -765,6 +775,16 @@ | @@ -765,6 +775,16 @@ | ||
| 765 | path = ShopCoupon; | 775 | path = ShopCoupon; |
| 766 | sourceTree = "<group>"; | 776 | sourceTree = "<group>"; |
| 767 | }; | 777 | }; |
| 778 | + 192ED46E2C5217A00057244C /* Vitae */ = { | ||
| 779 | + isa = PBXGroup; | ||
| 780 | + children = ( | ||
| 781 | + 192ED46F2C5217CF0057244C /* CNLiveVocationalCertificateFirCell.swift */, | ||
| 782 | + 192ED4732C521F4D0057244C /* CNLiveVocationalCertifiteCollectionViewLayout.swift */, | ||
| 783 | + 192ED4772C5339D50057244C /* CNLiveCertificateCollectionCell.swift */, | ||
| 784 | + ); | ||
| 785 | + path = Vitae; | ||
| 786 | + sourceTree = "<group>"; | ||
| 787 | + }; | ||
| 768 | 1938BD112B3D6C0C00390A34 /* HomePages */ = { | 788 | 1938BD112B3D6C0C00390A34 /* HomePages */ = { |
| 769 | isa = PBXGroup; | 789 | isa = PBXGroup; |
| 770 | children = ( | 790 | children = ( |
| @@ -1145,6 +1165,7 @@ | @@ -1145,6 +1165,7 @@ | ||
| 1145 | 19DFE64C2C4792C500E428AE /* CNLiveDigitalResumeInfoController.swift */, | 1165 | 19DFE64C2C4792C500E428AE /* CNLiveDigitalResumeInfoController.swift */, |
| 1146 | 192ED4642C4DF6340057244C /* CNLiveDigitalResumeInfoSelectAddressController.swift */, | 1166 | 192ED4642C4DF6340057244C /* CNLiveDigitalResumeInfoSelectAddressController.swift */, |
| 1147 | 192ED4662C4F47E50057244C /* CNLiveSelectHangYeController.swift */, | 1167 | 192ED4662C4F47E50057244C /* CNLiveSelectHangYeController.swift */, |
| 1168 | + 192ED46C2C51FA360057244C /* CNLiveVitaeVocationalCertificateController.swift */, | ||
| 1148 | ); | 1169 | ); |
| 1149 | path = DigitalAuth; | 1170 | path = DigitalAuth; |
| 1150 | sourceTree = "<group>"; | 1171 | sourceTree = "<group>"; |
| @@ -1160,6 +1181,7 @@ | @@ -1160,6 +1181,7 @@ | ||
| 1160 | 19C735C82C1063A000CACF4E /* DigitalAuthViews */ = { | 1181 | 19C735C82C1063A000CACF4E /* DigitalAuthViews */ = { |
| 1161 | isa = PBXGroup; | 1182 | isa = PBXGroup; |
| 1162 | children = ( | 1183 | children = ( |
| 1184 | + 192ED46E2C5217A00057244C /* Vitae */, | ||
| 1163 | 19DFE6472C44BE9500E428AE /* DigitalResume */, | 1185 | 19DFE6472C44BE9500E428AE /* DigitalResume */, |
| 1164 | 19C735C92C10647B00CACF4E /* CNLiveDigitalAuthCell.swift */, | 1186 | 19C735C92C10647B00CACF4E /* CNLiveDigitalAuthCell.swift */, |
| 1165 | 19C735CB2C11A1F400CACF4E /* CNLiveDigitalThreeCollectCell.swift */, | 1187 | 19C735CB2C11A1F400CACF4E /* CNLiveDigitalThreeCollectCell.swift */, |
| @@ -1203,6 +1225,7 @@ | @@ -1203,6 +1225,7 @@ | ||
| 1203 | children = ( | 1225 | children = ( |
| 1204 | 19DFE6452C41099900E428AE /* CNLiveVitaeModel.swift */, | 1226 | 19DFE6452C41099900E428AE /* CNLiveVitaeModel.swift */, |
| 1205 | 192ED4622C4A642F0057244C /* CNLiveAddrAreaModel.swift */, | 1227 | 192ED4622C4A642F0057244C /* CNLiveAddrAreaModel.swift */, |
| 1228 | + 192ED4752C524EA10057244C /* CNLiveVitaeCertificateModel.swift */, | ||
| 1206 | ); | 1229 | ); |
| 1207 | path = Vitae; | 1230 | path = Vitae; |
| 1208 | sourceTree = "<group>"; | 1231 | sourceTree = "<group>"; |
| @@ -1956,6 +1979,7 @@ | @@ -1956,6 +1979,7 @@ | ||
| 1956 | 1917332F2B16C7C9007BCC04 /* CNLiveTimer.swift in Sources */, | 1979 | 1917332F2B16C7C9007BCC04 /* CNLiveTimer.swift in Sources */, |
| 1957 | 194134942C240583004FC047 /* CNLiveDigitalRealManageController.swift in Sources */, | 1980 | 194134942C240583004FC047 /* CNLiveDigitalRealManageController.swift in Sources */, |
| 1958 | 7CD675292A270F6A008354C1 /* WJColorChange.m in Sources */, | 1981 | 7CD675292A270F6A008354C1 /* WJColorChange.m in Sources */, |
| 1982 | + 192ED4782C5339D50057244C /* CNLiveCertificateCollectionCell.swift in Sources */, | ||
| 1959 | 194134862C196F59004FC047 /* CNLiveAuthTool.swift in Sources */, | 1983 | 194134862C196F59004FC047 /* CNLiveAuthTool.swift in Sources */, |
| 1960 | 1938BD172B3D6C7F00390A34 /* CNLiveAuthViewController.swift in Sources */, | 1984 | 1938BD172B3D6C7F00390A34 /* CNLiveAuthViewController.swift in Sources */, |
| 1961 | 19864E412BF6090400586E72 /* CNLiveDuanJuDetailCell.swift in Sources */, | 1985 | 19864E412BF6090400586E72 /* CNLiveDuanJuDetailCell.swift in Sources */, |
| @@ -1981,6 +2005,7 @@ | @@ -1981,6 +2005,7 @@ | ||
| 1981 | 798A44FB2A30999900815935 /* CNLiveAlertTool.swift in Sources */, | 2005 | 798A44FB2A30999900815935 /* CNLiveAlertTool.swift in Sources */, |
| 1982 | 191732EB2B070943007BCC04 /* CNLiveShopGoodsManageDetailsGoodsCategoryModel.swift in Sources */, | 2006 | 191732EB2B070943007BCC04 /* CNLiveShopGoodsManageDetailsGoodsCategoryModel.swift in Sources */, |
| 1983 | 19AD65AA2BA041210045A444 /* CNLiveGoodsDetailsTableViewCell.swift in Sources */, | 2007 | 19AD65AA2BA041210045A444 /* CNLiveGoodsDetailsTableViewCell.swift in Sources */, |
| 2008 | + 192ED4702C5217CF0057244C /* CNLiveVocationalCertificateFirCell.swift in Sources */, | ||
| 1984 | 194134902C22C25A004FC047 /* CNLiveDigitalMineRealNameController.swift in Sources */, | 2009 | 194134902C22C25A004FC047 /* CNLiveDigitalMineRealNameController.swift in Sources */, |
| 1985 | 19565EC02AF4DE0E007D6727 /* CNLiveShopDetailBtnsCell.swift in Sources */, | 2010 | 19565EC02AF4DE0E007D6727 /* CNLiveShopDetailBtnsCell.swift in Sources */, |
| 1986 | 191732E92B0706B3007BCC04 /* CNLiveShopClassifyCell.swift in Sources */, | 2011 | 191732E92B0706B3007BCC04 /* CNLiveShopClassifyCell.swift in Sources */, |
| @@ -2032,6 +2057,7 @@ | @@ -2032,6 +2057,7 @@ | ||
| 2032 | 1938BD202B46799A00390A34 /* CNLivePlayletHomePageController.swift in Sources */, | 2057 | 1938BD202B46799A00390A34 /* CNLivePlayletHomePageController.swift in Sources */, |
| 2033 | 790D019D2A2DCBD000C5978D /* UIView+CNLiveExtensions.swift in Sources */, | 2058 | 790D019D2A2DCBD000C5978D /* UIView+CNLiveExtensions.swift in Sources */, |
| 2034 | 790B1FB62A41938F0074CF00 /* UIImage+CNLiveExtensions.swift in Sources */, | 2059 | 790B1FB62A41938F0074CF00 /* UIImage+CNLiveExtensions.swift in Sources */, |
| 2060 | + 192ED4742C521F4D0057244C /* CNLiveVocationalCertifiteCollectionViewLayout.swift in Sources */, | ||
| 2035 | 191732F82B08AB9D007BCC04 /* CNLiveShopClassilyViewModel.swift in Sources */, | 2061 | 191732F82B08AB9D007BCC04 /* CNLiveShopClassilyViewModel.swift in Sources */, |
| 2036 | 79BB1C162B05C62900C5720C /* CNLiveShopBodyCouponView.swift in Sources */, | 2062 | 79BB1C162B05C62900C5720C /* CNLiveShopBodyCouponView.swift in Sources */, |
| 2037 | 798916E92B04532D00D08302 /* CNLiveSavePointDB.swift in Sources */, | 2063 | 798916E92B04532D00D08302 /* CNLiveSavePointDB.swift in Sources */, |
| @@ -2049,6 +2075,7 @@ | @@ -2049,6 +2075,7 @@ | ||
| 2049 | 799172342AF08D3200DC01A8 /* CNLiveShopViewModel.swift in Sources */, | 2075 | 799172342AF08D3200DC01A8 /* CNLiveShopViewModel.swift in Sources */, |
| 2050 | 799172362AF08D4500DC01A8 /* CNLiveShopBaseModel.swift in Sources */, | 2076 | 799172362AF08D4500DC01A8 /* CNLiveShopBaseModel.swift in Sources */, |
| 2051 | 790B1FB62A41938F0074CF00 /* UIImage+CNLiveExtensions.swift in Sources */, | 2077 | 790B1FB62A41938F0074CF00 /* UIImage+CNLiveExtensions.swift in Sources */, |
| 2078 | + 192ED4762C524EA10057244C /* CNLiveVitaeCertificateModel.swift in Sources */, | ||
| 2052 | 790D019D2A2DCBD000C5978D /* UIView+CNLiveExtensions.swift in Sources */, | 2079 | 790D019D2A2DCBD000C5978D /* UIView+CNLiveExtensions.swift in Sources */, |
| 2053 | 1938BD3D2B4BDD4B00390A34 /* CNLiveAlbumCell.swift in Sources */, | 2080 | 1938BD3D2B4BDD4B00390A34 /* CNLiveAlbumCell.swift in Sources */, |
| 2054 | 19E9D1622B3BBB2E00D0FB30 /* CNLiveFileManager.swift in Sources */, | 2081 | 19E9D1622B3BBB2E00D0FB30 /* CNLiveFileManager.swift in Sources */, |
| @@ -2056,6 +2083,7 @@ | @@ -2056,6 +2083,7 @@ | ||
| 2056 | 19DFE64B2C4516B000E428AE /* CNLiveDigitalResumeSecCell.swift in Sources */, | 2083 | 19DFE64B2C4516B000E428AE /* CNLiveDigitalResumeSecCell.swift in Sources */, |
| 2057 | 19DFE6462C41099900E428AE /* CNLiveVitaeModel.swift in Sources */, | 2084 | 19DFE6462C41099900E428AE /* CNLiveVitaeModel.swift in Sources */, |
| 2058 | 19CC4D472ADD006600308E2A /* CNDownSlideSingleCourseCell.swift in Sources */, | 2085 | 19CC4D472ADD006600308E2A /* CNDownSlideSingleCourseCell.swift in Sources */, |
| 2086 | + 192ED46D2C51FA360057244C /* CNLiveVitaeVocationalCertificateController.swift in Sources */, | ||
| 2059 | 191733232B14601A007BCC04 /* CNLivePlayerProgressSlider.swift in Sources */, | 2087 | 191733232B14601A007BCC04 /* CNLivePlayerProgressSlider.swift in Sources */, |
| 2060 | 1917334A2B2BE746007BCC04 /* CNLiveCreateCouponTableViewCell.swift in Sources */, | 2088 | 1917334A2B2BE746007BCC04 /* CNLiveCreateCouponTableViewCell.swift in Sources */, |
| 2061 | 191732FE2B0B3EBF007BCC04 /* CNLiveShopGoodsDetailsViewController.swift in Sources */, | 2089 | 191732FE2B0B3EBF007BCC04 /* CNLiveShopGoodsDetailsViewController.swift in Sources */, |
metaCode/Classes/Main/HomePage/Controller/DigitalAuth/CNLiveVitaeVocationalCertificateController.swift
0 → 100644
| 1 | +// | ||
| 2 | +// CNLiveVitaeVocationalCertificateController.swift | ||
| 3 | +// metaCode | ||
| 4 | +// | ||
| 5 | +// Created by zx on 2024/7/25. | ||
| 6 | +// 职业证书页面 | ||
| 7 | + | ||
| 8 | +import Foundation | ||
| 9 | +import SnapKit | ||
| 10 | + | ||
| 11 | +class CNLiveVitaeVocationalCertificateController:CNLiveBaseViewController,UITableViewDataSource, UITableViewDelegate{ | ||
| 12 | + | ||
| 13 | + lazy var dataArray :NSMutableArray = { | ||
| 14 | + let dataArray = NSMutableArray() | ||
| 15 | + return dataArray | ||
| 16 | + }() | ||
| 17 | + | ||
| 18 | + let kCNLiveVocationalCertificateFirCellIdentifier = "kCNLiveVocationalCertificateFirCellIdentifier" | ||
| 19 | + | ||
| 20 | + lazy var tableView : UITableView = { | ||
| 21 | + let tableView = UITableView(frame: .zero, style: .plain) | ||
| 22 | + tableView.dataSource = self | ||
| 23 | + tableView.delegate = self | ||
| 24 | + tableView.separatorStyle = .none | ||
| 25 | + tableView.tableFooterView = UIView.init() | ||
| 26 | + tableView.register(CNLiveVocationalCertificateFirCell.self, forCellReuseIdentifier: kCNLiveVocationalCertificateFirCellIdentifier) | ||
| 27 | + tableView.backgroundColor = .clear | ||
| 28 | + return tableView | ||
| 29 | + }() | ||
| 30 | + lazy var bottomZhiNanWhiteView :UIView = { | ||
| 31 | + let bottomNavView = UIView() | ||
| 32 | + bottomNavView.backgroundColor = .white | ||
| 33 | + return bottomNavView | ||
| 34 | + }() | ||
| 35 | + lazy var addCertificateBtn: UIButton = { | ||
| 36 | + let nextBtn = UIButton(type: .custom) | ||
| 37 | + nextBtn.setTitle("添加证书", for: .normal) | ||
| 38 | + nextBtn.setTitleColor(.white, for: .normal) | ||
| 39 | + nextBtn.backgroundColor = HexColor("#1961FE") | ||
| 40 | + nextBtn.layer.cornerRadius = 20 | ||
| 41 | + nextBtn.clipsToBounds = true | ||
| 42 | + nextBtn.addTarget(self, action: #selector(addCertificateBtnAction), for: .touchUpInside) | ||
| 43 | + return nextBtn | ||
| 44 | + }() | ||
| 45 | + lazy var cerListArr :Array<CNLiveVitaeCertificateModel> = { | ||
| 46 | + let dataArray = Array<CNLiveVitaeCertificateModel>() | ||
| 47 | + return dataArray | ||
| 48 | + }() | ||
| 49 | + | ||
| 50 | + override func viewDidLoad() { | ||
| 51 | + super.viewDidLoad() | ||
| 52 | + titleName = "职业证书" | ||
| 53 | + navigationBarHidden = false | ||
| 54 | + self.initUI() | ||
| 55 | + self.getCetList() | ||
| 56 | + } | ||
| 57 | + | ||
| 58 | + deinit {} | ||
| 59 | + func initUI(){ | ||
| 60 | + self.view.backgroundColor = HexColor("#F9F9F9") | ||
| 61 | + | ||
| 62 | + self.view.addSubview(self.tableView) | ||
| 63 | + self.tableView.snp.makeConstraints { make in | ||
| 64 | + make.top.equalTo(KNavigationHeight) | ||
| 65 | + make.left.right.equalToSuperview() | ||
| 66 | + make.height.equalToSuperview().offset(-KNavigationHeight-60) | ||
| 67 | + } | ||
| 68 | + | ||
| 69 | + self.view.addSubview(self.bottomZhiNanWhiteView) | ||
| 70 | + self.bottomZhiNanWhiteView.snp.makeConstraints { make in | ||
| 71 | + make.top.equalTo(self.tableView.snp.bottom) | ||
| 72 | + make.bottom.left.right.equalToSuperview() | ||
| 73 | + } | ||
| 74 | + | ||
| 75 | + self.bottomZhiNanWhiteView.addSubview(self.addCertificateBtn) | ||
| 76 | + self.addCertificateBtn.snp.makeConstraints { make in | ||
| 77 | + make.left.equalTo(15) | ||
| 78 | + make.right.equalToSuperview().offset(-15) | ||
| 79 | + make.top.equalTo(10) | ||
| 80 | + make.height.equalTo(40) | ||
| 81 | + } | ||
| 82 | + | ||
| 83 | + } | ||
| 84 | + | ||
| 85 | + func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { | ||
| 86 | + return 1 | ||
| 87 | + } | ||
| 88 | + | ||
| 89 | + func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { | ||
| 90 | + guard let cell = tableView.dequeueReusableCell(withIdentifier: kCNLiveVocationalCertificateFirCellIdentifier) as? CNLiveVocationalCertificateFirCell | ||
| 91 | + else { | ||
| 92 | + let cell = CNLiveVocationalCertificateFirCell() | ||
| 93 | + return cell | ||
| 94 | + } | ||
| 95 | + cell.cerListArr = self.cerListArr | ||
| 96 | + return cell | ||
| 97 | + } | ||
| 98 | + | ||
| 99 | + func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { | ||
| 100 | + | ||
| 101 | + } | ||
| 102 | + | ||
| 103 | + func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat { | ||
| 104 | + return adapt_length(length: 277)+346 | ||
| 105 | + } | ||
| 106 | + | ||
| 107 | + | ||
| 108 | + @objc func addCertificateBtnAction(){ | ||
| 109 | + | ||
| 110 | + } | ||
| 111 | + | ||
| 112 | + func getCetList(){ | ||
| 113 | + let vsid = UserInfoManager.shared.userInfo.currentUser?.vsid ?? "" | ||
| 114 | + CNLiveVitaeViewModel.getCerList(vsid: vsid, page: 1, pageSize: 100){ result, respStatue in | ||
| 115 | + if respStatue == .success{ | ||
| 116 | + if let res = result as? [CNLiveVitaeCertificateModel]{ | ||
| 117 | + self.cerListArr = res | ||
| 118 | + self.tableView.reloadData() | ||
| 119 | + } | ||
| 120 | + }else{ | ||
| 121 | + showMessage(message: "数据异常") | ||
| 122 | + } | ||
| 123 | + | ||
| 124 | + } | ||
| 125 | + } | ||
| 126 | +} |
metaCode/Classes/Main/HomePage/View/DigitalAuthViews/DigitalResume/CNLiveDigitalResumeCell.swift
| @@ -535,7 +535,7 @@ class CNLiveDigitalResumeCell: UITableViewCell { | @@ -535,7 +535,7 @@ class CNLiveDigitalResumeCell: UITableViewCell { | ||
| 535 | 535 | ||
| 536 | } | 536 | } |
| 537 | @objc func zhengshuDetailTitleLabelAciton(){ | 537 | @objc func zhengshuDetailTitleLabelAciton(){ |
| 538 | - | 538 | + navigationViewController().pushViewController(CNLiveVitaeVocationalCertificateController(), animated: true) |
| 539 | } | 539 | } |
| 540 | @objc func gongzuoDetailTitleLabelAciton(){ | 540 | @objc func gongzuoDetailTitleLabelAciton(){ |
| 541 | 541 | ||
| @@ -580,10 +580,12 @@ class CNLiveDigitalResumeCell: UITableViewCell { | @@ -580,10 +580,12 @@ class CNLiveDigitalResumeCell: UITableViewCell { | ||
| 580 | } | 580 | } |
| 581 | let tempArray = StandSortManager.sortMyListData(auths: CNLiveSaveAuthDB.shared.searchAllObject() as NSArray) as! [MineAuthListModel] | 581 | let tempArray = StandSortManager.sortMyListData(auths: CNLiveSaveAuthDB.shared.searchAllObject() as NSArray) as! [MineAuthListModel] |
| 582 | if tempArray.count > 0{ | 582 | if tempArray.count > 0{ |
| 583 | - self.renzhengDetailTitleLabel.text = String(format: "%d >", tempArray.count) | 583 | + self.renzhengDetailTitleLabel.text = String(format: "添加职业技能身份 %d >", tempArray.count) |
| 584 | }else{ | 584 | }else{ |
| 585 | self.renzhengDetailTitleLabel.text = "添加职业技能身份 0 >" | 585 | self.renzhengDetailTitleLabel.text = "添加职业技能身份 0 >" |
| 586 | } | 586 | } |
| 587 | - | 587 | + self.zhengshuDetailTitleLabel.text = "上传证书 \(model.certificates.count) >" |
| 588 | + self.gongzuoDetailTitleLabel.text = "补充工作记录 \(model.works.count) >" | ||
| 589 | + self.huojiangDetailTitleLabel.text = "展示获奖情况 \(model.awards.count) >" | ||
| 588 | } | 590 | } |
| 589 | } | 591 | } |
metaCode/Classes/Main/HomePage/View/DigitalAuthViews/Vitae/CNLiveCertificateCollectionCell.swift
0 → 100644
| 1 | +// | ||
| 2 | +// CNLiveCertificateCollectionCell.swift | ||
| 3 | +// metaCode | ||
| 4 | +// | ||
| 5 | +// Created by zx on 2024/7/26. | ||
| 6 | +// | ||
| 7 | + | ||
| 8 | +import Foundation | ||
| 9 | +import Kingfisher | ||
| 10 | + | ||
| 11 | +class CNLiveCertificateCollectionCell: UICollectionViewCell { | ||
| 12 | + | ||
| 13 | + //cerModel | ||
| 14 | + var _cerModel : CNLiveVitaeCertificateModel? | ||
| 15 | + var cerModel : CNLiveVitaeCertificateModel? { | ||
| 16 | + get{ | ||
| 17 | + _cerModel | ||
| 18 | + } | ||
| 19 | + set{ | ||
| 20 | + _cerModel = newValue! | ||
| 21 | + setupNewUI(model: _cerModel!) | ||
| 22 | + } | ||
| 23 | + } | ||
| 24 | + | ||
| 25 | + lazy var iconImgView :UIImageView = { | ||
| 26 | + let iconImgView = UIImageView(frame: CGRect(x: 0, y: 0, width: 76, height: 90)) | ||
| 27 | + iconImgView.contentMode = .scaleAspectFill | ||
| 28 | + iconImgView.clipsToBounds = true | ||
| 29 | + iconImgView.backgroundColor = .white | ||
| 30 | + return iconImgView | ||
| 31 | + }() | ||
| 32 | + | ||
| 33 | + //是否选中 | ||
| 34 | + var _cellIsSelected : Bool = false | ||
| 35 | + var cellIsSelected : Bool { | ||
| 36 | + get{ | ||
| 37 | + _cellIsSelected | ||
| 38 | + } | ||
| 39 | + set{ | ||
| 40 | + _cellIsSelected = newValue | ||
| 41 | + if _cellIsSelected == true{ | ||
| 42 | + UIView.animate(withDuration: 0.2) { | ||
| 43 | + self.iconImgView.frame = CGRect(x: 0, y: 0, width: 97, height: 114) | ||
| 44 | + self.iconImgView.center = self.contentView.center | ||
| 45 | + } | ||
| 46 | + }else{ | ||
| 47 | + UIView.animate(withDuration: 0.2) { | ||
| 48 | + self.iconImgView.frame = CGRect(x: 0, y: 0, width: 76, height: 90) | ||
| 49 | + self.iconImgView.center = self.contentView.center | ||
| 50 | + } | ||
| 51 | + } | ||
| 52 | + | ||
| 53 | + } | ||
| 54 | + } | ||
| 55 | + | ||
| 56 | + override init(frame: CGRect) { | ||
| 57 | + super.init(frame: frame) | ||
| 58 | + self.contentView.addSubview(self.iconImgView) | ||
| 59 | + | ||
| 60 | + } | ||
| 61 | + | ||
| 62 | + required init?(coder: NSCoder) { | ||
| 63 | + fatalError("init(coder:) has not been implemented") | ||
| 64 | + } | ||
| 65 | + | ||
| 66 | + func setupNewUI(model:CNLiveVitaeCertificateModel){ | ||
| 67 | + self.iconImgView.kf.setImage(with: URL(string: model.img)) | ||
| 68 | + } | ||
| 69 | +} |
metaCode/Classes/Main/HomePage/View/DigitalAuthViews/Vitae/CNLiveVocationalCertificateFirCell.swift
0 → 100644
| 1 | +// | ||
| 2 | +// CNLiveVocationalCertificateFirCell.swift | ||
| 3 | +// metaCode | ||
| 4 | +// | ||
| 5 | +// Created by zx on 2024/7/25. | ||
| 6 | +// 简历-职业证书顶部cell | ||
| 7 | + | ||
| 8 | +import Foundation | ||
| 9 | +import Kingfisher | ||
| 10 | +import SnapKit | ||
| 11 | + | ||
| 12 | + | ||
| 13 | +class CNLiveVocationalCertificateFirCell: UITableViewCell, UICollectionViewDataSource ,UICollectionViewDelegate{ | ||
| 14 | + | ||
| 15 | + var currSeleIndex = 0 | ||
| 16 | + var pageNum: NSInteger! = 1 | ||
| 17 | + | ||
| 18 | + //cerListArr | ||
| 19 | + var _cerListArr : Array<CNLiveVitaeCertificateModel>? | ||
| 20 | + var cerListArr : Array<CNLiveVitaeCertificateModel>? { | ||
| 21 | + get{ | ||
| 22 | + _cerListArr | ||
| 23 | + } | ||
| 24 | + set{ | ||
| 25 | + _cerListArr = newValue! | ||
| 26 | + setupNewUI(cerListArr :_cerListArr!) | ||
| 27 | + } | ||
| 28 | + } | ||
| 29 | + | ||
| 30 | + lazy var bgImgView :UIImageView = { | ||
| 31 | + let iconImgView = UIImageView() | ||
| 32 | + iconImgView.image = UIImage(named: "mine_jianli_zhengshu-bg") | ||
| 33 | + return iconImgView | ||
| 34 | + }() | ||
| 35 | + lazy var yuanmaLabel: UILabel = { | ||
| 36 | + let titleLabel = UILabel() | ||
| 37 | + titleLabel.textColor = HexColor("#333333") | ||
| 38 | + titleLabel.text = "职业证书" | ||
| 39 | + titleLabel.font = BoldFont_24 | ||
| 40 | + titleLabel.adjustsFontSizeToFitWidth=true | ||
| 41 | + return titleLabel | ||
| 42 | + }() | ||
| 43 | + | ||
| 44 | + lazy var yuanmaDescLabel: UILabel = { | ||
| 45 | + let titleLabel = UILabel() | ||
| 46 | + titleLabel.textColor = HexColor("#333333") | ||
| 47 | + titleLabel.text = "共 1 条" | ||
| 48 | + titleLabel.font = Font_16 | ||
| 49 | + return titleLabel | ||
| 50 | + }() | ||
| 51 | + | ||
| 52 | + let kCNLiveVocationalCertificateFirCollectCellIdentifier = "kCNLiveVocationalCertificateFirCollectCellIdentifier" | ||
| 53 | + | ||
| 54 | + let collectionView: UICollectionView = { | ||
| 55 | + let layout = UICollectionViewFlowLayout()//CNLiveVocationalCertifiteCollectionViewLayout() | ||
| 56 | + layout.scrollDirection = .horizontal | ||
| 57 | + layout.itemSize = CGSizeMake(76, 90) | ||
| 58 | + layout.sectionInset = .init(top: 0, left: 15, bottom: 0, right: 15) | ||
| 59 | + layout.minimumLineSpacing = 30 | ||
| 60 | + let collectionView = UICollectionView(frame: .zero, collectionViewLayout: layout) | ||
| 61 | + collectionView.backgroundColor = .clear | ||
| 62 | + collectionView.showsHorizontalScrollIndicator = false | ||
| 63 | + return collectionView | ||
| 64 | + }() | ||
| 65 | + | ||
| 66 | + lazy var whiteBgView :UIView = { | ||
| 67 | + let whiteBgView = UIView() | ||
| 68 | + whiteBgView.backgroundColor = .white | ||
| 69 | + whiteBgView.layer.cornerRadius = 12 | ||
| 70 | + whiteBgView.clipsToBounds = true | ||
| 71 | + return whiteBgView | ||
| 72 | + }() | ||
| 73 | + lazy var cerDetailTitleLabel: UILabel = { | ||
| 74 | + let titleLabel = UILabel() | ||
| 75 | + titleLabel.textColor = HexColor("#333333") | ||
| 76 | + titleLabel.textAlignment = .left | ||
| 77 | + titleLabel.text = "证书详情" | ||
| 78 | + titleLabel.font = BoldFont_16 | ||
| 79 | + return titleLabel | ||
| 80 | + }() | ||
| 81 | + lazy var cerNameTitleLabel: UILabel = { | ||
| 82 | + let titleLabel = UILabel() | ||
| 83 | + titleLabel.textColor = HexColor("#999999") | ||
| 84 | + titleLabel.textAlignment = .left | ||
| 85 | + titleLabel.text = "证书名称" | ||
| 86 | + titleLabel.font = Font_12 | ||
| 87 | + return titleLabel | ||
| 88 | + }() | ||
| 89 | + lazy var cerNameDetailTitleLabel: UILabel = { | ||
| 90 | + let titleLabel = UILabel() | ||
| 91 | + titleLabel.textColor = HexColor("#333333") | ||
| 92 | + titleLabel.textAlignment = .left | ||
| 93 | + titleLabel.text = "无" | ||
| 94 | + titleLabel.font = BoldFont_14 | ||
| 95 | + return titleLabel | ||
| 96 | + }() | ||
| 97 | + lazy var cerLevelTitleLabel: UILabel = { | ||
| 98 | + let titleLabel = UILabel() | ||
| 99 | + titleLabel.textColor = HexColor("#999999") | ||
| 100 | + titleLabel.textAlignment = .left | ||
| 101 | + titleLabel.text = "证书等级/分数" | ||
| 102 | + titleLabel.font = Font_12 | ||
| 103 | + return titleLabel | ||
| 104 | + }() | ||
| 105 | + lazy var cerLevelDetailTitleLabel: UILabel = { | ||
| 106 | + let titleLabel = UILabel() | ||
| 107 | + titleLabel.textColor = HexColor("#333333") | ||
| 108 | + titleLabel.textAlignment = .left | ||
| 109 | + titleLabel.text = "无" | ||
| 110 | + titleLabel.font = BoldFont_14 | ||
| 111 | + return titleLabel | ||
| 112 | + }() | ||
| 113 | + lazy var authIconImgView :UIImageView = { | ||
| 114 | + let iconImgView = UIImageView() | ||
| 115 | + iconImgView.image = UIImage(named: "mine_jianli_yiyanzheng") | ||
| 116 | + iconImgView.isHidden = true | ||
| 117 | + return iconImgView | ||
| 118 | + }() | ||
| 119 | + lazy var cerNumberTitleLabel: UILabel = { | ||
| 120 | + let titleLabel = UILabel() | ||
| 121 | + titleLabel.textColor = HexColor("#999999") | ||
| 122 | + titleLabel.textAlignment = .left | ||
| 123 | + titleLabel.text = "证书编号" | ||
| 124 | + titleLabel.font = Font_12 | ||
| 125 | + return titleLabel | ||
| 126 | + }() | ||
| 127 | + lazy var cerNumberDetailTitleLabel: UILabel = { | ||
| 128 | + let titleLabel = UILabel() | ||
| 129 | + titleLabel.textColor = HexColor("#333333") | ||
| 130 | + titleLabel.textAlignment = .left | ||
| 131 | + titleLabel.text = "无" | ||
| 132 | + titleLabel.font = BoldFont_14 | ||
| 133 | + return titleLabel | ||
| 134 | + }() | ||
| 135 | + lazy var cerJiGouTitleLabel: UILabel = { | ||
| 136 | + let titleLabel = UILabel() | ||
| 137 | + titleLabel.textColor = HexColor("#999999") | ||
| 138 | + titleLabel.textAlignment = .left | ||
| 139 | + titleLabel.text = "发证机构" | ||
| 140 | + titleLabel.font = Font_12 | ||
| 141 | + return titleLabel | ||
| 142 | + }() | ||
| 143 | + lazy var cerJiGouDetailTitleLabel: UILabel = { | ||
| 144 | + let titleLabel = UILabel() | ||
| 145 | + titleLabel.textColor = HexColor("#333333") | ||
| 146 | + titleLabel.textAlignment = .left | ||
| 147 | + titleLabel.text = "无" | ||
| 148 | + titleLabel.font = BoldFont_14 | ||
| 149 | + return titleLabel | ||
| 150 | + }() | ||
| 151 | + lazy var cerStatusTitleLabel: UILabel = { | ||
| 152 | + let titleLabel = UILabel() | ||
| 153 | + titleLabel.textColor = HexColor("#999999") | ||
| 154 | + titleLabel.textAlignment = .left | ||
| 155 | + titleLabel.text = "验证状态" | ||
| 156 | + titleLabel.font = Font_12 | ||
| 157 | + return titleLabel | ||
| 158 | + }() | ||
| 159 | + lazy var cerStatusDetailTitleLabel: UILabel = { | ||
| 160 | + let titleLabel = UILabel() | ||
| 161 | + titleLabel.textColor = HexColor("#333333") | ||
| 162 | + titleLabel.textAlignment = .left | ||
| 163 | + titleLabel.text = "未验证" | ||
| 164 | + titleLabel.font = BoldFont_14 | ||
| 165 | + return titleLabel | ||
| 166 | + }() | ||
| 167 | + lazy var authGuanfangIconImgView :UIImageView = { | ||
| 168 | + let iconImgView = UIImageView() | ||
| 169 | + iconImgView.image = UIImage(named: "mine_jianli_guanfnagAuth") | ||
| 170 | + iconImgView.isHidden = true | ||
| 171 | + return iconImgView | ||
| 172 | + }() | ||
| 173 | + | ||
| 174 | + override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) { | ||
| 175 | + super.init(style: style, reuseIdentifier: reuseIdentifier) | ||
| 176 | + self.selectionStyle = .none | ||
| 177 | + self.backgroundColor = .clear | ||
| 178 | + self.contentView.backgroundColor = .clear | ||
| 179 | + self.contentView.addSubview(self.bgImgView) | ||
| 180 | + self.bgImgView.snp.makeConstraints { make in | ||
| 181 | + make.top.equalTo(0) | ||
| 182 | + make.left.right.equalToSuperview() | ||
| 183 | + make.height.equalTo(KSreenWidth*457/375) | ||
| 184 | + } | ||
| 185 | + | ||
| 186 | + self.contentView.addSubview(self.yuanmaLabel) | ||
| 187 | + self.yuanmaLabel.snp.makeConstraints { make in | ||
| 188 | + make.top.equalTo(adapt_length(length: 55)) | ||
| 189 | + make.left.equalTo(adapt_length(length: 30)) | ||
| 190 | + } | ||
| 191 | + | ||
| 192 | + self.contentView.addSubview(self.yuanmaDescLabel) | ||
| 193 | + self.yuanmaDescLabel.snp.makeConstraints { make in | ||
| 194 | + make.top.equalTo(self.yuanmaLabel.snp.bottom).offset(adapt_length(length: 5)) | ||
| 195 | + make.left.equalTo(adapt_length(length: 30)) | ||
| 196 | + } | ||
| 197 | + | ||
| 198 | + self.contentView.addSubview(self.collectionView) | ||
| 199 | + self.collectionView.dataSource = self | ||
| 200 | + self.collectionView.delegate = self | ||
| 201 | + self.collectionView.register(CNLiveCertificateCollectionCell.self, forCellWithReuseIdentifier: kCNLiveVocationalCertificateFirCollectCellIdentifier) | ||
| 202 | + self.collectionView.snp.makeConstraints { make in | ||
| 203 | + make.top.equalTo(self.yuanmaDescLabel.snp.bottom).offset(adapt_length(length: 41)) | ||
| 204 | + make.height.equalTo(adapt_length(length: 114)) | ||
| 205 | + make.left.equalTo(15) | ||
| 206 | + make.right.equalToSuperview().offset(-15) | ||
| 207 | + } | ||
| 208 | + | ||
| 209 | + self.contentView.addSubview(self.whiteBgView) | ||
| 210 | + self.whiteBgView.snp.makeConstraints { make in | ||
| 211 | + make.top.equalTo(adapt_length(length: 277)) | ||
| 212 | + make.bottom.equalToSuperview() | ||
| 213 | + make.left.equalTo(15) | ||
| 214 | + make.right.equalToSuperview().offset(-15) | ||
| 215 | + } | ||
| 216 | + self.whiteBgView.addSubview(self.cerDetailTitleLabel) | ||
| 217 | + self.cerDetailTitleLabel.snp.makeConstraints { make in | ||
| 218 | + make.top.equalTo(15) | ||
| 219 | + make.left.equalTo(15) | ||
| 220 | + } | ||
| 221 | + self.whiteBgView.addSubview(self.cerNameTitleLabel) | ||
| 222 | + self.cerNameTitleLabel.snp.makeConstraints { make in | ||
| 223 | + make.top.equalTo(self.cerDetailTitleLabel.snp.bottom).offset(30) | ||
| 224 | + make.left.equalTo(15) | ||
| 225 | + } | ||
| 226 | + self.whiteBgView.addSubview(self.cerNameDetailTitleLabel) | ||
| 227 | + self.cerNameDetailTitleLabel.snp.makeConstraints { make in | ||
| 228 | + make.top.equalTo(self.cerNameTitleLabel.snp.bottom).offset(3) | ||
| 229 | + make.left.equalTo(15) | ||
| 230 | + } | ||
| 231 | + self.whiteBgView.addSubview(self.cerLevelTitleLabel) | ||
| 232 | + self.cerLevelTitleLabel.snp.makeConstraints { make in | ||
| 233 | + make.top.equalTo(self.cerNameDetailTitleLabel.snp.bottom).offset(15) | ||
| 234 | + make.left.equalTo(15) | ||
| 235 | + make.width.equalTo(100) | ||
| 236 | + make.height.equalTo(17) | ||
| 237 | + } | ||
| 238 | + self.whiteBgView.addSubview(self.cerLevelDetailTitleLabel) | ||
| 239 | + self.cerLevelDetailTitleLabel.snp.makeConstraints { make in | ||
| 240 | + make.top.equalTo(self.cerLevelTitleLabel.snp.bottom).offset(3) | ||
| 241 | + make.left.equalTo(15) | ||
| 242 | + } | ||
| 243 | + self.whiteBgView.addSubview(self.authIconImgView) | ||
| 244 | + self.authIconImgView.snp.makeConstraints { make in | ||
| 245 | + make.top.equalTo(self.cerNameDetailTitleLabel.snp.bottom).offset(5) | ||
| 246 | + make.right.equalToSuperview() | ||
| 247 | + } | ||
| 248 | + self.whiteBgView.addSubview(self.cerNumberTitleLabel) | ||
| 249 | + self.cerNumberTitleLabel.snp.makeConstraints { make in | ||
| 250 | + | ||
| 251 | + make.top.equalTo(self.cerLevelTitleLabel.snp.top) | ||
| 252 | + make.right.equalToSuperview().offset(adapt_length(length: -117)) | ||
| 253 | +// make.left.greaterThanOrEqualTo(self.cerLevelTitleLabel.snp.right).offset(5) | ||
| 254 | + } | ||
| 255 | + self.whiteBgView.addSubview(self.cerNumberDetailTitleLabel) | ||
| 256 | + self.cerNumberDetailTitleLabel.snp.makeConstraints { make in | ||
| 257 | + make.top.equalTo(self.cerNumberTitleLabel.snp.bottom).offset(3) | ||
| 258 | + make.left.equalTo(self.cerNumberTitleLabel.snp.left) | ||
| 259 | + make.left.greaterThanOrEqualTo(self.cerLevelDetailTitleLabel.snp.right).offset(5) | ||
| 260 | + } | ||
| 261 | + self.whiteBgView.addSubview(self.cerJiGouTitleLabel) | ||
| 262 | + self.cerJiGouTitleLabel.snp.makeConstraints { make in | ||
| 263 | + make.top.equalTo(self.cerLevelDetailTitleLabel.snp.bottom).offset(15) | ||
| 264 | + make.left.equalTo(15) | ||
| 265 | + } | ||
| 266 | + self.whiteBgView.addSubview(self.cerJiGouDetailTitleLabel) | ||
| 267 | + self.cerJiGouDetailTitleLabel.snp.makeConstraints { make in | ||
| 268 | + make.top.equalTo(self.cerJiGouTitleLabel.snp.bottom).offset(3) | ||
| 269 | + make.left.equalTo(15) | ||
| 270 | + } | ||
| 271 | + self.whiteBgView.addSubview(self.cerStatusTitleLabel) | ||
| 272 | + self.cerStatusTitleLabel.snp.makeConstraints { make in | ||
| 273 | + make.top.equalTo(self.cerJiGouDetailTitleLabel.snp.bottom).offset(15) | ||
| 274 | + make.left.equalTo(15) | ||
| 275 | + } | ||
| 276 | + self.whiteBgView.addSubview(self.cerStatusDetailTitleLabel) | ||
| 277 | + self.cerStatusDetailTitleLabel.snp.makeConstraints { make in | ||
| 278 | + make.top.equalTo(self.cerStatusTitleLabel.snp.bottom).offset(3) | ||
| 279 | + make.left.equalTo(15) | ||
| 280 | + } | ||
| 281 | + self.whiteBgView.addSubview(self.authGuanfangIconImgView) | ||
| 282 | + self.authGuanfangIconImgView.snp.makeConstraints { make in | ||
| 283 | + make.bottom.equalToSuperview().offset(-20) | ||
| 284 | + make.left.equalTo(15) | ||
| 285 | + } | ||
| 286 | + } | ||
| 287 | + | ||
| 288 | + required init?(coder: NSCoder) { | ||
| 289 | + fatalError("init(coder:) has not been implemented") | ||
| 290 | + } | ||
| 291 | + | ||
| 292 | + func setupNewUI(cerListArr : Array<CNLiveVitaeCertificateModel>){ | ||
| 293 | + self.yuanmaDescLabel.text = "共 \(cerListArr.count) 条" | ||
| 294 | + self.collectionView.reloadData() | ||
| 295 | + } | ||
| 296 | + func setupCerDetailNewUI(cerModel : CNLiveVitaeCertificateModel){ | ||
| 297 | + self.cerNameDetailTitleLabel.text = (cerModel.title.count > 0) ? cerModel.title : "无" | ||
| 298 | + self.cerLevelDetailTitleLabel.text = (cerModel.lv.count > 0) ? cerModel.lv : "无" | ||
| 299 | + self.cerNumberDetailTitleLabel.text = (cerModel.number.count > 0) ? cerModel.number : "无" | ||
| 300 | + self.cerJiGouDetailTitleLabel.text = (cerModel.organization.count > 0) ? cerModel.organization : "无" | ||
| 301 | + var isAuthed = false | ||
| 302 | + if cerModel.status == 0 || cerModel.status == -1{ | ||
| 303 | + isAuthed = false | ||
| 304 | + } | ||
| 305 | + if cerModel.status == 1{ | ||
| 306 | + isAuthed = true | ||
| 307 | + } | ||
| 308 | + self.cerStatusDetailTitleLabel.text = isAuthed ? "已验证" : "未验证" | ||
| 309 | + self.authIconImgView.isHidden = isAuthed ? false : true | ||
| 310 | + self.authGuanfangIconImgView.isHidden = isAuthed ? false : true | ||
| 311 | + } | ||
| 312 | + | ||
| 313 | + func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int { | ||
| 314 | + return self.cerListArr?.count ?? 0 // 图片的数量 | ||
| 315 | + } | ||
| 316 | + | ||
| 317 | + func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell { | ||
| 318 | + let cell = collectionView.dequeueReusableCell(withReuseIdentifier: kCNLiveVocationalCertificateFirCollectCellIdentifier, for: indexPath) as! CNLiveCertificateCollectionCell | ||
| 319 | + if indexPath.row == self.currSeleIndex{ | ||
| 320 | + cell.cellIsSelected = true | ||
| 321 | + if self.cerListArr?.count ?? 0 > 0{ | ||
| 322 | + let model = self.cerListArr![indexPath.row] | ||
| 323 | + self.setupCerDetailNewUI(cerModel: model) | ||
| 324 | + } | ||
| 325 | + | ||
| 326 | + }else{ | ||
| 327 | + cell.cellIsSelected = false | ||
| 328 | + } | ||
| 329 | + if self.cerListArr?.count ?? 0 > 0{ | ||
| 330 | + let model = self.cerListArr?[indexPath.row] | ||
| 331 | + cell.cerModel = model | ||
| 332 | + } | ||
| 333 | + return cell | ||
| 334 | + } | ||
| 335 | + func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) { | ||
| 336 | + self.currSeleIndex = indexPath.row | ||
| 337 | + self.collectionView.reloadData() | ||
| 338 | + if self.cerListArr?.count ?? 0 > 0{ | ||
| 339 | + let model = self.cerListArr![indexPath.row] | ||
| 340 | + self.setupCerDetailNewUI(cerModel: model) | ||
| 341 | + } | ||
| 342 | + } | ||
| 343 | + | ||
| 344 | + | ||
| 345 | +} |
metaCode/Classes/Main/HomePage/View/DigitalAuthViews/Vitae/CNLiveVocationalCertifiteCollectionViewLayout.swift
0 → 100644
| 1 | +// | ||
| 2 | +// CNLiveVocationalCertifiteCollectionViewLayout.swift | ||
| 3 | +// metaCode | ||
| 4 | +// | ||
| 5 | +// Created by zx on 2024/7/25. | ||
| 6 | +// | ||
| 7 | + | ||
| 8 | +import UIKit | ||
| 9 | + | ||
| 10 | +class CNLiveVocationalCertifiteCollectionViewLayout: UICollectionViewFlowLayout { | ||
| 11 | + var cellWidth: CGFloat = 76.0 | ||
| 12 | + var cellHeight: CGFloat = 90.0 | ||
| 13 | + var bigCellWidth: CGFloat = 97.0 | ||
| 14 | + var bigCellHeight: CGFloat = 114.0 | ||
| 15 | + | ||
| 16 | + | ||
| 17 | +// | ||
| 18 | +// override var collectionViewContentSize: CGSize { | ||
| 19 | +// return CGSize(width: cellWidth * CGFloat(collectionView?.numberOfItems(inSection: 0) ?? 0), height: cellHeight) | ||
| 20 | +// } | ||
| 21 | + | ||
| 22 | + override func prepare() { | ||
| 23 | + super.prepare() | ||
| 24 | + // 这里可以添加额外的准备工作 | ||
| 25 | + } | ||
| 26 | + | ||
| 27 | + | ||
| 28 | + override func shouldInvalidateLayout(forBoundsChange newBounds: CGRect) -> Bool { | ||
| 29 | + return true | ||
| 30 | + } | ||
| 31 | +// override func layoutAttributesForElements(in rect: CGRect) -> [UICollectionViewLayoutAttributes]? { | ||
| 32 | +// let collectionW = collectionView?.bounds.size.width ?? 0 | ||
| 33 | +// guard let superAttrs = super.layoutAttributesForElements(in: rect) else { return nil } | ||
| 34 | +// | ||
| 35 | +// var adjustedAttrs = [UICollectionViewLayoutAttributes]() | ||
| 36 | +// | ||
| 37 | +// // 遍历所有元素属性 | ||
| 38 | +// for attr in superAttrs { | ||
| 39 | +// // 复制当前属性以避免直接修改原始属性 | ||
| 40 | +// let mutableAttr = attr.copy() as! UICollectionViewLayoutAttributes | ||
| 41 | +// | ||
| 42 | +// // 计算当前图片中心到集合视图最左侧的距离 | ||
| 43 | +// let offsetX = mutableAttr.center.x - (collectionView?.contentOffset.x ?? 0) | ||
| 44 | +// | ||
| 45 | +// // 检查是否是左侧第一个图片,并且距离小于或等于100点 | ||
| 46 | +// if offsetX <= 100 && offsetX >= 0 { // 确保图片在集合视图内 | ||
| 47 | +// // 计算放大比例(这里假设最大放大到1.3倍,可以根据需要调整) | ||
| 48 | +// let scaleFactor = 1 - (offsetX / 100.0) * (1 - 1.3) | ||
| 49 | +// let scale = max(scaleFactor, 1.0) // 确保不会缩小 | ||
| 50 | +// mutableAttr.transform = CGAffineTransform(scaleX: scale, y: scale) | ||
| 51 | +// print("1111scale:\(scale)") | ||
| 52 | +// | ||
| 53 | +// } else { | ||
| 54 | +// // 如果不是左侧第一个图片或距离太远,则不放大 | ||
| 55 | +// mutableAttr.transform = CGAffineTransform.identity | ||
| 56 | +// } | ||
| 57 | +// print("1111offsetX:\(offsetX)") | ||
| 58 | +// | ||
| 59 | +// | ||
| 60 | +// adjustedAttrs.append(mutableAttr) | ||
| 61 | +// } | ||
| 62 | +// | ||
| 63 | +// return adjustedAttrs | ||
| 64 | +// } | ||
| 65 | + | ||
| 66 | + | ||
| 67 | + override func layoutAttributesForElements(in rect: CGRect) -> [UICollectionViewLayoutAttributes]? { | ||
| 68 | + let collectionW = collectionView?.bounds.size.width ?? 0 | ||
| 69 | + guard let attrs = super.layoutAttributesForElements( in: collectionView?.bounds ?? .zero) else { return nil } | ||
| 70 | + | ||
| 71 | + for attr in attrs { | ||
| 72 | + let margin = abs((attr.center.x - (collectionView?.contentOffset.x ?? 0))) | ||
| 73 | + let bigScale:CGFloat = 114.0/90.0 | ||
| 74 | + var scale:CGFloat = 1.0 | ||
| 75 | + let maxOffX:CGFloat = 153 | ||
| 76 | + let minOffX:CGFloat = 53 | ||
| 77 | + if margin >= minOffX && margin <= maxOffX{ | ||
| 78 | + scale = 1+(bigScale-1)*((maxOffX-margin)/100.0) | ||
| 79 | + }else{ | ||
| 80 | + scale = 1.0 | ||
| 81 | + } | ||
| 82 | + attr.transform = CGAffineTransform(scaleX: scale, y: scale) | ||
| 83 | + } | ||
| 84 | + | ||
| 85 | + return attrs | ||
| 86 | + } | ||
| 87 | + | ||
| 88 | + override func targetContentOffset(forProposedContentOffset proposedContentOffset: CGPoint, withScrollingVelocity velocity: CGPoint) -> CGPoint { | ||
| 89 | + let collectionW = collectionView?.bounds.size.width ?? 0 | ||
| 90 | + var targetP = proposedContentOffset | ||
| 91 | + | ||
| 92 | + guard let attrs = super.layoutAttributesForElements(in: CGRect(x: targetP.x, y: 0, width: collectionW, height: CGFloat.greatestFiniteMagnitude)) else { | ||
| 93 | + return targetP | ||
| 94 | + } | ||
| 95 | + | ||
| 96 | + var minSpacing: CGFloat = CGFloat.greatestFiniteMagnitude | ||
| 97 | + for attr in attrs { | ||
| 98 | + let centerOffsetX = attr.center.x - targetP.x - collectionW * 0.5 | ||
| 99 | + if abs(centerOffsetX) < abs(minSpacing) { | ||
| 100 | + minSpacing = centerOffsetX | ||
| 101 | + } | ||
| 102 | + } | ||
| 103 | + | ||
| 104 | + targetP.x += minSpacing | ||
| 105 | + return targetP | ||
| 106 | + } | ||
| 107 | +} |
metaCode/Classes/Main/HomePage/ViewModel/Vitae/CNLiveVitaeViewModel.swift
| @@ -136,6 +136,43 @@ class CNLiveVitaeViewModel:NSObject{ | @@ -136,6 +136,43 @@ class CNLiveVitaeViewModel:NSObject{ | ||
| 136 | } | 136 | } |
| 137 | } | 137 | } |
| 138 | } | 138 | } |
| 139 | + | ||
| 140 | + /* | ||
| 141 | + 获取证书列表 | ||
| 142 | + 参数 vsid 实名对象id | ||
| 143 | + 参数 page NSInteger | ||
| 144 | + 参数 pageSize NSInteger | ||
| 145 | + */ | ||
| 146 | + static func getCerList(vsid:String,page:NSInteger,pageSize:NSInteger,resultBlock: @escaping downSlideResultBlock) { | ||
| 147 | + let param = NSMutableDictionary() | ||
| 148 | + param.setValue(vsid, forKey: "vsid") | ||
| 149 | + param.setValue("\(page)", forKey: "page") | ||
| 150 | + param.setValue("\(pageSize)", forKey: "pageSize") | ||
| 151 | + CNLiveNetworking.setAllowRequestDefaultArgument(true) | ||
| 152 | + CNLiveNetworking.setupShowDataResult(false) | ||
| 153 | + CNLiveNetworking.setupDSRequest(true) | ||
| 154 | + let custom_param = NSMutableDictionary() | ||
| 155 | + custom_param.setValue(CNLiveMCEnvironmentManager.shared.appId, forKey: "appId") | ||
| 156 | + custom_param.setValue(CNLiveMCEnvironmentManager.shared.appKey, forKey: "appKey") | ||
| 157 | + CNLiveNetworking.setupCustomParam(custom_param as? [String : String]) | ||
| 158 | + | ||
| 159 | + CNLiveNetworking.requestNetwork(with: .GET, urlString: APPBaseMCUrl+"/userApi/certificates", param: param as! [String : String], cacheType: .networkOnly) { task, result, error in | ||
| 160 | + hiddenLoading() | ||
| 161 | + if (error == nil) { | ||
| 162 | + let resp = result as! NSDictionary | ||
| 163 | + if resp["errorCode"] as! Int == 0{ | ||
| 164 | + let dataDic = resp["data"] as! NSDictionary | ||
| 165 | + let shopDetailModel = newDictionaryToModel(dataDic as! [String : Any], CNLiveVitaeCertificateListModel.self) as! CNLiveVitaeCertificateListModel | ||
| 166 | + resultBlock(shopDetailModel.list ?? [CNLiveVitaeCertificateModel](),.success) | ||
| 167 | + }else{ | ||
| 168 | + resultBlock(NSNull(),.failed) | ||
| 169 | + } | ||
| 170 | + }else{ | ||
| 171 | + resultBlock(NSNull(),.failed) | ||
| 172 | + } | ||
| 173 | + } | ||
| 174 | + | ||
| 175 | + } | ||
| 139 | } | 176 | } |
| 140 | 177 | ||
| 141 | 178 |
metaCode/Classes/Main/Model/Vitae/CNLiveVitaeCertificateModel.swift
0 → 100644
| 1 | +// | ||
| 2 | +// CNLiveVitaeCertificateModel.swift | ||
| 3 | +// metaCode | ||
| 4 | +// | ||
| 5 | +// Created by zx on 2024/7/25. | ||
| 6 | +// 数字简历-证书model | ||
| 7 | + | ||
| 8 | +import Foundation | ||
| 9 | + | ||
| 10 | +class CNLiveVitaeCertificateListModel:BaseModel{ | ||
| 11 | + var list:[CNLiveVitaeCertificateModel]? | ||
| 12 | +} | ||
| 13 | +class CNLiveVitaeCertificateModel:BaseModel{ | ||
| 14 | + ///id | ||
| 15 | + var id:String = "" | ||
| 16 | + /// | ||
| 17 | + var vsid:String = "" | ||
| 18 | + /// | ||
| 19 | + var img:String = "" | ||
| 20 | + /// | ||
| 21 | + var title:String = "" | ||
| 22 | + /// | ||
| 23 | + var uploadTime:String = "" | ||
| 24 | + /// | ||
| 25 | + var status:Int = 0 | ||
| 26 | + /// | ||
| 27 | + var number:String = "" | ||
| 28 | + /// | ||
| 29 | + var lv:String = "" | ||
| 30 | + /// | ||
| 31 | + var time:String = "" | ||
| 32 | + /// | ||
| 33 | + var organization:String = "" | ||
| 34 | + /// | ||
| 35 | + var validity:String = "" | ||
| 36 | +} | ||
| 37 | +/** | ||
| 38 | + { | ||
| 39 | + "id": 26, | ||
| 40 | + "vsid": 7, | ||
| 41 | + "img": "http://wjjtest.ys2.cnliveimg.com/802/img/vitae_photo_0/2024/07/24/172178969871678268091.webp", | ||
| 42 | + "title": "普通话", | ||
| 43 | + "uploadTime": 1721789699000, | ||
| 44 | + "status": 0, | ||
| 45 | + "number": "77463", | ||
| 46 | + "lv": "", | ||
| 47 | + "time": "", | ||
| 48 | + "organization": "普通话", | ||
| 49 | + "validity": "" | ||
| 50 | + } | ||
| 51 | + */ |
metaCode/Supporting Files/Assets.xcassets/MinePage/jianli/mine_jianli_guanfnagAuth.imageset/Contents.json
0 → 100644
| 1 | +{ | ||
| 2 | + "images" : [ | ||
| 3 | + { | ||
| 4 | + "idiom" : "universal", | ||
| 5 | + "scale" : "1x" | ||
| 6 | + }, | ||
| 7 | + { | ||
| 8 | + "filename" : "mine_jianli_guanfnagAuth@2x.png", | ||
| 9 | + "idiom" : "universal", | ||
| 10 | + "scale" : "2x" | ||
| 11 | + }, | ||
| 12 | + { | ||
| 13 | + "filename" : "mine_jianli_guanfnagAuth@3x.png", | ||
| 14 | + "idiom" : "universal", | ||
| 15 | + "scale" : "3x" | ||
| 16 | + } | ||
| 17 | + ], | ||
| 18 | + "info" : { | ||
| 19 | + "author" : "xcode", | ||
| 20 | + "version" : 1 | ||
| 21 | + } | ||
| 22 | +} |
metaCode/Supporting Files/Assets.xcassets/MinePage/jianli/mine_jianli_guanfnagAuth.imageset/mine_jianli_guanfnagAuth@2x.png
0 → 100644
3.43 KB
metaCode/Supporting Files/Assets.xcassets/MinePage/jianli/mine_jianli_guanfnagAuth.imageset/mine_jianli_guanfnagAuth@3x.png
0 → 100644
6.2 KB
metaCode/Supporting Files/Assets.xcassets/MinePage/jianli/mine_jianli_yiyanzheng.imageset/Contents.json
0 → 100644
| 1 | +{ | ||
| 2 | + "images" : [ | ||
| 3 | + { | ||
| 4 | + "idiom" : "universal", | ||
| 5 | + "scale" : "1x" | ||
| 6 | + }, | ||
| 7 | + { | ||
| 8 | + "filename" : "mine_jianli_yiyanzheng@2x.png", | ||
| 9 | + "idiom" : "universal", | ||
| 10 | + "scale" : "2x" | ||
| 11 | + }, | ||
| 12 | + { | ||
| 13 | + "filename" : "mine_jianli_yiyanzheng@3x.png", | ||
| 14 | + "idiom" : "universal", | ||
| 15 | + "scale" : "3x" | ||
| 16 | + } | ||
| 17 | + ], | ||
| 18 | + "info" : { | ||
| 19 | + "author" : "xcode", | ||
| 20 | + "version" : 1 | ||
| 21 | + } | ||
| 22 | +} |
metaCode/Supporting Files/Assets.xcassets/MinePage/jianli/mine_jianli_yiyanzheng.imageset/mine_jianli_yiyanzheng@2x.png
0 → 100644
23.4 KB
metaCode/Supporting Files/Assets.xcassets/MinePage/jianli/mine_jianli_yiyanzheng.imageset/mine_jianli_yiyanzheng@3x.png
0 → 100644
47.9 KB
metaCode/Supporting Files/Assets.xcassets/MinePage/jianli/mine_jianli_zhengshu-bg.imageset/Contents.json
0 → 100644
| 1 | +{ | ||
| 2 | + "images" : [ | ||
| 3 | + { | ||
| 4 | + "idiom" : "universal", | ||
| 5 | + "scale" : "1x" | ||
| 6 | + }, | ||
| 7 | + { | ||
| 8 | + "filename" : "mine_jianli_zhengshu-bg@2x.png", | ||
| 9 | + "idiom" : "universal", | ||
| 10 | + "scale" : "2x" | ||
| 11 | + }, | ||
| 12 | + { | ||
| 13 | + "filename" : "mine_jianli_zhengshu-bg@3x.png", | ||
| 14 | + "idiom" : "universal", | ||
| 15 | + "scale" : "3x" | ||
| 16 | + } | ||
| 17 | + ], | ||
| 18 | + "info" : { | ||
| 19 | + "author" : "xcode", | ||
| 20 | + "version" : 1 | ||
| 21 | + } | ||
| 22 | +} |
metaCode/Supporting Files/Assets.xcassets/MinePage/jianli/mine_jianli_zhengshu-bg.imageset/mine_jianli_zhengshu-bg@2x.png
0 → 100644
323 KB
metaCode/Supporting Files/Assets.xcassets/MinePage/jianli/mine_jianli_zhengshu-bg.imageset/mine_jianli_zhengshu-bg@3x.png
0 → 100644
856 KB