Commit 1fb5b8c766bf37d0368f18f094ca5a408eb0be1d
1 parent
55bc4736
* [x] 数字简历-展示的手机号,设置手机号优先级>sid的手机号
* [x] 数字简历-工作时间设置不上
Showing
4 changed files
with
42 additions
and
13 deletions
metaCode/Classes/Main/HomePage/Controller/DigitalAuth/数字简历相关页面/CNLiveDigitalResumeInfoController.swift
| ... | ... | @@ -476,9 +476,9 @@ class CNLiveDigitalResumeInfoController:CNLiveBaseViewController, UITextFieldDel |
| 476 | 476 | // MARK: - UITextFieldDelegate |
| 477 | 477 | func textFieldDidEndEditing(_ textField: UITextField) { |
| 478 | 478 | self.view.endEditing(true) |
| 479 | - if textField.text?.count ?? 0 > 0{ | |
| 479 | +// if textField.text?.count ?? 0 > 0{ | |
| 480 | 480 | self.savePhone() |
| 481 | - } | |
| 481 | +// } | |
| 482 | 482 | } |
| 483 | 483 | |
| 484 | 484 | func savePhone(){ |
| ... | ... | @@ -606,16 +606,15 @@ class CNLiveDigitalResumeInfoController:CNLiveBaseViewController, UITextFieldDel |
| 606 | 606 | MineInfoAlertView.showSelectView(showType: .selectDay) { [weak self] text in |
| 607 | 607 | print("刷新之后的数据是=>\(text)")//"2024-06-18" |
| 608 | 608 | if (text as! String).count > 0{ |
| 609 | - var yearStr = "" | |
| 609 | + var yearStr = ""//UI展示str | |
| 610 | + var textstr = ""//接口传"2024-06-18" | |
| 610 | 611 | if let textStr = text as? String{ |
| 611 | - | |
| 612 | - var yearStr = "" | |
| 613 | 612 | if let workExperience = self?.calculateWorkExperience(fromDateString: textStr){ |
| 614 | 613 | yearStr = "\(textStr)(\(workExperience)年经验)" |
| 615 | 614 | }else{ |
| 616 | 615 | yearStr = textStr |
| 617 | 616 | } |
| 618 | - yearStr = textStr | |
| 617 | + textstr = textStr | |
| 619 | 618 | }else{ |
| 620 | 619 | yearStr = "请选择" |
| 621 | 620 | } |
| ... | ... | @@ -624,10 +623,10 @@ class CNLiveDigitalResumeInfoController:CNLiveBaseViewController, UITextFieldDel |
| 624 | 623 | self?.canjiaRightTitleLabel.textColor = HexColor("#333333") |
| 625 | 624 | |
| 626 | 625 | if var userDic = UserDefaults.standard.dictionary(forKey: UserInfoManager.shared.userInfo.uid){ |
| 627 | - userDic.updateValue(yearStr, forKey: "jianli_workTime") | |
| 626 | + userDic.updateValue(textstr, forKey: "jianli_workTime") | |
| 628 | 627 | UserDefaults.standard.setValue(userDic, forKey: UserInfoManager.shared.userInfo.uid) |
| 629 | 628 | UserDefaults.standard.synchronize() |
| 630 | - self!.updateViate(key: "jianli_workTime", value: yearStr) | |
| 629 | + self!.updateViate(key: "jianli_workTime", value: textstr) | |
| 631 | 630 | }else{ |
| 632 | 631 | let tempDic = NSMutableDictionary() |
| 633 | 632 | UserDefaults.standard.setValue(tempDic, forKey: UserInfoManager.shared.userInfo.uid) | ... | ... |
metaCode/Classes/Main/HomePage/Controller/DigitalAuth/证书相关页面/CNLiveVitaeAddCertificateController.swift
| ... | ... | @@ -82,6 +82,7 @@ class CNLiveVitaeAddCertificateController:CNLiveBaseViewController,UITableViewDa |
| 82 | 82 | make.right.equalToSuperview().offset(-15) |
| 83 | 83 | make.bottom.equalToSuperview().offset(-75) |
| 84 | 84 | } |
| 85 | + self.chengNuoTitleLabel.isHidden = true | |
| 85 | 86 | |
| 86 | 87 | self.view.addSubview(self.bottomZhiNanWhiteView) |
| 87 | 88 | self.bottomZhiNanWhiteView.snp.makeConstraints { make in |
| ... | ... | @@ -119,6 +120,7 @@ class CNLiveVitaeAddCertificateController:CNLiveBaseViewController,UITableViewDa |
| 119 | 120 | self.seleImage = image |
| 120 | 121 | self.seleImageUrl = url |
| 121 | 122 | self.bottomZhiNanWhiteView.isHidden = false |
| 123 | + self.chengNuoTitleLabel.isHidden = false | |
| 122 | 124 | } |
| 123 | 125 | } |
| 124 | 126 | return cell |
| ... | ... | @@ -172,11 +174,20 @@ class CNLiveVitaeAddCertificateController:CNLiveBaseViewController,UITableViewDa |
| 172 | 174 | //提交证书 |
| 173 | 175 | CNLiveVitaeViewModel.saveCertificate(img: self.seleImageUrl, lv: cell.cerLevelTF.text ?? "", number: cell.cerNumberTF.text ?? "", organization: cell.cerJiGouTF.text ?? "", time: cell.cerTimeTF.text ?? "", title: cell.cerNameTF.text ?? "", uploadTime: "", validity: cell.cerYouXiaoTF.text ?? "", vsid: vsid){result, respStatue in |
| 174 | 176 | if respStatue == .success{ |
| 177 | + var ishaveResume = false | |
| 175 | 178 | self.navigationController?.viewControllers.forEach({ item in |
| 176 | - if (item.isKind(of: CNLiveVitaeVocationalCertificateController.self)) { | |
| 179 | + if (item.isKind(of: CNLiveDigitalResumeController.self)) { | |
| 177 | 180 | self.navigationController?.popToViewController(item, animated: true) |
| 181 | + ishaveResume = true | |
| 178 | 182 | } |
| 183 | +// else if (item.isKind(of: CNLiveVitaeVocationalCertificateController.self)) { | |
| 184 | +// self.navigationController?.popToViewController(item, animated: true) | |
| 185 | +// ishaveResume = true | |
| 186 | +// } | |
| 179 | 187 | }) |
| 188 | + if ishaveResume == false{ | |
| 189 | + self.navigationController?.popViewController(animated: true) | |
| 190 | + } | |
| 180 | 191 | } |
| 181 | 192 | |
| 182 | 193 | } | ... | ... |
metaCode/Classes/Main/HomePage/View/DigitalAuthViews/DigitalResume/CNLiveDigitalResumeCell.swift
| ... | ... | @@ -726,8 +726,8 @@ class CNLiveDigitalResumeCell: UITableViewCell { |
| 726 | 726 | navigationViewController().pushViewController(CNLiveVitaeVocationalCertificateController(), animated: true) |
| 727 | 727 | |
| 728 | 728 | }else{ |
| 729 | - //跳转上传示意图页面 | |
| 730 | - navigationViewController().pushViewController(CNLiveVitaeCerAddPhotoController(), animated: true) | |
| 729 | + //跳转个人证书上传页面 | |
| 730 | + navigationViewController().pushViewController(CNLiveVitaeAddCertificateController(), animated: true) | |
| 731 | 731 | } |
| 732 | 732 | } |
| 733 | 733 | @objc func gongzuoDetailTitleLabelAciton(){ |
| ... | ... | @@ -823,7 +823,15 @@ class CNLiveDigitalResumeCell: UITableViewCell { |
| 823 | 823 | } |
| 824 | 824 | if model.vitae?.workTime.count ?? 0 > 0{ |
| 825 | 825 | var yearStr = "" |
| 826 | - if let workExperience = self.calculateWorkExperience(fromDateString: model.vitae!.workTime){ | |
| 826 | + var workTimeStr = "" | |
| 827 | + let arr = model.vitae!.workTime.components(separatedBy: "(") | |
| 828 | + if arr.count > 0{ | |
| 829 | + workTimeStr = arr.first! as String | |
| 830 | + }else{ | |
| 831 | + workTimeStr = model.vitae!.workTime | |
| 832 | + } | |
| 833 | + | |
| 834 | + if let workExperience = self.calculateWorkExperience(fromDateString: workTimeStr){ | |
| 827 | 835 | yearStr = "\(workExperience)年经验" |
| 828 | 836 | }else{ |
| 829 | 837 | yearStr = "" | ... | ... |
metaCode/Classes/Main/HomePage/View/DigitalAuthViews/我的简历cell/CNLiveDigitalResumePreViewFirCell.swift
| ... | ... | @@ -242,7 +242,18 @@ class CNLiveDigitalResumePreViewFirCell: UITableViewCell { |
| 242 | 242 | let idNo = UserInfoManager.shared.userInfo.currentUser?.idNo ?? "" |
| 243 | 243 | let (gender, age) = self.extractGenderAndAge(fromIDCardNumber: idNo) |
| 244 | 244 | let ageStr = String(format: "%d", age ?? 0) |
| 245 | - self.phoneTitleLabel.text = gender+" | "+ageStr+"岁"+" | "+UserInfoManager.shared.userInfo.mobile | |
| 245 | + var phoneTitleLabelStr = gender | |
| 246 | + if (model.vitae?.showAge ?? false) == true{ | |
| 247 | + phoneTitleLabelStr = phoneTitleLabelStr+" | "+ageStr+"岁" | |
| 248 | + } | |
| 249 | + if (model.vitae?.showPhone ?? false) == true{ | |
| 250 | + let tempStr = (model.vitae?.phone.count ?? 0 > 0 ? model.vitae!.phone : UserInfoManager.shared.userInfo.mobile) | |
| 251 | + if tempStr.count > 0{ | |
| 252 | + phoneTitleLabelStr = phoneTitleLabelStr+" | "+tempStr | |
| 253 | + } | |
| 254 | + } | |
| 255 | + self.phoneTitleLabel.text = phoneTitleLabelStr | |
| 256 | + | |
| 246 | 257 | |
| 247 | 258 | if model.vitae?.profession.count ?? 0 > 0{ |
| 248 | 259 | self.hangyeTitleLabel.text = model.vitae?.profession | ... | ... |