Commit c2c70c39a6dd75564a5dd5593add3d0552ddecd6

Authored by “张旭”
1 parent 4243ac84

工作记录列表页面

@@ -65,7 +65,8 @@ target 'metaCode' do @@ -65,7 +65,8 @@ target 'metaCode' do
65 65
66 #图片浏览器 66 #图片浏览器
67 pod 'SKPhotoBrowser', :git => 'https://gitee.com/mirrors/SKPhotoBrowser.git' 67 pod 'SKPhotoBrowser', :git => 'https://gitee.com/mirrors/SKPhotoBrowser.git'
68 - 68 + #图片视频混合浏览器
  69 + pod 'JFHeroBrowser'
69 #视频播放器 70 #视频播放器
70 pod 'PLPlayerKit' 71 pod 'PLPlayerKit'
71 #UI框架 72 #UI框架
metaCode.xcodeproj/project.pbxproj
@@ -142,6 +142,9 @@ @@ -142,6 +142,9 @@
142 1965FA402AFB38AA00F0F435 /* CNLiveAddGoodsSelectUploadImageView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1965FA3F2AFB38AA00F0F435 /* CNLiveAddGoodsSelectUploadImageView.swift */; }; 142 1965FA402AFB38AA00F0F435 /* CNLiveAddGoodsSelectUploadImageView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1965FA3F2AFB38AA00F0F435 /* CNLiveAddGoodsSelectUploadImageView.swift */; };
143 1965FA422AFB79EA00F0F435 /* CNLiveGoodsCategoryController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1965FA412AFB79EA00F0F435 /* CNLiveGoodsCategoryController.swift */; }; 143 1965FA422AFB79EA00F0F435 /* CNLiveGoodsCategoryController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1965FA412AFB79EA00F0F435 /* CNLiveGoodsCategoryController.swift */; };
144 197325D22BB11C18002E41A3 /* DatabaseManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 197325D12BB11C18002E41A3 /* DatabaseManager.swift */; }; 144 197325D22BB11C18002E41A3 /* DatabaseManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 197325D12BB11C18002E41A3 /* DatabaseManager.swift */; };
  145 + 1975636E2C5A2EB2004E0F42 /* CNLiveVitaeWorkDetailController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1975636D2C5A2EB2004E0F42 /* CNLiveVitaeWorkDetailController.swift */; };
  146 + 197563712C5A3151004E0F42 /* CNLiveVitaeWorkCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 197563702C5A3151004E0F42 /* CNLiveVitaeWorkCell.swift */; };
  147 + 197563752C5B62FE004E0F42 /* CNLiveViateWorkModelLayout.swift in Sources */ = {isa = PBXBuildFile; fileRef = 197563742C5B62FE004E0F42 /* CNLiveViateWorkModelLayout.swift */; };
145 19864E3F2BEF6A3300586E72 /* CNLiveDownSlideRealHotListCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 19864E3E2BEF6A3300586E72 /* CNLiveDownSlideRealHotListCell.swift */; }; 148 19864E3F2BEF6A3300586E72 /* CNLiveDownSlideRealHotListCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 19864E3E2BEF6A3300586E72 /* CNLiveDownSlideRealHotListCell.swift */; };
146 19864E412BF6090400586E72 /* CNLiveDuanJuDetailCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 19864E402BF6090400586E72 /* CNLiveDuanJuDetailCell.swift */; }; 149 19864E412BF6090400586E72 /* CNLiveDuanJuDetailCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 19864E402BF6090400586E72 /* CNLiveDuanJuDetailCell.swift */; };
147 19AB90642BB412C700B6A79B /* CNLiveDownslideOperationManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 19AB90632BB412C700B6A79B /* CNLiveDownslideOperationManager.swift */; }; 150 19AB90642BB412C700B6A79B /* CNLiveDownslideOperationManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 19AB90632BB412C700B6A79B /* CNLiveDownslideOperationManager.swift */; };
@@ -475,6 +478,9 @@ @@ -475,6 +478,9 @@
475 1965FA3F2AFB38AA00F0F435 /* CNLiveAddGoodsSelectUploadImageView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveAddGoodsSelectUploadImageView.swift; sourceTree = "<group>"; }; 478 1965FA3F2AFB38AA00F0F435 /* CNLiveAddGoodsSelectUploadImageView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveAddGoodsSelectUploadImageView.swift; sourceTree = "<group>"; };
476 1965FA412AFB79EA00F0F435 /* CNLiveGoodsCategoryController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveGoodsCategoryController.swift; sourceTree = "<group>"; }; 479 1965FA412AFB79EA00F0F435 /* CNLiveGoodsCategoryController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveGoodsCategoryController.swift; sourceTree = "<group>"; };
477 197325D12BB11C18002E41A3 /* DatabaseManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DatabaseManager.swift; sourceTree = "<group>"; }; 480 197325D12BB11C18002E41A3 /* DatabaseManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DatabaseManager.swift; sourceTree = "<group>"; };
  481 + 1975636D2C5A2EB2004E0F42 /* CNLiveVitaeWorkDetailController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveVitaeWorkDetailController.swift; sourceTree = "<group>"; };
  482 + 197563702C5A3151004E0F42 /* CNLiveVitaeWorkCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveVitaeWorkCell.swift; sourceTree = "<group>"; };
  483 + 197563742C5B62FE004E0F42 /* CNLiveViateWorkModelLayout.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveViateWorkModelLayout.swift; sourceTree = "<group>"; };
478 19864E3E2BEF6A3300586E72 /* CNLiveDownSlideRealHotListCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveDownSlideRealHotListCell.swift; sourceTree = "<group>"; }; 484 19864E3E2BEF6A3300586E72 /* CNLiveDownSlideRealHotListCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveDownSlideRealHotListCell.swift; sourceTree = "<group>"; };
479 19864E402BF6090400586E72 /* CNLiveDuanJuDetailCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveDuanJuDetailCell.swift; sourceTree = "<group>"; }; 485 19864E402BF6090400586E72 /* CNLiveDuanJuDetailCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveDuanJuDetailCell.swift; sourceTree = "<group>"; };
480 19AB90632BB412C700B6A79B /* CNLiveDownslideOperationManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveDownslideOperationManager.swift; sourceTree = "<group>"; }; 486 19AB90632BB412C700B6A79B /* CNLiveDownslideOperationManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveDownslideOperationManager.swift; sourceTree = "<group>"; };
@@ -814,6 +820,7 @@ @@ -814,6 +820,7 @@
814 isa = PBXGroup; 820 isa = PBXGroup;
815 children = ( 821 children = (
816 192ED4832C5742510057244C /* CNLiveVitaeAddWorkController.swift */, 822 192ED4832C5742510057244C /* CNLiveVitaeAddWorkController.swift */,
  823 + 1975636D2C5A2EB2004E0F42 /* CNLiveVitaeWorkDetailController.swift */,
