Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
galaxy-iOS
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
mobile-group
galaxy-iOS
Commits
2dfdddd2
Commit
2dfdddd2
authored
Jun 19, 2024
by
pete谢兆麟
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
我的名片
parent
459e76c9
Changes
16
Show whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
774 additions
and
8 deletions
+774
-8
project.pbxproj
galaxy/galaxy.xcodeproj/project.pbxproj
+20
-0
YHMyNameCardViewController.swift
.../Modules/Community(社区)/C/YHMyNameCardViewController.swift
+25
-0
YHUserInformationModel.swift
...sses/Modules/Community(社区)/M/YHUserInformationModel.swift
+6
-0
YHMyEducationCell.swift
...y/Classes/Modules/Community(社区)/V/YHMyEducationCell.swift
+8
-1
YHMyInformationItemCell.swift
...ses/Modules/Community(社区)/V/YHMyInformationItemCell.swift
+22
-0
YHMyInterestTopicCell.swift
...asses/Modules/Community(社区)/V/YHMyInterestTopicCell.swift
+9
-1
YHMyIntroductionCell.swift
...lasses/Modules/Community(社区)/V/YHMyIntroductionCell.swift
+9
-1
YHMyWorkExperienceCell.swift
...sses/Modules/Community(社区)/V/YHMyWorkExperienceCell.swift
+8
-1
YHItemModel.swift
...息流程)/MainApplicantInformation(主申请人信息)/M/YHItemModel.swift
+2
-0
YHEditBaseUserInfoViewController.swift
...我的)/MyCard(我的名片)/C/YHEditBaseUserInfoViewController.swift
+8
-2
YHEditHonorViewController.swift
...s/Mine(我的)/MyCard(我的名片)/C/YHEditHonorViewController.swift
+128
-0
YHEditPersonalProfileViewController.swift
.../MyCard(我的名片)/C/YHEditPersonalProfileViewController.swift
+128
-0
YHEditSchoolViewController.swift
.../Mine(我的)/MyCard(我的名片)/C/YHEditSchoolViewController.swift
+114
-0
YHEditWorkViewController.swift
...es/Mine(我的)/MyCard(我的名片)/C/YHEditWorkViewController.swift
+114
-0
YHEditBaseInfoFootView.swift
...ules/Mine(我的)/MyCard(我的名片)/V/YHEditBaseInfoFootView.swift
+146
-0
YHEditViewModel.swift
...es/Modules/Mine(我的)/MyCard(我的名片)/VM/YHEditViewModel.swift
+27
-2
No files found.
galaxy/galaxy.xcodeproj/project.pbxproj
View file @
2dfdddd2
...
...
@@ -63,6 +63,11 @@
044D0C062C22736F00C5CF5E
/* YHSetExplainView.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
044D0C052C22736F00C5CF5E
/* YHSetExplainView.swift */
;
};
044D0C0D2C22876A00C5CF5E
/* YHEditBaseUserInfoViewController.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
044D0C0C2C22876A00C5CF5E
/* YHEditBaseUserInfoViewController.swift */
;
};
044D0C0F2C2287C500C5CF5E
/* YHEditViewModel.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
044D0C0E2C2287C500C5CF5E
/* YHEditViewModel.swift */
;
};
044D0C182C22AB7300C5CF5E
/* YHEditBaseInfoFootView.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
044D0C172C22AB7300C5CF5E
/* YHEditBaseInfoFootView.swift */
;
};
044D0C1A2C22B40B00C5CF5E
/* YHEditPersonalProfileViewController.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
044D0C192C22B40B00C5CF5E
/* YHEditPersonalProfileViewController.swift */
;
};
044D0C1C2C22C30B00C5CF5E
/* YHEditSchoolViewController.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
044D0C1B2C22C30B00C5CF5E
/* YHEditSchoolViewController.swift */
;
};
044D0C1E2C22CFBF00C5CF5E
/* YHEditWorkViewController.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
044D0C1D2C22CFBF00C5CF5E
/* YHEditWorkViewController.swift */
;
};
044D0C202C22D37500C5CF5E
/* YHEditHonorViewController.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
044D0C1F2C22D37500C5CF5E
/* YHEditHonorViewController.swift */
;
};
045EEE792B9F171A0022A143
/* YHPreviewViewModel.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
045EED9A2B9F171A0022A143
/* YHPreviewViewModel.swift */
;
};
045EEE7A2B9F171A0022A143
/* YHPreviewForOtherInfoModel.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
045EED9C2B9F171A0022A143
/* YHPreviewForOtherInfoModel.swift */
;
};
045EEE7B2B9F171A0022A143
/* YHPersonInfoCellModel2.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
045EED9D2B9F171A0022A143
/* YHPersonInfoCellModel2.swift */
;
};
...
...
@@ -584,6 +589,11 @@
044D0C052C22736F00C5CF5E
/* YHSetExplainView.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHSetExplainView.swift
;
sourceTree
=
"<group>"
;
};
044D0C0C2C22876A00C5CF5E
/* YHEditBaseUserInfoViewController.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHEditBaseUserInfoViewController.swift
;
sourceTree
=
"<group>"
;
};
044D0C0E2C2287C500C5CF5E
/* YHEditViewModel.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHEditViewModel.swift
;
sourceTree
=
"<group>"
;
};
044D0C172C22AB7300C5CF5E
/* YHEditBaseInfoFootView.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHEditBaseInfoFootView.swift
;
sourceTree
=
"<group>"
;
};
044D0C192C22B40B00C5CF5E
/* YHEditPersonalProfileViewController.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHEditPersonalProfileViewController.swift
;
sourceTree
=
"<group>"
;
};
044D0C1B2C22C30B00C5CF5E
/* YHEditSchoolViewController.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHEditSchoolViewController.swift
;
sourceTree
=
"<group>"
;
};
044D0C1D2C22CFBF00C5CF5E
/* YHEditWorkViewController.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHEditWorkViewController.swift
;
sourceTree
=
"<group>"
;
};
044D0C1F2C22D37500C5CF5E
/* YHEditHonorViewController.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHEditHonorViewController.swift
;
sourceTree
=
"<group>"
;
};
045EED9A2B9F171A0022A143
/* YHPreviewViewModel.swift */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHPreviewViewModel.swift
;
sourceTree
=
"<group>"
;
};
045EED9C2B9F171A0022A143
/* YHPreviewForOtherInfoModel.swift */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHPreviewForOtherInfoModel.swift
;
sourceTree
=
"<group>"
;
};
045EED9D2B9F171A0022A143
/* YHPersonInfoCellModel2.swift */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHPersonInfoCellModel2.swift
;
sourceTree
=
"<group>"
;
};
...
...
@@ -1241,6 +1251,10 @@
isa
=
PBXGroup
;
children
=
(
044D0C0C2C22876A00C5CF5E
/* YHEditBaseUserInfoViewController.swift */
,
044D0C192C22B40B00C5CF5E
/* YHEditPersonalProfileViewController.swift */
,
044D0C1B2C22C30B00C5CF5E
/* YHEditSchoolViewController.swift */
,
044D0C1D2C22CFBF00C5CF5E
/* YHEditWorkViewController.swift */
,
044D0C1F2C22D37500C5CF5E
/* YHEditHonorViewController.swift */
,
);
path
=
C
;
sourceTree
=
"<group>"
;
...
...
@@ -1248,6 +1262,7 @@
044D0C0B2C22874600C5CF5E
/* V */
=
{
isa
=
PBXGroup
;
children
=
(
044D0C172C22AB7300C5CF5E
/* YHEditBaseInfoFootView.swift */
,
);
path
=
V
;
sourceTree
=
"<group>"
;
...
...
@@ -2966,6 +2981,7 @@
045EEEB12B9F171A0022A143
/* YHClipperView.swift in Sources */
,
A567E5962BD7643D00D5D5A0
/* YHConfigModel.swift in Sources */
,
04FD85722C21786900BEF9C5
/* YHNameCardInfoView.swift in Sources */
,
044D0C182C22AB7300C5CF5E
/* YHEditBaseInfoFootView.swift in Sources */
,
A514E5DC2B60A2B700C93951
/* YHServiceCenterSecondViewController.swift in Sources */
,
A5EF21372BA6E2D1005027E6
/* YHQuestionAndAnswerModel.swift in Sources */
,
A567E5A52BD7643D00D5D5A0
/* YHHomeCollectionLayout.swift in Sources */
,
...
...
@@ -3182,6 +3198,7 @@
04754A952B96FF3D00F8ADCA
/* UITextField+Extension.swift in Sources */
,
A5ACE9312B4564F7002C94D2
/* YHPersonalCenterCell.swift in Sources */
,
045EEE9A2B9F171A0022A143
/* YHWorkIntroductionViewModel.swift in Sources */
,
044D0C1C2C22C30B00C5CF5E
/* YHEditSchoolViewController.swift in Sources */
,
A5ACE9532B4564F7002C94D2
/* YHBaseViewController.swift in Sources */
,
045EEE9D2B9F171A0022A143
/* YHWorkItemListViewModel.swift in Sources */
,
A5ACE9392B4564F7002C94D2
/* UIDevice+Extension.swift in Sources */
,
...
...
@@ -3237,6 +3254,7 @@
044CF8D42BB6BCF700008CE8
/* YHSignatureUploadTableViewCell.swift in Sources */
,
A567E5B02BD7643D00D5D5A0
/* YHHomeWebBottomView.swift in Sources */
,
045EEF0D2B9F171A0022A143
/* YHBasicInfoFillCell.swift in Sources */
,
044D0C1A2C22B40B00C5CF5E
/* YHEditPersonalProfileViewController.swift in Sources */
,
048787D92BCF68530036E221
/* YHProgressView.swift in Sources */
,
045EEEEC2B9F171A0022A143
/* YHBrotherInfoVC.swift in Sources */
,
0477E17A2BA41C7E00436346
/* YHCertificateModel.swift in Sources */
,
...
...
@@ -3298,6 +3316,7 @@
0445E6B12BE9E15C003C52F9
/* YHFindAppNewVersionView.swift in Sources */
,
045EEEBE2B9F171A0022A143
/* YHResultBottomView.swift in Sources */
,
045EEEEB2B9F171A0022A143
/* YHTest.swift in Sources */
,
044D0C202C22D37500C5CF5E
/* YHEditHonorViewController.swift in Sources */
,
045EEEAC2B9F171A0022A143
/* YHWorkExperienceTableViewCell.swift in Sources */
,
A5ACE93C2B4564F7002C94D2
/* UIColor+Extension.swift in Sources */
,
A567E5A82BD7643D00D5D5A0
/* YHHomeWebBottomButton.swift in Sources */
,
...
...
@@ -3379,6 +3398,7 @@
045EEE962B9F171A0022A143
/* YHPreviewInfoCertificatePictureItemsView.swift in Sources */
,
A592FE912BA6CC010062FACA
/* YHCertificateEntryHeadView.swift in Sources */
,
0425E63D2BA9345200A5E763
/* YHSchemeTableViewCell.swift in Sources */
,
044D0C1E2C22CFBF00C5CF5E
/* YHEditWorkViewController.swift in Sources */
,
A5ACE9302B4564F7002C94D2
/* Algorithm.swift in Sources */
,
045EEED52B9F171A0022A143
/* YHEducationRequestViewModel.swift in Sources */
,
045EEEB62B9F171A0022A143
/* YHWorkExperienceItemView.swift in Sources */
,
...
...
galaxy/galaxy/Classes/Modules/Community(社区)/C/YHMyNameCardViewController.swift
View file @
2dfdddd2
...
...
@@ -103,26 +103,51 @@ extension YHMyNameCardViewController: UITableViewDelegate, UITableViewDataSource
if
indexPath
.
section
==
1
{
let
cell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
YHMyIntroductionCell
.
cellReuseIdentifier
,
for
:
indexPath
)
as!
YHMyIntroductionCell
cell
.
editBlock
=
{
[
weak
self
]
in
guard
let
self
=
self
else
{
return
}
let
vc
=
YHEditPersonalProfileViewController
()
self
.
navigationController
?
.
pushViewController
(
vc
)
}
return
cell
}
if
indexPath
.
section
==
2
{
let
cell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
YHMyEducationCell
.
cellReuseIdentifier
,
for
:
indexPath
)
as!
YHMyEducationCell
cell
.
editBlock
=
{
[
weak
self
]
in
guard
let
self
=
self
else
{
return
}
let
vc
=
YHEditSchoolViewController
()
self
.
navigationController
?
.
pushViewController
(
vc
)
}
return
cell
}
if
indexPath
.
section
==
3
{
let
cell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
YHMyWorkExperienceCell
.
cellReuseIdentifier
,
for
:
indexPath
)
as!
YHMyWorkExperienceCell
cell
.
editBlock
=
{
[
weak
self
]
in
guard
let
self
=
self
else
{
return
}
let
vc
=
YHEditWorkViewController
()
self
.
navigationController
?
.
pushViewController
(
vc
)
}
return
cell
}
if
indexPath
.
section
==
4
{
let
cell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
YHMyIntroductionCell
.
cellReuseIdentifier
,
for
:
indexPath
)
as!
YHMyIntroductionCell
cell
.
titleLabel
.
text
=
"荣誉奖项"
cell
.
editBlock
=
{
[
weak
self
]
in
guard
let
self
=
self
else
{
return
}
let
vc
=
YHEditHonorViewController
()
self
.
navigationController
?
.
pushViewController
(
vc
)
}
return
cell
}
if
indexPath
.
section
==
5
{
let
cell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
YHMyInterestTopicCell
.
cellReuseIdentifier
,
for
:
indexPath
)
as!
YHMyInterestTopicCell
cell
.
editBlock
=
{
[
weak
self
]
in
guard
let
self
=
self
else
{
return
}
let
vc
=
YHEditHonorViewController
()
self
.
navigationController
?
.
pushViewController
(
vc
)
}
return
cell
}
...
...
galaxy/galaxy/Classes/Modules/Community(社区)/M/YHUserInformationModel.swift
View file @
2dfdddd2
...
...
@@ -16,6 +16,9 @@ enum YHUserInformationID: Int {
case
id5
=
4
// 职位
case
id6
=
5
// 所在地
case
id7
=
6
// 星座
case
id8
=
7
// 专业
case
id9
=
8
// 学位
case
id10
=
9
// 所在企业
}
struct
YHUserInformationModel
{
...
...
@@ -47,6 +50,9 @@ class YHMainUserInformationModel: YHBaseModel {
var
industry
:
String
=
""
var
position
:
String
=
""
var
constellation
:
String
=
""
var
major
:
String
=
""
var
degree
:
String
=
""
var
company
:
String
=
""
}
class
YHMainUserInformationSetModel
:
YHBaseModel
{
...
...
galaxy/galaxy/Classes/Modules/Community(社区)/V/YHMyEducationCell.swift
View file @
2dfdddd2
...
...
@@ -9,7 +9,8 @@
import
UIKit
class
YHMyEducationCell
:
UITableViewCell
{
typealias
EditBlock
=
()
->
()
var
editBlock
:
EditBlock
?
static
let
cellReuseIdentifier
=
"YHMyEducationCell"
lazy
var
cardView
:
UIView
=
{
...
...
@@ -50,6 +51,7 @@ class YHMyEducationCell: UITableViewCell {
lazy
var
editBtn
:
UIButton
=
{
let
btn
=
UIButton
()
btn
.
setImage
(
UIImage
(
named
:
"people_card_edit"
),
for
:
.
normal
)
btn
.
addTarget
(
self
,
action
:
#selector(
edit
)
,
for
:
.
touchUpInside
)
btn
.
YH_clickEdgeInsets
=
UIEdgeInsets
(
top
:
20
,
left
:
20
,
bottom
:
20
,
right
:
20
)
return
btn
}()
...
...
@@ -131,4 +133,9 @@ class YHMyEducationCell: UITableViewCell {
}
}
@objc
func
edit
()
{
if
let
block
=
editBlock
{
block
()
}
}
}
galaxy/galaxy/Classes/Modules/Community(社区)/V/YHMyInformationItemCell.swift
View file @
2dfdddd2
...
...
@@ -181,6 +181,28 @@ class YHMyInformationItemCell: UITableViewCell {
block
(
self
.
dataSource
??
YHUserInformationModel
())
}
}
case
.
school
:
let
vc
=
YHCollegeSearchViewController
()
vc
.
searchCollegeName
=
self
.
dataSource
?
.
message
vc
.
selectBlock
=
{[
weak
self
]
text
in
guard
let
self
=
self
else
{
return
}
self
.
dataSource
?
.
message
=
text
self
.
updateAllViews
()
if
let
block
=
self
.
block
{
block
(
self
.
dataSource
??
YHUserInformationModel
())
}
}
UIViewController
.
current
?
.
navigationController
?
.
pushViewController
(
vc
)
case
.
degree
:
YHSheetPickerView
.
show
(
type
:
.
educationDegree
,
selectTitle
:
self
.
dataSource
?
.
message
)
{
[
weak
self
]
item
in
guard
let
self
=
self
else
{
return
}
self
.
dataSource
?
.
message
=
item
.
title
self
.
updateAllViews
()
if
let
block
=
self
.
block
{
block
(
self
.
dataSource
??
YHUserInformationModel
())
}
}
}
}
...
...
galaxy/galaxy/Classes/Modules/Community(社区)/V/YHMyInterestTopicCell.swift
View file @
2dfdddd2
...
...
@@ -47,7 +47,8 @@ class YHTopicItemCell: UICollectionViewCell {
class
YHMyInterestTopicCell
:
UITableViewCell
{
typealias
EditBlock
=
()
->
()
var
editBlock
:
EditBlock
?
static
let
cellReuseIdentifier
=
"YHMyInterestTopicCell"
var
topicArr
:[
String
]
=
[
"深度阅读爱好者"
,
"皮划艇玩家"
,
"创新主义"
,
"茶道"
,
"皮划艇玩家"
,
"创新主义"
,
"茶道"
,
"深度阅读爱好者"
]
...
...
@@ -72,6 +73,7 @@ class YHMyInterestTopicCell: UITableViewCell {
lazy
var
editBtn
:
UIButton
=
{
let
btn
=
UIButton
()
btn
.
setImage
(
UIImage
(
named
:
"people_card_edit"
),
for
:
.
normal
)
btn
.
addTarget
(
self
,
action
:
#selector(
edit
)
,
for
:
.
touchUpInside
)
btn
.
YH_clickEdgeInsets
=
UIEdgeInsets
(
top
:
20
,
left
:
20
,
bottom
:
20
,
right
:
20
)
return
btn
}()
...
...
@@ -135,6 +137,12 @@ class YHMyInterestTopicCell: UITableViewCell {
make
.
top
.
equalTo
(
titleLabel
.
snp
.
bottom
)
.
offset
(
12
)
}
}
@objc
func
edit
()
{
if
let
block
=
editBlock
{
block
()
}
}
}
...
...
galaxy/galaxy/Classes/Modules/Community(社区)/V/YHMyIntroductionCell.swift
View file @
2dfdddd2
...
...
@@ -9,7 +9,8 @@
import
UIKit
class
YHMyIntroductionCell
:
UITableViewCell
{
typealias
EditBlock
=
()
->
()
var
editBlock
:
EditBlock
?
static
let
cellReuseIdentifier
=
"YHMyIntroductionCell"
lazy
var
cardView
:
UIView
=
{
...
...
@@ -41,6 +42,7 @@ class YHMyIntroductionCell: UITableViewCell {
lazy
var
editBtn
:
UIButton
=
{
let
btn
=
UIButton
()
btn
.
setImage
(
UIImage
(
named
:
"people_card_edit"
),
for
:
.
normal
)
btn
.
addTarget
(
self
,
action
:
#selector(
edit
)
,
for
:
.
touchUpInside
)
btn
.
YH_clickEdgeInsets
=
UIEdgeInsets
(
top
:
20
,
left
:
20
,
bottom
:
20
,
right
:
20
)
return
btn
}()
...
...
@@ -90,4 +92,10 @@ class YHMyIntroductionCell: UITableViewCell {
make
.
bottom
.
equalTo
(
-
16
)
}
}
@objc
func
edit
()
{
if
let
block
=
editBlock
{
block
()
}
}
}
galaxy/galaxy/Classes/Modules/Community(社区)/V/YHMyWorkExperienceCell.swift
View file @
2dfdddd2
...
...
@@ -53,7 +53,8 @@ class YHExperienceItemView: UIView {
}
class
YHMyWorkExperienceCell
:
UITableViewCell
{
typealias
EditBlock
=
()
->
()
var
editBlock
:
EditBlock
?
static
let
cellReuseIdentifier
=
"YHMyWorkExperienceCell"
lazy
var
cardView
:
UIView
=
{
...
...
@@ -76,6 +77,7 @@ class YHMyWorkExperienceCell: UITableViewCell {
lazy
var
editBtn
:
UIButton
=
{
let
btn
=
UIButton
()
btn
.
setImage
(
UIImage
(
named
:
"people_card_edit"
),
for
:
.
normal
)
btn
.
addTarget
(
self
,
action
:
#selector(
edit
)
,
for
:
.
touchUpInside
)
btn
.
YH_clickEdgeInsets
=
UIEdgeInsets
(
top
:
20
,
left
:
20
,
bottom
:
20
,
right
:
20
)
return
btn
}()
...
...
@@ -160,4 +162,9 @@ class YHMyWorkExperienceCell: UITableViewCell {
}
@objc
func
edit
()
{
if
let
block
=
editBlock
{
block
()
}
}
}
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/ServiceProcess(我的信息流程)/MainApplicantInformation(主申请人信息)/M/YHItemModel.swift
View file @
2dfdddd2
...
...
@@ -18,6 +18,8 @@ enum YHItemSelectType: Int {
case
sex
=
6
case
marry
=
7
case
constellation
=
8
case
school
=
9
case
degree
=
10
}
enum
YHItemID
:
Int
{
...
...
galaxy/galaxy/Classes/Modules/Mine(我的)/MyCard(我的名片)/C/YHEditBaseUserInfoViewController.swift
View file @
2dfdddd2
...
...
@@ -14,7 +14,7 @@ class YHEditBaseUserInfoViewController: YHBaseViewController {
var
changeButton
:
UIButton
!
var
nextButton
:
UIButton
!
var
tableView
:
UITableView
!
var
promptView
:
YHFailPromp
tView
!
var
footView
:
YHEditBaseInfoFoo
tView
!
var
items
:
[
YHUserInformationModel
]
=
[]
var
viewModel
:
YHEditViewModel
=
YHEditViewModel
()
...
...
@@ -30,7 +30,7 @@ class YHEditBaseUserInfoViewController: YHBaseViewController {
}
func
setView
()
{
gk_navTitle
=
"
设置
"
gk_navTitle
=
"
基础信息
"
view
.
backgroundColor
=
.
white
photoImageView
=
{
...
...
@@ -95,6 +95,11 @@ class YHEditBaseUserInfoViewController: YHBaseViewController {
make
.
height
.
equalTo
(
48
)
}
footView
=
{
let
view
=
YHEditBaseInfoFootView
(
frame
:
CGRect
(
x
:
0
,
y
:
0
,
width
:
KScreenWidth
,
height
:
158
))
return
view
}()
tableView
=
{
let
tableView
=
UITableView
(
frame
:
.
zero
,
style
:
.
grouped
)
if
#available(iOS 11.0, *)
{
...
...
@@ -104,6 +109,7 @@ class YHEditBaseUserInfoViewController: YHBaseViewController {
tableView
.
separatorStyle
=
.
none
tableView
.
delegate
=
self
tableView
.
dataSource
=
self
tableView
.
tableFooterView
=
footView
tableView
.
register
(
cellWithClass
:
YHMyInformationItemCell
.
self
)
return
tableView
}()
...
...
galaxy/galaxy/Classes/Modules/Mine(我的)/MyCard(我的名片)/C/YHEditHonorViewController.swift
0 → 100644
View file @
2dfdddd2
//
// YHEditHonorViewController.swift
// galaxy
//
// Created by EDY on 2024/6/19.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import
UIKit
class
YHEditHonorViewController
:
YHBaseViewController
{
var
messageTextField
:
UITextView
!
var
promptsLabel
:
UILabel
!
var
numberLabel
:
UILabel
!
var
nextButton
:
UIButton
!
var
viewModel
:
YHEditViewModel
=
YHEditViewModel
()
override
func
viewDidLoad
()
{
super
.
viewDidLoad
()
setView
()
getData
()
}
func
getData
()
{
}
func
setView
()
{
gk_navTitle
=
"荣誉奖项"
view
.
backgroundColor
=
.
white
let
bgView
=
UIView
()
bgView
.
backgroundColor
=
UIColor
(
hex
:
0xf8f8f8
)
bgView
.
layer
.
masksToBounds
=
true
bgView
.
layer
.
cornerRadius
=
6
view
.
addSubview
(
bgView
)
bgView
.
snp
.
makeConstraints
{
make
in
make
.
left
.
equalTo
(
18
)
make
.
right
.
equalTo
(
-
18
)
make
.
top
.
equalTo
(
20
+
k_Height_NavigationtBarAndStatuBar
)
make
.
height
.
equalTo
(
276
)
}
messageTextField
=
{
let
textField
=
UITextView
()
textField
.
backgroundColor
=
.
clear
textField
.
font
=
UIFont
.
PFSC_R
(
ofSize
:
15
)
textField
.
delegate
=
self
return
textField
}()
view
.
addSubview
(
messageTextField
)
messageTextField
.
snp
.
makeConstraints
{
make
in
make
.
left
.
equalTo
(
29
)
make
.
right
.
equalTo
(
-
29
)
make
.
top
.
equalTo
(
29
+
k_Height_NavigationtBarAndStatuBar
)
make
.
height
.
equalTo
(
260
)
}
promptsLabel
=
{
let
prompts
=
UILabel
()
prompts
.
font
=
UIFont
.
PFSC_R
(
ofSize
:
14
)
prompts
.
textColor
=
UIColor
.
mainTextColor30
prompts
.
text
=
"展示你的辉煌时刻,让更多见证你的卓越成就。"
prompts
.
numberOfLines
=
0
return
prompts
}()
view
.
addSubview
(
promptsLabel
)
promptsLabel
.
snp
.
makeConstraints
{
make
in
make
.
left
.
equalTo
(
34
)
make
.
right
.
equalTo
(
-
34
)
make
.
top
.
equalTo
(
34
+
k_Height_NavigationtBarAndStatuBar
)
}
numberLabel
=
{
let
view
=
UILabel
()
view
.
text
=
"--/200"
view
.
font
=
UIFont
.
PFSC_R
(
ofSize
:
14
)
view
.
textColor
=
UIColor
.
mainTextColor30
view
.
textAlignment
=
.
right
return
view
}()
view
.
addSubview
(
numberLabel
)
numberLabel
.
snp
.
makeConstraints
{
make
in
make
.
height
.
equalTo
(
17
)
make
.
right
.
equalTo
(
-
34
)
make
.
top
.
equalTo
(
265
+
k_Height_NavigationtBarAndStatuBar
)
}
nextButton
=
{
let
button
=
UIButton
(
type
:
.
custom
)
button
.
backgroundColor
=
UIColor
.
brandMainColor
button
.
titleLabel
?
.
font
=
UIFont
.
PFSC_M
(
ofSize
:
16
)
button
.
contentHorizontalAlignment
=
.
center
button
.
setTitle
(
"保存"
,
for
:
.
normal
)
button
.
setTitleColor
(
UIColor
(
hex
:
0xffffff
),
for
:
.
normal
)
button
.
layer
.
cornerRadius
=
kCornerRadius3
button
.
addTarget
(
self
,
action
:
#selector(
nextStep
)
,
for
:
.
touchUpInside
)
return
button
}()
view
.
addSubview
(
nextButton
)
nextButton
.
snp
.
makeConstraints
{
make
in
make
.
left
.
equalTo
(
16
)
make
.
right
.
equalTo
(
-
16
)
make
.
bottom
.
equalTo
(
-
8
-
k_Height_safeAreaInsetsBottom
())
make
.
height
.
equalTo
(
48
)
}
}
@objc
func
nextStep
()
{
self
.
navigationController
?
.
popViewController
(
animated
:
true
)
}
}
extension
YHEditHonorViewController
:
UITextViewDelegate
{
func
textViewDidChange
(
_
textView
:
UITextView
)
{
if
textView
.
text
.
count
!=
0
{
promptsLabel
.
isHidden
=
true
}
else
{
promptsLabel
.
isHidden
=
false
}
numberLabel
.
text
=
textView
.
text
.
count
.
string
+
"/200"
}
func
textView
(
_
textView
:
UITextView
,
shouldChangeTextIn
range
:
NSRange
,
replacementText
text
:
String
)
->
Bool
{
let
newLength
=
(
textView
.
text
as
NSString
)
.
length
+
text
.
count
-
range
.
length
return
newLength
<=
200
}
}
galaxy/galaxy/Classes/Modules/Mine(我的)/MyCard(我的名片)/C/YHEditPersonalProfileViewController.swift
0 → 100644
View file @
2dfdddd2
//
// YHEditPersonalProfileViewController.swift
// galaxy
//
// Created by EDY on 2024/6/19.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import
UIKit
class
YHEditPersonalProfileViewController
:
YHBaseViewController
{
var
messageTextField
:
UITextView
!
var
promptsLabel
:
UILabel
!
var
numberLabel
:
UILabel
!
var
nextButton
:
UIButton
!
var
viewModel
:
YHEditViewModel
=
YHEditViewModel
()
override
func
viewDidLoad
()
{
super
.
viewDidLoad
()
setView
()
getData
()
}
func
getData
()
{
}
func
setView
()
{
gk_navTitle
=
"个人简介"
view
.
backgroundColor
=
.
white
let
bgView
=
UIView
()
bgView
.
backgroundColor
=
UIColor
(
hex
:
0xf8f8f8
)
bgView
.
layer
.
masksToBounds
=
true
bgView
.
layer
.
cornerRadius
=
6
view
.
addSubview
(
bgView
)
bgView
.
snp
.
makeConstraints
{
make
in
make
.
left
.
equalTo
(
18
)
make
.
right
.
equalTo
(
-
18
)
make
.
top
.
equalTo
(
20
+
k_Height_NavigationtBarAndStatuBar
)
make
.
height
.
equalTo
(
276
)
}
messageTextField
=
{
let
textField
=
UITextView
()
textField
.
backgroundColor
=
.
clear
textField
.
font
=
UIFont
.
PFSC_R
(
ofSize
:
15
)
textField
.
delegate
=
self
return
textField
}()
view
.
addSubview
(
messageTextField
)
messageTextField
.
snp
.
makeConstraints
{
make
in
make
.
left
.
equalTo
(
29
)
make
.
right
.
equalTo
(
-
29
)
make
.
top
.
equalTo
(
29
+
k_Height_NavigationtBarAndStatuBar
)
make
.
height
.
equalTo
(
260
)
}
promptsLabel
=
{
let
prompts
=
UILabel
()
prompts
.
font
=
UIFont
.
PFSC_R
(
ofSize
:
14
)
prompts
.
textColor
=
UIColor
.
mainTextColor30
prompts
.
text
=
"快来完善你的个人简介,用简洁的文字描绘你的独特魅力。"
prompts
.
numberOfLines
=
0
return
prompts
}()
view
.
addSubview
(
promptsLabel
)
promptsLabel
.
snp
.
makeConstraints
{
make
in
make
.
left
.
equalTo
(
34
)
make
.
right
.
equalTo
(
-
34
)
make
.
top
.
equalTo
(
34
+
k_Height_NavigationtBarAndStatuBar
)
}
numberLabel
=
{
let
view
=
UILabel
()
view
.
text
=
"--/200"
view
.
font
=
UIFont
.
PFSC_R
(
ofSize
:
14
)
view
.
textColor
=
UIColor
.
mainTextColor30
view
.
textAlignment
=
.
right
return
view
}()
view
.
addSubview
(
numberLabel
)
numberLabel
.
snp
.
makeConstraints
{
make
in
make
.
height
.
equalTo
(
17
)
make
.
right
.
equalTo
(
-
34
)
make
.
top
.
equalTo
(
265
+
k_Height_NavigationtBarAndStatuBar
)
}
nextButton
=
{
let
button
=
UIButton
(
type
:
.
custom
)
button
.
backgroundColor
=
UIColor
.
brandMainColor
button
.
titleLabel
?
.
font
=
UIFont
.
PFSC_M
(
ofSize
:
16
)
button
.
contentHorizontalAlignment
=
.
center
button
.
setTitle
(
"保存"
,
for
:
.
normal
)
button
.
setTitleColor
(
UIColor
(
hex
:
0xffffff
),
for
:
.
normal
)
button
.
layer
.
cornerRadius
=
kCornerRadius3
button
.
addTarget
(
self
,
action
:
#selector(
nextStep
)
,
for
:
.
touchUpInside
)
return
button
}()
view
.
addSubview
(
nextButton
)
nextButton
.
snp
.
makeConstraints
{
make
in
make
.
left
.
equalTo
(
16
)
make
.
right
.
equalTo
(
-
16
)
make
.
bottom
.
equalTo
(
-
8
-
k_Height_safeAreaInsetsBottom
())
make
.
height
.
equalTo
(
48
)
}
}
@objc
func
nextStep
()
{
self
.
navigationController
?
.
popViewController
(
animated
:
true
)
}
}
extension
YHEditPersonalProfileViewController
:
UITextViewDelegate
{
func
textViewDidChange
(
_
textView
:
UITextView
)
{
if
textView
.
text
.
count
!=
0
{
promptsLabel
.
isHidden
=
true
}
else
{
promptsLabel
.
isHidden
=
false
}
numberLabel
.
text
=
textView
.
text
.
count
.
string
+
"/200"
}
func
textView
(
_
textView
:
UITextView
,
shouldChangeTextIn
range
:
NSRange
,
replacementText
text
:
String
)
->
Bool
{
let
newLength
=
(
textView
.
text
as
NSString
)
.
length
+
text
.
count
-
range
.
length
return
newLength
<=
200
}
}
galaxy/galaxy/Classes/Modules/Mine(我的)/MyCard(我的名片)/C/YHEditSchoolViewController.swift
0 → 100644
View file @
2dfdddd2
//
// YHEditSchoolViewController.swift
// galaxy
//
// Created by EDY on 2024/6/19.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import
UIKit
class
YHEditSchoolViewController
:
YHBaseViewController
{
var
nextButton
:
UIButton
!
var
tableView
:
UITableView
!
var
items
:
[
YHUserInformationModel
]
=
[]
var
viewModel
:
YHEditViewModel
=
YHEditViewModel
()
override
func
viewDidLoad
()
{
super
.
viewDidLoad
()
setView
()
getData
()
}
func
getData
()
{
items
=
viewModel
.
getBaseSchoolDataSource
()
tableView
.
reloadData
()
}
func
setView
()
{
gk_navTitle
=
"基础信息"
view
.
backgroundColor
=
.
white
nextButton
=
{
let
button
=
UIButton
(
type
:
.
custom
)
button
.
backgroundColor
=
UIColor
.
brandMainColor
button
.
titleLabel
?
.
font
=
UIFont
.
PFSC_M
(
ofSize
:
16
)
button
.
contentHorizontalAlignment
=
.
center
button
.
setTitle
(
"保存"
,
for
:
.
normal
)
button
.
setTitleColor
(
UIColor
(
hex
:
0xffffff
),
for
:
.
normal
)
button
.
layer
.
cornerRadius
=
kCornerRadius3
button
.
addTarget
(
self
,
action
:
#selector(
nextStep
)
,
for
:
.
touchUpInside
)
return
button
}()
view
.
addSubview
(
nextButton
)
nextButton
.
snp
.
makeConstraints
{
make
in
make
.
left
.
equalTo
(
16
)
make
.
right
.
equalTo
(
-
16
)
make
.
bottom
.
equalTo
(
-
8
-
k_Height_safeAreaInsetsBottom
())
make
.
height
.
equalTo
(
48
)
}
tableView
=
{
let
tableView
=
UITableView
(
frame
:
.
zero
,
style
:
.
grouped
)
if
#available(iOS 11.0, *)
{
tableView
.
contentInsetAdjustmentBehavior
=
.
never
}
tableView
.
backgroundColor
=
.
white
tableView
.
separatorStyle
=
.
none
tableView
.
delegate
=
self
tableView
.
dataSource
=
self
tableView
.
register
(
cellWithClass
:
YHMyInformationItemCell
.
self
)
return
tableView
}()
view
.
addSubview
(
tableView
)
tableView
.
snp
.
makeConstraints
{
make
in
make
.
top
.
equalTo
(
k_Height_NavigationtBarAndStatuBar
)
make
.
bottom
.
equalTo
(
-
k_Height_safeAreaInsetsBottom
()
-
64
-
36
)
make
.
left
.
right
.
equalTo
(
view
)
}
}
@objc
func
nextStep
()
{
self
.
navigationController
?
.
popViewController
(
animated
:
true
)
}
}
extension
YHEditSchoolViewController
:
UITableViewDelegate
,
UITableViewDataSource
{
func
tableView
(
_
tableView
:
UITableView
,
numberOfRowsInSection
section
:
Int
)
->
Int
{
return
items
.
count
}
func
tableView
(
_
tableView
:
UITableView
,
cellForRowAt
indexPath
:
IndexPath
)
->
UITableViewCell
{
let
cell
=
tableView
.
dequeueReusableCell
(
withClass
:
YHMyInformationItemCell
.
self
)
cell
.
dataSource
=
items
[
indexPath
.
row
]
cell
.
block
=
{
[
weak
self
]
model
in
guard
let
self
=
self
else
{
return
}
self
.
viewModel
.
updateModel
(
model
)
if
model
.
id
!=
.
id8
{
self
.
getData
()
}
}
return
cell
}
func
tableView
(
_
tableView
:
UITableView
,
heightForRowAt
indexPath
:
IndexPath
)
->
CGFloat
{
return
61.0
}
func
tableView
(
_
tableView
:
UITableView
,
viewForHeaderInSection
section
:
Int
)
->
UIView
?
{
let
view
=
UIView
(
frame
:
CGRect
(
x
:
0
,
y
:
0
,
width
:
KScreenWidth
,
height
:
0.01
))
return
view
}
func
tableView
(
_
tableView
:
UITableView
,
heightForHeaderInSection
section
:
Int
)
->
CGFloat
{
return
0.01
}
func
tableView
(
_
tableView
:
UITableView
,
viewForFooterInSection
section
:
Int
)
->
UIView
?
{
return
UIView
()
}
func
tableView
(
_
tableView
:
UITableView
,
heightForFooterInSection
section
:
Int
)
->
CGFloat
{
return
0.01
}
}
galaxy/galaxy/Classes/Modules/Mine(我的)/MyCard(我的名片)/C/YHEditWorkViewController.swift
0 → 100644
View file @
2dfdddd2
//
// YHEditWorkViewController.swift
// galaxy
//
// Created by EDY on 2024/6/19.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import
UIKit
class
YHEditWorkViewController
:
YHBaseViewController
{
var
nextButton
:
UIButton
!
var
tableView
:
UITableView
!
var
items
:
[
YHUserInformationModel
]
=
[]
var
viewModel
:
YHEditViewModel
=
YHEditViewModel
()
override
func
viewDidLoad
()
{
super
.
viewDidLoad
()
setView
()
getData
()
}
func
getData
()
{
items
=
viewModel
.
getBaseWorkDataSource
()
tableView
.
reloadData
()
}
func
setView
()
{
gk_navTitle
=
"工作经历"
view
.
backgroundColor
=
.
white
nextButton
=
{
let
button
=
UIButton
(
type
:
.
custom
)
button
.
backgroundColor
=
UIColor
.
brandMainColor
button
.
titleLabel
?
.
font
=
UIFont
.
PFSC_M
(
ofSize
:
16
)
button
.
contentHorizontalAlignment
=
.
center
button
.
setTitle
(
"保存"
,
for
:
.
normal
)
button
.
setTitleColor
(
UIColor
(
hex
:
0xffffff
),
for
:
.
normal
)
button
.
layer
.
cornerRadius
=
kCornerRadius3
button
.
addTarget
(
self
,
action
:
#selector(
nextStep
)
,
for
:
.
touchUpInside
)
return
button
}()
view
.
addSubview
(
nextButton
)
nextButton
.
snp
.
makeConstraints
{
make
in
make
.
left
.
equalTo
(
16
)
make
.
right
.
equalTo
(
-
16
)
make
.
bottom
.
equalTo
(
-
8
-
k_Height_safeAreaInsetsBottom
())
make
.
height
.
equalTo
(
48
)
}
tableView
=
{
let
tableView
=
UITableView
(
frame
:
.
zero
,
style
:
.
grouped
)
if
#available(iOS 11.0, *)
{
tableView
.
contentInsetAdjustmentBehavior
=
.
never
}
tableView
.
backgroundColor
=
.
white
tableView
.
separatorStyle
=
.
none
tableView
.
delegate
=
self
tableView
.
dataSource
=
self
tableView
.
register
(
cellWithClass
:
YHMyInformationItemCell
.
self
)
return
tableView
}()
view
.
addSubview
(
tableView
)
tableView
.
snp
.
makeConstraints
{
make
in
make
.
top
.
equalTo
(
k_Height_NavigationtBarAndStatuBar
)
make
.
bottom
.
equalTo
(
-
k_Height_safeAreaInsetsBottom
()
-
64
-
36
)
make
.
left
.
right
.
equalTo
(
view
)
}
}
@objc
func
nextStep
()
{
self
.
navigationController
?
.
popViewController
(
animated
:
true
)
}
}
extension
YHEditWorkViewController
:
UITableViewDelegate
,
UITableViewDataSource
{
func
tableView
(
_
tableView
:
UITableView
,
numberOfRowsInSection
section
:
Int
)
->
Int
{
return
items
.
count
}
func
tableView
(
_
tableView
:
UITableView
,
cellForRowAt
indexPath
:
IndexPath
)
->
UITableViewCell
{
let
cell
=
tableView
.
dequeueReusableCell
(
withClass
:
YHMyInformationItemCell
.
self
)
cell
.
dataSource
=
items
[
indexPath
.
row
]
cell
.
block
=
{
[
weak
self
]
model
in
guard
let
self
=
self
else
{
return
}
self
.
viewModel
.
updateModel
(
model
)
if
model
.
id
!=
.
id5
||
model
.
id
!=
.
id10
{
self
.
getData
()
}
}
return
cell
}
func
tableView
(
_
tableView
:
UITableView
,
heightForRowAt
indexPath
:
IndexPath
)
->
CGFloat
{
return
61.0
}
func
tableView
(
_
tableView
:
UITableView
,
viewForHeaderInSection
section
:
Int
)
->
UIView
?
{
let
view
=
UIView
(
frame
:
CGRect
(
x
:
0
,
y
:
0
,
width
:
KScreenWidth
,
height
:
0.01
))
return
view
}
func
tableView
(
_
tableView
:
UITableView
,
heightForHeaderInSection
section
:
Int
)
->
CGFloat
{
return
0.01
}
func
tableView
(
_
tableView
:
UITableView
,
viewForFooterInSection
section
:
Int
)
->
UIView
?
{
return
UIView
()
}
func
tableView
(
_
tableView
:
UITableView
,
heightForFooterInSection
section
:
Int
)
->
CGFloat
{
return
0.01
}
}
galaxy/galaxy/Classes/Modules/Mine(我的)/MyCard(我的名片)/V/YHEditBaseInfoFootView.swift
0 → 100644
View file @
2dfdddd2
//
// YHEditBaseInfoFootView.swift
// galaxy
//
// Created by EDY on 2024/6/19.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import
UIKit
class
YHEditBaseInfoFootView
:
UIView
{
typealias
MessageBlock
=
(
_
message
:
String
)
->
()
var
messageBlock
:
MessageBlock
?
var
titleLabel
:
UILabel
!
var
messageTextField
:
UITextView
!
var
promptsLabel
:
UILabel
!
var
numberLabel
:
UILabel
!
var
dataSource
:
String
?
{
didSet
{
updateAllViews
()
}
}
override
func
awakeFromNib
()
{
super
.
awakeFromNib
()
// Initialization code
}
override
init
(
frame
:
CGRect
)
{
super
.
init
(
frame
:
frame
)
setupUI
()
}
required
init
?(
coder
:
NSCoder
)
{
super
.
init
(
coder
:
coder
)
}
func
setupUI
()
{
backgroundColor
=
.
white
titleLabel
=
{
let
label
=
UILabel
()
let
str
=
"个性签名"
let
attributes
:
[
NSAttributedString
.
Key
:
Any
]
=
[
.
font
:
UIFont
.
PFSC_R
(
ofSize
:
15
),
.
foregroundColor
:
UIColor
.
mainTextColor
]
let
questionAttrStr
=
NSMutableAttributedString
(
string
:
str
,
attributes
:
attributes
)
label
.
attributedText
=
questionAttrStr
return
label
}()
addSubview
(
titleLabel
)
titleLabel
.
snp
.
makeConstraints
{
make
in
make
.
left
.
equalTo
(
21
)
make
.
top
.
equalTo
(
20
)
make
.
height
.
equalTo
(
21
)
make
.
width
.
equalTo
(
70
)
}
let
bgView
=
UIView
()
bgView
.
backgroundColor
=
UIColor
(
hex
:
0xf8f8f8
)
bgView
.
layer
.
masksToBounds
=
true
bgView
.
layer
.
cornerRadius
=
6
addSubview
(
bgView
)
bgView
.
snp
.
makeConstraints
{
make
in
make
.
left
.
equalTo
(
113
)
make
.
right
.
equalTo
(
-
19
)
make
.
top
.
equalTo
(
23
)
make
.
height
.
equalTo
(
108
)
}
messageTextField
=
{
let
textField
=
UITextView
()
textField
.
backgroundColor
=
.
clear
textField
.
font
=
UIFont
.
PFSC_R
(
ofSize
:
15
)
textField
.
delegate
=
self
return
textField
}()
addSubview
(
messageTextField
)
messageTextField
.
snp
.
makeConstraints
{
make
in
make
.
left
.
equalTo
(
124
)
make
.
right
.
equalTo
(
-
37
)
make
.
top
.
equalTo
(
30
)
make
.
height
.
equalTo
(
80
)
}
promptsLabel
=
{
let
prompts
=
UILabel
()
prompts
.
font
=
UIFont
.
PFSC_R
(
ofSize
:
14
)
prompts
.
textColor
=
UIColor
.
mainTextColor30
prompts
.
text
=
"填写个性签名,展现真我风采,彰显独特身份"
prompts
.
numberOfLines
=
0
return
prompts
}()
addSubview
(
promptsLabel
)
promptsLabel
.
snp
.
makeConstraints
{
make
in
make
.
left
.
equalTo
(
129
)
make
.
right
.
equalTo
(
-
37
)
make
.
top
.
equalTo
(
35
)
}
numberLabel
=
{
let
view
=
UILabel
()
view
.
text
=
"--/20"
view
.
font
=
UIFont
.
PFSC_R
(
ofSize
:
14
)
view
.
textColor
=
UIColor
.
placeHolderColor
view
.
textAlignment
=
.
right
return
view
}()
addSubview
(
numberLabel
)
numberLabel
.
snp
.
makeConstraints
{
make
in
make
.
height
.
equalTo
(
16
)
make
.
right
.
equalTo
(
-
37
)
make
.
top
.
equalTo
(
101
)
}
}
func
updateAllViews
()
{
messageTextField
.
text
=
dataSource
if
dataSource
?
.
count
!=
0
{
promptsLabel
.
isHidden
=
true
}
else
{
promptsLabel
.
isHidden
=
false
}
numberLabel
.
text
=
messageTextField
.
text
.
count
.
string
+
"/20"
}
}
extension
YHEditBaseInfoFootView
:
UITextViewDelegate
{
func
textViewDidChange
(
_
textView
:
UITextView
)
{
if
textView
.
text
.
count
!=
0
{
promptsLabel
.
isHidden
=
true
}
else
{
promptsLabel
.
isHidden
=
false
}
if
let
block
=
messageBlock
{
block
(
textView
.
text
??
""
)
}
numberLabel
.
text
=
textView
.
text
.
count
.
string
+
"/20"
}
func
textView
(
_
textView
:
UITextView
,
shouldChangeTextIn
range
:
NSRange
,
replacementText
text
:
String
)
->
Bool
{
let
newLength
=
(
textView
.
text
as
NSString
)
.
length
+
text
.
count
-
range
.
length
return
newLength
<=
20
}
}
galaxy/galaxy/Classes/Modules/Mine(我的)/MyCard(我的名片)/VM/YHEditViewModel.swift
View file @
2dfdddd2
...
...
@@ -41,14 +41,39 @@ class YHEditViewModel: YHBaseViewModel {
mainModel
.
username
=
item
.
message
??
""
case
.
id2
:
mainModel
.
area
=
item
.
value
??
[]
case
.
id3
:
mainModel
.
school
=
item
.
message
??
""
case
.
id4
:
mainModel
.
industry
=
item
.
message
??
""
case
.
id5
:
mainModel
.
position
=
item
.
message
??
""
case
.
id6
:
mainModel
.
country
=
item
.
message
??
""
case
.
id7
:
mainModel
.
constellation
=
item
.
message
??
""
default
:
break
case
.
id8
:
mainModel
.
major
=
item
.
message
??
""
case
.
id9
:
mainModel
.
degree
=
item
.
message
??
""
case
.
id10
:
mainModel
.
company
=
item
.
message
??
""
}
}
func
getBaseSchoolDataSource
()
->
[
YHUserInformationModel
]
{
let
item1
=
YHUserInformationModel
(
id
:
.
id3
,
title
:
"毕业院校"
,
isUserKeyBoard
:
false
,
prompts
:
"请输入您的毕业院校"
,
message
:
mainModel
.
school
,
type
:
.
school
)
let
item2
=
YHUserInformationModel
(
id
:
.
id8
,
title
:
"专业"
,
isUserKeyBoard
:
true
,
prompts
:
"请输入您的专业"
,
message
:
mainModel
.
major
)
let
item3
=
YHUserInformationModel
(
id
:
.
id9
,
title
:
"学位"
,
isUserKeyBoard
:
false
,
prompts
:
"请选择您的学位"
,
message
:
mainModel
.
degree
,
type
:
.
degree
)
return
[
item1
,
item2
,
item3
]
}
func
getBaseWorkDataSource
()
->
[
YHUserInformationModel
]
{
let
item1
=
YHUserInformationModel
(
id
:
.
id10
,
title
:
"所在企业"
,
isUserKeyBoard
:
true
,
prompts
:
"请输入您的所在企业"
,
message
:
mainModel
.
company
)
let
item2
=
YHUserInformationModel
(
id
:
.
id5
,
title
:
"职位"
,
isUserKeyBoard
:
true
,
prompts
:
"请输入您的职位"
,
message
:
mainModel
.
position
)
let
item3
=
YHUserInformationModel
(
id
:
.
id4
,
title
:
"所在行业"
,
isUserKeyBoard
:
false
,
prompts
:
"请选择您的所在行业"
,
message
:
mainModel
.
industry
,
type
:
.
id
)
return
[
item1
,
item2
,
item3
]
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment