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
d99aca6e
Commit
d99aca6e
authored
Jun 20, 2024
by
Steven杜宇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
// 卡片点击逻辑
parent
5ec6348c
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
83 additions
and
17 deletions
+83
-17
project.pbxproj
galaxy/galaxy.xcodeproj/project.pbxproj
+4
-0
YHMatchPeopleViewController.swift
...Modules/Community(社区)/C/YHMatchPeopleViewController.swift
+46
-2
YHPeopleCardModel.swift
...y/Classes/Modules/Community(社区)/M/YHPeopleCardModel.swift
+13
-0
YHNameCardInfoView.swift
.../Classes/Modules/Community(社区)/V/YHNameCardInfoView.swift
+16
-0
YHPeopleMatchNoDataView.swift
...ses/Modules/Community(社区)/V/YHPeopleMatchNoDataView.swift
+4
-15
No files found.
galaxy/galaxy.xcodeproj/project.pbxproj
View file @
d99aca6e
...
...
@@ -338,6 +338,7 @@
04FA8B302C0874CA00ABE43F
/* YHOneKeyLoginViewModel.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
04FA8B2F2C0874CA00ABE43F
/* YHOneKeyLoginViewModel.swift */
;
};
04FA8B332C0880A100ABE43F
/* YHAppleLoginViewModel.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
04FA8B322C0880A100ABE43F
/* YHAppleLoginViewModel.swift */
;
};
04FB01CE2C23DDBD0040115D
/* YHPeopleMatchNoDataView.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
04FB01CD2C23DDBD0040115D
/* YHPeopleMatchNoDataView.swift */
;
};
04FB01D02C23FA420040115D
/* YHPeopleCardModel.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
04FB01CF2C23FA420040115D
/* YHPeopleCardModel.swift */
;
};
04FD85662C2124AF00BEF9C5
/* YHMyNameCardViewController.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
04FD85652C2124AF00BEF9C5
/* YHMyNameCardViewController.swift */
;
};
04FD85682C21277800BEF9C5
/* YHMyNameCardAvatarInfoCell.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
04FD85672C21277800BEF9C5
/* YHMyNameCardAvatarInfoCell.swift */
;
};
04FD856A2C21362300BEF9C5
/* YHMyIntroductionCell.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
04FD85692C21362300BEF9C5
/* YHMyIntroductionCell.swift */
;
};
...
...
@@ -870,6 +871,7 @@
04FA8B2F2C0874CA00ABE43F
/* YHOneKeyLoginViewModel.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHOneKeyLoginViewModel.swift
;
sourceTree
=
"<group>"
;
};
04FA8B322C0880A100ABE43F
/* YHAppleLoginViewModel.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHAppleLoginViewModel.swift
;
sourceTree
=
"<group>"
;
};
04FB01CD2C23DDBD0040115D
/* YHPeopleMatchNoDataView.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHPeopleMatchNoDataView.swift
;
sourceTree
=
"<group>"
;
};
04FB01CF2C23FA420040115D
/* YHPeopleCardModel.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHPeopleCardModel.swift
;
sourceTree
=
"<group>"
;
};
04FD85652C2124AF00BEF9C5
/* YHMyNameCardViewController.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHMyNameCardViewController.swift
;
sourceTree
=
"<group>"
;
};
04FD85672C21277800BEF9C5
/* YHMyNameCardAvatarInfoCell.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHMyNameCardAvatarInfoCell.swift
;
sourceTree
=
"<group>"
;
};
04FD85692C21362300BEF9C5
/* YHMyIntroductionCell.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHMyIntroductionCell.swift
;
sourceTree
=
"<group>"
;
};
...
...
@@ -1211,6 +1213,7 @@
isa
=
PBXGroup
;
children
=
(
044D0BFD2C21649A00C5CF5E
/* YHUserInformationModel.swift */
,
04FB01CF2C23FA420040115D
/* YHPeopleCardModel.swift */
,
);
path
=
M
;
sourceTree
=
"<group>"
;
...
...
@@ -3134,6 +3137,7 @@
045EEED92B9F171A0022A143
/* YHEducationDetailVC.swift in Sources */
,
045EEF1A2B9F171A0022A143
/* YHAddressViewController.swift in Sources */
,
A5C382CA2B5E1F4C00C5E65C
/* YHLoginTipsView.swift in Sources */
,
04FB01D02C23FA420040115D
/* YHPeopleCardModel.swift in Sources */
,
045EEEE92B9F171A0022A143
/* YHFamilyRequestViewModel.swift in Sources */
,
04F957472C203033003C631C
/* YHMyGoodFriendsVC.swift in Sources */
,
044867B42BA1953B00DFAD4A
/* YHCertificateFilterView.swift in Sources */
,
...
...
galaxy/galaxy/Classes/Modules/Community(社区)/C/YHMatchPeopleViewController.swift
View file @
d99aca6e
...
...
@@ -11,7 +11,7 @@ import DragCardContainer
class
YHMatchPeopleViewController
:
YHBaseViewController
{
var
matchCardsArr
:[
String
]
=
[
""
,
""
,
""
,
""
,
""
,
""
,
""
,
""
,
""
,
""
,
""
,
""
,
""
,
""
,
""
,
""
,
""
,
""
]
var
matchCardsArr
:[
YHPeopleCardModel
]
=
[
YHPeopleCardModel
(),
YHPeopleCardModel
(),
YHPeopleCardModel
(),
YHPeopleCardModel
(),
YHPeopleCardModel
()
]
lazy
var
bgImgV
:
UIImageView
=
{
let
bg
=
UIImageView
(
image
:
UIImage
(
named
:
"people_match_result_bg"
))
...
...
@@ -66,9 +66,29 @@ class YHMatchPeopleViewController: YHBaseViewController {
return
btn
}()
lazy
var
rematchBtn
:
UIButton
=
{
let
btn
=
UIButton
()
btn
.
isHidden
=
true
btn
.
setTitle
(
"再次智能匹配"
,
for
:
.
normal
)
btn
.
backgroundColor
=
.
brandMainColor
btn
.
setTitleColor
(
.
white
,
for
:
.
normal
)
btn
.
titleLabel
?
.
font
=
.
PFSC_M
(
ofSize
:
15
)
btn
.
layer
.
cornerRadius
=
3
btn
.
addTarget
(
self
,
action
:
#selector(
didRematchBtnClicked
)
,
for
:
.
touchUpInside
)
return
btn
}()
lazy
var
noDataView
:
YHPeopleMatchNoDataView
=
{
let
view
=
YHPeopleMatchNoDataView
.
createView
()
view
.
isHidden
=
true
view
.
relookBlock
=
{
[
weak
self
]
in
guard
let
self
=
self
else
{
return
}
self
.
rematchBtn
.
isHidden
=
true
self
.
changeBtn
.
isHidden
=
false
self
.
myCardBtn
.
isHidden
=
false
self
.
cardContainer
.
reloadData
(
forceReset
:
true
)
}
return
view
}()
...
...
@@ -125,6 +145,10 @@ class YHMatchPeopleViewController: YHBaseViewController {
self
.
navigationController
?
.
pushViewController
(
vc
)
}
@objc
func
didRematchBtnClicked
()
{
}
func
createUI
()
{
gk_navigationBar
.
isHidden
=
true
...
...
@@ -147,6 +171,7 @@ class YHMatchPeopleViewController: YHBaseViewController {
self
.
view
.
addSubview
(
self
.
cardActionView
)
self
.
cardActionView
.
addSubview
(
cardContainer
)
self
.
view
.
addSubview
(
self
.
noDataView
)
self
.
view
.
addSubview
(
self
.
rematchBtn
)
self
.
bgImgV
.
snp
.
makeConstraints
{
make
in
make
.
edges
.
equalToSuperview
()
...
...
@@ -211,6 +236,13 @@ class YHMatchPeopleViewController: YHBaseViewController {
make
.
top
.
equalTo
(
self
.
topLabel
.
snp
.
bottom
)
.
offset
(
120
)
make
.
height
.
equalTo
(
YHPeopleMatchNoDataView
.
height
)
}
self
.
rematchBtn
.
snp
.
makeConstraints
{
make
in
make
.
left
.
equalTo
(
24
)
make
.
right
.
equalTo
(
-
24
)
make
.
height
.
equalTo
(
48
)
make
.
bottom
.
equalTo
(
-
135
)
}
animaiton
()
}
...
...
@@ -266,6 +298,13 @@ extension YHMatchPeopleViewController: DragCardDataSource {
let
cardView
:
YHNameCardInfoView
=
YHNameCardInfoView
.
createCardView
()
cardView
.
allowedDirection
=
self
.
allowedDirection
cardView
.
tag
=
1000
+
index
if
0
<=
index
&&
index
<
self
.
matchCardsArr
.
count
{
let
cardModel
=
self
.
matchCardsArr
[
index
]
cardView
.
cardModel
=
cardModel
cardView
.
sendBlock
=
{
cardModel
.
isSend
=
true
}
}
return
cardView
}
}
...
...
@@ -294,7 +333,12 @@ extension YHMatchPeopleViewController: DragCardDelegate {
public
func
dragCard
(
_
dragCard
:
DragCardContainer
,
didRemovedLast
cardView
:
DragCardView
)
{
print
(
"didRemovedLast"
)
self
.
noDataView
.
isHidden
=
false
DispatchQueue
.
main
.
asyncAfter
(
deadline
:
.
now
()
+
0.5
,
execute
:
{
self
.
noDataView
.
isHidden
=
false
self
.
rematchBtn
.
isHidden
=
false
self
.
changeBtn
.
isHidden
=
true
self
.
myCardBtn
.
isHidden
=
true
})
}
public
func
dragCard
(
_
dragCard
:
DragCardContainer
,
didSelectTopCardAt
index
:
Int
,
with
cardView
:
DragCardView
)
{
...
...
galaxy/galaxy/Classes/Modules/Community(社区)/M/YHPeopleCardModel.swift
0 → 100644
View file @
d99aca6e
//
// YHPeopleCardModel.swift
// galaxy
//
// Created by edy on 2024/6/20.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import
UIKit
class
YHPeopleCardModel
:
NSObject
{
var
isSend
:
Bool
=
false
}
galaxy/galaxy/Classes/Modules/Community(社区)/V/YHNameCardInfoView.swift
View file @
d99aca6e
...
...
@@ -13,6 +13,21 @@ class YHNameCardInfoView: DragCardView {
static
let
height
=
456.0
static
let
width
=
KScreenWidth
-
36.0
*
2
var
sendBlock
:(()
->
())?
var
cardModel
:
YHPeopleCardModel
=
YHPeopleCardModel
()
{
didSet
{
if
self
.
cardModel
.
isSend
{
self
.
bottomBtn
.
setTitle
(
"已发送好友申请"
,
for
:
.
normal
)
self
.
bottomBtn
.
backgroundColor
=
.
brandMainColor30
self
.
bottomBtn
.
isUserInteractionEnabled
=
false
}
else
{
self
.
bottomBtn
.
setTitle
(
"交换名片"
,
for
:
.
normal
)
self
.
bottomBtn
.
backgroundColor
=
.
brandMainColor
self
.
bottomBtn
.
isUserInteractionEnabled
=
true
}
}
}
lazy
var
bgImgV
:
UIImageView
=
{
let
view
=
UIImageView
()
...
...
@@ -97,6 +112,7 @@ class YHNameCardInfoView: DragCardView {
self
.
bottomBtn
.
setTitle
(
"已发送好友申请"
,
for
:
.
normal
)
self
.
bottomBtn
.
backgroundColor
=
.
brandMainColor30
self
.
bottomBtn
.
isUserInteractionEnabled
=
false
self
.
sendBlock
?()
}
view
.
show
()
}
...
...
galaxy/galaxy/Classes/Modules/Community(社区)/V/YHPeopleMatchNoDataView.swift
View file @
d99aca6e
...
...
@@ -12,6 +12,8 @@ class YHPeopleMatchNoDataView: UIView {
static
let
height
=
198.0
var
relookBlock
:(()
->
())?
lazy
var
bgImgView
:
UIImageView
=
{
let
view
=
UIImageView
(
image
:
UIImage
(
named
:
"people_match_no_data_bg"
))
return
view
...
...
@@ -26,17 +28,6 @@ class YHPeopleMatchNoDataView: UIView {
return
label
}()
lazy
var
rematchBtn
:
UIButton
=
{
let
btn
=
UIButton
()
btn
.
setTitle
(
"再次智能匹配"
,
for
:
.
normal
)
btn
.
backgroundColor
=
.
brandMainColor
btn
.
setTitleColor
(
.
white
,
for
:
.
normal
)
btn
.
titleLabel
?
.
font
=
.
PFSC_M
(
ofSize
:
15
)
btn
.
layer
.
cornerRadius
=
3
btn
.
addTarget
(
self
,
action
:
#selector(
didRematchBtnClicked
)
,
for
:
.
touchUpInside
)
return
btn
}()
lazy
var
relookBtn
:
UIButton
=
{
let
btn
=
UIButton
()
btn
.
setTitle
(
"重新查看"
,
for
:
.
normal
)
...
...
@@ -50,12 +41,10 @@ class YHPeopleMatchNoDataView: UIView {
return
btn
}()
@objc
func
didRematchBtnClicked
()
{
}
@objc
func
didRelookBtnClicked
()
{
self
.
isHidden
=
true
self
.
relookBlock
?()
}
static
func
createView
()
->
YHPeopleMatchNoDataView
{
...
...
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