817 ); 824 );
818 path = "工作相关页面"; 825 path = "工作相关页面";
819 sourceTree = "<group>"; 826 sourceTree = "<group>";
@@ -824,6 +831,7 @@ @@ -824,6 +831,7 @@
824 192ED4862C575EC90057244C /* CNLiveVitaeAddWorkFirCell.swift */, 831 192ED4862C575EC90057244C /* CNLiveVitaeAddWorkFirCell.swift */,
825 192ED4892C5771930057244C /* CNLiveVitaeAddWorkSecCell.swift */, 832 192ED4892C5771930057244C /* CNLiveVitaeAddWorkSecCell.swift */,
826 192ED48B2C57719F0057244C /* CNLiveVitaeAddWorkThreeCell.swift */, 833 192ED48B2C57719F0057244C /* CNLiveVitaeAddWorkThreeCell.swift */,
  834 + 197563702C5A3151004E0F42 /* CNLiveVitaeWorkCell.swift */,
827 ); 835 );
828 path = Work; 836 path = Work;
829 sourceTree = "<group>"; 837 sourceTree = "<group>";
@@ -1282,6 +1290,7 @@ @@ -1282,6 +1290,7 @@
1282 19DFE6452C41099900E428AE /* CNLiveVitaeModel.swift */, 1290 19DFE6452C41099900E428AE /* CNLiveVitaeModel.swift */,
1283 192ED4622C4A642F0057244C /* CNLiveAddrAreaModel.swift */, 1291 192ED4622C4A642F0057244C /* CNLiveAddrAreaModel.swift */,
1284 192ED4752C524EA10057244C /* CNLiveVitaeCertificateModel.swift */, 1292 192ED4752C524EA10057244C /* CNLiveVitaeCertificateModel.swift */,
  1293 + 197563742C5B62FE004E0F42 /* CNLiveViateWorkModelLayout.swift */,
1285 ); 1294 );
1286 path = Vitae; 1295 path = Vitae;
1287 sourceTree = "<group>"; 1296 sourceTree = "<group>";
@@ -2139,6 +2148,7 @@ @@ -2139,6 +2148,7 @@
2139 1938BD3D2B4BDD4B00390A34 /* CNLiveAlbumCell.swift in Sources */, 2148 1938BD3D2B4BDD4B00390A34 /* CNLiveAlbumCell.swift in Sources */,
2140 19E9D1622B3BBB2E00D0FB30 /* CNLiveFileManager.swift in Sources */, 2149 19E9D1622B3BBB2E00D0FB30 /* CNLiveFileManager.swift in Sources */,
2141 79E496E82AB9674300127BF8 /* NSMutableAttributedString+CNLiveExtensions.swift in Sources */, 2150 79E496E82AB9674300127BF8 /* NSMutableAttributedString+CNLiveExtensions.swift in Sources */,
  2151 + 197563752C5B62FE004E0F42 /* CNLiveViateWorkModelLayout.swift in Sources */,
2142 19DFE64B2C4516B000E428AE /* CNLiveDigitalResumeSecCell.swift in Sources */, 2152 19DFE64B2C4516B000E428AE /* CNLiveDigitalResumeSecCell.swift in Sources */,
2143 19DFE6462C41099900E428AE /* CNLiveVitaeModel.swift in Sources */, 2153 19DFE6462C41099900E428AE /* CNLiveVitaeModel.swift in Sources */,
2144 19CC4D472ADD006600308E2A /* CNDownSlideSingleCourseCell.swift in Sources */, 2154 19CC4D472ADD006600308E2A /* CNDownSlideSingleCourseCell.swift in Sources */,
@@ -2158,6 +2168,7 @@ @@ -2158,6 +2168,7 @@
2158 192ED4802C5488AD0057244C /* CNLiveVitaeCerAddPhotoController.swift in Sources */, 2168 192ED4802C5488AD0057244C /* CNLiveVitaeCerAddPhotoController.swift in Sources */,
2159 1917334E2B2C1A08007BCC04 /* CNLiveSelectCouponTapView.swift in Sources */, 2169 1917334E2B2C1A08007BCC04 /* CNLiveSelectCouponTapView.swift in Sources */,
2160 19C0F76F2BDB4CE10097CC8F /* CNBindingManageModel.swift in Sources */, 2170 19C0F76F2BDB4CE10097CC8F /* CNBindingManageModel.swift in Sources */,
  2171 + 197563712C5A3151004E0F42 /* CNLiveVitaeWorkCell.swift in Sources */,
2161 191733272B148BB1007BCC04 /* CNLivePlayerFastForwardPreviewView.swift in Sources */, 2172 191733272B148BB1007BCC04 /* CNLivePlayerFastForwardPreviewView.swift in Sources */,
2162 7CD675522A29C04B008354C1 /* CNLiveConfigstant.swift in Sources */, 2173 7CD675522A29C04B008354C1 /* CNLiveConfigstant.swift in Sources */,
2163 79282A402A2F055100B5F8CF /* CNLiveConfigUserInfo.swift in Sources */, 2174 79282A402A2F055100B5F8CF /* CNLiveConfigUserInfo.swift in Sources */,
@@ -2258,6 +2269,7 @@ @@ -2258,6 +2269,7 @@
2258 7C4931312A2F142F000E44B4 /* CNHomePageBackgroupView.swift in Sources */, 2269 7C4931312A2F142F000E44B4 /* CNHomePageBackgroupView.swift in Sources */,
2259 19BB1FF22AF21A950094D962 /* CNLliveShopDetailBannerCell.swift in Sources */, 2270 19BB1FF22AF21A950094D962 /* CNLliveShopDetailBannerCell.swift in Sources */,
2260 1938BD432B4E34B200390A34 /* CNHomepageDuanJuDetailViewController.swift in Sources */, 2271 1938BD432B4E34B200390A34 /* CNHomepageDuanJuDetailViewController.swift in Sources */,
  2272 + 1975636E2C5A2EB2004E0F42 /* CNLiveVitaeWorkDetailController.swift in Sources */,
