CNLiveDigitalResumeCell.swift
24.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
//
// CNLiveDigitalResumeCell.swift
// metaCode
//
// Created by zx on 2024/7/15.
// 数字简历顶部cell
import Foundation
import Kingfisher
import SnapKit
class CNLiveDigitalResumeCell: UITableViewCell {
//简历Model
var _vitaeModel : CNLiveVitaeModel?
var vitaeModel : CNLiveVitaeModel? {
get{
_vitaeModel
}
set{
_vitaeModel = newValue!
setupNewUI(model: _vitaeModel!)
}
}
lazy var bgImgView :UIImageView = {
let iconImgView = UIImageView()
iconImgView.width = KSreenWidth
iconImgView.height = KSreenWidth*234/375
// fillCode
let bgLayer1 = CAGradientLayer()
bgLayer1.colors = [UIColor(red: 0.16, green: 0.45, blue: 0.99, alpha: 1).cgColor, UIColor(red: 0.96, green: 0.96, blue: 0.98, alpha: 1).cgColor]
bgLayer1.locations = [0, 1]
bgLayer1.frame = iconImgView.bounds
bgLayer1.startPoint = CGPoint(x: 0.5, y: 0)
bgLayer1.endPoint = CGPoint(x: 1, y: 1)
iconImgView.layer.addSublayer(bgLayer1)
return iconImgView
}()
lazy var iconImgView :UIImageView = {
let iconImgView = UIImageView()
iconImgView.image = UIImage(named: "mine_jianli_iconbg")
return iconImgView
}()
lazy var jianliTitleLabel: UILabel = {
let titleLabel = UILabel.init()
titleLabel.textColor = HexColor("#C2D7FF")
titleLabel.textAlignment = .left
titleLabel.font = Font_14//数字简历ID:123456789321
titleLabel.text = "数字简历ID:"
titleLabel.adjustsFontSizeToFitWidth=true
titleLabel.addGestureRecognizer(UITapGestureRecognizer(target: self, action: #selector(jianliAction)))
titleLabel.isUserInteractionEnabled = true
return titleLabel
}()
lazy var jianliDetailImgView :UIImageView = {
let iconImgView = UIImageView()
iconImgView.image = UIImage(named: "mine_jianli_back")
iconImgView.addGestureRecognizer(UITapGestureRecognizer(target: self, action: #selector(jianliAction)))
iconImgView.isUserInteractionEnabled = true
return iconImgView
}()
lazy var whiteBgView :UIView = {
let whiteBgView = UIView()
whiteBgView.backgroundColor = .white
whiteBgView.layer.cornerRadius = 12
whiteBgView.clipsToBounds = true
return whiteBgView
}()
lazy var jianliIconBgView :UIView = {
let whiteBgView = UIView()
whiteBgView.backgroundColor = .white
whiteBgView.layer.cornerRadius = 12
whiteBgView.clipsToBounds = true
return whiteBgView
}()
lazy var jianliIconImgView :UIImageView = {
let iconImgView = UIImageView()
iconImgView.image = UIImage(named: "mine_jianli_icon")
iconImgView.addGestureRecognizer(UITapGestureRecognizer(target: self, action: #selector(jianliIconAction)))
iconImgView.isUserInteractionEnabled = true
return iconImgView
}()
//已认证 名字
lazy var authNameTitleLabel: UILabel = {
let titleLabel = UILabel()
titleLabel.textColor = HexColor("#333333")
titleLabel.textAlignment = .center
titleLabel.text = ""
titleLabel.font = BoldFont_24
return titleLabel
}()
lazy var changePersonBtn: UIButton = {
let closeBtn = UIButton(type: .custom)
closeBtn.backgroundColor = HexColor("#FFF8DB")
closeBtn.layer.cornerRadius = 3
closeBtn.clipsToBounds = true
closeBtn.setTitle("实名对象切换 ▶", for: .normal)
closeBtn.setTitleColor(HexColor("#F2A62E"), for: .normal)
closeBtn.titleLabel?.font = Font_12
closeBtn.addTarget(self, action: #selector(changePersonBtnAction), for: .touchUpInside)
return closeBtn
}()
lazy var phoneTitleLabel: UILabel = {
let titleLabel = UILabel()
titleLabel.textColor = HexColor("#999999")
titleLabel.textAlignment = .left
titleLabel.text = "男 | xx岁 | 10000000000"
titleLabel.font = Font_14
return titleLabel
}()
lazy var weizhiTitleLabel: UILabel = {
let titleLabel = UILabel()
titleLabel.textColor = HexColor("#999999")
titleLabel.textAlignment = .left
titleLabel.text = " | 位置未授权"
titleLabel.font = Font_14
return titleLabel
}()
lazy var workTitleLabel: UILabel = {
let titleLabel = UILabel()
titleLabel.textColor = HexColor("#999999")
titleLabel.textAlignment = .left
titleLabel.text = "参加工作时间未设置 >"
titleLabel.font = Font_14
titleLabel.isUserInteractionEnabled = true
titleLabel.addGestureRecognizer(UITapGestureRecognizer(target: self, action: #selector(workTitleLabelAciton)))
return titleLabel
}()
lazy var lineView :UIView = {
let bottomNavView = UIView()
bottomNavView.backgroundColor = HexColor("#EBEBEB")
return bottomNavView
}()
lazy var hangyeTitleLabel: UILabel = {
let titleLabel = UILabel()
titleLabel.textColor = HexColor("#333333")
titleLabel.textAlignment = .left
titleLabel.text = "行业"
titleLabel.font = BoldFont_14
return titleLabel
}()
lazy var hangyeImgView :UIImageView = {
let iconImgView = UIImageView()
iconImgView.image = UIImage(named: "mine_jianli_zhenshi")
return iconImgView
}()
lazy var hangyeDetailTitleLabel: UILabel = {
let titleLabel = UILabel()
titleLabel.textColor = HexColor("#999999")
titleLabel.textAlignment = .right
titleLabel.text = "选择您所在行业 >"
titleLabel.font = Font_14
titleLabel.isUserInteractionEnabled = true
titleLabel.addGestureRecognizer(UITapGestureRecognizer(target: self, action: #selector(hangyeDetailTitleLabelAciton)))
return titleLabel
}()
lazy var renzhengTitleLabel: UILabel = {
let titleLabel = UILabel()
titleLabel.textColor = HexColor("#333333")
titleLabel.textAlignment = .left
titleLabel.text = "官方认证"
titleLabel.font = BoldFont_14
return titleLabel
}()
lazy var renzhengDetailTitleLabel: UILabel = {
let titleLabel = UILabel()
titleLabel.textColor = HexColor("#999999")
titleLabel.textAlignment = .right
titleLabel.text = "添加职业技能身份 0 >"
titleLabel.font = Font_14
titleLabel.isUserInteractionEnabled = true
titleLabel.addGestureRecognizer(UITapGestureRecognizer(target: self, action: #selector(renzhengDetailTitleLabelAciton)))
return titleLabel
}()
lazy var zhengshuTitleLabel: UILabel = {
let titleLabel = UILabel()
titleLabel.textColor = HexColor("#333333")
titleLabel.textAlignment = .left
titleLabel.text = "其他证书"
titleLabel.font = BoldFont_14
return titleLabel
}()
lazy var zhengshuDetailTitleLabel: UILabel = {
let titleLabel = UILabel()
titleLabel.textColor = HexColor("#999999")
titleLabel.textAlignment = .right
titleLabel.text = "上传证书 0 >"
titleLabel.font = Font_14
titleLabel.isUserInteractionEnabled = true
titleLabel.addGestureRecognizer(UITapGestureRecognizer(target: self, action: #selector(zhengshuDetailTitleLabelAciton)))
return titleLabel
}()
lazy var gongzuoTitleLabel: UILabel = {
let titleLabel = UILabel()
titleLabel.textColor = HexColor("#333333")
titleLabel.textAlignment = .left
titleLabel.text = "工作记录"
titleLabel.font = BoldFont_14
return titleLabel
}()
lazy var gongzuoDetailTitleLabel: UILabel = {
let titleLabel = UILabel()
titleLabel.textColor = HexColor("#999999")
titleLabel.textAlignment = .right
titleLabel.text = "补充工作记录 0 >"
titleLabel.font = Font_14
titleLabel.isUserInteractionEnabled = true
titleLabel.addGestureRecognizer(UITapGestureRecognizer(target: self, action: #selector(gongzuoDetailTitleLabelAciton)))
return titleLabel
}()
lazy var huojiangTitleLabel: UILabel = {
let titleLabel = UILabel()
titleLabel.textColor = HexColor("#333333")
titleLabel.textAlignment = .left
titleLabel.text = "获奖情况"
titleLabel.font = BoldFont_14
return titleLabel
}()
lazy var huojiangDetailTitleLabel: UILabel = {
let titleLabel = UILabel()
titleLabel.textColor = HexColor("#999999")
titleLabel.textAlignment = .right
titleLabel.text = "展示获奖情况 0 >"
titleLabel.font = Font_14
titleLabel.isUserInteractionEnabled = true
titleLabel.addGestureRecognizer(UITapGestureRecognizer(target: self, action: #selector(huojiangDetailTitleLabelAciton)))
return titleLabel
}()
lazy var bottomLineView :UIView = {
let bottomNavView = UIView()
bottomNavView.backgroundColor = HexColor("#EBEBEB")
return bottomNavView
}()
lazy var chakanTitleLabel: UILabel = {
let titleLabel = UILabel()
titleLabel.textColor = HexColor("#999999")
titleLabel.textAlignment = .right
titleLabel.text = "查看完整资料 >"
titleLabel.font = Font_14
titleLabel.isUserInteractionEnabled = true
titleLabel.addGestureRecognizer(UITapGestureRecognizer(target: self, action: #selector(chakanTitleLabelAciton)))
return titleLabel
}()
lazy var shezhiView :UIView = {
let bottomNavView = UIView()
bottomNavView.width = KSreenWidth-30
bottomNavView.height = 61
// fillCode
let bgLayer1 = CAGradientLayer()
bgLayer1.colors = [UIColor(red: 0.98, green: 1, blue: 1, alpha: 1).cgColor, UIColor(red: 0.9, green: 0.95, blue: 1, alpha: 1).cgColor]
bgLayer1.locations = [0, 1]
bgLayer1.frame = bottomNavView.bounds
bgLayer1.startPoint = CGPoint(x: 0.5, y: 1)
bgLayer1.endPoint = CGPoint(x: 0, y: 0)
bottomNavView.layer.addSublayer(bgLayer1)
return bottomNavView
}()
lazy var shezhiBtn: UIButton = {
let closeBtn = UIButton(type: .custom)
closeBtn.layer.cornerRadius = 8
closeBtn.clipsToBounds = true
closeBtn.setTitle("设置", for: .normal)
closeBtn.setTitleColor(HexColor("#333333"), for: .normal)
closeBtn.titleLabel?.font = BoldFont_16
closeBtn.backgroundColor = HexColor("#E8EBF4")
closeBtn.addTarget(self, action: #selector(shezhiBtnAction), for: .touchUpInside)
return closeBtn
}()
lazy var chakanBtn: UIButton = {
let closeBtn = UIButton(type: .custom)
closeBtn.layer.cornerRadius = 8
closeBtn.clipsToBounds = true
closeBtn.setTitle("查看我的数字简历", for: .normal)
closeBtn.setTitleColor(HexColor("#FFFFFF"), for: .normal)
closeBtn.titleLabel?.font = BoldFont_16
closeBtn.backgroundColor = HexColor("#1961FE")
closeBtn.addTarget(self, action: #selector(chakanBtnAction), for: .touchUpInside)
return closeBtn
}()
override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
super.init(style: style, reuseIdentifier: reuseIdentifier)
self.selectionStyle = .none
self.backgroundColor = .clear
self.contentView.backgroundColor = .clear
self.contentView.addSubview(self.bgImgView)
self.bgImgView.snp.makeConstraints { make in
make.top.equalTo(0)
make.left.right.equalToSuperview()
make.height.equalTo(KSreenWidth*234/375)
}
self.bgImgView.addSubview(self.iconImgView)
self.iconImgView.snp.makeConstraints { make in
make.top.equalTo(23)
make.left.equalTo(15)
make.height.equalTo(25)
make.width.equalTo(149)
}
self.bgImgView.addSubview(self.jianliTitleLabel)
self.jianliTitleLabel.snp.makeConstraints { make in
make.top.equalTo(self.iconImgView.snp.bottom).offset(7)
make.left.equalTo(15)
}
self.bgImgView.addSubview(self.jianliDetailImgView)
self.jianliDetailImgView.snp.makeConstraints { make in
make.left.equalTo(self.jianliTitleLabel.snp.right).offset(4)
make.centerY.equalTo(self.jianliTitleLabel.snp.centerY)
make.height.equalTo(12)
make.width.equalTo(12)
}
self.contentView.addSubview(self.whiteBgView)
self.whiteBgView.snp.makeConstraints { make in
make.top.equalTo(adapt_length(length: 87))
make.bottom.equalToSuperview()
make.left.equalTo(15)
make.right.equalToSuperview().offset(-15)
}
self.contentView.addSubview(self.jianliIconBgView)
self.jianliIconBgView.snp.makeConstraints { make in
make.top.equalTo(adapt_length(length: 37))
make.right.equalToSuperview().offset(adapt_length(length: -42))
make.width.height.equalTo(adapt_length(length: 90))
}
self.jianliIconBgView.addSubview(self.jianliIconImgView)
self.jianliIconImgView.snp.makeConstraints { make in
make.width.height.equalTo(adapt_length(length: 70))
make.center.equalToSuperview()
}
self.whiteBgView.addSubview(self.authNameTitleLabel)
self.authNameTitleLabel.snp.makeConstraints { make in
make.left.equalTo(adapt_length(length: 15))
make.top.equalTo(adapt_length(length: 20))
}
self.authNameTitleLabel.text = UserInfoManager.shared.userInfo.currentUser?.name
self.whiteBgView.addSubview(self.changePersonBtn)
self.changePersonBtn.snp.makeConstraints { make in
make.left.equalTo(self.authNameTitleLabel.snp.right).offset(adapt_length(length: 5))
make.centerY.equalTo(self.authNameTitleLabel.snp.centerY)
make.width.equalTo(adapt_length(length: 91))
make.height.equalTo(adapt_length(length: 21))
}
self.whiteBgView.addSubview(self.phoneTitleLabel)
let (gender, age) = self.extractGenderAndAge(fromIDCardNumber: UserInfoManager.shared.userInfo.currentUser?.idNo ?? "")
let ageStr = String(format: "%d", age ?? 0)
self.phoneTitleLabel.text = gender+" | "+ageStr+"岁"+" | "+UserInfoManager.shared.userInfo.mobile
self.phoneTitleLabel.sizeToFit()
self.phoneTitleLabel.snp.makeConstraints { make in
make.left.equalTo(adapt_length(length: 15))
make.top.equalTo(self.authNameTitleLabel.snp.bottom).offset(adapt_length(length: 8))
make.width.equalTo(self.phoneTitleLabel.size.width)
make.height.equalTo(self.phoneTitleLabel.size.height)
}
self.whiteBgView.addSubview(self.weizhiTitleLabel)
self.weizhiTitleLabel.snp.makeConstraints { make in
make.left.equalTo(self.phoneTitleLabel.snp.right)
make.right.equalToSuperview().offset(-5)
make.top.equalTo(self.phoneTitleLabel.snp.top)
}
self.whiteBgView.addSubview(self.workTitleLabel)
self.workTitleLabel.snp.makeConstraints { make in
make.left.equalTo(adapt_length(length: 15))
make.top.equalTo(self.phoneTitleLabel.snp.bottom).offset(adapt_length(length: 4))
}
self.whiteBgView.addSubview(self.lineView)
self.lineView.snp.makeConstraints { make in
make.left.equalTo(adapt_length(length: 15))
make.right.equalToSuperview().offset(adapt_length(length: -15))
make.top.equalTo(self.workTitleLabel.snp.bottom).offset(adapt_length(length: 15))
make.height.equalTo(0.5)
}
self.whiteBgView.addSubview(self.hangyeTitleLabel)
self.hangyeTitleLabel.snp.makeConstraints { make in
make.left.equalTo(adapt_length(length: 15))
make.top.equalTo(self.lineView.snp.bottom).offset(adapt_length(length: 20))
}
self.whiteBgView.addSubview(self.hangyeImgView)
self.hangyeImgView.snp.makeConstraints { make in
make.left.equalTo(self.hangyeTitleLabel.snp.right).offset(5)
make.centerY.equalTo(self.hangyeTitleLabel.snp.centerY)
make.width.equalTo(83)
make.height.equalTo(16)
}
self.hangyeImgView.isHidden = true
self.whiteBgView.addSubview(self.hangyeDetailTitleLabel)
self.hangyeDetailTitleLabel.snp.makeConstraints { make in
make.right.equalToSuperview().offset(adapt_length(length: -20))
make.centerY.equalTo(self.hangyeTitleLabel.snp.centerY)
}
self.whiteBgView.addSubview(self.renzhengTitleLabel)
self.renzhengTitleLabel.snp.makeConstraints { make in
make.left.equalTo(adapt_length(length: 15))
make.top.equalTo(self.hangyeTitleLabel.snp.bottom).offset(adapt_length(length: 20))
}
self.whiteBgView.addSubview(self.renzhengDetailTitleLabel)
self.renzhengDetailTitleLabel.snp.makeConstraints { make in
make.right.equalToSuperview().offset(adapt_length(length: -20))
make.centerY.equalTo(self.renzhengTitleLabel.snp.centerY)
}
self.whiteBgView.addSubview(self.zhengshuTitleLabel)
self.zhengshuTitleLabel.snp.makeConstraints { make in
make.left.equalTo(adapt_length(length: 15))
make.top.equalTo(self.renzhengTitleLabel.snp.bottom).offset(adapt_length(length: 20))
}
self.whiteBgView.addSubview(self.zhengshuDetailTitleLabel)
self.zhengshuDetailTitleLabel.snp.makeConstraints { make in
make.right.equalToSuperview().offset(adapt_length(length: -20))
make.centerY.equalTo(self.zhengshuTitleLabel.snp.centerY)
}
self.whiteBgView.addSubview(self.gongzuoTitleLabel)
self.gongzuoTitleLabel.snp.makeConstraints { make in
make.left.equalTo(adapt_length(length: 15))
make.top.equalTo(self.zhengshuTitleLabel.snp.bottom).offset(adapt_length(length: 20))
}
self.whiteBgView.addSubview(self.gongzuoDetailTitleLabel)
self.gongzuoDetailTitleLabel.snp.makeConstraints { make in
make.right.equalToSuperview().offset(adapt_length(length: -20))
make.centerY.equalTo(self.gongzuoTitleLabel.snp.centerY)
}
self.whiteBgView.addSubview(self.huojiangTitleLabel)
self.huojiangTitleLabel.snp.makeConstraints { make in
make.left.equalTo(adapt_length(length: 15))
make.top.equalTo(self.gongzuoTitleLabel.snp.bottom).offset(adapt_length(length: 20))
}
self.whiteBgView.addSubview(self.huojiangDetailTitleLabel)
self.huojiangDetailTitleLabel.snp.makeConstraints { make in
make.right.equalToSuperview().offset(adapt_length(length: -20))
make.centerY.equalTo(self.huojiangTitleLabel.snp.centerY)
}
self.whiteBgView.addSubview(self.bottomLineView)
self.bottomLineView.snp.makeConstraints { make in
make.left.equalTo(adapt_length(length: 15))
make.right.equalToSuperview().offset(adapt_length(length: -15))
make.top.equalTo(self.huojiangTitleLabel.snp.bottom).offset(adapt_length(length: 20))
make.height.equalTo(0.5)
}
self.whiteBgView.addSubview(self.chakanTitleLabel)
self.chakanTitleLabel.snp.makeConstraints { make in
make.top.equalTo(self.bottomLineView.snp.bottom).offset(15)
make.centerX.equalToSuperview()
make.width.equalTo(100)
}
self.whiteBgView.addSubview(self.shezhiView)
self.shezhiView.snp.makeConstraints { make in
make.left.right.equalToSuperview()
make.top.equalTo(self.chakanTitleLabel.snp.bottom).offset(15)
make.height.equalTo(60)
}
self.shezhiView.addSubview(self.shezhiBtn)
self.shezhiBtn.snp.makeConstraints { make in
make.left.equalTo(adapt_length(length: 15))
make.width.equalTo(adapt_length(length: 105))
make.top.equalTo(10)
make.height.equalTo(40)
}
self.shezhiView.addSubview(self.chakanBtn)
self.chakanBtn.snp.makeConstraints { make in
make.right.equalToSuperview().offset(adapt_length(length: -15))
make.width.equalTo(adapt_length(length: 195))
make.top.equalTo(10)
make.height.equalTo(40)
}
}
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
//身份证号提取 性别和年龄
func extractGenderAndAge(fromIDCardNumber idCardNumber: String) -> (gender: String, age: Int?) {
guard idCardNumber.count == 18 else {
return ("未知", nil)
}
// 提取出生年份(身份证号码的第7位到第14位)
let birthYearStr = idCardNumber.subString(start: 6, length: 4)
guard let birthYear = Int(birthYearStr) else {
return ("未知", nil)
}
// 计算年龄
let currentYear = Calendar.current.component(.year, from: Date())
let age = currentYear - birthYear
// 提取性别(身份证号码的第17位,奇数代表男,偶数代表女)
let genderCode = Int(String(idCardNumber[idCardNumber.index(idCardNumber.startIndex, offsetBy: 16)]))
let gender = genderCode != nil && genderCode! % 2 == 0 ? "女" : "男"
return (gender, age >= 0 ? age : nil)
}
// MARK: - buttonAction
@objc func jianliAction(){
}
@objc func jianliIconAction(){
}
@objc func changePersonBtnAction(){
}
@objc func workTitleLabelAciton(){
let vc = CNLiveDigitalResumeInfoController()
currentViewController()?.navigationController?.pushViewController(vc, animated: true)
}
@objc func hangyeDetailTitleLabelAciton(){
navigationViewController().pushViewController(CNLiveSelectHangYeController(), animated: true)
}
@objc func renzhengDetailTitleLabelAciton(){
navigationViewController().pushViewController(CNLiveIdentityRepositoryController(), animated: true)
}
@objc func zhengshuDetailTitleLabelAciton(){
}
@objc func gongzuoDetailTitleLabelAciton(){
}
@objc func huojiangDetailTitleLabelAciton(){
}
@objc func chakanTitleLabelAciton(){
}
@objc func shezhiBtnAction(){
let vc = CNLiveDigitalResumeInfoController()
currentViewController()?.navigationController?.pushViewController(vc, animated: true)
}
@objc func chakanBtnAction(){
}
func setupNewUI(model:CNLiveVitaeModel){
self.jianliTitleLabel.text = "数字简历ID:"+"\(model.vitae!.id)"
if model.vitae?.profession.count ?? 0 > 0{
self.hangyeTitleLabel.text = model.vitae?.profession
self.hangyeDetailTitleLabel.isHidden = true
//再加一个本人承诺真实icon
self.hangyeImgView.isHidden = false
}else{
self.hangyeTitleLabel.text = "行业"
self.hangyeDetailTitleLabel.isHidden = false
//隐藏一个本人承诺真实icon
self.hangyeImgView.isHidden = true
}
if model.vitae?.city.count ?? 0 > 0 && model.vitae?.showAddress == true{
self.weizhiTitleLabel.text = " | "+model.vitae!.city
}else{
self.weizhiTitleLabel.text = " | 位置未授权"
}
if model.vitae?.workTime.count ?? 0 > 0{
self.workTitleLabel.text = model.vitae!.workTime
}else{
self.workTitleLabel.text = "参加工作时间未设置 >"
}
let tempArray = StandSortManager.sortMyListData(auths: CNLiveSaveAuthDB.shared.searchAllObject() as NSArray) as! [MineAuthListModel]
if tempArray.count > 0{
self.renzhengDetailTitleLabel.text = String(format: "%d >", tempArray.count)
}else{
self.renzhengDetailTitleLabel.text = "添加职业技能身份 0 >"
}
}
}