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
7a47fa3f
Commit
7a47fa3f
authored
Jun 25, 2024
by
Steven杜宇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
// 人脉
parent
13a8c9a9
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
144 additions
and
26 deletions
+144
-26
YHMyNameCardViewController.swift
.../Modules/Community(社区)/C/YHMyNameCardViewController.swift
+12
-0
YHPeopleViewController.swift
...sses/Modules/Community(社区)/C/YHPeopleViewController.swift
+4
-4
YHMatchUserInfo.swift
...axy/Classes/Modules/Community(社区)/M/YHMatchUserInfo.swift
+18
-3
YHMyEducationCell.swift
...y/Classes/Modules/Community(社区)/V/YHMyEducationCell.swift
+24
-3
YHMyInterestTopicCell.swift
...asses/Modules/Community(社区)/V/YHMyInterestTopicCell.swift
+58
-9
YHMyIntroductionCell.swift
...lasses/Modules/Community(社区)/V/YHMyIntroductionCell.swift
+21
-2
YHMyNameCardAvatarInfoCell.swift
.../Modules/Community(社区)/V/YHMyNameCardAvatarInfoCell.swift
+5
-5
YHMyWorkExperienceCell.swift
...sses/Modules/Community(社区)/V/YHMyWorkExperienceCell.swift
+2
-0
No files found.
galaxy/galaxy/Classes/Modules/Community(社区)/C/YHMyNameCardViewController.swift
View file @
7a47fa3f
...
@@ -32,6 +32,12 @@ class YHMyNameCardViewController: YHBaseViewController {
...
@@ -32,6 +32,12 @@ class YHMyNameCardViewController: YHBaseViewController {
return
tableView
return
tableView
}()
}()
var
isCurrentUser
:
Bool
{
get
{
return
(
!
self
.
userId
.
isEmpty
&&
self
.
userId
==
YHLoginManager
.
shared
.
userModel
?
.
id
)
}
}
lazy
var
bgImgView
:
UIImageView
=
{
lazy
var
bgImgView
:
UIImageView
=
{
let
view
=
UIImageView
(
image
:
UIImage
(
named
:
"people_card_bg"
))
let
view
=
UIImageView
(
image
:
UIImage
(
named
:
"people_card_bg"
))
return
view
return
view
...
@@ -220,31 +226,37 @@ extension YHMyNameCardViewController {
...
@@ -220,31 +226,37 @@ extension YHMyNameCardViewController {
let
model1
=
YHUserNameCardInfo
()
let
model1
=
YHUserNameCardInfo
()
model1
.
type
=
.
avatar
model1
.
type
=
.
avatar
model1
.
isCurrentUser
=
self
.
isCurrentUser
model1
.
updateModel
(
self
.
viewModel
.
nameCardInfo
)
model1
.
updateModel
(
self
.
viewModel
.
nameCardInfo
)
self
.
cardInfoArr
.
append
(
model1
)
self
.
cardInfoArr
.
append
(
model1
)
let
model2
=
YHUserNameCardInfo
()
let
model2
=
YHUserNameCardInfo
()
model2
.
type
=
.
introduce
model2
.
type
=
.
introduce
model2
.
isCurrentUser
=
self
.
isCurrentUser
model2
.
updateModel
(
self
.
viewModel
.
nameCardInfo
)
model2
.
updateModel
(
self
.
viewModel
.
nameCardInfo
)
self
.
cardInfoArr
.
append
(
model2
)
self
.
cardInfoArr
.
append
(
model2
)
let
model3
=
YHUserNameCardInfo
()
let
model3
=
YHUserNameCardInfo
()
model3
.
type
=
.
education
model3
.
type
=
.
education
model3
.
isCurrentUser
=
self
.
isCurrentUser
model3
.
updateModel
(
self
.
viewModel
.
nameCardInfo
)
model3
.
updateModel
(
self
.
viewModel
.
nameCardInfo
)
self
.
cardInfoArr
.
append
(
model3
)
self
.
cardInfoArr
.
append
(
model3
)
let
model4
=
YHUserNameCardInfo
()
let
model4
=
YHUserNameCardInfo
()
model4
.
type
=
.
workExperience
model4
.
type
=
.
workExperience
model4
.
isCurrentUser
=
self
.
isCurrentUser
model4
.
updateModel
(
self
.
viewModel
.
nameCardInfo
)
model4
.
updateModel
(
self
.
viewModel
.
nameCardInfo
)
self
.
cardInfoArr
.
append
(
model4
)
self
.
cardInfoArr
.
append
(
model4
)
let
model5
=
YHUserNameCardInfo
()
let
model5
=
YHUserNameCardInfo
()
model5
.
type
=
.
honor
model5
.
type
=
.
honor
model5
.
isCurrentUser
=
self
.
isCurrentUser
model5
.
updateModel
(
self
.
viewModel
.
nameCardInfo
)
model5
.
updateModel
(
self
.
viewModel
.
nameCardInfo
)
self
.
cardInfoArr
.
append
(
model5
)
self
.
cardInfoArr
.
append
(
model5
)
let
model6
=
YHUserNameCardInfo
()
let
model6
=
YHUserNameCardInfo
()
model6
.
type
=
.
topics
model6
.
type
=
.
topics
model6
.
isCurrentUser
=
self
.
isCurrentUser
model6
.
updateModel
(
self
.
viewModel
.
nameCardInfo
)
model6
.
updateModel
(
self
.
viewModel
.
nameCardInfo
)
self
.
cardInfoArr
.
append
(
model6
)
self
.
cardInfoArr
.
append
(
model6
)
...
...
galaxy/galaxy/Classes/Modules/Community(社区)/C/YHPeopleViewController.swift
View file @
7a47fa3f
...
@@ -148,10 +148,10 @@ class YHPeopleViewController: YHBaseViewController {
...
@@ -148,10 +148,10 @@ class YHPeopleViewController: YHBaseViewController {
@objc
func
didMatchBtnClicked
()
{
@objc
func
didMatchBtnClicked
()
{
//
if true {
if
true
{
//
startMatchUsers()
startMatchUsers
()
//
return
return
//
}
}
let
vc
=
YHInformationAuthorizationStepOneViewController
()
let
vc
=
YHInformationAuthorizationStepOneViewController
()
self
.
navigationController
?
.
pushViewController
(
vc
)
self
.
navigationController
?
.
pushViewController
(
vc
)
...
...
galaxy/galaxy/Classes/Modules/Community(社区)/M/YHMatchUserInfo.swift
View file @
7a47fa3f
...
@@ -48,6 +48,21 @@ class YHMatchUserAddress: SmartCodable {
...
@@ -48,6 +48,21 @@ class YHMatchUserAddress: SmartCodable {
}
}
}
}
class
YHAuthorizationModel
:
SmartCodable
{
var
educationExperience
:
Int
=
0
var
workExperience
=
0
required
init
()
{
}
enum
CodingKeys
:
String
,
CodingKey
{
case
educationExperience
=
"public_education_experience"
case
workExperience
=
"public_work_experience"
}
}
enum
YHNameCardInfoType
:
Int
{
enum
YHNameCardInfoType
:
Int
{
case
unknown
=
-
1
case
unknown
=
-
1
case
avatar
=
0
case
avatar
=
0
...
@@ -76,11 +91,13 @@ class YHUserNameCardInfo: SmartCodable {
...
@@ -76,11 +91,13 @@ class YHUserNameCardInfo: SmartCodable {
var
industry
:
String
=
""
var
industry
:
String
=
""
var
honor
:
String
=
""
var
honor
:
String
=
""
var
topics
:
[
String
]
=
[]
var
topics
:
[
String
]
=
[]
var
authorization
:
YHAuthorizationModel
=
YHAuthorizationModel
()
// 自定义属性
// 自定义属性
var
type
:
YHNameCardInfoType
=
.
unknown
var
type
:
YHNameCardInfoType
=
.
unknown
var
isHiddenEducation
=
false
var
isHiddenEducation
=
false
var
isHiddenWorkExperience
=
false
var
isHiddenWorkExperience
=
false
var
isCurrentUser
=
false
required
init
()
{
required
init
()
{
...
@@ -110,11 +127,9 @@ class YHUserNameCardInfo: SmartCodable {
...
@@ -110,11 +127,9 @@ class YHUserNameCardInfo: SmartCodable {
}
}
enum
CodingKeys
:
String
,
CodingKey
{
enum
CodingKeys
:
String
,
CodingKey
{
case
id
case
yhId
=
"yh_id"
case
yhId
=
"yh_id"
case
isSigned
=
"is_signed"
case
isSigned
=
"is_signed"
case
avatar
,
username
,
address
,
zodiac
,
signature
,
bio
,
college
,
major
,
background
case
id
,
avatar
,
username
,
address
,
zodiac
,
signature
,
bio
,
college
,
major
,
background
,
authorization
,
position
,
industry
,
honor
,
topics
case
companyName
=
"company_name"
case
companyName
=
"company_name"
case
position
,
industry
,
honor
,
topics
}
}
}
}
galaxy/galaxy/Classes/Modules/Community(社区)/V/YHMyEducationCell.swift
View file @
7a47fa3f
...
@@ -15,8 +15,29 @@ class YHMyEducationCell: UITableViewCell {
...
@@ -15,8 +15,29 @@ class YHMyEducationCell: UITableViewCell {
var
userModel
:
YHUserNameCardInfo
=
YHUserNameCardInfo
()
{
var
userModel
:
YHUserNameCardInfo
=
YHUserNameCardInfo
()
{
didSet
{
didSet
{
self
.
collegeLabel
.
text
=
self
.
userModel
.
college
self
.
collegeLabel
.
textColor
=
UIColor
.
mainTextColor
self
.
detailLabel
.
text
=
self
.
userModel
.
background
self
.
detailLabel
.
textColor
=
UIColor
.
mainTextColor70
if
!
self
.
userModel
.
college
.
isEmpty
{
self
.
collegeLabel
.
text
=
self
.
userModel
.
college
}
else
{
self
.
collegeLabel
.
text
=
""
if
self
.
userModel
.
isCurrentUser
{
self
.
collegeLabel
.
text
=
"填写院校名称"
self
.
collegeLabel
.
textColor
=
UIColor
.
mainTextColor30
}
}
if
!
self
.
userModel
.
background
.
isEmpty
{
self
.
detailLabel
.
text
=
self
.
userModel
.
background
}
else
{
self
.
detailLabel
.
text
=
""
if
self
.
userModel
.
isCurrentUser
{
self
.
detailLabel
.
text
=
"填写专业 · 填写学位"
self
.
detailLabel
.
textColor
=
UIColor
.
mainTextColor30
}
}
}
}
}
}
...
@@ -39,7 +60,7 @@ class YHMyEducationCell: UITableViewCell {
...
@@ -39,7 +60,7 @@ class YHMyEducationCell: UITableViewCell {
lazy
var
collegeLabel
:
UILabel
=
{
lazy
var
collegeLabel
:
UILabel
=
{
let
label
=
UILabel
()
let
label
=
UILabel
()
label
.
textColor
=
UIColor
.
mainTextColor
70
label
.
textColor
=
UIColor
.
mainTextColor
label
.
textAlignment
=
.
left
label
.
textAlignment
=
.
left
label
.
font
=
UIFont
.
PFSC_M
(
ofSize
:
14
)
label
.
font
=
UIFont
.
PFSC_M
(
ofSize
:
14
)
label
.
numberOfLines
=
0
label
.
numberOfLines
=
0
...
...
galaxy/galaxy/Classes/Modules/Community(社区)/V/YHMyInterestTopicCell.swift
View file @
7a47fa3f
...
@@ -54,11 +54,52 @@ class YHMyInterestTopicCell: UITableViewCell {
...
@@ -54,11 +54,52 @@ class YHMyInterestTopicCell: UITableViewCell {
var
topicArr
:[
String
]
=
[]
var
topicArr
:[
String
]
=
[]
var
userModel
:
YHUserNameCardInfo
=
YHUserNameCardInfo
()
{
var
userModel
:
YHUserNameCardInfo
=
YHUserNameCardInfo
()
{
didSet
{
didSet
{
self
.
topicArr
.
removeAll
()
if
self
.
userModel
.
topics
.
count
>
0
{
var
isShowList
=
true
self
.
topicArr
.
append
(
contentsOf
:
self
.
userModel
.
topics
)
if
self
.
userModel
.
isCurrentUser
{
if
self
.
topicArr
.
count
<=
0
{
isShowList
=
false
}
}
self
.
collectionView
.
isHidden
=
!
isShowList
self
.
detailLabel
.
isHidden
=
isShowList
if
isShowList
{
self
.
topicArr
.
removeAll
()
if
self
.
userModel
.
topics
.
count
>
0
{
self
.
topicArr
.
append
(
contentsOf
:
self
.
userModel
.
topics
)
}
self
.
collectionView
.
snp
.
remakeConstraints
{
make
in
make
.
left
.
equalTo
(
16
)
make
.
right
.
equalTo
(
-
16
)
make
.
bottom
.
equalTo
(
-
16
)
make
.
height
.
equalTo
(
24
)
make
.
top
.
equalTo
(
titleLabel
.
snp
.
bottom
)
.
offset
(
12
)
}
self
.
detailLabel
.
snp
.
remakeConstraints
{
make
in
make
.
edges
.
equalTo
(
self
.
collectionView
)
}
self
.
collectionView
.
reloadData
{
let
height
=
self
.
collectionView
.
contentSize
.
height
self
.
collectionView
.
snp
.
updateConstraints
{
make
in
make
.
height
.
equalTo
(
height
)
}
}
}
else
{
self
.
detailLabel
.
snp
.
remakeConstraints
{
make
in
make
.
left
.
equalTo
(
16
)
make
.
right
.
equalTo
(
-
16
)
make
.
bottom
.
equalTo
(
-
16
)
make
.
top
.
equalTo
(
titleLabel
.
snp
.
bottom
)
.
offset
(
12
)
}
self
.
collectionView
.
snp
.
remakeConstraints
{
make
in
make
.
edges
.
equalTo
(
self
.
detailLabel
)
}
}
}
self
.
collectionView
.
reloadData
()
}
}
}
}
...
@@ -106,6 +147,16 @@ class YHMyInterestTopicCell: UITableViewCell {
...
@@ -106,6 +147,16 @@ class YHMyInterestTopicCell: UITableViewCell {
return
collectView
return
collectView
}()
}()
lazy
var
detailLabel
:
UILabel
=
{
let
label
=
UILabel
()
label
.
textColor
=
UIColor
.
mainTextColor70
label
.
textAlignment
=
.
left
label
.
font
=
UIFont
.
PFSC_R
(
ofSize
:
14
)
label
.
numberOfLines
=
0
label
.
text
=
"填写你的兴趣爱好,与志同道合的人畅聊共同话题,如MBTI人格测试、艺术、运动、技术等方面。"
return
label
}()
required
init
?(
coder
:
NSCoder
)
{
required
init
?(
coder
:
NSCoder
)
{
super
.
init
(
coder
:
coder
)
super
.
init
(
coder
:
coder
)
}
}
...
@@ -124,6 +175,7 @@ class YHMyInterestTopicCell: UITableViewCell {
...
@@ -124,6 +175,7 @@ class YHMyInterestTopicCell: UITableViewCell {
self
.
contentView
.
addSubview
(
self
.
cardView
)
self
.
contentView
.
addSubview
(
self
.
cardView
)
cardView
.
addSubview
(
self
.
titleLabel
)
cardView
.
addSubview
(
self
.
titleLabel
)
cardView
.
addSubview
(
collectionView
)
cardView
.
addSubview
(
collectionView
)
cardView
.
addSubview
(
detailLabel
)
cardView
.
addSubview
(
self
.
editBtn
)
cardView
.
addSubview
(
self
.
editBtn
)
...
@@ -151,11 +203,8 @@ class YHMyInterestTopicCell: UITableViewCell {
...
@@ -151,11 +203,8 @@ class YHMyInterestTopicCell: UITableViewCell {
make
.
top
.
equalTo
(
titleLabel
.
snp
.
bottom
)
.
offset
(
12
)
make
.
top
.
equalTo
(
titleLabel
.
snp
.
bottom
)
.
offset
(
12
)
}
}
collectionView
.
reloadData
{
detailLabel
.
snp
.
makeConstraints
{
make
in
let
height
=
self
.
collectionView
.
contentSize
.
height
make
.
edges
.
equalTo
(
self
.
collectionView
)
self
.
collectionView
.
snp
.
updateConstraints
{
make
in
make
.
height
.
equalTo
(
height
)
}
}
}
}
}
...
...
galaxy/galaxy/Classes/Modules/Community(社区)/V/YHMyIntroductionCell.swift
View file @
7a47fa3f
...
@@ -17,11 +17,30 @@ class YHMyIntroductionCell: UITableViewCell {
...
@@ -17,11 +17,30 @@ class YHMyIntroductionCell: UITableViewCell {
didSet
{
didSet
{
if
userModel
.
type
==
.
introduce
{
if
userModel
.
type
==
.
introduce
{
self
.
titleLabel
.
text
=
"个人简介"
self
.
titleLabel
.
text
=
"个人简介"
self
.
detailLabel
.
text
=
self
.
userModel
.
bio
self
.
detailLabel
.
textColor
=
UIColor
.
mainTextColor70
if
!
self
.
userModel
.
bio
.
isEmpty
{
self
.
detailLabel
.
text
=
self
.
userModel
.
bio
}
else
{
self
.
detailLabel
.
text
=
""
if
self
.
userModel
.
isCurrentUser
{
self
.
detailLabel
.
text
=
"快来完善你的个人简介,用简洁的文字描绘你的独特魅力。"
self
.
detailLabel
.
textColor
=
UIColor
.
mainTextColor30
}
}
}
else
if
userModel
.
type
==
.
honor
{
}
else
if
userModel
.
type
==
.
honor
{
self
.
titleLabel
.
text
=
"荣誉奖项"
self
.
titleLabel
.
text
=
"荣誉奖项"
self
.
detailLabel
.
text
=
self
.
userModel
.
honor
self
.
detailLabel
.
textColor
=
UIColor
.
mainTextColor70
if
!
self
.
userModel
.
honor
.
isEmpty
{
self
.
detailLabel
.
text
=
self
.
userModel
.
honor
}
else
{
self
.
detailLabel
.
text
=
""
if
self
.
userModel
.
isCurrentUser
{
self
.
detailLabel
.
text
=
"展示你的辉煌时刻,让更多人见证你的卓越成就!"
self
.
detailLabel
.
textColor
=
UIColor
.
mainTextColor30
}
}
}
}
}
}
}
}
...
...
galaxy/galaxy/Classes/Modules/Community(社区)/V/YHMyNameCardAvatarInfoCell.swift
View file @
7a47fa3f
...
@@ -28,8 +28,8 @@ class YHMyNameCardAvatarInfoCell: UITableViewCell {
...
@@ -28,8 +28,8 @@ class YHMyNameCardAvatarInfoCell: UITableViewCell {
self
.
zodiacLabel
.
text
=
self
.
userModel
.
zodiac
self
.
zodiacLabel
.
text
=
self
.
userModel
.
zodiac
var
name
:
ASAttributedString
=
.
init
(
string
:
self
.
userModel
.
username
,
.
font
(
UIFont
.
PFSC_B
(
ofSize
:
18
)),
.
foreground
(
UIColor
.
mainTextColor
))
var
name
:
ASAttributedString
=
.
init
(
string
:
self
.
userModel
.
username
,
.
font
(
UIFont
.
PFSC_B
(
ofSize
:
18
)),
.
foreground
(
UIColor
.
mainTextColor
))
var
cityTag
:
ASAttributedString
=
"
\(
.
view
(
self
.
cityLabel
,
.
original
(
.
center
))
)
"
let
cityTag
:
ASAttributedString
=
"
\(
.
view
(
self
.
cityLabel
,
.
original
(
.
center
))
)
"
var
zodiacTag
:
ASAttributedString
=
"
\(
.
view
(
self
.
zodiacLabel
,
.
original
(
.
center
))
)
"
let
zodiacTag
:
ASAttributedString
=
"
\(
.
view
(
self
.
zodiacLabel
,
.
original
(
.
center
))
)
"
if
!
self
.
userModel
.
address
.
city
.
isEmpty
{
if
!
self
.
userModel
.
address
.
city
.
isEmpty
{
name
+=
cityTag
name
+=
cityTag
...
@@ -37,9 +37,9 @@ class YHMyNameCardAvatarInfoCell: UITableViewCell {
...
@@ -37,9 +37,9 @@ class YHMyNameCardAvatarInfoCell: UITableViewCell {
if
!
self
.
userModel
.
zodiac
.
isEmpty
{
if
!
self
.
userModel
.
zodiac
.
isEmpty
{
name
+=
zodiacTag
name
+=
zodiacTag
}
}
self
.
nameTextView
.
attributed
.
text
=
name
+
"ASDFASFSDFASFDASFASFDASFASDFASDFASDFASFASFASFDAFAFASDFASDF"
self
.
nameTextView
.
attributed
.
text
=
name
self
.
professionalLabel
.
text
=
self
.
userModel
.
position
+
"dfasdfasdfasfasdfasdfasfdasdfasdfasdfsadfasdfas"
self
.
professionalLabel
.
text
=
self
.
userModel
.
position
self
.
detailLabel
.
text
=
self
.
userModel
.
signature
+
"asdfasfdasdfasdfasdfasdgfasdgewrgqrgegvsvdfvfgbsdfbvdfbvsdfvasdvadsvasvda"
self
.
detailLabel
.
text
=
self
.
userModel
.
signature
self
.
signImgV
.
isHidden
=
!
self
.
userModel
.
isSigned
self
.
signImgV
.
isHidden
=
!
self
.
userModel
.
isSigned
}
}
}
}
...
...
galaxy/galaxy/Classes/Modules/Community(社区)/V/YHMyWorkExperienceCell.swift
View file @
7a47fa3f
...
@@ -23,6 +23,7 @@ class YHExperienceItemView: UIView {
...
@@ -23,6 +23,7 @@ class YHExperienceItemView: UIView {
label
.
textColor
=
UIColor
.
mainTextColor70
label
.
textColor
=
UIColor
.
mainTextColor70
label
.
textAlignment
=
.
left
label
.
textAlignment
=
.
left
label
.
font
=
UIFont
.
PFSC_R
(
ofSize
:
14
)
label
.
font
=
UIFont
.
PFSC_R
(
ofSize
:
14
)
label
.
text
=
"填写最近一份工作经验"
return
label
return
label
}()
}()
...
@@ -59,6 +60,7 @@ class YHMyWorkExperienceCell: UITableViewCell {
...
@@ -59,6 +60,7 @@ class YHMyWorkExperienceCell: UITableViewCell {
var
userModel
:
YHUserNameCardInfo
=
YHUserNameCardInfo
()
{
var
userModel
:
YHUserNameCardInfo
=
YHUserNameCardInfo
()
{
didSet
{
didSet
{
self
.
companyView
.
detailLabel
.
text
=
self
.
userModel
.
companyName
self
.
companyView
.
detailLabel
.
text
=
self
.
userModel
.
companyName
self
.
professionView
.
detailLabel
.
text
=
self
.
userModel
.
position
self
.
professionView
.
detailLabel
.
text
=
self
.
userModel
.
position
self
.
industryView
.
detailLabel
.
text
=
self
.
userModel
.
industry
self
.
industryView
.
detailLabel
.
text
=
self
.
userModel
.
industry
...
...
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