2261 19DFE6432C41039600E428AE /* CNLiveVitaeViewModel.swift in Sources */, 2273 19DFE6432C41039600E428AE /* CNLiveVitaeViewModel.swift in Sources */,
2262 790D018B2A2D8B3300C5978D /* CNLiveLoginViewController.swift in Sources */, 2274 790D018B2A2D8B3300C5978D /* CNLiveLoginViewController.swift in Sources */,
2263 19C735D02C12F5F600CACF4E /* CNLiveRealNameCell.swift in Sources */, 2275 19C735D02C12F5F600CACF4E /* CNLiveRealNameCell.swift in Sources */,
metaCode/Classes/Main/HomePage/Controller/DigitalAuth/工作相关页面/CNLiveVitaeWorkDetailController.swift 0 → 100644
  1 +//
  2 +// CNLiveVitaeWorkDetailController.swift
  3 +// metaCode
  4 +//
  5 +// Created by zx on 2024/7/31.
  6 +// 工作记录页面(工作记录详情)
  7 +
  8 +import Foundation
  9 +import SnapKit
  10 +
  11 +class CNLiveVitaeWorkDetailController:CNLiveBaseViewController,UITableViewDataSource, UITableViewDelegate{
  12 + var jianjieLblHeight:CGFloat = 40
  13 + var cellHeights:Array<CGFloat> = Array()
  14 +
  15 + lazy var bgImgView :UIImageView = {
  16 + let iconImgView = UIImageView()
  17 + iconImgView.image = UIImage(named: "mine_jianli_workBg")
  18 + return iconImgView
  19 + }()
  20 + lazy var yuanmaLabel: UILabel = {
  21 + let titleLabel = UILabel()
  22 + titleLabel.textColor = HexColor("#333333")
  23 + titleLabel.text = "工作记录"
  24 + titleLabel.font = BoldFont_24
  25 + titleLabel.adjustsFontSizeToFitWidth=true
  26 + return titleLabel
  27 + }()
  28 +
  29 + lazy var yuanmaDescLabel: UILabel = {
  30 + let titleLabel = UILabel()
  31 + titleLabel.textColor = HexColor("#333333")
  32 + titleLabel.text = "共 1 条"
  33 + titleLabel.font = Font_16
  34 + return titleLabel
  35 + }()
  36 +
  37 + let kCNLiveVitaeWorkCellIdentifier = "kCNLiveVitaeWorkCellIdentifier"
  38 +
  39 + lazy var tableView : UITableView = {
  40 + let tableView = UITableView(frame: .zero, style: .plain)
  41 + tableView.dataSource = self
  42 + tableView.delegate = self
  43 + tableView.separatorStyle = .none
  44 + tableView.tableFooterView = UIView.init()
  45 + tableView.register(CNLiveVitaeWorkCell.self, forCellReuseIdentifier: kCNLiveVitaeWorkCellIdentifier)
  46 + tableView.backgroundColor = .clear
  47 + return tableView
  48 + }()
  49 + lazy var bottomZhiNanWhiteView :UIView = {
  50 + let bottomNavView = UIView()
  51 + bottomNavView.backgroundColor = .white
  52 + return bottomNavView
  53 + }()
  54 + lazy var addWorkBtn: UIButton = {
  55 + let nextBtn = UIButton(type: .custom)
  56 + nextBtn.setTitle("添加工作记录", for: .normal)
  57 + nextBtn.setTitleColor(.white, for: .normal)
  58 + nextBtn.backgroundColor = HexColor("#1961FE")
  59 + nextBtn.layer.cornerRadius = 20
  60 + nextBtn.clipsToBounds = true
  61 + nextBtn.addTarget(self, action: #selector(addWorkBtnAction), for: .touchUpInside)
  62 + return nextBtn
  63 + }()
  64 + lazy var workListArr :Array<CNLiveVitaeWorksModel> = {
  65 + let dataArray = Array<CNLiveVitaeWorksModel>()
  66 + return dataArray
  67 + }()
  68 +
  69 + override func viewWillAppear(_ animated: Bool) {
  70 + super.viewWillAppear(animated)
  71 + self.getWorkList()
  72 + }
  73 + override func viewDidLoad() {
  74 + super.viewDidLoad()
  75 + titleName = "工作记录"
  76 + navigationBarHidden = false
  77 + self.initUI()
  78 + }
  79 +
  80 + deinit {}
  81 + func initUI(){
  82 + self.view.backgroundColor = HexColor("#F9F9F9")
  83 +
  84 + self.view.addSubview(self.bgImgView)
  85 + self.bgImgView.snp.makeConstraints { make in
  86 + make.top.equalTo(KNavigationHeight)
  87 + make.left.right.equalToSuperview()
  88 + make.height.equalTo(KSreenWidth*457/375)
  89 + }
  90 + self.bgImgView.addSubview(self.yuanmaLabel)
  91 + self.yuanmaLabel.snp.makeConstraints { make in
  92 + make.top.equalTo(59)
  93 + make.left.equalTo(adapt_length(length: 30))
  94 + }
  95 + self.bgImgView.addSubview(self.yuanmaDescLabel)
  96 + self.yuanmaDescLabel.snp.makeConstraints { make in
  97 + make.top.equalTo(self.yuanmaLabel.snp.bottom).offset(adapt_length(length: 5))
  98 + make.left.equalTo(adapt_length(length: 30))
  99 + }
  100 +
  101 + self.view.addSubview(self.tableView)
  102 + self.tableView.snp.makeConstraints { make in
  103 + make.top.equalTo(150+KNavigationHeight)
  104 + make.left.right.equalToSuperview()
  105 + make.bottom.equalToSuperview().offset(-60)
  106 + }
  107 +
  108 + self.view.addSubview(self.bottomZhiNanWhiteView)
  109 + self.bottomZhiNanWhiteView.snp.makeConstraints { make in
  110 + make.top.equalTo(self.tableView.snp.bottom)
  111 + make.bottom.left.right.equalToSuperview()
  112 + }
  113 +
  114 + self.bottomZhiNanWhiteView.addSubview(self.addWorkBtn)
  115 + self.addWorkBtn.snp.makeConstraints { make in
  116 + make.left.equalTo(15)
  117 + make.right.equalToSuperview().offset(-15)
  118 + make.top.equalTo(10)
  119 + make.height.equalTo(40)
  120 + }
  121 +
  122 + }
  123 +
  124 + func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
  125 + return self.workListArr.count
  126 + }
  127 +
  128 + func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
  129 + guard let cell = tableView.dequeueReusableCell(withIdentifier: kCNLiveVitaeWorkCellIdentifier) as? CNLiveVitaeWorkCell
  130 + else {
  131 + let cell = CNLiveVitaeWorkCell()
  132 + return cell
  133 + }
  134 + let model = workListArr[indexPath.row]
  135 + cell.workModel = model
  136 + cell.vitaeWorkCellChangedBlock = { workCell,jianjieHeight in
  137 + let res = self.workListArr
  138 + var tempArr = Array<CNLiveVitaeWorksModel>()
  139 + let idxPath = tableView.indexPath(for: workCell)
  140 + for (idx,mdl) in res.enumerated() {
  141 + if idx == idxPath?.row{
  142 + let layout = CNLiveViateWorkModelLayout(model: mdl,descH: Float(jianjieHeight))
  143 + let newWorkModel = layout.getCellHModel()
  144 + tempArr.append(newWorkModel)
  145 + }else{
  146 + tempArr.append(mdl)
  147 + }
  148 + }
  149 + self.workListArr = Array(tempArr)
  150 + self.tableView.reloadData()
  151 + }
  152 +
  153 + return cell
  154 + }
  155 +
  156 + func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
  157 +
  158 + }
  159 +
  160 + func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
  161 + let model = self.workListArr[indexPath.row]
  162 + return CGFloat(model.cellH)
  163 + }
  164 +
  165 + @objc func addWorkBtnAction(){
  166 + self.navigationController?.pushViewController(CNLiveVitaeAddWorkController(), animated: true)
  167 + }
  168 +
  169 + func getWorkList(){
  170 + let vsid = UserInfoManager.shared.userInfo.currentUser?.vsid ?? ""
  171 + CNLiveVitaeViewModel.getWorkList(vsid: vsid){ result, respStatus in
  172 + if respStatus == .success{
  173 + if let res = result as? [CNLiveVitaeWorksModel]{
  174 + self.workListArr = Array()
  175 + for mdl in res {
  176 + let layout = CNLiveViateWorkModelLayout(model: mdl,descH: 40.0)
  177 + let newWorkModel = layout.getCellHModel()
  178 + self.workListArr.append(newWorkModel)
  179 + }
  180 + self.tableView.reloadData()
  181 + self.yuanmaDescLabel.text = "共 \(res.count) 条"
  182 + }
  183 + }else{
  184 + showMessage(message: "数据异常")
  185 + }
  186 +
  187 + }
  188 + }
  189 +}
