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
01a550b6
Commit
01a550b6
authored
Jun 27, 2024
by
Steven杜宇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
// 人脉
parent
a408d40d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
12 deletions
+15
-12
YHMatchResultListViewController.swift
...les/Community(社区)/C/YHMatchResultListViewController.swift
+15
-12
No files found.
galaxy/galaxy/Classes/Modules/Community(社区)/C/YHMatchResultListViewController.swift
View file @
01a550b6
...
...
@@ -17,6 +17,8 @@ class YHMatchResultListViewController: YHBaseViewController {
let
viewModel
=
YHMatchUserViewModel
()
let
loginViewModel
=
YHLoginViewModel
()
let
secondCardColor
=
UIColor
.
init
(
hex
:
0xE7EBF3
)
let
thirdCardColor
=
UIColor
.
init
(
hex
:
0xC4CEE3
)
var
matchUsersArr
:[
YHMatchUserInfo
?]
=
[]
weak
var
delegate
:
YHMatchProtocol
?
lazy
var
bgImgV
:
UIImageView
=
{
...
...
@@ -284,11 +286,13 @@ class YHMatchResultListViewController: YHBaseViewController {
func
animaiton
()
{
let
gap
=
8.0
let
view3
=
YHNameCardInfoView
.
createCardView
()
view3
.
backgroundColor
=
UIColor
.
init
(
hex
:
0xC4CEE3
)
view3
.
backgroundColor
=
self
.
thirdCardColor
view3
.
y
=
-
YHNameCardInfoView
.
height
view3
.
x
=
36
+
10
view3
.
width
=
YHNameCardInfoView
.
width
-
5
*
4
view3
.
x
=
36
+
gap
*
2
view3
.
width
=
YHNameCardInfoView
.
width
-
gap
*
4
view3
.
isHidden
=
self
.
matchUsersArr
.
count
<
3
if
self
.
matchUsersArr
.
count
>=
3
{
if
let
user
=
self
.
matchUsersArr
[
2
]
{
...
...
@@ -298,10 +302,10 @@ class YHMatchResultListViewController: YHBaseViewController {
self
.
view
.
addSubview
(
view3
)
let
view2
=
YHNameCardInfoView
.
createCardView
()
view2
.
backgroundColor
=
UIColor
.
init
(
hex
:
0xE7EBF3
)
view2
.
backgroundColor
=
self
.
secondCardColor
view2
.
y
=
-
YHNameCardInfoView
.
height
view2
.
x
=
36
+
5
view2
.
width
=
YHNameCardInfoView
.
width
-
5
*
2
view2
.
x
=
36
+
gap
view2
.
width
=
YHNameCardInfoView
.
width
-
gap
*
2
view2
.
isHidden
=
self
.
matchUsersArr
.
count
<
2
self
.
view
.
addSubview
(
view2
)
if
self
.
matchUsersArr
.
count
>=
2
{
...
...
@@ -373,6 +377,7 @@ extension YHMatchResultListViewController: DragCardDataSource {
public
func
dragCard
(
_
dragCard
:
DragCardContainer
,
viewForCard
index
:
Int
)
->
DragCardView
{
print
(
"getTopCardAt:
\(
index
)
"
)
let
cardView
:
YHNameCardInfoView
=
YHNameCardInfoView
.
createCardView
()
cardView
.
allowedDirection
=
self
.
allowedDirection
cardView
.
tag
=
1000
+
index
...
...
@@ -384,10 +389,9 @@ extension YHMatchResultListViewController: DragCardDataSource {
guard
let
self
=
self
else
{
return
}
YHHUD
.
show
(
.
progress
(
message
:
"加载中..."
))
self
.
viewModel
.
addFriendWithText
(
text
!
,
yhId
:
userModel
.
yhId
)
{
[
weak
self
]
success
,
error
in
guard
let
self
=
self
else
{
return
}
success
,
error
in
YHHUD
.
hide
()
if
success
{
YHHUD
.
hide
()
YHHUD
.
flash
(
message
:
"已发送好友申请"
)
cardView
.
bottomBtn
.
setTitle
(
"已发送好友申请"
,
for
:
.
normal
)
cardView
.
bottomBtn
.
backgroundColor
=
.
brandMainColor30
...
...
@@ -410,12 +414,11 @@ extension YHMatchResultListViewController: DragCardDelegate {
if
cardView
is
YHNameCardInfoView
{
let
cardInfoView
=
cardView
as!
YHNameCardInfoView
cardInfoView
.
backgroundColor
=
.
white
if
let
secondCardView
=
dragCard
.
viewWithTag
(
1000
+
index
+
1
)
as?
YHNameCardInfoView
{
secondCardView
.
backgroundColor
=
UIColor
.
init
(
hex
:
0xE7EBF3
)
secondCardView
.
backgroundColor
=
self
.
secondCardColor
}
if
let
thirdCardView
=
dragCard
.
viewWithTag
(
1000
+
index
+
2
)
as?
YHNameCardInfoView
{
thirdCardView
.
backgroundColor
=
UIColor
.
init
(
hex
:
0xC4CEE3
)
thirdCardView
.
backgroundColor
=
self
.
thirdCardColor
}
}
}
...
...
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