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
59b41db5
Commit
59b41db5
authored
Sep 27, 2025
by
Steven杜宇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
// 名片
parent
129c8eff
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
388 additions
and
59 deletions
+388
-59
project.pbxproj
galaxy/galaxy.xcodeproj/project.pbxproj
+4
-4
YHConnectListViewController.swift
...y(社区)/Connections(人脉)/C/YHConnectListViewController.swift
+1
-1
YHSetExplainView.swift
...xy/Classes/Modules/Community(社区)/V/YHSetExplainView.swift
+2
-2
YHMyNewViewController.swift
...xy/Classes/Modules/Mine(我的)/C/YHMyNewViewController.swift
+1
-1
YHNameCardContainerViewController.swift
...的)/NameCard(名片)/C/YHNameCardContainerViewController.swift
+128
-49
YHNameCardHomePageViewController.swift
...我的)/NameCard(名片)/C/YHNameCardHomePageViewController.swift
+250
-0
Contents.json
...ets.xcassets/nameCard/name_card_bg.imageset/Contents.json
+2
-2
头部背景图 1.png
...ssets.xcassets/nameCard/name_card_bg.imageset/头部背景图 1.png
+0
-0
头部背景图-1.png
...ssets.xcassets/nameCard/name_card_bg.imageset/头部背景图-1.png
+0
-0
头部背景图.png
.../Assets.xcassets/nameCard/name_card_bg.imageset/头部背景图.png
+0
-0
No files found.
galaxy/galaxy.xcodeproj/project.pbxproj
View file @
59b41db5
...
@@ -39,7 +39,7 @@
...
@@ -39,7 +39,7 @@
041CCDF72D7ED9030015E7BC
/* YHHKVisaRenewalPaymentInfoList.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
041CCDF62D7ED9030015E7BC
/* YHHKVisaRenewalPaymentInfoList.swift */
;
};
041CCDF72D7ED9030015E7BC
/* YHHKVisaRenewalPaymentInfoList.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
041CCDF62D7ED9030015E7BC
/* YHHKVisaRenewalPaymentInfoList.swift */
;
};
041CCDF92D7EE8B90015E7BC
/* YHVisaRenewalPayMemberCell.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
041CCDF82D7EE8B90015E7BC
/* YHVisaRenewalPayMemberCell.swift */
;
};
041CCDF92D7EE8B90015E7BC
/* YHVisaRenewalPayMemberCell.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
041CCDF82D7EE8B90015E7BC
/* YHVisaRenewalPayMemberCell.swift */
;
};
0426E09A2E84E962005C9F5D
/* YHContact.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
0426E0992E84E962005C9F5D
/* YHContact.swift */
;
};
0426E09A2E84E962005C9F5D
/* YHContact.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
0426E0992E84E962005C9F5D
/* YHContact.swift */
;
};
0426E09C2E851A91005C9F5D
/* YHN
ewNameCardViewController.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
0426E09B2E851A91005C9F5D
/* YHNewNameCard
ViewController.swift */
;
};
0426E09C2E851A91005C9F5D
/* YHN
ameCardContainerViewController.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
0426E09B2E851A91005C9F5D
/* YHNameCardContainer
ViewController.swift */
;
};
04307B662D1942F500ED8E8D
/* YHDynamicSheetPickerView.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
04307B652D1942F500ED8E8D
/* YHDynamicSheetPickerView.swift */
;
};
04307B662D1942F500ED8E8D
/* YHDynamicSheetPickerView.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
04307B652D1942F500ED8E8D
/* YHDynamicSheetPickerView.swift */
;
};
04307B682D19911800ED8E8D
/* YHIncomeInfoEditCell.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
04307B672D19911800ED8E8D
/* YHIncomeInfoEditCell.swift */
;
};
04307B682D19911800ED8E8D
/* YHIncomeInfoEditCell.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
04307B672D19911800ED8E8D
/* YHIncomeInfoEditCell.swift */
;
};
04307B6A2D1A4C6500ED8E8D
/* YHIncomeInfoSelectCell.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
04307B692D1A4C6500ED8E8D
/* YHIncomeInfoSelectCell.swift */
;
};
04307B6A2D1A4C6500ED8E8D
/* YHIncomeInfoSelectCell.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
04307B692D1A4C6500ED8E8D
/* YHIncomeInfoSelectCell.swift */
;
};
...
@@ -1388,7 +1388,7 @@
...
@@ -1388,7 +1388,7 @@
041CCDF62D7ED9030015E7BC
/* YHHKVisaRenewalPaymentInfoList.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHHKVisaRenewalPaymentInfoList.swift
;
sourceTree
=
"<group>"
;
};
041CCDF62D7ED9030015E7BC
/* YHHKVisaRenewalPaymentInfoList.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHHKVisaRenewalPaymentInfoList.swift
;
sourceTree
=
"<group>"
;
};
041CCDF82D7EE8B90015E7BC
/* YHVisaRenewalPayMemberCell.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHVisaRenewalPayMemberCell.swift
;
sourceTree
=
"<group>"
;
};
041CCDF82D7EE8B90015E7BC
/* YHVisaRenewalPayMemberCell.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHVisaRenewalPayMemberCell.swift
;
sourceTree
=
"<group>"
;
};
0426E0992E84E962005C9F5D
/* YHContact.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHContact.swift
;
sourceTree
=
"<group>"
;
};
0426E0992E84E962005C9F5D
/* YHContact.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHContact.swift
;
sourceTree
=
"<group>"
;
};
0426E09B2E851A91005C9F5D
/* YHN
ewNameCardViewController.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHNewNameCard
ViewController.swift
;
sourceTree
=
"<group>"
;
};
0426E09B2E851A91005C9F5D
/* YHN
ameCardContainerViewController.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHNameCardContainer
ViewController.swift
;
sourceTree
=
"<group>"
;
};
04307B652D1942F500ED8E8D
/* YHDynamicSheetPickerView.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHDynamicSheetPickerView.swift
;
sourceTree
=
"<group>"
;
};
04307B652D1942F500ED8E8D
/* YHDynamicSheetPickerView.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHDynamicSheetPickerView.swift
;
sourceTree
=
"<group>"
;
};
04307B672D19911800ED8E8D
/* YHIncomeInfoEditCell.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHIncomeInfoEditCell.swift
;
sourceTree
=
"<group>"
;
};
04307B672D19911800ED8E8D
/* YHIncomeInfoEditCell.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHIncomeInfoEditCell.swift
;
sourceTree
=
"<group>"
;
};
04307B692D1A4C6500ED8E8D
/* YHIncomeInfoSelectCell.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHIncomeInfoSelectCell.swift
;
sourceTree
=
"<group>"
;
};
04307B692D1A4C6500ED8E8D
/* YHIncomeInfoSelectCell.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHIncomeInfoSelectCell.swift
;
sourceTree
=
"<group>"
;
};
...
@@ -6907,7 +6907,7 @@
...
@@ -6907,7 +6907,7 @@
04B30B7D2E86374E004E4B12
/* C */
=
{
04B30B7D2E86374E004E4B12
/* C */
=
{
isa
=
PBXGroup
;
isa
=
PBXGroup
;
children
=
(
children
=
(
0426E09B2E851A91005C9F5D
/* YHN
ewNameCard
ViewController.swift */
,
0426E09B2E851A91005C9F5D
/* YHN
ameCardContainer
ViewController.swift */
,
04B30B7A2E86307C004E4B12
/* YHNameCardHomePageViewController.swift */
,
04B30B7A2E86307C004E4B12
/* YHNameCardHomePageViewController.swift */
,
);
);
path
=
C
;
path
=
C
;
...
@@ -8692,7 +8692,7 @@
...
@@ -8692,7 +8692,7 @@
045C137C2D12CA5F00BD2DC0
/* YHVisaRenewalPayInfoBaseCell.swift in Sources */
,
045C137C2D12CA5F00BD2DC0
/* YHVisaRenewalPayInfoBaseCell.swift in Sources */
,
045C137D2D12CA5F00BD2DC0
/* YHPaddedLabel.swift in Sources */
,
045C137D2D12CA5F00BD2DC0
/* YHPaddedLabel.swift in Sources */
,
045C137E2D12CA5F00BD2DC0
/* IMAppKey.swift in Sources */
,
045C137E2D12CA5F00BD2DC0
/* IMAppKey.swift in Sources */
,
0426E09C2E851A91005C9F5D
/* YHN
ewNameCard
ViewController.swift in Sources */
,
0426E09C2E851A91005C9F5D
/* YHN
ameCardContainer
ViewController.swift in Sources */
,
045C137F2D12CA5F00BD2DC0
/* YHHomeWebViewBottomForSavePicView.swift in Sources */
,
045C137F2D12CA5F00BD2DC0
/* YHHomeWebViewBottomForSavePicView.swift in Sources */
,
045C13802D12CA5F00BD2DC0
/* YHLifeViewController.swift in Sources */
,
045C13802D12CA5F00BD2DC0
/* YHLifeViewController.swift in Sources */
,
045C13812D12CA5F00BD2DC0
/* YHParentInfoVC.swift in Sources */
,
045C13812D12CA5F00BD2DC0
/* YHParentInfoVC.swift in Sources */
,
...
...
galaxy/galaxy/Classes/Modules/Community(社区)/Connections(人脉)/C/YHConnectListViewController.swift
View file @
59b41db5
...
@@ -65,7 +65,7 @@ extension YHConnectListViewController: UITableViewDelegate, UITableViewDataSourc
...
@@ -65,7 +65,7 @@ extension YHConnectListViewController: UITableViewDelegate, UITableViewDataSourc
func
tableView
(
_
tableView
:
UITableView
,
didSelectRowAt
indexPath
:
IndexPath
)
{
func
tableView
(
_
tableView
:
UITableView
,
didSelectRowAt
indexPath
:
IndexPath
)
{
if
0
<=
indexPath
.
row
&&
indexPath
.
row
<
arr
.
count
{
if
0
<=
indexPath
.
row
&&
indexPath
.
row
<
arr
.
count
{
let
vc
=
YHN
ewNameCard
ViewController
()
let
vc
=
YHN
ameCardContainer
ViewController
()
navigationController
?
.
pushViewController
(
vc
)
navigationController
?
.
pushViewController
(
vc
)
}
}
}
}
...
...
galaxy/galaxy/Classes/Modules/Community(社区)/V/YHSetExplainView.swift
View file @
59b41db5
...
@@ -157,9 +157,9 @@ class YHSetExplainView: UIView {
...
@@ -157,9 +157,9 @@ class YHSetExplainView: UIView {
make
.
bottom
.
equalTo
(
-
42
)
make
.
bottom
.
equalTo
(
-
42
)
make
.
height
.
equalTo
(
48
)
make
.
height
.
equalTo
(
48
)
}
}
bottomButton
.
layoutIfNeeded
()
//
bottomButton.layoutIfNeeded()
bottomButton
.
addYinHeGradualLayer
()
//
bottomButton.addYinHeGradualLayer()
}
}
@objc
private
func
handleTap
(
_
sender
:
AnyObject
?)
{
@objc
private
func
handleTap
(
_
sender
:
AnyObject
?)
{
...
...
galaxy/galaxy/Classes/Modules/Mine(我的)/C/YHMyNewViewController.swift
View file @
59b41db5
...
@@ -667,7 +667,7 @@ extension YHMyNewViewController {
...
@@ -667,7 +667,7 @@ extension YHMyNewViewController {
switch
item
.
type
{
switch
item
.
type
{
case
.
myCard
:
// 我的名片
case
.
myCard
:
// 我的名片
let
vc
=
YHN
ewNameCard
ViewController
()
let
vc
=
YHN
ameCardContainer
ViewController
()
self
.
navigationController
?
.
pushViewController
(
vc
)
self
.
navigationController
?
.
pushViewController
(
vc
)
// enterMyNameCard()
// enterMyNameCard()
case
.
myMessage
:
// 我的消息
case
.
myMessage
:
// 我的消息
...
...
galaxy/galaxy/Classes/Modules/Mine(我的)/NameCard(名片)/C/YHN
ewNameCard
ViewController.swift
→
galaxy/galaxy/Classes/Modules/Mine(我的)/NameCard(名片)/C/YHN
ameCardContainer
ViewController.swift
View file @
59b41db5
...
@@ -10,9 +10,21 @@ import AttributedString
...
@@ -10,9 +10,21 @@ import AttributedString
import
JXSegmentedView
import
JXSegmentedView
import
UIKit
import
UIKit
class
YHN
ewNameCard
ViewController
:
YHBaseViewController
{
class
YHN
ameCardContainer
ViewController
:
YHBaseViewController
{
var
defaultIndex
=
0
var
defaultIndex
=
0
lazy
var
containerScrollView
:
UIScrollView
=
{
let
scrollView
=
UIScrollView
(
frame
:
.
zero
)
scrollView
.
delegate
=
self
scrollView
.
contentInsetAdjustmentBehavior
=
.
never
return
scrollView
}()
lazy
var
containerView
:
UIView
=
{
let
view
=
UIView
()
return
view
}()
lazy
var
headerView
:
UIView
=
{
lazy
var
headerView
:
UIView
=
{
let
view
=
UIView
()
let
view
=
UIView
()
...
@@ -23,7 +35,39 @@ class YHNewNameCardViewController: YHBaseViewController {
...
@@ -23,7 +35,39 @@ class YHNewNameCardViewController: YHBaseViewController {
view
.
addSubview
(
bgImgView
)
view
.
addSubview
(
bgImgView
)
bgImgView
.
snp
.
makeConstraints
{
make
in
bgImgView
.
snp
.
makeConstraints
{
make
in
make
.
left
.
right
.
top
.
equalToSuperview
()
make
.
left
.
right
.
top
.
equalToSuperview
()
make
.
height
.
equalTo
(
bgImgView
.
snp
.
width
)
.
multipliedBy
(
300.0
/
375.0
)
make
.
height
.
equalTo
(
bgImgView
.
snp
.
width
)
.
multipliedBy
(
800.0
/
375.0
)
}
view
.
addSubview
(
avatarImgView
)
avatarImgView
.
snp
.
makeConstraints
{
make
in
make
.
left
.
equalTo
(
20
)
make
.
top
.
equalTo
(
24
+
k_Height_NavigationtBarAndStatuBar
)
make
.
width
.
height
.
equalTo
(
68
)
}
view
.
addSubview
(
editBtn
)
editBtn
.
snp
.
makeConstraints
{
make
in
make
.
width
.
height
.
equalTo
(
20
)
make
.
centerY
.
equalTo
(
avatarImgView
)
make
.
right
.
equalTo
(
-
20
)
}
view
.
addSubview
(
nameTextView
)
nameTextView
.
snp
.
makeConstraints
{
make
in
make
.
left
.
equalTo
(
20
)
make
.
right
.
equalTo
(
-
20
)
make
.
top
.
equalTo
(
avatarImgView
.
snp
.
bottom
)
.
offset
(
12
)
}
view
.
addSubview
(
professionalLabel
)
professionalLabel
.
snp
.
makeConstraints
{
make
in
make
.
left
.
equalTo
(
20
)
make
.
right
.
equalTo
(
-
20
)
make
.
top
.
equalTo
(
nameTextView
.
snp
.
bottom
)
.
offset
(
4
)
}
view
.
addSubview
(
signatureLabel
)
signatureLabel
.
snp
.
makeConstraints
{
make
in
make
.
left
.
equalTo
(
20
)
make
.
right
.
equalTo
(
-
20
)
make
.
top
.
equalTo
(
professionalLabel
.
snp
.
bottom
)
.
offset
(
6
)
make
.
bottom
.
equalTo
(
-
32
)
}
}
return
view
return
view
}()
}()
...
@@ -120,11 +164,19 @@ class YHNewNameCardViewController: YHBaseViewController {
...
@@ -120,11 +164,19 @@ class YHNewNameCardViewController: YHBaseViewController {
}()
}()
lazy
var
childrenVC
:
[
YHBaseViewController
]
=
{
lazy
var
childrenVC
:
[
YHBaseViewController
]
=
{
let
vc1
=
YHNameCardHomePageViewController
()
let
vc2
=
YHNameCardHomePageViewController
()
let
vc2
=
YHNameCardHomePageViewController
()
let
vcs
:
[
YHBaseViewController
]
=
[
vc1
,
vc2
]
let
vcs
:
[
YHBaseViewController
]
=
[
homePageVC
,
vc2
]
return
vcs
return
vcs
}()
}()
lazy
var
homePageVC
:
YHNameCardHomePageViewController
=
{
let
vc
=
YHNameCardHomePageViewController
()
if
let
userId
=
YHLoginManager
.
shared
.
userModel
?
.
id
{
vc
.
userId
=
userId
}
return
vc
}()
lazy
var
bottomBtn
:
UIButton
=
{
lazy
var
bottomBtn
:
UIButton
=
{
let
btn
=
UIButton
(
type
:
.
custom
)
let
btn
=
UIButton
(
type
:
.
custom
)
...
@@ -143,54 +195,50 @@ class YHNewNameCardViewController: YHBaseViewController {
...
@@ -143,54 +195,50 @@ class YHNewNameCardViewController: YHBaseViewController {
let
rightButtonItem
=
UIBarButtonItem
(
image
:
UIImage
(
named
:
"name_card_authorize"
)?
.
withRenderingMode
(
.
alwaysOriginal
),
style
:
.
plain
,
target
:
self
,
action
:
#selector(
authorizeBtnClicked
)
)
let
rightButtonItem
=
UIBarButtonItem
(
image
:
UIImage
(
named
:
"name_card_authorize"
)?
.
withRenderingMode
(
.
alwaysOriginal
),
style
:
.
plain
,
target
:
self
,
action
:
#selector(
authorizeBtnClicked
)
)
gk_navRightBarButtonItem
=
rightButtonItem
gk_navRightBarButtonItem
=
rightButtonItem
gk_navItemRightSpace
=
16
gk_navItemRightSpace
=
16
NotificationCenter
.
default
.
addObserver
(
self
,
selector
:
#selector(
leaveTopOp
)
,
name
:
Notification
.
Name
(
rawValue
:
"leaveTop0"
),
object
:
nil
)
createUI
()
createUI
()
}
}
deinit
{
NotificationCenter
.
default
.
removeObserver
(
self
)
}
@objc
func
authorizeBtnClicked
()
{
@objc
func
authorizeBtnClicked
()
{
}
}
func
createUI
()
{
func
createUI
()
{
view
.
backgroundColor
=
.
white
view
.
backgroundColor
=
.
white
view
.
addSubview
(
headerView
)
view
.
addSubview
(
containerScrollView
)
headerView
.
snp
.
makeConstraints
{
make
in
containerScrollView
.
addSubview
(
containerView
)
view
.
addSubview
(
bottomBtn
)
containerScrollView
.
snp
.
makeConstraints
{
make
in
make
.
left
.
right
.
top
.
equalToSuperview
()
make
.
left
.
right
.
top
.
equalToSuperview
()
make
.
bottom
.
equalTo
(
bottomBtn
.
snp
.
top
)
.
offset
(
-
8
)
}
}
headerView
.
addSubview
(
avatarImgView
)
avatarImgView
.
snp
.
makeConstraints
{
make
in
containerView
.
snp
.
makeConstraints
{
make
in
make
.
left
.
equalTo
(
20
)
make
.
width
.
equalTo
(
KScreenWidth
)
make
.
top
.
equalTo
(
24
+
k_Height_NavigationtBarAndStatuBar
)
make
.
edges
.
equalToSuperview
()
make
.
width
.
height
.
equalTo
(
68
)
}
headerView
.
addSubview
(
editBtn
)
editBtn
.
snp
.
makeConstraints
{
make
in
make
.
width
.
height
.
equalTo
(
20
)
make
.
centerY
.
equalTo
(
avatarImgView
)
make
.
right
.
equalTo
(
-
20
)
}
headerView
.
addSubview
(
nameTextView
)
nameTextView
.
snp
.
makeConstraints
{
make
in
make
.
left
.
equalTo
(
20
)
make
.
right
.
equalTo
(
-
20
)
make
.
top
.
equalTo
(
avatarImgView
.
snp
.
bottom
)
.
offset
(
12
)
}
}
headerView
.
addSubview
(
professionalLabel
)
professionalLabel
.
snp
.
makeConstraints
{
make
in
bottomBtn
.
snp
.
makeConstraints
{
make
in
make
.
left
.
equalTo
(
20
)
make
.
left
.
equalTo
(
16
)
make
.
right
.
equalTo
(
-
20
)
make
.
right
.
equalTo
(
-
16
)
make
.
top
.
equalTo
(
nameTextView
.
snp
.
bottom
)
.
offset
(
4
)
make
.
height
.
equalTo
(
46
)
make
.
bottom
.
equalTo
(
-
k_Height_safeAreaInsetsBottom
()
-
10
)
}
}
headerView
.
addSubview
(
signatureLabel
)
signatureLabel
.
snp
.
makeConstraints
{
make
in
containerView
.
addSubview
(
headerView
)
make
.
left
.
equalTo
(
20
)
headerView
.
snp
.
makeConstraints
{
make
in
make
.
right
.
equalTo
(
-
20
)
make
.
left
.
right
.
top
.
equalToSuperview
()
make
.
top
.
equalTo
(
professionalLabel
.
snp
.
bottom
)
.
offset
(
6
)
make
.
bottom
.
equalTo
(
-
32
)
}
}
segmentedView
.
dataSource
=
segmentedDataSource
segmentedView
.
dataSource
=
segmentedDataSource
segmentedView
.
delegate
=
self
segmentedView
.
delegate
=
self
v
iew
.
addSubview
(
segmentedView
)
containerV
iew
.
addSubview
(
segmentedView
)
segmentedView
.
snp
.
makeConstraints
{
make
in
segmentedView
.
snp
.
makeConstraints
{
make
in
make
.
left
.
right
.
equalToSuperview
()
make
.
left
.
right
.
equalToSuperview
()
make
.
top
.
equalTo
(
headerView
.
snp
.
bottom
)
make
.
top
.
equalTo
(
headerView
.
snp
.
bottom
)
...
@@ -198,20 +246,13 @@ class YHNewNameCardViewController: YHBaseViewController {
...
@@ -198,20 +246,13 @@ class YHNewNameCardViewController: YHBaseViewController {
}
}
segmentedView
.
listContainer
=
listContainerView
segmentedView
.
listContainer
=
listContainerView
view
.
addSubview
(
listContainerView
)
containerView
.
addSubview
(
listContainerView
)
view
.
addSubview
(
bottomBtn
)
listContainerView
.
snp
.
makeConstraints
{
make
in
listContainerView
.
snp
.
makeConstraints
{
make
in
make
.
left
.
right
.
equalToSuperview
()
make
.
left
.
right
.
equalToSuperview
()
make
.
top
.
equalTo
(
segmentedView
.
snp
.
bottom
)
.
offset
(
0.0
)
make
.
top
.
equalTo
(
segmentedView
.
snp
.
bottom
)
.
offset
(
0.0
)
make
.
bottom
.
equalTo
(
bottomBtn
.
snp
.
top
)
.
offset
(
-
8
)
make
.
height
.
equalTo
(
KScreenHeight
-
k_Height_NavigationtBarAndStatuBar
-
30
-
k_Height_safeAreaInsetsBottom
()
-
46
-
10
)
}
make
.
bottom
.
equalTo
(
containerView
)
bottomBtn
.
snp
.
makeConstraints
{
make
in
make
.
left
.
equalTo
(
16
)
make
.
right
.
equalTo
(
-
16
)
make
.
height
.
equalTo
(
46
)
make
.
bottom
.
equalTo
(
-
k_Height_safeAreaInsetsBottom
()
-
10
)
}
}
// 分类Title
// 分类Title
...
@@ -243,7 +284,7 @@ class YHNewNameCardViewController: YHBaseViewController {
...
@@ -243,7 +284,7 @@ class YHNewNameCardViewController: YHBaseViewController {
// self.signImgV.isHidden = !self.userModel.isSigned
// self.signImgV.isHidden = !self.userModel.isSigned
var
name
:
ASAttributedString
=
.
init
(
string
:
"阿萨德减肥啦拒收到付垃圾啊送达了开发机山卡拉"
,
.
font
(
UIFont
.
PFSC_M
(
ofSize
:
21
)),
.
foreground
(
UIColor
.
brandGrayColor8
))
let
name
:
ASAttributedString
=
.
init
(
string
:
"阿萨德减肥啦拒收到付垃圾啊送达了开发机山卡拉"
,
.
font
(
UIFont
.
PFSC_M
(
ofSize
:
21
)),
.
foreground
(
UIColor
.
brandGrayColor8
))
let
cityTag
:
ASAttributedString
=
"
\(
.
view
(
cityLabel
,
.
original
(
.
center
))
)
"
let
cityTag
:
ASAttributedString
=
"
\(
.
view
(
cityLabel
,
.
original
(
.
center
))
)
"
let
zodiacTag
:
ASAttributedString
=
"
\(
.
view
(
zodiacLabel
,
.
original
(
.
center
))
)
"
let
zodiacTag
:
ASAttributedString
=
"
\(
.
view
(
zodiacLabel
,
.
original
(
.
center
))
)
"
...
@@ -260,7 +301,7 @@ class YHNewNameCardViewController: YHBaseViewController {
...
@@ -260,7 +301,7 @@ class YHNewNameCardViewController: YHBaseViewController {
}
}
}
}
extension
YHN
ewNameCard
ViewController
:
JXSegmentedViewDelegate
{
extension
YHN
ameCardContainer
ViewController
:
JXSegmentedViewDelegate
{
func
segmentedView
(
_
segmentedView
:
JXSegmentedView
,
didSelectedItemAt
index
:
Int
)
{
func
segmentedView
(
_
segmentedView
:
JXSegmentedView
,
didSelectedItemAt
index
:
Int
)
{
}
}
...
@@ -268,7 +309,7 @@ extension YHNewNameCardViewController: JXSegmentedViewDelegate {
...
@@ -268,7 +309,7 @@ extension YHNewNameCardViewController: JXSegmentedViewDelegate {
}
}
}
}
extension
YHN
ewNameCard
ViewController
:
JXSegmentedListContainerViewDataSource
{
extension
YHN
ameCardContainer
ViewController
:
JXSegmentedListContainerViewDataSource
{
func
numberOfLists
(
in
listContainerView
:
JXSegmentedListContainerView
)
->
Int
{
func
numberOfLists
(
in
listContainerView
:
JXSegmentedListContainerView
)
->
Int
{
if
let
titleDataSource
=
segmentedView
.
dataSource
as?
JXSegmentedBaseDataSource
{
if
let
titleDataSource
=
segmentedView
.
dataSource
as?
JXSegmentedBaseDataSource
{
return
titleDataSource
.
dataSource
.
count
return
titleDataSource
.
dataSource
.
count
...
@@ -283,3 +324,41 @@ extension YHNewNameCardViewController: JXSegmentedListContainerViewDataSource {
...
@@ -283,3 +324,41 @@ extension YHNewNameCardViewController: JXSegmentedListContainerViewDataSource {
return
vc
return
vc
}
}
}
}
extension
YHNameCardContainerViewController
:
UIScrollViewDelegate
{
func
scrollViewDidScroll
(
_
scrollView
:
UIScrollView
)
{
if
scrollView
.
contentOffset
.
y
>
0
{
var
alpha
=
scrollView
.
contentOffset
.
y
/
(
24
)
if
alpha
>
1.0
{
alpha
=
1.0
}
gk_navBarAlpha
=
alpha
gk_navBackgroundColor
=
.
white
gk_navTitle
=
"我的名片"
}
else
{
gk_navBarAlpha
=
0.0
gk_navBackgroundColor
=
.
clear
gk_navTitle
=
nil
}
// 吸顶
let
fixOffSetY
:
CGFloat
=
self
.
headerView
.
height
-
k_Height_NavigationtBarAndStatuBar
if
scrollView
.
contentOffset
.
y
>=
fixOffSetY
{
scrollView
.
contentOffset
=
CGPoint
(
x
:
0
,
y
:
fixOffSetY
)
scrollView
.
isScrollEnabled
=
false
homePageVC
.
vcCanScroll
=
true
}
else
{
containerScrollView
.
isScrollEnabled
=
true
homePageVC
.
vcCanScroll
=
false
}
}
}
extension
YHNameCardContainerViewController
{
@objc
func
leaveTopOp
()
{
containerScrollView
.
isScrollEnabled
=
true
}
}
galaxy/galaxy/Classes/Modules/Mine(我的)/NameCard(名片)/C/YHNameCardHomePageViewController.swift
View file @
59b41db5
...
@@ -11,17 +11,249 @@ import JXSegmentedView
...
@@ -11,17 +11,249 @@ import JXSegmentedView
class
YHNameCardHomePageViewController
:
YHBaseViewController
{
class
YHNameCardHomePageViewController
:
YHBaseViewController
{
var
userId
:
String
=
""
var
cardInfoArr
:
[
YHUserNameCardInfo
]
=
[]
let
viewModel
=
YHMatchUserViewModel
()
var
vcCanScroll
:
Bool
=
false
{
didSet
{
tableView
.
isScrollEnabled
=
vcCanScroll
}
}
var
isCurrentUser
:
Bool
{
get
{
return
(
!
self
.
userId
.
isEmpty
&&
self
.
userId
==
YHLoginManager
.
shared
.
userModel
?
.
id
)
}
}
lazy
var
tableView
:
UITableView
=
{
let
tableView
=
UITableView
(
frame
:
.
zero
,
style
:
.
grouped
)
tableView
.
estimatedSectionHeaderHeight
=
100
tableView
.
showsVerticalScrollIndicator
=
false
tableView
.
separatorStyle
=
.
none
tableView
.
delegate
=
self
tableView
.
dataSource
=
self
tableView
.
backgroundColor
=
.
clear
tableView
.
register
(
UITableViewCell
.
self
,
forCellReuseIdentifier
:
"UITableViewCell"
)
tableView
.
register
(
YHMyNameCardAvatarInfoCell
.
self
,
forCellReuseIdentifier
:
YHMyNameCardAvatarInfoCell
.
cellReuseIdentifier
)
tableView
.
register
(
YHMyIntroductionCell
.
self
,
forCellReuseIdentifier
:
YHMyIntroductionCell
.
cellReuseIdentifier
)
tableView
.
register
(
YHMyEducationCell
.
self
,
forCellReuseIdentifier
:
YHMyEducationCell
.
cellReuseIdentifier
)
tableView
.
register
(
YHMyWorkExperienceCell
.
self
,
forCellReuseIdentifier
:
YHMyWorkExperienceCell
.
cellReuseIdentifier
)
tableView
.
register
(
YHMyInterestTopicCell
.
self
,
forCellReuseIdentifier
:
YHMyInterestTopicCell
.
cellReuseIdentifier
)
tableView
.
contentInset
=
UIEdgeInsets
(
top
:
41
,
left
:
0
,
bottom
:
0
,
right
:
0
)
return
tableView
}()
deinit
{
NotificationCenter
.
default
.
removeObserver
(
self
)
}
override
func
viewDidLoad
()
{
override
func
viewDidLoad
()
{
super
.
viewDidLoad
()
super
.
viewDidLoad
()
view
.
backgroundColor
=
.
white
view
.
backgroundColor
=
.
white
gk_navigationBar
.
isHidden
=
true
gk_navigationBar
.
isHidden
=
true
createUI
()
createUI
()
requestNameCardInfo
()
}
}
func
createUI
()
{
func
createUI
()
{
vcCanScroll
=
false
view
.
addSubview
(
self
.
tableView
)
self
.
tableView
.
snp
.
makeConstraints
{
make
in
make
.
left
.
equalTo
(
0
)
make
.
right
.
equalTo
(
0
)
make
.
bottom
.
equalToSuperview
()
make
.
top
.
equalToSuperview
()
}
}
func
requestNameCardInfo
()
{
self
.
viewModel
.
getUserNameCardInfo
(
uid
:
self
.
userId
)
{
_
,
_
in
self
.
cardInfoArr
.
removeAll
()
// 个人简介信息
var
isShowIntroduce
=
true
if
!
self
.
isCurrentUser
{
isShowIntroduce
=
!
self
.
viewModel
.
nameCardInfo
.
bio
.
isEmpty
}
if
isShowIntroduce
{
let
model2
=
YHUserNameCardInfo
()
model2
.
type
=
.
introduce
model2
.
isCurrentUser
=
self
.
isCurrentUser
model2
.
updateModel
(
self
.
viewModel
.
nameCardInfo
)
self
.
cardInfoArr
.
append
(
model2
)
}
// 教育经历信息
var
isShowEducation
=
true
if
!
self
.
isCurrentUser
{
isShowEducation
=
!
self
.
viewModel
.
nameCardInfo
.
isHiddenEducation
if
isShowEducation
{
isShowEducation
=
(
!
self
.
viewModel
.
nameCardInfo
.
college
.
isEmpty
||
!
self
.
viewModel
.
nameCardInfo
.
background
.
isEmpty
||
!
self
.
viewModel
.
nameCardInfo
.
major
.
isEmpty
)
}
}
if
isShowEducation
{
let
model3
=
YHUserNameCardInfo
()
model3
.
type
=
.
education
model3
.
isCurrentUser
=
self
.
isCurrentUser
model3
.
updateModel
(
self
.
viewModel
.
nameCardInfo
)
self
.
cardInfoArr
.
append
(
model3
)
}
// 工作经历信息
var
isShowWorkExperience
=
true
if
!
self
.
isCurrentUser
{
isShowWorkExperience
=
!
self
.
viewModel
.
nameCardInfo
.
isHiddenWorkExperience
if
isShowWorkExperience
{
isShowWorkExperience
=
(
!
self
.
viewModel
.
nameCardInfo
.
companyName
.
isEmpty
||
!
self
.
viewModel
.
nameCardInfo
.
position
.
isEmpty
||
!
self
.
viewModel
.
nameCardInfo
.
industry
.
isEmpty
)
}
}
if
isShowWorkExperience
{
let
model4
=
YHUserNameCardInfo
()
model4
.
type
=
.
workExperience
model4
.
isCurrentUser
=
self
.
isCurrentUser
model4
.
updateModel
(
self
.
viewModel
.
nameCardInfo
)
self
.
cardInfoArr
.
append
(
model4
)
}
// 荣誉奖项信息
var
isShowHonor
=
true
if
!
self
.
isCurrentUser
{
isShowHonor
=
!
self
.
viewModel
.
nameCardInfo
.
honor
.
isEmpty
}
if
isShowHonor
{
let
model5
=
YHUserNameCardInfo
()
model5
.
type
=
.
honor
model5
.
isCurrentUser
=
self
.
isCurrentUser
model5
.
updateModel
(
self
.
viewModel
.
nameCardInfo
)
self
.
cardInfoArr
.
append
(
model5
)
}
// 兴趣话题
var
isShowTopics
=
true
if
!
self
.
isCurrentUser
{
isShowTopics
=
self
.
viewModel
.
nameCardInfo
.
topics
.
count
>
0
}
if
isShowTopics
{
let
model6
=
YHUserNameCardInfo
()
model6
.
type
=
.
topics
model6
.
isCurrentUser
=
self
.
isCurrentUser
model6
.
updateModel
(
self
.
viewModel
.
nameCardInfo
)
self
.
cardInfoArr
.
append
(
model6
)
}
self
.
tableView
.
reloadData
()
}
}
}
extension
YHNameCardHomePageViewController
:
UITableViewDelegate
,
UITableViewDataSource
{
func
numberOfSections
(
in
tableView
:
UITableView
)
->
Int
{
return
self
.
cardInfoArr
.
count
}
func
tableView
(
_
tableView
:
UITableView
,
numberOfRowsInSection
section
:
Int
)
->
Int
{
return
1
}
func
tableView
(
_
tableView
:
UITableView
,
cellForRowAt
indexPath
:
IndexPath
)
->
UITableViewCell
{
if
0
<=
indexPath
.
section
&&
indexPath
.
section
<
self
.
cardInfoArr
.
count
{
let
cardInfo
=
self
.
cardInfoArr
[
indexPath
.
section
]
if
cardInfo
.
type
==
.
honor
||
cardInfo
.
type
==
.
introduce
{
guard
let
introCell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
YHMyIntroductionCell
.
cellReuseIdentifier
,
for
:
indexPath
)
as?
YHMyIntroductionCell
else
{
return
UITableViewCell
()
}
introCell
.
userModel
=
cardInfo
introCell
.
editBlock
=
{
[
weak
self
]
in
guard
let
self
=
self
else
{
return
}
if
cardInfo
.
type
==
.
honor
{
let
vc
=
YHEditHonorViewController
()
vc
.
model
=
self
.
viewModel
.
nameCardInfo
self
.
navigationController
?
.
pushViewController
(
vc
)
}
else
if
cardInfo
.
type
==
.
introduce
{
let
vc
=
YHEditPersonalProfileViewController
()
vc
.
model
=
self
.
viewModel
.
nameCardInfo
self
.
navigationController
?
.
pushViewController
(
vc
)
}
}
return
introCell
}
if
cardInfo
.
type
==
.
education
{
guard
let
eduCell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
YHMyEducationCell
.
cellReuseIdentifier
,
for
:
indexPath
)
as?
YHMyEducationCell
else
{
return
UITableViewCell
()
}
eduCell
.
userModel
=
cardInfo
eduCell
.
hiddenBtnBlock
=
{
[
weak
self
]
in
guard
let
self
=
self
else
{
return
}
YHWholeScreenTipsView
.
show
(
type
:
.
nameCardEducation
,
targetView
:
eduCell
.
hiddenBtn
)
}
eduCell
.
editBlock
=
{
[
weak
self
]
in
guard
let
self
=
self
else
{
return
}
let
vc
=
YHEditSchoolViewController
()
vc
.
model
=
self
.
viewModel
.
nameCardInfo
self
.
navigationController
?
.
pushViewController
(
vc
)
}
return
eduCell
}
if
cardInfo
.
type
==
.
workExperience
{
guard
let
workCell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
YHMyWorkExperienceCell
.
cellReuseIdentifier
,
for
:
indexPath
)
as?
YHMyWorkExperienceCell
else
{
return
UITableViewCell
()
}
workCell
.
userModel
=
cardInfo
workCell
.
hiddenBtnBlock
=
{
[
weak
self
]
in
guard
let
self
=
self
else
{
return
}
YHWholeScreenTipsView
.
show
(
type
:
.
nameCardWorkExperience
,
targetView
:
workCell
.
hiddenBtn
)
}
workCell
.
editBlock
=
{
[
weak
self
]
in
guard
let
self
=
self
else
{
return
}
let
vc
=
YHEditWorkViewController
()
vc
.
model
=
self
.
viewModel
.
nameCardInfo
self
.
navigationController
?
.
pushViewController
(
vc
)
}
return
workCell
}
if
cardInfo
.
type
==
.
topics
{
guard
let
topicCell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
YHMyInterestTopicCell
.
cellReuseIdentifier
,
for
:
indexPath
)
as?
YHMyInterestTopicCell
else
{
return
UITableViewCell
()
}
topicCell
.
userModel
=
cardInfo
topicCell
.
editBlock
=
{
[
weak
self
]
in
guard
let
self
=
self
else
{
return
}
let
vc
=
YHEditInterestViewController
()
vc
.
model
=
self
.
viewModel
.
nameCardInfo
self
.
navigationController
?
.
pushViewController
(
vc
)
}
return
topicCell
}
}
let
defaultCell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
"UITableViewCell"
,
for
:
indexPath
)
return
defaultCell
}
func
tableView
(
_
tableView
:
UITableView
,
heightForRowAt
indexPath
:
IndexPath
)
->
CGFloat
{
return
UITableView
.
automaticDimension
}
func
tableView
(
_
tableView
:
UITableView
,
didSelectRowAt
indexPath
:
IndexPath
)
{
}
}
func
tableView
(
_
tableView
:
UITableView
,
heightForFooterInSection
section
:
Int
)
->
CGFloat
{
return
16.0
}
func
tableView
(
_
tableView
:
UITableView
,
viewForFooterInSection
section
:
Int
)
->
UIView
?
{
let
view
=
UIView
()
return
view
}
func
tableView
(
_
tableView
:
UITableView
,
heightForHeaderInSection
section
:
Int
)
->
CGFloat
{
return
1.0
}
}
}
extension
YHNameCardHomePageViewController
:
JXSegmentedListContainerViewListDelegate
{
extension
YHNameCardHomePageViewController
:
JXSegmentedListContainerViewListDelegate
{
...
@@ -29,3 +261,21 @@ extension YHNameCardHomePageViewController: JXSegmentedListContainerViewListDele
...
@@ -29,3 +261,21 @@ extension YHNameCardHomePageViewController: JXSegmentedListContainerViewListDele
return
view
return
view
}
}
}
}
extension
YHNameCardHomePageViewController
:
UIScrollViewDelegate
{
// 控制滑动交互
func
scrollViewDidScroll
(
_
scrollView
:
UIScrollView
)
{
let
scrollViewSet
:
CGFloat
=
scrollView
.
contentOffset
.
y
if
vcCanScroll
==
false
{
// 不能滚动时
scrollView
.
contentOffset
=
CGPoint
(
x
:
0
,
y
:
0
)
}
else
{
if
scrollViewSet
<=
0
{
scrollView
.
contentOffset
=
CGPoint
(
x
:
0
,
y
:
0
)
vcCanScroll
=
false
NotificationCenter
.
default
.
post
(
name
:
Notification
.
Name
(
rawValue
:
"leaveTop0"
),
object
:
nil
)
}
else
{
scrollView
.
contentOffset
=
CGPoint
(
x
:
0
,
y
:
scrollViewSet
)
}
}
}
}
galaxy/galaxy/Res/Assets.xcassets/nameCard/name_card_bg.imageset/Contents.json
View file @
59b41db5
...
@@ -5,12 +5,12 @@
...
@@ -5,12 +5,12 @@
"scale"
:
"1x"
"scale"
:
"1x"
},
},
{
{
"filename"
:
"头部背景图.png"
,
"filename"
:
"头部背景图
-1
.png"
,
"idiom"
:
"universal"
,
"idiom"
:
"universal"
,
"scale"
:
"2x"
"scale"
:
"2x"
},
},
{
{
"filename"
:
"头部背景图
-
1.png"
,
"filename"
:
"头部背景图
1.png"
,
"idiom"
:
"universal"
,
"idiom"
:
"universal"
,
"scale"
:
"3x"
"scale"
:
"3x"
}
}
...
...
galaxy/galaxy/Res/Assets.xcassets/nameCard/name_card_bg.imageset/头部背景图 1.png
0 → 100644
View file @
59b41db5
120 KB
galaxy/galaxy/Res/Assets.xcassets/nameCard/name_card_bg.imageset/头部背景图-1.png
View replaced file @
129c8eff
View file @
59b41db5
110 KB
|
W:
|
H:
60.7 KB
|
W:
|
H:
2-up
Swipe
Onion skin
galaxy/galaxy/Res/Assets.xcassets/nameCard/name_card_bg.imageset/头部背景图.png
deleted
100644 → 0
View file @
129c8eff
55 KB
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