metaCode/Classes/Main/HomePage/View/DigitalAuthViews/DigitalResume/CNLiveDigitalResumeCell.swift
@@ -543,12 +543,14 @@ class CNLiveDigitalResumeCell: UITableViewCell { @@ -543,12 +543,14 @@ class CNLiveDigitalResumeCell: UITableViewCell {
543 } 543 }
544 @objc func gongzuoDetailTitleLabelAciton(){ 544 @objc func gongzuoDetailTitleLabelAciton(){
545 //工作记录 545 //工作记录
546 -  
547 - //有工作->工作记录页面  
548 -  
549 - //无工作->新增工作记录页面  
550 - navigationViewController().pushViewController(CNLiveVitaeAddWorkController(), animated: true)  
551 - 546 + let works = self.vitaeModel?.works
  547 + if works?.count ?? 0 > 0{
  548 + //有工作->工作记录页面
  549 + navigationViewController().pushViewController(CNLiveVitaeWorkDetailController(), animated: true)
  550 + }else{
  551 + //无工作->新增工作记录页面
  552 + navigationViewController().pushViewController(CNLiveVitaeAddWorkController(), animated: true)
  553 + }
552 } 554 }
553 @objc func huojiangDetailTitleLabelAciton(){ 555 @objc func huojiangDetailTitleLabelAciton(){
554 556
metaCode/Classes/Main/HomePage/View/DigitalAuthViews/Vitae/Work/CNLiveVitaeWorkCell.swift 0 → 100644
  1 +//
  2 +// CNLiveVitaeWorkCell.swift
  3 +// metaCode
  4 +//
  5 +// Created by zx on 2024/7/31.
  6 +// 简历-工作记录详情cell
  7 +
  8 +import Foundation
  9 +import QMUIKit
  10 +import SwiftUI
  11 +import SnapKit
  12 +import Kingfisher
  13 +import SKPhotoBrowser
  14 +
  15 +
  16 +//cell高度变化
  17 +typealias vitaeWorkCellChangedBlockActionBlock = (_ cell: CNLiveVitaeWorkCell ,_ cellHeight:CGFloat) -> Void
  18 +
  19 +class CNLiveVitaeWorkCell: UITableViewCell{
  20 + var images = [SKPhoto]()
  21 + var vitaeWorkCellChangedBlock:vitaeWorkCellChangedBlockActionBlock?
  22 +
  23 + //简历workModel
  24 + var _workModel : CNLiveVitaeWorksModel?
  25 + var workModel : CNLiveVitaeWorksModel? {
  26 + get{
  27 + _workModel
  28 + }
  29 + set{
  30 + _workModel = newValue!
  31 + setupNewUI(model: _workModel!)
  32 + }
  33 + }
  34 +
  35 + lazy var whiteBgView :UIView = {
  36 + let whiteBgView = UIView()
  37 + whiteBgView.backgroundColor = .white
  38 + whiteBgView.layer.cornerRadius = 12
  39 + whiteBgView.clipsToBounds = true
  40 + return whiteBgView
  41 + }()
  42 + lazy var workTitleLabel: UILabel = {
  43 + let titleLabel = UILabel()
  44 + titleLabel.textColor = HexColor("#333333")
  45 + titleLabel.textAlignment = .left
  46 + titleLabel.text = "职业"
  47 + titleLabel.font = BoldFont_16
  48 + return titleLabel
  49 + }()
  50 + lazy var line1View :UIView = {
  51 + let whiteBgView = UIView()
  52 + whiteBgView.backgroundColor = HexColor("#EBEBEB")
  53 + return whiteBgView
  54 + }()
  55 + lazy var workNameTitleLabel: UILabel = {
  56 + let titleLabel = UILabel()
  57 + titleLabel.textColor = HexColor("#333333")
  58 + titleLabel.textAlignment = .left
  59 + titleLabel.text = "工作岗位"
  60 + titleLabel.font = Font_14
  61 + titleLabel.adjustsFontSizeToFitWidth = true
  62 + return titleLabel
  63 + }()
  64 + lazy var workPositionTitleLabel: UILabel = {
  65 + let titleLabel = UILabel()
  66 + titleLabel.textColor = HexColor("#333333")
  67 + titleLabel.textAlignment = .left
  68 + titleLabel.text = "公司名称"
  69 + titleLabel.font = Font_14
  70 + titleLabel.adjustsFontSizeToFitWidth = true
  71 + return titleLabel
  72 + }()
  73 + ///工作内容描述
  74 + lazy var jianjieLabel: UILabel = {
  75 + let titleLabel = UILabel.init(frame: CGRectMake(15, 113, KSreenWidth-60, 40))
  76 + titleLabel.textColor = HexColor("#999999")
  77 + titleLabel.textAlignment = .left
  78 + titleLabel.font = Font_14
  79 + titleLabel.backgroundColor = .clear// UIColor(red:0.98, green:0.98, blue:0.98, alpha:1.00)
  80 + titleLabel.text = "描述"
  81 + titleLabel.numberOfLines = 0
  82 + var lines = titleLabel.getRealLabelTextLines()
  83 + let height = titleLabel.qmui_lineHeight
  84 + if lines > 2 {
  85 + lines = 2
  86 + }
  87 + titleLabel.height = height*CGFloat(lines)
  88 + return titleLabel
  89 + }()
  90 + //展开,收起
  91 + lazy var expandBtn: UIButton = {
  92 + let expandBtn = UIButton.init(type: .custom)
  93 + expandBtn.backgroundColor = .clear
  94 +
  95 + expandBtn.frame = CGRect(x: self.jianjieLabel.right-60, y: self.jianjieLabel.bottom+10, width: 60, height: 30)
  96 + expandBtn.setTitle("更多", for: .normal)
  97 + expandBtn.setTitle("收起", for: .selected)
  98 +
  99 + expandBtn.setTitleColor(HexColor("#1B64FE"), for: .normal)
  100 + expandBtn.setImage(UIImage(named: "homepage_unfold"), for: .normal)
  101 + expandBtn.setImage(UIImage(named: "homepage_fold"), for: .selected)
  102 + expandBtn.titleLabel?.font = Font_14
  103 + expandBtn.setupButtonImageAndTitlePossitionWith(padding: 5, style: .right)
  104 + expandBtn.addTarget(self, action: #selector(expandBtnAction), for: .touchUpInside)
  105 + return expandBtn
  106 + }()
  107 +
  108 + lazy var dingweiImgView :UIImageView = {
  109 + let iconImgView = UIImageView()
  110 + iconImgView.image = UIImage(named: "mine_jinali_workdingwei")
  111 + return iconImgView
  112 + }()
  113 + lazy var workDingWeiTitleLabel: UILabel = {
  114 + let titleLabel = UILabel()
  115 + titleLabel.textColor = HexColor("#999999")
  116 + titleLabel.textAlignment = .left
  117 + titleLabel.text = ""
  118 + titleLabel.font = Font_11
  119 + titleLabel.adjustsFontSizeToFitWidth = true
  120 + return titleLabel
  121 + }()
  122 + lazy var line2View :UIView = {
  123 + let whiteBgView = UIView()
  124 + whiteBgView.backgroundColor = HexColor("#EBEBEB")
  125 + return whiteBgView
  126 + }()
  127 + lazy var realImgView :UIImageView = {
  128 + let iconImgView = UIImageView()
  129 + iconImgView.image = UIImage(named: "mine_jianli_zhenshi")
  130 + return iconImgView
  131 + }()
  132 + lazy var deleteBtn: UIButton = {
  133 + let closeBtn = UIButton(type: .custom)
  134 + closeBtn.setTitle("删除", for: .normal)
  135 + closeBtn.setTitleColor(HexColor("#999999"), for: .normal)
  136 + closeBtn.titleLabel?.font = Font_13
  137 + closeBtn.layer.cornerRadius = 12
  138 + closeBtn.clipsToBounds = true
  139 + closeBtn.layer.borderColor = HexColor("#999999")?.cgColor
  140 + closeBtn.layer.borderWidth = 0.5
  141 + closeBtn.addTarget(self, action: #selector(deleteBtnAction), for: .touchUpInside)
  142 + return closeBtn
  143 + }()
  144 + lazy var editBtn: UIButton = {
  145 + let closeBtn = UIButton(type: .custom)
  146 + closeBtn.setTitle("编辑", for: .normal)
  147 + closeBtn.setTitleColor(HexColor("#1961FE"), for: .normal)
  148 + closeBtn.titleLabel?.font = Font_13
  149 + closeBtn.layer.cornerRadius = 12
  150 + closeBtn.clipsToBounds = true
  151 + closeBtn.layer.borderColor = HexColor("#1961FE")?.cgColor
  152 + closeBtn.layer.borderWidth = 0.5
  153 + closeBtn.addTarget(self, action: #selector(editBtnAction), for: .touchUpInside)
  154 + return closeBtn
  155 + }()
  156 +
  157 +
  158 + override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
  159 + super.init(style: style, reuseIdentifier: reuseIdentifier)
  160 + self.selectionStyle = .none
  161 + self.backgroundColor = .clear
  162 + self.contentView.backgroundColor = .clear
  163 +
  164 + self.contentView.addSubview(self.whiteBgView)
  165 + self.whiteBgView.snp.makeConstraints { make in
  166 + make.top.equalTo(15)
  167 + make.bottom.equalToSuperview()
  168 + make.left.equalTo(15)
  169 + make.right.equalToSuperview().offset(-15)
  170 + }
  171 + self.whiteBgView.addSubview(self.workTitleLabel)
  172 + self.workTitleLabel.snp.makeConstraints { make in
  173 + make.top.equalTo(15)
  174 + make.left.equalTo(15)
  175 + }
  176 + self.whiteBgView.addSubview(self.line1View)
  177 + self.line1View.snp.makeConstraints { make in
  178 + make.height.equalTo(0.5)
  179 + make.left.equalTo(15)
  180 + make.right.equalToSuperview().offset(-15)
  181 + make.top.equalTo(self.workTitleLabel.snp.bottom).offset(15)
  182 + }
  183 + self.whiteBgView.addSubview(self.workNameTitleLabel)
  184 + self.workNameTitleLabel.snp.makeConstraints { make in
  185 + make.top.equalTo(self.line1View.snp.bottom).offset(15)
  186 + make.left.equalTo(15)
  187 + make.right.equalToSuperview().offset(-15)
  188 + }
  189 + self.whiteBgView.addSubview(self.workPositionTitleLabel)
  190 + self.workPositionTitleLabel.snp.makeConstraints { make in
  191 + make.top.equalTo(self.workNameTitleLabel.snp.bottom).offset(5)
  192 + make.left.equalTo(15)
  193 + make.right.equalToSuperview().offset(-15)
  194 + }
  195 +
  196 + self.whiteBgView.addSubview(self.jianjieLabel)
  197 + self.whiteBgView.addSubview(self.expandBtn)
  198 +
  199 + let lines = jianjieLabel.getRealLabelTextLines()
  200 + if lines <= 2{
  201 + self.expandBtn.isHidden = true
  202 + }else{
  203 + self.expandBtn.isHidden = false
  204 + }
  205 +
  206 + self.whiteBgView.addSubview(self.dingweiImgView)
  207 + self.dingweiImgView.snp.makeConstraints { make in
  208 + make.left.equalTo(15)
  209 + make.bottom.equalToSuperview().offset(-72)
  210 + make.width.equalTo(10)
  211 + make.height.equalTo(10)
  212 + }
  213 + self.whiteBgView.addSubview(self.workDingWeiTitleLabel)
  214 + self.workDingWeiTitleLabel.snp.makeConstraints { make in
  215 + make.left.equalTo(self.dingweiImgView.snp.right).offset(3)
  216 + make.centerY.equalTo(self.dingweiImgView.snp.centerY)
  217 + }
  218 + self.whiteBgView.addSubview(self.line2View)
  219 + self.line2View.snp.makeConstraints { make in
  220 + make.height.equalTo(0.5)
  221 + make.left.equalTo(15)
  222 + make.right.equalToSuperview().offset(-15)
  223 + make.top.equalTo(self.workDingWeiTitleLabel.snp.bottom).offset(15)
  224 + }
  225 + self.whiteBgView.addSubview(self.realImgView)
  226 + self.realImgView.snp.makeConstraints { make in
  227 + make.left.equalTo(20)
  228 + make.bottom.equalToSuperview().offset(-20)
  229 + make.width.equalTo(80)
  230 + make.height.equalTo(80.0*78/403)
  231 + }
  232 + self.whiteBgView.addSubview(self.editBtn)
  233 + self.editBtn.snp.makeConstraints { make in
  234 + make.right.equalToSuperview().offset(-15)
  235 + make.bottom.equalToSuperview().offset(-15)
  236 + make.width.equalTo(70)
  237 + make.height.equalTo(24)
  238 + }
  239 + self.whiteBgView.addSubview(self.deleteBtn)
  240 + self.deleteBtn.snp.makeConstraints { make in
  241 + make.right.equalTo(self.editBtn.snp.left).offset(-10)
  242 + make.bottom.equalToSuperview().offset(-15)
  243 + make.width.equalTo(70)
  244 + make.height.equalTo(24)
  245 + }
  246 +
  247 + }
  248 +
  249 + required init?(coder: NSCoder) {
  250 + fatalError("init(coder:) has not been implemented")
  251 + }
  252 +
  253 + func setupNewUI(model:CNLiveVitaeWorksModel){
  254 + self.whiteBgView.subviews.forEach { view in
  255 + if view.tag >= 1000{
  256 + view.removeFromSuperview()
  257 + }
  258 + }
  259 + self.workTitleLabel.text = model.profession
  260 +
  261 + let startDateString = convertTimestampStringToDateString(timestampString: model.startWorkingDate)
  262 + let endDateString = convertTimestampStringToDateString(timestampString: model.endWorkingDate)
  263 + if endDateString == nil || endDateString?.count == 0{
  264 + self.workNameTitleLabel.text = model.position+" | "+(startDateString ?? "")
  265 + }else{
  266 + self.workNameTitleLabel.text = model.position+" | "+(startDateString ?? "")+" - "+endDateString!
  267 + }
  268 + self.workPositionTitleLabel.text = model.companyName
  269 +
  270 + self.jianjieLabel.text = model.jobDuties//"描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述"
  271 + let lines = jianjieLabel.getRealLabelTextLines()
  272 + let height = jianjieLabel.qmui_lineHeight
  273 + if lines <= 2{
  274 + self.expandBtn.isHidden = true
  275 + }else{
  276 + self.expandBtn.isHidden = false
  277 + }
  278 +
  279 + if self.expandBtn.isSelected{
  280 + //展开状态
  281 + self.jianjieLabel.height = height*CGFloat(lines)
  282 +
  283 + }else{
  284 + //收起状态
  285 + if lines <= 2{
  286 + //小于2行,按实际行数
  287 + self.jianjieLabel.height = CGFloat(lines)*height
  288 + }else{
  289 + //大于2行, 显示2行
  290 + self.jianjieLabel.height = 2*height
  291 + }
  292 + }
  293 +
  294 + let imgArr = model.imgs.components(separatedBy: ",")
  295 + if imgArr.count > 0{
  296 + for i in 0..<imgArr.count {
  297 + let imgWH:Float = Float((KSreenWidth-60-15)/3.0)
  298 + let imgGap:Float = 7.5
  299 + let imgLeftGap:Float = 15
  300 + let lie = i%3
  301 + let hang = i/3
  302 + let imgView = UIImageView(frame: CGRect(x: CGFloat(imgLeftGap+(imgGap+imgWH)*Float(lie)), y: CGFloat((imgWH+10)*Float(hang))+self.jianjieLabel.bottom+10, width: CGFloat(imgWH), height: CGFloat(imgWH)))
  303 + imgView.isUserInteractionEnabled = true
  304 + imgView.addGestureRecognizer(UITapGestureRecognizer(target: self, action: #selector(imgViewTapAciton)))
  305 + imgView.tag = 1000+i
  306 + imgView.contentMode = .scaleAspectFit
  307 + let imgUrl = imgArr[i]
  308 + imgView.kf.setImage(with: URL(string: imgUrl))
  309 + imgView.clipsToBounds = true
  310 + imgView.layer.cornerRadius = 5
  311 + self.whiteBgView.addSubview(imgView)
  312 +
  313 + let photo = SKPhoto.photoWithImageURL(imgUrl)
  314 + photo.shouldCachePhotoURLImage = false
  315 + photo.photoURL = imgUrl
  316 + self.images.append(photo)
  317 + }
  318 + }
  319 +
  320 + self.workDingWeiTitleLabel.text = model.city
  321 +
  322 + }
  323 + func convertTimestampStringToDateString(timestampString: String) -> String? {
  324 + // 首先,将毫秒时间戳字符串转换为TimeInterval(秒)
  325 + guard let timestampMilliseconds = Double(timestampString) else {
  326 + return nil
  327 + }
  328 + let timestampSeconds = timestampMilliseconds / 1000.0
  329 +
  330 + // 然后,将TimeInterval转换为Date对象
  331 + let date = Date(timeIntervalSince1970: timestampSeconds)
  332 +
  333 + // 接着,设置DateFormatter的格式
  334 + let formatter = DateFormatter()
  335 + formatter.dateFormat = "yyyy.MM.dd" // 设置为你想要的日期格式
  336 +
  337 + // 最后,使用DateFormatter将Date对象格式化为字符串
  338 + return formatter.string(from: date)
  339 + }
  340 +
  341 + // MARK: - Action
  342 + @objc func expandBtnAction(button:UIButton){
  343 + button.isSelected = !button.isSelected
  344 + let lines = jianjieLabel.getRealLabelTextLines()
  345 + let height = jianjieLabel.qmui_lineHeight
  346 +
  347 + if button.isSelected{
  348 + //文本收起状态,点击展开
  349 + self.jianjieLabel.height = CGFloat(lines)*height
  350 + }else{
  351 + //文本展开状态,点击收起
  352 + self.jianjieLabel.height = 2*height
  353 + }
  354 + self.vitaeWorkCellChangedBlock!(self, self.jianjieLabel.height)
  355 +
  356 + self.expandBtn.top = self.jianjieLabel.bottom
  357 +
  358 + }
  359 + @objc func editBtnAction(){
  360 +
  361 + }
  362 + @objc func deleteBtnAction(){
  363 +
  364 + }
  365 +
  366 + @objc func imgViewTapAciton(ges: UITapGestureRecognizer){
  367 + let imgView = ges.view as! UIImageView
  368 + let index = imgView.tag-1000
  369 +
  370 + let browser = SKPhotoBrowser(photos: self.images)
  371 + browser.initializePageIndex(index)
  372 + currentViewController()?.present(browser, animated: true)
  373 + }
  374 +
  375 +}
  376 +
metaCode/Classes/Main/HomePage/ViewModel/Vitae/CNLiveVitaeViewModel.swift
@@ -42,7 +42,7 @@ class CNLiveVitaeViewModel:NSObject{ @@ -42,7 +42,7 @@ class CNLiveVitaeViewModel:NSObject{
42 resultBlock(NSNull(),.failed) 42 resultBlock(NSNull(),.failed)
43 } 43 }
44 } 44 }
45 - 45 +
46 } 46 }
47 /* 47 /*
48 保存简历/更新简历 48 保存简历/更新简历
@@ -107,7 +107,7 @@ class CNLiveVitaeViewModel:NSObject{ @@ -107,7 +107,7 @@ class CNLiveVitaeViewModel:NSObject{
107 showMessage(message: "上传失败") 107 showMessage(message: "上传失败")
108 resultBlock(NSNull(),.failed) 108 resultBlock(NSNull(),.failed)
109 } 109 }
110 - 110 +
111 } 111 }
112 112
113 /// 获取省市区县列表 113 /// 获取省市区县列表
@@ -123,7 +123,7 @@ class CNLiveVitaeViewModel:NSObject{ @@ -123,7 +123,7 @@ class CNLiveVitaeViewModel:NSObject{
123 custom_param.setValue(CNLiveMCEnvironmentManager.shared.appId_wjj, forKey: "appId") 123 custom_param.setValue(CNLiveMCEnvironmentManager.shared.appId_wjj, forKey: "appId")
124 custom_param.setValue(CNLiveMCEnvironmentManager.shared.appKey_wjj, forKey: "appKey") 124 custom_param.setValue(CNLiveMCEnvironmentManager.shared.appKey_wjj, forKey: "appKey")
125 CNLiveNetworking.setupCustomParam(custom_param as? [String : String]) 125 CNLiveNetworking.setupCustomParam(custom_param as? [String : String])
126 - 126 +
127 CNLiveNetworking.requestNetwork(with: .POST, urlString: "https://managemall.cnlive.com"+"/Api/Index3/getCityList", param: param as! [String : String], cacheType: .networkOnly) { task, result, error in 127 CNLiveNetworking.requestNetwork(with: .POST, urlString: "https://managemall.cnlive.com"+"/Api/Index3/getCityList", param: param as! [String : String], cacheType: .networkOnly) { task, result, error in
128 hiddenLoading() 128 hiddenLoading()
129 if (error == nil) { 129 if (error == nil) {
@@ -146,7 +146,7 @@ class CNLiveVitaeViewModel:NSObject{ @@ -146,7 +146,7 @@ class CNLiveVitaeViewModel:NSObject{
146 values.addEntries(from: ["lv":lv]) 146 values.addEntries(from: ["lv":lv])
147 values.addEntries(from: ["number":number]) 147 values.addEntries(from: ["number":number])
148 values.addEntries(from: ["organization":organization]) 148 values.addEntries(from: ["organization":organization])
149 -// values.addEntries(from: ["status":status]) 149 + // values.addEntries(from: ["status":status])
150 values.addEntries(from: ["time":time]) 150 values.addEntries(from: ["time":time])
151 values.addEntries(from: ["title":title]) 151 values.addEntries(from: ["title":title])
152 values.addEntries(from: ["uploadTime":uploadTime]) 152 values.addEntries(from: ["uploadTime":uploadTime])
@@ -191,9 +191,9 @@ class CNLiveVitaeViewModel:NSObject{ @@ -191,9 +191,9 @@ class CNLiveVitaeViewModel:NSObject{
191 showMessage(message: "上传失败") 191 showMessage(message: "上传失败")
192 resultBlock(NSNull(),.failed) 192 resultBlock(NSNull(),.failed)
193 } 193 }
194 - 194 +
195 } 195 }
196 - 196 +
197 197
198 /* 198 /*
199 获取证书列表 199 获取证书列表
@@ -229,7 +229,7 @@ class CNLiveVitaeViewModel:NSObject{ @@ -229,7 +229,7 @@ class CNLiveVitaeViewModel:NSObject{
229 resultBlock(NSNull(),.failed) 229 resultBlock(NSNull(),.failed)
230 } 230 }
231 } 231 }
232 - 232 +
233 } 233 }
234 234
235 /* 235 /*
@@ -287,9 +287,49 @@ class CNLiveVitaeViewModel:NSObject{ @@ -287,9 +287,49 @@ class CNLiveVitaeViewModel:NSObject{
287 showMessage(message: "上传失败") 287 showMessage(message: "上传失败")
288 resultBlock(NSNull(),.failed) 288 resultBlock(NSNull(),.failed)
289 } 289 }
290 - 290 +
291 } 291 }
  292 +
  293 + /*
  294 + 获取工作记录列表
  295 + 参数 vsid 实名对象id
  296 + 参数 type 1简历信息 2官方认证 3证书 4工作经历 4获奖情况
  297 + */
  298 + static func getWorkList(vsid:String,resultBlock: @escaping downSlideResultBlock) {
  299 + let param = NSMutableDictionary()
  300 + param.setValue(vsid, forKey: "vsid")
  301 + param.setValue("4", forKey: "type")
  302 + CNLiveNetworking.setAllowRequestDefaultArgument(true)
  303 + CNLiveNetworking.setupShowDataResult(false)
  304 + CNLiveNetworking.setupDSRequest(true)
  305 + let custom_param = NSMutableDictionary()
  306 + custom_param.setValue(CNLiveMCEnvironmentManager.shared.appId, forKey: "appId")
  307 + custom_param.setValue(CNLiveMCEnvironmentManager.shared.appKey, forKey: "appKey")
  308 + CNLiveNetworking.setupCustomParam(custom_param as? [String : String])
  309 +
  310 + CNLiveNetworking.requestNetwork(with: .GET, urlString: APPBaseMCUrl+"/userApi/getVitae", param: param as! [String : String], cacheType: .networkOnly) { task, result, error in
  311 + hiddenLoading()
  312 + if (error == nil) {
  313 + let resp = result as! NSDictionary
  314 + if resp["errorCode"] as! Int == 0{
  315 + let dataArr = resp["data"] as! Array<[String : Any]>
  316 + var worksArr = Array<CNLiveVitaeWorksModel>()
  317 + for (_,dic) in dataArr.enumerated() {
  318 + let model = newDictionaryToModel(dic, CNLiveVitaeWorksModel.self) as! CNLiveVitaeWorksModel
  319 + worksArr.append(model)
  320 + }
  321 + resultBlock(worksArr,.success)
  322 + }else{
  323 + resultBlock(NSNull(),.failed)
  324 + }
  325 + }else{
  326 + resultBlock(NSNull(),.failed)
  327 + }
  328 + }
  329 +
292 330
  331 + }
  332 +
293 } 333 }
294 334
295 335
metaCode/Classes/Main/MinePage/View/CNLiveMineInfoAlertView.swift
@@ -112,7 +112,7 @@ class MineInfoAlertView: UIView { @@ -112,7 +112,7 @@ class MineInfoAlertView: UIView {
112 } 112 }
113 if UserInfoManager.shared.userInfo.birthday.count > 0 && self.type == .birthday{ 113 if UserInfoManager.shared.userInfo.birthday.count > 0 && self.type == .birthday{
114 let dateFomatter = DateFormatter() 114 let dateFomatter = DateFormatter()
115 - dateFomatter.dateFormat = "yyyy-MM-dd" 115 + dateFomatter.dateFormat = "yyyy.MM.dd"
116 dateFomatter.locale = Locale.init(identifier: "zh_CN") 116 dateFomatter.locale = Locale.init(identifier: "zh_CN")
117 let date = dateFomatter.date(from: UserInfoManager.shared.userInfo.birthday) 117 let date = dateFomatter.date(from: UserInfoManager.shared.userInfo.birthday)
118 datePicker.setDate(date!, animated: true) 118 datePicker.setDate(date!, animated: true)
@@ -313,7 +313,7 @@ class MineInfoAlertView: UIView { @@ -313,7 +313,7 @@ class MineInfoAlertView: UIView {
313 313
314 @objc func dateChangeAction(sender: UIDatePicker) { 314 @objc func dateChangeAction(sender: UIDatePicker) {
315 let formatter = DateFormatter() 315 let formatter = DateFormatter()
316 - formatter.dateFormat = "yyyy-MM-dd" 316 + formatter.dateFormat = "yyyy.MM.dd"
317 if self.type == .birthday{ 317 if self.type == .birthday{
318 birthday = formatter.string(from: datePicker.date) 318 birthday = formatter.string(from: datePicker.date)
319 } 319 }
@@ -336,7 +336,7 @@ class MineInfoAlertView: UIView { @@ -336,7 +336,7 @@ class MineInfoAlertView: UIView {
336 value = selectDay ?? "" 336 value = selectDay ?? ""
337 if value.count == 0{ 337 if value.count == 0{
338 let formatter = DateFormatter() 338 let formatter = DateFormatter()
339 - formatter.dateFormat = "yyyy-MM-dd" 339 + formatter.dateFormat = "yyyy.MM.dd"
340 let date = formatter.string(from: datePicker.date) 340 let date = formatter.string(from: datePicker.date)
341 print("获取到的时间是:\(date)") 341 print("获取到的时间是:\(date)")
342 result!(date) 342 result!(date)
@@ -632,7 +632,7 @@ class MineStandListAlertView: UIView, UIPickerViewDelegate, UIPickerViewDataSour @@ -632,7 +632,7 @@ class MineStandListAlertView: UIView, UIPickerViewDelegate, UIPickerViewDataSour
632 } 632 }
633 if UserInfoManager.shared.userInfo.birthday.count > 0 { 633 if UserInfoManager.shared.userInfo.birthday.count > 0 {
634 let dateFomatter = DateFormatter() 634 let dateFomatter = DateFormatter()
635 - dateFomatter.dateFormat = "yyyy-MM-dd" 635 + dateFomatter.dateFormat = "yyyy.MM.dd"
636 dateFomatter.locale = Locale.init(identifier: "zh_CN") 636 dateFomatter.locale = Locale.init(identifier: "zh_CN")
637 let date = dateFomatter.date(from: UserInfoManager.shared.userInfo.birthday) 637 let date = dateFomatter.date(from: UserInfoManager.shared.userInfo.birthday)
638 datePicker.setDate(date!, animated: true) 638 datePicker.setDate(date!, animated: true)
@@ -706,7 +706,7 @@ class MineStandListAlertView: UIView, UIPickerViewDelegate, UIPickerViewDataSour @@ -706,7 +706,7 @@ class MineStandListAlertView: UIView, UIPickerViewDelegate, UIPickerViewDataSour
706 text = formatter.string(from: datePicker.date) 706 text = formatter.string(from: datePicker.date)
707 }else{ 707 }else{
708 let formatter = DateFormatter() 708 let formatter = DateFormatter()
709 - formatter.dateFormat = "yyyy-MM-dd" 709 + formatter.dateFormat = "yyyy.MM.dd"
710 text = formatter.string(from: datePicker.date) 710 text = formatter.string(from: datePicker.date)
711 } 711 }
712 712
@@ -866,7 +866,7 @@ class MineStandListAlertView: UIView, UIPickerViewDelegate, UIPickerViewDataSour @@ -866,7 +866,7 @@ class MineStandListAlertView: UIView, UIPickerViewDelegate, UIPickerViewDataSour
866 866
867 @objc func dateChangeAction(sender: UIDatePicker) { 867 @objc func dateChangeAction(sender: UIDatePicker) {
868 let formatter = DateFormatter() 868 let formatter = DateFormatter()
869 - formatter.dateFormat = "yyyy-MM-dd" 869 + formatter.dateFormat = "yyyy.MM.dd"
870 let date = formatter.string(from: datePicker.date) 870 let date = formatter.string(from: datePicker.date)
871 print("获取到的时间是:\(date)") 871 print("获取到的时间是:\(date)")
872 text = date 872 text = date
metaCode/Classes/Main/Model/Vitae/CNLiveViateWorkModelLayout.swift 0 → 100644
  1 +//
  2 +// CNLiveViateWorkModelLayout.swift
  3 +// metaCode
  4 +//
  5 +// Created by zx on 2024/8/1.
  6 +//
  7 +
  8 +import Foundation
  9 +
  10 +
  11 +class CNLiveViateWorkModelLayout:NSObject{
  12 +
  13 + ///cell高度
  14 + var cellH:CGFloat = 0.0
  15 +// var descH:Float = 40.0
  16 +
  17 + var _workModel : CNLiveVitaeWorksModel?
  18 + var workModel : CNLiveVitaeWorksModel? {
  19 + get{
  20 + _workModel
  21 + }
  22 + set{
  23 + _workModel = newValue
  24 + }
  25 + }
  26 +
  27 + init(model:CNLiveVitaeWorksModel,descH:Float){
  28 + super.init()
  29 + self.workModel = model
  30 + let imgArr = model.imgs.components(separatedBy: ",")
  31 + var hang:Float = 1
  32 + if imgArr.count > 0{
  33 + if imgArr.count <= 3{
  34 + hang = 1
  35 + }else if imgArr.count <= 6{
  36 + hang = 2
  37 + }else if imgArr.count <= 9{
  38 + hang = 3
  39 + }else{
  40 + hang = 4
  41 + }
  42 + }else{
  43 + hang = 0
  44 + }
  45 + let imgWH:Float = Float((KSreenWidth-60-15)/3.0+10)
  46 + _workModel?.cellH = Float(123)+descH+Float(hang*imgWH)+90
  47 + }
  48 + func getCellHModel()->CNLiveVitaeWorksModel{
  49 + return _workModel!
  50 + }
  51 +
  52 +}
metaCode/Classes/Main/Model/Vitae/CNLiveVitaeModel.swift
@@ -104,6 +104,9 @@ class CNLiveVitaeWorksModel:BaseModel{ @@ -104,6 +104,9 @@ class CNLiveVitaeWorksModel:BaseModel{
104 /// 104 ///
105 var imgs:String = "" 105 var imgs:String = ""
106 106
  107 + ///cell高度
  108 + var cellH: Float = 0
  109 +
107 } 110 }
108 111
109 //简历证书模块 112 //简历证书模块
metaCode/Supporting Files/Assets.xcassets/MinePage/jianli/mine_jianli_workBg.imageset/Contents.json 0 → 100644
  1 +{
  2 + "images" : [
  3 + {
  4 + "idiom" : "universal",
  5 + "scale" : "1x"
  6 + },
  7 + {
  8 + "filename" : "mine_jianli_workBg@2x.png",
  9 + "idiom" : "universal",
  10 + "scale" : "2x"
  11 + },
  12 + {
  13 + "filename" : "mine_jianli_workBg@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_workBg.imageset/mine_jianli_workBg@2x.png 0 → 100644

315 KB

metaCode/Supporting Files/Assets.xcassets/MinePage/jianli/mine_jianli_workBg.imageset/mine_jianli_workBg@3x.png 0 → 100644

841 KB

metaCode/Supporting Files/Assets.xcassets/MinePage/jianli/mine_jinali_workdingwei.imageset/Contents.json 0 → 100644
  1 +{
  2 + "images" : [
  3 + {
  4 + "idiom" : "universal",
  5 + "scale" : "1x"
  6 + },
  7 + {
  8 + "filename" : "mine_jinali_workdingwei@2x.png",
  9 + "idiom" : "universal",
  10 + "scale" : "2x"
  11 + },
  12 + {
  13 + "filename" : "mine_jinali_workdingwei@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_jinali_workdingwei.imageset/mine_jinali_workdingwei@2x.png 0 → 100644

661 Bytes

metaCode/Supporting Files/Assets.xcassets/MinePage/jianli/mine_jinali_workdingwei.imageset/mine_jinali_workdingwei@3x.png 0 → 100644

1.14 KB