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
7e30d161
Commit
7e30d161
authored
Jun 25, 2024
by
Steven杜宇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
// 人脉
parent
dd2d0b62
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
26 additions
and
5 deletions
+26
-5
YHMyGoodFriendsVC.swift
...y/Classes/Modules/Community(社区)/C/YHMyGoodFriendsVC.swift
+4
-0
YHAddFriendCardCell.swift
...Classes/Modules/Community(社区)/V/YHAddFriendCardCell.swift
+0
-5
YHMatchUserViewModel.swift
...asses/Modules/Community(社区)/VM/YHMatchUserViewModel.swift
+22
-0
No files found.
galaxy/galaxy/Classes/Modules/Community(社区)/C/YHMyGoodFriendsVC.swift
View file @
7e30d161
...
@@ -101,9 +101,13 @@ extension YHMyGoodFriendsVC: UITableViewDelegate, UITableViewDataSource {
...
@@ -101,9 +101,13 @@ extension YHMyGoodFriendsVC: UITableViewDelegate, UITableViewDataSource {
if
indexPath
.
section
==
0
{
if
indexPath
.
section
==
0
{
let
cell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
YHAddFriendCardCell
.
cellReuseIdentifier
,
for
:
indexPath
)
as!
YHAddFriendCardCell
let
cell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
YHAddFriendCardCell
.
cellReuseIdentifier
,
for
:
indexPath
)
as!
YHAddFriendCardCell
cell
.
cardCount
=
self
.
friendRequestArr
.
count
cell
.
cardCount
=
self
.
friendRequestArr
.
count
if
self
.
friendRequestArr
.
count
>
0
{
cell
.
friendModel
=
self
.
friendRequestArr
[
0
]
}
cell
.
acceptBlock
=
{
cell
.
acceptBlock
=
{
[
weak
self
]
accept
in
[
weak
self
]
accept
in
guard
let
self
=
self
else
{
return
}
guard
let
self
=
self
else
{
return
}
self
.
viewModel
.
receiveFriendApply
()
self
.
friendRequestArr
.
removeFirst
()
self
.
friendRequestArr
.
removeFirst
()
self
.
tableView
.
reloadData
()
self
.
tableView
.
reloadData
()
}
}
...
...
galaxy/galaxy/Classes/Modules/Community(社区)/V/YHAddFriendCardCell.swift
View file @
7e30d161
...
@@ -188,11 +188,6 @@ class YHAddFriendCardCell: UITableViewCell {
...
@@ -188,11 +188,6 @@ class YHAddFriendCardCell: UITableViewCell {
cardView
.
addSubview
(
ignoreBtn
)
cardView
.
addSubview
(
ignoreBtn
)
cardView
.
addSubview
(
acceptBtn
)
cardView
.
addSubview
(
acceptBtn
)
self
.
headImgV
.
backgroundColor
=
.
red
self
.
nameLabel
.
text
=
"XASAFSDFASDXASAFSDFASDXASAFSDFASDXASAFSDFASD"
self
.
professionalLabel
.
text
=
"咨询副总监 | 资讯科技及电讯"
self
.
msgLabel
.
text
=
"资讯科技及电讯资资讯科技及电讯资资讯科技及电讯资资讯科技及讯科技及电讯资资讯科技及电讯资资讯科技及电讯资资讯科技及科技及电讯资资讯科技及讯科技及电讯资资讯科技及科技及电讯资资讯科技及讯科技及电讯资资讯科技及"
cardView
.
snp
.
makeConstraints
{
make
in
cardView
.
snp
.
makeConstraints
{
make
in
make
.
left
.
right
.
top
.
equalToSuperview
()
make
.
left
.
right
.
top
.
equalToSuperview
()
make
.
bottom
.
equalTo
(
self
.
secondCardView
)
.
offset
(
-
6
)
make
.
bottom
.
equalTo
(
self
.
secondCardView
)
.
offset
(
-
6
)
...
...
galaxy/galaxy/Classes/Modules/Community(社区)/VM/YHMatchUserViewModel.swift
View file @
7e30d161
...
@@ -129,5 +129,27 @@ class YHMatchUserViewModel: NSObject {
...
@@ -129,5 +129,27 @@ class YHMatchUserViewModel: NSObject {
}
}
}
}
func
receiveFriendApply
(
userId
:
String
,
isReceive
:
Bool
,
callBack
:
@escaping
(
_
success
:
Bool
,
_
error
:
YHErrorModel
?)
->
())
{
let
act
=
isReceive
?
2
:
1
let
params
=
[
"act"
:
act
,
"yh_id"
:
userId
]
as
[
String
:
Any
]
let
strUrl
=
YHBaseUrlManager
.
shared
.
curURL
()
+
YHAllApiName
.
People
.
receiveFriendRequestApi
let
_
=
YHNetRequest
.
postRequest
(
url
:
strUrl
,
params
:
params
)
{
[
weak
self
]
json
,
code
in
//1. json字符串 转 对象
guard
let
self
=
self
else
{
return
}
printLog
(
json
)
if
json
.
code
==
200
{
callBack
(
true
,
nil
)
}
else
{
let
error
:
YHErrorModel
=
YHErrorModel
(
errorCode
:
Int32
(
json
.
code
),
errorMsg
:
json
.
msg
)
callBack
(
false
,
error
)
}
}
failBlock
:
{
err
in
callBack
(
false
,
err
)
}
}
}
}
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