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
bbffdffa
Commit
bbffdffa
authored
Jun 25, 2024
by
Steven杜宇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
// 人脉
parent
dedb5ec0
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
58 additions
and
32 deletions
+58
-32
YHMyNameCardViewController.swift
.../Modules/Community(社区)/C/YHMyNameCardViewController.swift
+18
-13
YHMyEducationCell.swift
...y/Classes/Modules/Community(社区)/V/YHMyEducationCell.swift
+2
-0
YHMyInterestTopicCell.swift
...asses/Modules/Community(社区)/V/YHMyInterestTopicCell.swift
+3
-1
YHMyIntroductionCell.swift
...lasses/Modules/Community(社区)/V/YHMyIntroductionCell.swift
+3
-2
YHMyNameCardAvatarInfoCell.swift
.../Modules/Community(社区)/V/YHMyNameCardAvatarInfoCell.swift
+3
-0
YHMyWorkExperienceCell.swift
...sses/Modules/Community(社区)/V/YHMyWorkExperienceCell.swift
+29
-16
No files found.
galaxy/galaxy/Classes/Modules/Community(社区)/C/YHMyNameCardViewController.swift
View file @
bbffdffa
...
...
@@ -121,9 +121,21 @@ extension YHMyNameCardViewController: UITableViewDelegate, UITableViewDataSource
if
0
<=
indexPath
.
section
&&
indexPath
.
section
<
self
.
cardInfoArr
.
count
{
let
cardInfo
=
self
.
cardInfoArr
[
indexPath
.
section
]
if
cardInfo
.
type
==
.
avatar
{
let
cell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
YHMyNameCardAvatarInfoCell
.
cellReuseIdentifier
,
for
:
indexPath
)
as!
YHMyNameCardAvatarInfoCell
cell
.
userModel
=
cardInfo
cell
.
editBlock
=
{
[
weak
self
]
in
guard
let
self
=
self
else
{
return
}
let
vc
=
YHEditBaseUserInfoViewController
()
vc
.
model
=
self
.
viewModel
.
nameCardInfo
self
.
navigationController
?
.
pushViewController
(
vc
)
}
return
cell
}
if
cardInfo
.
type
==
.
honor
||
cardInfo
.
type
==
.
introduce
{
let
introCell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
YHMyIntroductionCell
.
cellReuseIdentifier
,
for
:
indexPath
)
as!
YHMyIntroductionCell
introCell
.
userModel
=
self
.
viewModel
.
nameC
ardInfo
introCell
.
userModel
=
c
ardInfo
introCell
.
editBlock
=
{
[
weak
self
]
in
guard
let
self
=
self
else
{
return
}
if
cardInfo
.
type
==
.
honor
{
...
...
@@ -141,7 +153,7 @@ extension YHMyNameCardViewController: UITableViewDelegate, UITableViewDataSource
if
cardInfo
.
type
==
.
education
{
let
eduCell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
YHMyEducationCell
.
cellReuseIdentifier
,
for
:
indexPath
)
as!
YHMyEducationCell
eduCell
.
userModel
=
self
.
viewModel
.
nameC
ardInfo
eduCell
.
userModel
=
c
ardInfo
eduCell
.
editBlock
=
{
[
weak
self
]
in
guard
let
self
=
self
else
{
return
}
let
vc
=
YHEditSchoolViewController
()
...
...
@@ -153,7 +165,7 @@ extension YHMyNameCardViewController: UITableViewDelegate, UITableViewDataSource
if
cardInfo
.
type
==
.
workExperience
{
let
workCell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
YHMyWorkExperienceCell
.
cellReuseIdentifier
,
for
:
indexPath
)
as!
YHMyWorkExperienceCell
workCell
.
userModel
=
self
.
viewModel
.
nameC
ardInfo
workCell
.
userModel
=
c
ardInfo
workCell
.
editBlock
=
{
[
weak
self
]
in
guard
let
self
=
self
else
{
return
}
let
vc
=
YHEditWorkViewController
()
...
...
@@ -165,7 +177,7 @@ extension YHMyNameCardViewController: UITableViewDelegate, UITableViewDataSource
if
cardInfo
.
type
==
.
topics
{
let
topicCell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
YHMyInterestTopicCell
.
cellReuseIdentifier
,
for
:
indexPath
)
as!
YHMyInterestTopicCell
topicCell
.
userModel
=
self
.
viewModel
.
nameC
ardInfo
topicCell
.
userModel
=
c
ardInfo
topicCell
.
editBlock
=
{
[
weak
self
]
in
guard
let
self
=
self
else
{
return
}
let
vc
=
YHEditInterestViewController
()
...
...
@@ -176,15 +188,8 @@ extension YHMyNameCardViewController: UITableViewDelegate, UITableViewDataSource
}
}
let
cell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
YHMyNameCardAvatarInfoCell
.
cellReuseIdentifier
,
for
:
indexPath
)
as!
YHMyNameCardAvatarInfoCell
cell
.
userModel
=
self
.
viewModel
.
nameCardInfo
cell
.
editBlock
=
{
[
weak
self
]
in
guard
let
self
=
self
else
{
return
}
let
vc
=
YHEditBaseUserInfoViewController
()
vc
.
model
=
self
.
viewModel
.
nameCardInfo
self
.
navigationController
?
.
pushViewController
(
vc
)
}
return
cell
let
defaultCell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
"UITableViewCell"
,
for
:
indexPath
)
return
defaultCell
}
func
tableView
(
_
tableView
:
UITableView
,
heightForRowAt
indexPath
:
IndexPath
)
->
CGFloat
{
...
...
galaxy/galaxy/Classes/Modules/Community(社区)/V/YHMyEducationCell.swift
View file @
bbffdffa
...
...
@@ -15,6 +15,8 @@ class YHMyEducationCell: UITableViewCell {
var
userModel
:
YHUserNameCardInfo
=
YHUserNameCardInfo
()
{
didSet
{
self
.
editBtn
.
isHidden
=
!
self
.
userModel
.
isCurrentUser
self
.
collegeLabel
.
textColor
=
UIColor
.
mainTextColor
self
.
detailLabel
.
textColor
=
UIColor
.
mainTextColor70
...
...
galaxy/galaxy/Classes/Modules/Community(社区)/V/YHMyInterestTopicCell.swift
View file @
bbffdffa
...
...
@@ -55,6 +55,8 @@ class YHMyInterestTopicCell: UITableViewCell {
var
userModel
:
YHUserNameCardInfo
=
YHUserNameCardInfo
()
{
didSet
{
self
.
editBtn
.
isHidden
=
!
self
.
userModel
.
isCurrentUser
var
isShowList
=
true
if
self
.
userModel
.
isCurrentUser
{
if
self
.
topicArr
.
count
<=
0
{
...
...
@@ -149,7 +151,7 @@ class YHMyInterestTopicCell: UITableViewCell {
lazy
var
detailLabel
:
UILabel
=
{
let
label
=
UILabel
()
label
.
textColor
=
UIColor
.
mainTextColor
7
0
label
.
textColor
=
UIColor
.
mainTextColor
3
0
label
.
textAlignment
=
.
left
label
.
font
=
UIFont
.
PFSC_R
(
ofSize
:
14
)
label
.
numberOfLines
=
0
...
...
galaxy/galaxy/Classes/Modules/Community(社区)/V/YHMyIntroductionCell.swift
View file @
bbffdffa
...
...
@@ -15,6 +15,9 @@ class YHMyIntroductionCell: UITableViewCell {
var
userModel
:
YHUserNameCardInfo
=
YHUserNameCardInfo
()
{
didSet
{
self
.
editBtn
.
isHidden
=
!
self
.
userModel
.
isCurrentUser
if
userModel
.
type
==
.
introduce
{
self
.
titleLabel
.
text
=
"个人简介"
self
.
detailLabel
.
textColor
=
UIColor
.
mainTextColor70
...
...
@@ -93,8 +96,6 @@ class YHMyIntroductionCell: UITableViewCell {
self
.
backgroundColor
=
.
clear
self
.
contentView
.
backgroundColor
=
.
clear
detailLabel
.
text
=
"拥有超过十年的互联网行业经验,目前担任某知名科技公司的高级产品经理。成功领导并推动了多个产品的上线与迭代,赢得了业界和用户的广泛认可。"
self
.
contentView
.
addSubview
(
self
.
cardView
)
cardView
.
addSubview
(
self
.
titleLabel
)
cardView
.
addSubview
(
self
.
detailLabel
)
...
...
galaxy/galaxy/Classes/Modules/Community(社区)/V/YHMyNameCardAvatarInfoCell.swift
View file @
bbffdffa
...
...
@@ -17,6 +17,9 @@ class YHMyNameCardAvatarInfoCell: UITableViewCell {
let
headWidth
=
74.0
var
userModel
:
YHUserNameCardInfo
=
YHUserNameCardInfo
()
{
didSet
{
self
.
editBtn
.
isHidden
=
!
self
.
userModel
.
isCurrentUser
if
let
url
=
URL
(
string
:
self
.
userModel
.
avatar
)
{
self
.
headImgV
.
kf
.
setImage
(
with
:
url
,
placeholder
:
UIImage
(
named
:
"people_head_default"
))
}
...
...
galaxy/galaxy/Classes/Modules/Community(社区)/V/YHMyWorkExperienceCell.swift
View file @
bbffdffa
...
...
@@ -61,27 +61,40 @@ class YHMyWorkExperienceCell: UITableViewCell {
var
userModel
:
YHUserNameCardInfo
=
YHUserNameCardInfo
()
{
didSet
{
self
.
companyView
.
detailLabel
.
text
=
self
.
userModel
.
companyName
self
.
professionView
.
detailLabel
.
text
=
self
.
userModel
.
position
self
.
industryView
.
detailLabel
.
text
=
self
.
userModel
.
industry
self
.
editBtn
.
isHidden
=
!
self
.
userModel
.
isCurrentUser
self
.
companyView
.
isHidden
=
self
.
userModel
.
companyName
.
isEmpty
self
.
professionView
.
isHidden
=
self
.
userModel
.
position
.
isEmpty
self
.
industryView
.
isHidden
=
self
.
userModel
.
industry
.
isEmpty
let
companyHeight
=
self
.
userModel
.
companyName
.
isEmpty
?
0.0
:
20
self
.
companyView
.
snp
.
updateConstraints
{
make
in
make
.
height
.
equalTo
(
companyHeight
)
self
.
companyView
.
detailLabel
.
textColor
=
UIColor
.
mainTextColor70
self
.
professionView
.
detailLabel
.
textColor
=
UIColor
.
mainTextColor70
self
.
industryView
.
detailLabel
.
textColor
=
UIColor
.
mainTextColor70
if
!
self
.
userModel
.
companyName
.
isEmpty
{
self
.
companyView
.
detailLabel
.
text
=
self
.
userModel
.
companyName
}
else
{
self
.
companyView
.
detailLabel
.
text
=
""
if
self
.
userModel
.
isCurrentUser
{
self
.
companyView
.
detailLabel
.
textColor
=
UIColor
.
mainTextColor30
self
.
companyView
.
detailLabel
.
text
=
"请填写最近一份工作经历"
}
}
let
positionHeight
=
self
.
userModel
.
position
.
isEmpty
?
0.0
:
20
self
.
professionView
.
snp
.
updateConstraints
{
make
in
make
.
height
.
equalTo
(
positionHeight
)
if
!
self
.
userModel
.
position
.
isEmpty
{
self
.
professionView
.
detailLabel
.
text
=
self
.
userModel
.
position
}
else
{
self
.
professionView
.
detailLabel
.
text
=
""
if
self
.
userModel
.
isCurrentUser
{
self
.
professionView
.
detailLabel
.
textColor
=
UIColor
.
mainTextColor30
self
.
professionView
.
detailLabel
.
text
=
"请填写最近一份工作经历"
}
}
let
industryHeight
=
self
.
userModel
.
industry
.
isEmpty
?
0.0
:
20
self
.
industryView
.
snp
.
updateConstraints
{
make
in
make
.
height
.
equalTo
(
industryHeight
)
if
!
self
.
userModel
.
industry
.
isEmpty
{
self
.
industryView
.
detailLabel
.
text
=
self
.
userModel
.
industry
}
else
{
self
.
industryView
.
detailLabel
.
text
=
""
if
self
.
userModel
.
isCurrentUser
{
self
.
industryView
.
detailLabel
.
textColor
=
UIColor
.
mainTextColor30
self
.
industryView
.
detailLabel
.
text
=
"请填写最近一份工作经历"
}
}
}
}
...
...
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