CNLiveDigitalResumeSecCell.swift
13.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
//
// CNLiveDigitalResumeSecCell.swift
// metaCode
//
// Created by zx on 2024/7/15.
// 数字简历-sec-cell
import Foundation
class CNLiveDigitalResumeSecCell:UITableViewCell{
var _usersModel : MineGetUserMsgVerifyUsersModel?
var usersModel : MineGetUserMsgVerifyUsersModel? {
get{
_usersModel
}
set{
_usersModel = newValue!
setupNewUI(model: _usersModel!)
}
}
lazy var leftWhiteBgView :UIImageView = {
let bottomNavView = UIImageView()
bottomNavView.backgroundColor = HexColor("#FFFFFF")
bottomNavView.layer.cornerRadius = 12
bottomNavView.clipsToBounds = true
bottomNavView.image = UIImage(named: "mine_jianli_qiuzhi")
bottomNavView.contentMode = .scaleAspectFit
bottomNavView.isUserInteractionEnabled = true
bottomNavView.addGestureRecognizer(UITapGestureRecognizer(target: self, action: #selector(leftQiuZhiAction)))
return bottomNavView
}()
lazy var rightWhiteBgView :UIImageView = {
let bottomNavView = UIImageView()
bottomNavView.backgroundColor = HexColor("#FFFFFF")
bottomNavView.layer.cornerRadius = 12
bottomNavView.clipsToBounds = true
bottomNavView.image = UIImage(named: "mine_jianli_zhiye")
bottomNavView.contentMode = .scaleAspectFit
bottomNavView.isUserInteractionEnabled = true
bottomNavView.addGestureRecognizer(UITapGestureRecognizer(target: self, action: #selector(rightZhiYeAction)))
return bottomNavView
}()
lazy var bottomWhiteBgView :UIView = {
let bottomNavView = UIView()
bottomNavView.backgroundColor = HexColor("#FFFFFF")
bottomNavView.layer.cornerRadius = 12
bottomNavView.clipsToBounds = true
return bottomNavView
}()
lazy var bottomTitleLabel: UILabel = {
let titleLabel = UILabel()
titleLabel.textColor = HexColor("#333333")
titleLabel.text = "大家都在看"
titleLabel.textAlignment = .left
titleLabel.font = BoldFont_18
return titleLabel
}()
lazy var bottomZhiYuanZheView :UIImageView = {
let bottomNavView = UIImageView()
bottomNavView.image = UIImage(named: "mine_jianli_zhiyuanzhe")
bottomNavView.contentMode = .scaleAspectFit
bottomNavView.isUserInteractionEnabled = true
bottomNavView.addGestureRecognizer(UITapGestureRecognizer(target: self, action: #selector(zhiyuanzheAction)))
return bottomNavView
}()
lazy var bottomYangLaoHuLiYuanView :UIImageView = {
let bottomNavView = UIImageView()
bottomNavView.image = UIImage(named: "mine_jianli_huliyuan")
bottomNavView.contentMode = .scaleAspectFit
bottomNavView.isUserInteractionEnabled = true
bottomNavView.addGestureRecognizer(UITapGestureRecognizer(target: self, action: #selector(yangLaoHuLiYuanAction)))
return bottomNavView
}()
lazy var bottomErTongPeiBanShiView :UIImageView = {
let bottomNavView = UIImageView()
bottomNavView.image = UIImage(named: "mine_jianli_peibanshi")
bottomNavView.contentMode = .scaleAspectFit
bottomNavView.isUserInteractionEnabled = true
bottomNavView.addGestureRecognizer(UITapGestureRecognizer(target: self, action: #selector(erTongPeiBanShiAction)))
return bottomNavView
}()
lazy var bottomXinLiZhiYunShiView :UIImageView = {
let bottomNavView = UIImageView()
bottomNavView.image = UIImage(named: "mine_jianli_xinli")
bottomNavView.contentMode = .scaleAspectFit
bottomNavView.isUserInteractionEnabled = true
bottomNavView.addGestureRecognizer(UITapGestureRecognizer(target: self, action: #selector(xinLiZhiYunShiAction)))
return bottomNavView
}()
lazy var bottomJiaTingJiaoYuView :UIImageView = {
let bottomNavView = UIImageView()
bottomNavView.image = UIImage(named: "mine_jianli_jiating")
bottomNavView.contentMode = .scaleAspectFit
bottomNavView.isUserInteractionEnabled = true
bottomNavView.addGestureRecognizer(UITapGestureRecognizer(target: self, action: #selector(JiaTingJiaoYuAction)))
return bottomNavView
}()
lazy var bottomGaoKaoYiShuView :UIImageView = {
let bottomNavView = UIImageView()
bottomNavView.image = UIImage(named: "mine_jianli_gaokao")
bottomNavView.contentMode = .scaleAspectFit
bottomNavView.isUserInteractionEnabled = true
bottomNavView.addGestureRecognizer(UITapGestureRecognizer(target: self, action: #selector(GaoKaoYiShuAction)))
return bottomNavView
}()
lazy var bottomZhiYeGuiHuaView :UIImageView = {
let bottomNavView = UIImageView()
bottomNavView.image = UIImage(named: "mine_jianli_zhiyeguigua")
bottomNavView.contentMode = .scaleAspectFit
bottomNavView.isUserInteractionEnabled = true
bottomNavView.addGestureRecognizer(UITapGestureRecognizer(target: self, action: #selector(ZhiYeGuiHuaAction)))
return bottomNavView
}()
lazy var bottomIconView :UIImageView = {
let bottomNavView = UIImageView()
bottomNavView.image = UIImage(named: "mine_jianli_grayIcon")
bottomNavView.contentMode = .scaleAspectFit
return bottomNavView
}()
override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
super.init(style: style, reuseIdentifier: reuseIdentifier)
self.selectionStyle = .none
self.backgroundColor = .clear
self.contentView.backgroundColor = .clear
self.initUI()
}
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
func initUI(){
self.contentView.addSubview(self.leftWhiteBgView)
self.leftWhiteBgView.snp.makeConstraints { make in
make.left.top.equalTo(adapt_length(length: 15))
make.width.equalTo(adapt_length(length: 165))
make.height.equalTo(adapt_length(length: 242))
}
self.contentView.addSubview(self.rightWhiteBgView)
self.rightWhiteBgView.snp.makeConstraints { make in
make.top.equalTo(adapt_length(length: 15))
make.right.equalToSuperview().offset(-adapt_length(length: 15))
make.width.equalTo(adapt_length(length: 165))
make.height.equalTo(adapt_length(length: 242))
}
self.contentView.addSubview(self.bottomWhiteBgView)
self.bottomWhiteBgView.snp.makeConstraints { make in
make.top.equalTo(self.leftWhiteBgView.snp.bottom).offset(adapt_length(length: 15))
make.right.equalToSuperview().offset(-adapt_length(length: 15))
make.left.equalTo(adapt_length(length: 15))
make.height.equalTo(adapt_length(length: 471))
}
self.bottomWhiteBgView.addSubview(self.bottomTitleLabel)
self.bottomTitleLabel.snp.makeConstraints { make in
make.left.equalTo(adapt_length(length: 15))
make.top.equalTo(adapt_length(length: 15))
}
self.bottomWhiteBgView.addSubview(self.bottomZhiYuanZheView)
self.bottomZhiYuanZheView.snp.makeConstraints { make in
make.left.equalTo(adapt_length(length: 15))
make.top.equalTo(self.bottomTitleLabel.snp.bottom).offset(adapt_length(length: 15))
make.width.equalTo(adapt_length(length: 152))
make.height.equalTo(adapt_length(length: 92))
}
self.bottomWhiteBgView.addSubview(self.bottomYangLaoHuLiYuanView)
self.bottomYangLaoHuLiYuanView.snp.makeConstraints { make in
make.right.equalToSuperview().offset(adapt_length(length: -15))
make.top.equalTo(self.bottomTitleLabel.snp.bottom).offset(adapt_length(length: 15))
make.width.equalTo(self.bottomZhiYuanZheView.snp.width)
make.height.equalTo(self.bottomZhiYuanZheView.snp.height)
}
self.bottomWhiteBgView.addSubview(self.bottomErTongPeiBanShiView)
self.bottomErTongPeiBanShiView.snp.makeConstraints { make in
make.left.equalTo(adapt_length(length: 15))
make.top.equalTo(self.bottomZhiYuanZheView.snp.bottom).offset(adapt_length(length: 11))
make.width.equalTo(adapt_length(length: 152))
make.height.equalTo(adapt_length(length: 92))
}
self.bottomWhiteBgView.addSubview(self.bottomXinLiZhiYunShiView)
self.bottomXinLiZhiYunShiView.snp.makeConstraints { make in
make.right.equalToSuperview().offset(adapt_length(length: -15))
make.top.equalTo(self.bottomYangLaoHuLiYuanView.snp.bottom).offset(adapt_length(length: 11))
make.width.equalTo(self.bottomZhiYuanZheView.snp.width)
make.height.equalTo(self.bottomZhiYuanZheView.snp.height)
}
self.bottomWhiteBgView.addSubview(self.bottomJiaTingJiaoYuView)
self.bottomJiaTingJiaoYuView.snp.makeConstraints { make in
make.left.equalTo(adapt_length(length: 15))
make.top.equalTo(self.bottomErTongPeiBanShiView.snp.bottom).offset(adapt_length(length: 11))
make.width.equalTo(adapt_length(length: 152))
make.height.equalTo(adapt_length(length: 92))
}
self.bottomWhiteBgView.addSubview(self.bottomGaoKaoYiShuView)
self.bottomGaoKaoYiShuView.snp.makeConstraints { make in
make.right.equalToSuperview().offset(adapt_length(length: -15))
make.top.equalTo(self.bottomXinLiZhiYunShiView.snp.bottom).offset(adapt_length(length: 11))
make.width.equalTo(self.bottomZhiYuanZheView.snp.width)
make.height.equalTo(self.bottomZhiYuanZheView.snp.height)
}
self.bottomWhiteBgView.addSubview(self.bottomZhiYeGuiHuaView)
self.bottomZhiYeGuiHuaView.snp.makeConstraints { make in
make.left.equalTo(adapt_length(length: 15))
make.top.equalTo(self.bottomJiaTingJiaoYuView.snp.bottom).offset(adapt_length(length: 11))
make.width.equalTo(adapt_length(length: 152))
make.height.equalTo(adapt_length(length: 92))
}
self.contentView.addSubview(self.bottomIconView)
self.bottomIconView.snp.makeConstraints { make in
make.top.equalTo(self.bottomWhiteBgView.snp.bottom).offset(adapt_length(length: 15))
make.centerX.equalToSuperview()
make.width.equalTo(adapt_length(length: 149))
make.height.equalTo(adapt_length(length: 25))
}
}
func setupNewUI(model:MineGetUserMsgVerifyUsersModel){
}
// MARK: - buttonAction
@objc func leftQiuZhiAction(){
self.show17Alert()
}
@objc func rightZhiYeAction(){
self.show17Alert()
}
@objc func zhiyuanzheAction(){
self.show17Alert()
}
@objc func yangLaoHuLiYuanAction(){
self.show17Alert()
}
@objc func erTongPeiBanShiAction(){
self.show17Alert()
}
@objc func xinLiZhiYunShiAction(){
self.show17Alert()
}
@objc func JiaTingJiaoYuAction(){
self.show17Alert()
}
@objc func GaoKaoYiShuAction(){
self.show17Alert()
}
@objc func ZhiYeGuiHuaAction(){
self.show17Alert()
}
let delegate = UIApplication.shared.delegate as! AppDelegate
/// 未认证-inputType17时弹窗背景图
lazy var alertBgImgView:UIImageView = {
let alertBgImgView:UIImageView = UIImageView()
alertBgImgView.tag = 20001
alertBgImgView.isUserInteractionEnabled = true
let ges = UITapGestureRecognizer(target: self, action: #selector(alertBgImgViewClickAction))
alertBgImgView.addGestureRecognizer(ges)
return alertBgImgView
}()
lazy var alertBgView:UIView = {
let alertBgView:UIView = UIView(frame: CGRect(x: 0, y: 0, width: KSreenWidth, height: KSreenHeight))
alertBgView.backgroundColor = HexColor("#000000")
alertBgView.alpha = 0.6
alertBgView.isUserInteractionEnabled = true
alertBgView.tag = 20000
let ges = UITapGestureRecognizer(target: self, action: #selector(alertBgViewClickAction))
alertBgView.addGestureRecognizer(ges)
return alertBgView
}()
// MARK: - 点击弹窗,按类型跳转
@objc func alertBgImgViewClickAction() {
self.hiden17Alert()
}
@objc func alertBgViewClickAction() {
//点击蒙版隐藏view
self.hiden17Alert()
}
//弹出弹窗
func show17Alert(){
delegate.window?.addSubview(self.alertBgView)
delegate.window?.addSubview(self.alertBgImgView)
alertBgImgView.snp.makeConstraints { make in
make.centerX.equalToSuperview()
make.centerY.equalToSuperview()
make.width.equalTo(KSreenWidth-80)
make.height.equalTo((KSreenWidth-80)*170.5/295)
}
self.alertBgImgView.image = UIImage(named: "auth_alert_unOpen")
}
func hiden17Alert(){
delegate.window?.subviews.forEach({ view in
if view.tag >= 20000{
view.removeFromSuperview()
}
})
}
}