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
a6f2fd26
Commit
a6f2fd26
authored
Mar 17, 2025
by
pete谢兆麟
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改代码
parent
d42d44ba
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
30 additions
and
37 deletions
+30
-37
YHActivityDetailViewController.swift
...y(社区)/Activity(活动)/C/YHActivityDetailViewController.swift
+10
-15
YHActivityListViewController.swift
...ity(社区)/Activity(活动)/C/YHActivityListViewController.swift
+9
-14
YHActivityTravelViewController.swift
...y(社区)/Activity(活动)/C/YHActivityTravelViewController.swift
+2
-1
YHMyGoodFriendsVC.swift
...y/Classes/Modules/Community(社区)/C/YHMyGoodFriendsVC.swift
+3
-2
YHNameCardViewController.swift
...es/Modules/Community(社区)/C/YHNameCardViewController.swift
+6
-5
No files found.
galaxy/galaxy/Classes/Modules/Community(社区)/Activity(活动)/C/YHActivityDetailViewController.swift
View file @
a6f2fd26
...
@@ -54,6 +54,7 @@ class YHActivityDetailViewController: YHBaseViewController {
...
@@ -54,6 +54,7 @@ class YHActivityDetailViewController: YHBaseViewController {
}()
}()
// MARK: - 生命周期方法
// MARK: - 生命周期方法
override
func
viewDidLoad
()
{
override
func
viewDidLoad
()
{
super
.
viewDidLoad
()
super
.
viewDidLoad
()
setupUI
()
setupUI
()
...
@@ -67,7 +68,7 @@ class YHActivityDetailViewController: YHBaseViewController {
...
@@ -67,7 +68,7 @@ class YHActivityDetailViewController: YHBaseViewController {
extension
YHActivityDetailViewController
{
extension
YHActivityDetailViewController
{
func
gotoTheRightVcForStatus
()
{
func
gotoTheRightVcForStatus
()
{
guard
let
model
=
self
.
viewModel
.
activityDetailModel
else
{
guard
let
model
=
viewModel
.
activityDetailModel
else
{
return
return
}
}
...
@@ -91,16 +92,14 @@ extension YHActivityDetailViewController {
...
@@ -91,16 +92,14 @@ extension YHActivityDetailViewController {
printLog
(
""
)
printLog
(
""
)
}
}
}
}
}
}
func
gotoActivityTravelVC
()
{
func
gotoActivityTravelVC
()
{
if
let
nav
=
self
.
navigationController
{
if
let
nav
=
navigationController
{
let
rrr
=
nav
.
viewControllers
.
contains
{
$0
.
isKind
(
of
:
YHActivityTravelViewController
.
self
)
}
let
rrr
=
nav
.
viewControllers
.
contains
{
$0
.
isKind
(
of
:
YHActivityTravelViewController
.
self
)
}
if
rrr
{
if
rrr
{
var
targetVc
:
UIViewController
?
var
targetVc
:
UIViewController
?
for
(
_
,
value
)
in
nav
.
viewControllers
.
enumerated
()
{
for
(
_
,
value
)
in
nav
.
viewControllers
.
enumerated
()
{
if
value
.
isKind
(
of
:
YHActivityTravelViewController
.
self
)
{
if
value
.
isKind
(
of
:
YHActivityTravelViewController
.
self
)
{
targetVc
=
value
targetVc
=
value
break
break
...
@@ -121,7 +120,7 @@ extension YHActivityDetailViewController {
...
@@ -121,7 +120,7 @@ extension YHActivityDetailViewController {
}
}
func
showApplyUI
()
{
func
showApplyUI
()
{
YHApplyActivityAlert
.
showApplyActivityAlertView
(
name
:
self
.
viewModel
.
activityDetailModel
?
.
businessCardName
??
""
)
{
(
tag
,
name
,
number
,
phone
)
in
YHApplyActivityAlert
.
showApplyActivityAlertView
(
name
:
viewModel
.
activityDetailModel
?
.
businessCardName
??
""
)
{
tag
,
name
,
number
,
phone
in
if
tag
{
if
tag
{
printLog
(
tag
)
printLog
(
tag
)
printLog
(
name
)
printLog
(
name
)
...
@@ -169,7 +168,7 @@ extension YHActivityDetailViewController {
...
@@ -169,7 +168,7 @@ extension YHActivityDetailViewController {
self
?
.
gotoTheRightVcForStatus
()
self
?
.
gotoTheRightVcForStatus
()
}
else
{
}
else
{
YHOneKeyLoginManager
.
shared
.
oneKeyLogin
()
YHOneKeyLoginManager
.
shared
.
oneKeyLogin
()
YHLoginManager
.
shared
.
loginSuccessActionBlock
=
{[
weak
self
]
in
YHLoginManager
.
shared
.
loginSuccessActionBlock
=
{
[
weak
self
]
in
guard
self
!=
nil
else
{
return
}
guard
self
!=
nil
else
{
return
}
self
?
.
loadData
()
self
?
.
loadData
()
YHLoginManager
.
shared
.
loginSuccessActionBlock
=
nil
YHLoginManager
.
shared
.
loginSuccessActionBlock
=
nil
...
@@ -183,6 +182,7 @@ extension YHActivityDetailViewController {
...
@@ -183,6 +182,7 @@ extension YHActivityDetailViewController {
make
.
height
.
equalTo
(
114
)
make
.
height
.
equalTo
(
114
)
}
}
}
}
func
loadData
()
{
func
loadData
()
{
if
!
activityId
.
isEmpty
{
if
!
activityId
.
isEmpty
{
viewModel
.
getActivityDetailData
(
activityID
:
activityId
)
{
success
,
error
in
viewModel
.
getActivityDetailData
(
activityID
:
activityId
)
{
success
,
error
in
...
@@ -206,7 +206,7 @@ extension YHActivityDetailViewController {
...
@@ -206,7 +206,7 @@ extension YHActivityDetailViewController {
}
}
func
requestImages
()
{
func
requestImages
()
{
guard
let
detailModel
=
self
.
viewModel
.
activityDetailModel
else
{
guard
let
detailModel
=
viewModel
.
activityDetailModel
else
{
return
return
}
}
let
ossGroup
=
DispatchGroup
()
let
ossGroup
=
DispatchGroup
()
...
@@ -214,13 +214,13 @@ extension YHActivityDetailViewController {
...
@@ -214,13 +214,13 @@ extension YHActivityDetailViewController {
ossGroup
.
enter
()
ossGroup
.
enter
()
item
.
imgView
.
kf
.
setImage
(
with
:
URL
(
string
:
item
.
url
))
{
result
in
item
.
imgView
.
kf
.
setImage
(
with
:
URL
(
string
:
item
.
url
))
{
result
in
switch
result
{
switch
result
{
case
.
success
(
let
value
):
case
let
.
success
(
value
):
let
size
=
value
.
image
.
size
let
size
=
value
.
image
.
size
let
scale
=
size
.
width
>
0
?
Double
(
size
.
height
/
size
.
width
)
:
0.0
let
scale
=
size
.
width
>
0
?
Double
(
size
.
height
/
size
.
width
)
:
0.0
if
scale
>
0
{
if
scale
>
0
{
item
.
height
=
scale
*
item
.
width
item
.
height
=
scale
*
item
.
width
}
}
case
.
failure
(
let
error
):
case
let
.
failure
(
error
):
print
(
"Job failed:
\(
error
.
localizedDescription
)
"
)
print
(
"Job failed:
\(
error
.
localizedDescription
)
"
)
}
}
ossGroup
.
leave
()
ossGroup
.
leave
()
...
@@ -232,7 +232,6 @@ extension YHActivityDetailViewController {
...
@@ -232,7 +232,6 @@ extension YHActivityDetailViewController {
}
}
func
applyActivity
(
param
:
[
String
:
Any
])
{
func
applyActivity
(
param
:
[
String
:
Any
])
{
viewModel
.
applyActivity
(
param
:
param
)
{
success
,
error
in
viewModel
.
applyActivity
(
param
:
param
)
{
success
,
error
in
if
success
{
if
success
{
YHHUD
.
flash
(
message
:
"报名成功"
)
YHHUD
.
flash
(
message
:
"报名成功"
)
...
@@ -270,12 +269,10 @@ extension YHActivityDetailViewController: UITableViewDelegate, UITableViewDataSo
...
@@ -270,12 +269,10 @@ extension YHActivityDetailViewController: UITableViewDelegate, UITableViewDataSo
}
}
func
tableView
(
_
tableView
:
UITableView
,
cellForRowAt
indexPath
:
IndexPath
)
->
UITableViewCell
{
func
tableView
(
_
tableView
:
UITableView
,
cellForRowAt
indexPath
:
IndexPath
)
->
UITableViewCell
{
let
cell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
YHActivityDetailCell
.
cellReuseIdentifier
,
for
:
indexPath
)
as!
YHActivityDetailCell
let
cell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
YHActivityDetailCell
.
cellReuseIdentifier
,
for
:
indexPath
)
as!
YHActivityDetailCell
cell
.
dataModel
=
viewModel
.
activityDetailModel
cell
.
dataModel
=
viewModel
.
activityDetailModel
if
indexPath
.
row
<
viewModel
.
arrActivityDetail
.
count
{
if
indexPath
.
row
<
viewModel
.
arrActivityDetail
.
count
{
let
model
=
viewModel
.
arrActivityDetail
[
indexPath
.
row
]
let
model
=
viewModel
.
arrActivityDetail
[
indexPath
.
row
]
if
model
.
type
==
0
{
if
model
.
type
==
0
{
...
@@ -284,7 +281,6 @@ extension YHActivityDetailViewController: UITableViewDelegate, UITableViewDataSo
...
@@ -284,7 +281,6 @@ extension YHActivityDetailViewController: UITableViewDelegate, UITableViewDataSo
return
cell
return
cell
}
else
if
model
.
type
==
1
{
}
else
if
model
.
type
==
1
{
let
cell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
YHActivityDetailCell1
.
cellReuseIdentifier
,
for
:
indexPath
)
as!
YHActivityDetailCell1
let
cell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
YHActivityDetailCell1
.
cellReuseIdentifier
,
for
:
indexPath
)
as!
YHActivityDetailCell1
cell
.
dataModel
=
model
.
activityDetailModel
??
YHActivityDetailModel
()
cell
.
dataModel
=
model
.
activityDetailModel
??
YHActivityDetailModel
()
return
cell
return
cell
...
@@ -293,7 +289,6 @@ extension YHActivityDetailViewController: UITableViewDelegate, UITableViewDataSo
...
@@ -293,7 +289,6 @@ extension YHActivityDetailViewController: UITableViewDelegate, UITableViewDataSo
let
cell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
YHActivityDetailCell2
.
cellReuseIdentifier
,
for
:
indexPath
)
as!
YHActivityDetailCell2
let
cell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
YHActivityDetailCell2
.
cellReuseIdentifier
,
for
:
indexPath
)
as!
YHActivityDetailCell2
cell
.
dataModel
=
model
.
activityDetailModel
??
YHActivityDetailModel
()
cell
.
dataModel
=
model
.
activityDetailModel
??
YHActivityDetailModel
()
return
cell
return
cell
}
}
}
}
return
cell
return
cell
...
...
galaxy/galaxy/Classes/Modules/Community(社区)/Activity(活动)/C/YHActivityListViewController.swift
View file @
a6f2fd26
...
@@ -6,11 +6,10 @@
...
@@ -6,11 +6,10 @@
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
//
import
UIKit
import
JXSegmentedView
import
JXSegmentedView
import
UIKit
enum
YHActivityStatus
:
Int
{
enum
YHActivityStatus
:
Int
{
// 活动的状态 1:立即报名 2:已报名 3:活动结束 4:已取消报名
// 活动的状态 1:立即报名 2:已报名 3:活动结束 4:已取消报名
case
unknow
=
0
// 未知
case
unknow
=
0
// 未知
...
@@ -110,7 +109,6 @@ enum YHActivityStatus: Int {
...
@@ -110,7 +109,6 @@ enum YHActivityStatus: Int {
活动列表 或 我的报名活动
活动列表 或 我的报名活动
*/
*/
class
YHActivityListViewController
:
YHBaseViewController
{
class
YHActivityListViewController
:
YHBaseViewController
{
var
type
:
Int
=
0
// 0-活动列表 1-我的报名活动
var
type
:
Int
=
0
// 0-活动列表 1-我的报名活动
lazy
var
viewModel
:
YHActivityViewModel
=
{
lazy
var
viewModel
:
YHActivityViewModel
=
{
...
@@ -139,6 +137,7 @@ class YHActivityListViewController: YHBaseViewController {
...
@@ -139,6 +137,7 @@ class YHActivityListViewController: YHBaseViewController {
}()
}()
// MARK: - 生命周期方法
// MARK: - 生命周期方法
override
func
viewDidLoad
()
{
override
func
viewDidLoad
()
{
super
.
viewDidLoad
()
super
.
viewDidLoad
()
view
.
backgroundColor
=
.
white
view
.
backgroundColor
=
.
white
...
@@ -177,7 +176,6 @@ class YHActivityListViewController: YHBaseViewController {
...
@@ -177,7 +176,6 @@ class YHActivityListViewController: YHBaseViewController {
}
}
emptyDataTipsView
.
isHidden
=
viewModel
.
arrActivityListData
.
count
>
0
?
true
:
false
emptyDataTipsView
.
isHidden
=
viewModel
.
arrActivityListData
.
count
>
0
?
true
:
false
}
}
override
func
viewWillAppear
(
_
animated
:
Bool
)
{
override
func
viewWillAppear
(
_
animated
:
Bool
)
{
...
@@ -188,7 +186,7 @@ class YHActivityListViewController: YHBaseViewController {
...
@@ -188,7 +186,7 @@ class YHActivityListViewController: YHBaseViewController {
extension
YHActivityListViewController
{
extension
YHActivityListViewController
{
func
loadMoreData
()
{
func
loadMoreData
()
{
self
.
viewModel
.
getActivityList
(
firstFlag
:
false
,
type
:
type
)
{
[
weak
self
]
_
,
_
in
viewModel
.
getActivityList
(
firstFlag
:
false
,
type
:
type
)
{
[
weak
self
]
_
,
_
in
guard
let
self
=
self
else
{
return
}
guard
let
self
=
self
else
{
return
}
self
.
tableView
.
reloadData
()
self
.
tableView
.
reloadData
()
self
.
emptyDataTipsView
.
isHidden
=
self
.
viewModel
.
arrActivityListData
.
count
>
0
?
true
:
false
self
.
emptyDataTipsView
.
isHidden
=
self
.
viewModel
.
arrActivityListData
.
count
>
0
?
true
:
false
...
@@ -206,7 +204,7 @@ extension YHActivityListViewController {
...
@@ -206,7 +204,7 @@ extension YHActivityListViewController {
}
}
func
loadFirstData
()
{
func
loadFirstData
()
{
self
.
viewModel
.
getActivityList
(
firstFlag
:
true
,
type
:
type
)
{
[
weak
self
]
_
,
_
in
viewModel
.
getActivityList
(
firstFlag
:
true
,
type
:
type
)
{
[
weak
self
]
_
,
_
in
guard
let
self
=
self
else
{
return
}
guard
let
self
=
self
else
{
return
}
self
.
tableView
.
es
.
stopPullToRefresh
()
self
.
tableView
.
es
.
stopPullToRefresh
()
...
@@ -229,7 +227,6 @@ extension YHActivityListViewController {
...
@@ -229,7 +227,6 @@ extension YHActivityListViewController {
}
}
extension
YHActivityListViewController
:
UITableViewDelegate
,
UITableViewDataSource
{
extension
YHActivityListViewController
:
UITableViewDelegate
,
UITableViewDataSource
{
func
numberOfSections
(
in
tableView
:
UITableView
)
->
Int
{
func
numberOfSections
(
in
tableView
:
UITableView
)
->
Int
{
if
viewModel
.
arrActivityListData
.
count
>
0
{
if
viewModel
.
arrActivityListData
.
count
>
0
{
return
viewModel
.
arrActivityListData
.
count
return
viewModel
.
arrActivityListData
.
count
...
@@ -242,7 +239,7 @@ extension YHActivityListViewController: UITableViewDelegate, UITableViewDataSour
...
@@ -242,7 +239,7 @@ extension YHActivityListViewController: UITableViewDelegate, UITableViewDataSour
}
}
func
tableView
(
_
tableView
:
UITableView
,
cellForRowAt
indexPath
:
IndexPath
)
->
UITableViewCell
{
func
tableView
(
_
tableView
:
UITableView
,
cellForRowAt
indexPath
:
IndexPath
)
->
UITableViewCell
{
let
cell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
YHActivityListCell
.
cellReuseIdentifier
,
for
:
indexPath
)
as!
YHActivityListCell
guard
let
cell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
YHActivityListCell
.
cellReuseIdentifier
,
for
:
indexPath
)
as?
YHActivityListCell
else
{
return
UITableViewCell
()
}
cell
.
sessionIndex
=
indexPath
.
section
cell
.
sessionIndex
=
indexPath
.
section
cell
.
type
=
type
cell
.
type
=
type
...
@@ -278,12 +275,11 @@ extension YHActivityListViewController: UITableViewDelegate, UITableViewDataSour
...
@@ -278,12 +275,11 @@ extension YHActivityListViewController: UITableViewDelegate, UITableViewDataSour
}
}
func
gotoActivityTravelVC
(
checkId
:
String
=
""
)
{
func
gotoActivityTravelVC
(
checkId
:
String
=
""
)
{
if
let
nav
=
self
.
navigationController
{
if
let
nav
=
navigationController
{
let
rrr
=
nav
.
viewControllers
.
contains
{
$0
.
isKind
(
of
:
YHActivityTravelViewController
.
self
)
}
let
rrr
=
nav
.
viewControllers
.
contains
{
$0
.
isKind
(
of
:
YHActivityTravelViewController
.
self
)
}
if
rrr
{
if
rrr
{
var
targetVc
:
UIViewController
?
var
targetVc
:
UIViewController
?
for
(
_
,
value
)
in
nav
.
viewControllers
.
enumerated
()
{
for
(
_
,
value
)
in
nav
.
viewControllers
.
enumerated
()
{
if
value
.
isKind
(
of
:
YHActivityTravelViewController
.
self
)
{
if
value
.
isKind
(
of
:
YHActivityTravelViewController
.
self
)
{
targetVc
=
value
targetVc
=
value
break
break
...
@@ -312,19 +308,18 @@ extension YHActivityListViewController: UITableViewDelegate, UITableViewDataSour
...
@@ -312,19 +308,18 @@ extension YHActivityListViewController: UITableViewDelegate, UITableViewDataSour
}
}
func
tableView
(
_
tableView
:
UITableView
,
viewForHeaderInSection
section
:
Int
)
->
UIView
?
{
func
tableView
(
_
tableView
:
UITableView
,
viewForHeaderInSection
section
:
Int
)
->
UIView
?
{
var
height
:
CGFloat
=
16.0
var
height
:
CGFloat
=
16.0
if
section
!=
0
{
if
section
!=
0
{
height
=
20.0
height
=
20.0
}
}
let
view
=
UIView
(
frame
:
CGRect
(
x
:
0
,
y
:
0
,
width
:
KScreenWidth
-
16.0
*
2
,
height
:
height
))
let
view
=
UIView
(
frame
:
CGRect
(
x
:
0
,
y
:
0
,
width
:
KScreenWidth
-
16.0
*
2
,
height
:
height
))
view
.
backgroundColor
=
.
clear
view
.
backgroundColor
=
.
clear
return
view
return
view
}
}
func
tableView
(
_
tableView
:
UITableView
,
viewForFooterInSection
section
:
Int
)
->
UIView
?
{
func
tableView
(
_
tableView
:
UITableView
,
viewForFooterInSection
section
:
Int
)
->
UIView
?
{
let
view
=
UIView
(
frame
:
CGRect
(
x
:
0
,
y
:
0
,
width
:
KScreenWidth
-
16.0
*
2
,
height
:
0.001
))
let
view
=
UIView
(
frame
:
CGRect
(
x
:
0
,
y
:
0
,
width
:
KScreenWidth
-
16.0
*
2
,
height
:
0.001
))
view
.
backgroundColor
=
.
clear
view
.
backgroundColor
=
.
clear
return
view
return
view
}
}
...
...
galaxy/galaxy/Classes/Modules/Community(社区)/Activity(活动)/C/YHActivityTravelViewController.swift
View file @
a6f2fd26
...
@@ -233,7 +233,8 @@ extension YHActivityTravelViewController: UITableViewDelegate, UITableViewDataSo
...
@@ -233,7 +233,8 @@ extension YHActivityTravelViewController: UITableViewDelegate, UITableViewDataSo
}
}
func
tableView
(
_
tableView
:
UITableView
,
cellForRowAt
indexPath
:
IndexPath
)
->
UITableViewCell
{
func
tableView
(
_
tableView
:
UITableView
,
cellForRowAt
indexPath
:
IndexPath
)
->
UITableViewCell
{
let
cell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
YHActivityTravelCell
.
cellReuseIdentifier
,
for
:
indexPath
)
as!
YHActivityTravelCell
guard
let
cell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
YHActivityTravelCell
.
cellReuseIdentifier
,
for
:
indexPath
)
as?
YHActivityTravelCell
else
{
return
UITableViewCell
()
}
cell
.
dataModel
=
viewModel
.
activityTravelModel
cell
.
dataModel
=
viewModel
.
activityTravelModel
cell
.
block
=
{[
weak
self
]
in
cell
.
block
=
{[
weak
self
]
in
self
?
.
clickBottomButton
()
self
?
.
clickBottomButton
()
...
...
galaxy/galaxy/Classes/Modules/Community(社区)/C/YHMyGoodFriendsVC.swift
View file @
a6f2fd26
...
@@ -88,7 +88,8 @@ extension YHMyGoodFriendsVC: UITableViewDelegate, UITableViewDataSource {
...
@@ -88,7 +88,8 @@ extension YHMyGoodFriendsVC: UITableViewDelegate, UITableViewDataSource {
func
tableView
(
_
tableView
:
UITableView
,
cellForRowAt
indexPath
:
IndexPath
)
->
UITableViewCell
{
func
tableView
(
_
tableView
:
UITableView
,
cellForRowAt
indexPath
:
IndexPath
)
->
UITableViewCell
{
if
indexPath
.
section
==
0
{
if
indexPath
.
section
==
0
{
let
cell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
YHAddFriendCardCell
.
cellReuseIdentifier
,
for
:
indexPath
)
as!
YHAddFriendCardCell
guard
let
cell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
YHAddFriendCardCell
.
cellReuseIdentifier
,
for
:
indexPath
)
as?
YHAddFriendCardCell
else
{
return
UITableViewCell
()
}
cell
.
cardCount
=
self
.
friendRequestArr
.
count
cell
.
cardCount
=
self
.
friendRequestArr
.
count
if
self
.
friendRequestArr
.
count
>
0
{
if
self
.
friendRequestArr
.
count
>
0
{
cell
.
friendModel
=
self
.
friendRequestArr
[
0
]
cell
.
friendModel
=
self
.
friendRequestArr
[
0
]
...
@@ -118,7 +119,7 @@ extension YHMyGoodFriendsVC: UITableViewDelegate, UITableViewDataSource {
...
@@ -118,7 +119,7 @@ extension YHMyGoodFriendsVC: UITableViewDelegate, UITableViewDataSource {
return
cell
return
cell
}
}
let
cell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
YHMyFriendsCell
.
cellReuseIdentifier
,
for
:
indexPath
)
as!
YHMyFriendsCell
guard
let
cell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
YHMyFriendsCell
.
cellReuseIdentifier
,
for
:
indexPath
)
as?
YHMyFriendsCell
else
{
return
UITableViewCell
()
}
if
0
<=
indexPath
.
row
&&
indexPath
.
row
<
friendsArr
.
count
{
if
0
<=
indexPath
.
row
&&
indexPath
.
row
<
friendsArr
.
count
{
let
friend
=
self
.
friendsArr
[
indexPath
.
row
]
let
friend
=
self
.
friendsArr
[
indexPath
.
row
]
cell
.
friendModel
=
friend
cell
.
friendModel
=
friend
...
...
galaxy/galaxy/Classes/Modules/Community(社区)/C/YHNameCardViewController.swift
View file @
a6f2fd26
...
@@ -127,7 +127,7 @@ extension YHNameCardViewController: UITableViewDelegate, UITableViewDataSource {
...
@@ -127,7 +127,7 @@ extension YHNameCardViewController: UITableViewDelegate, UITableViewDataSource {
let
cardInfo
=
self
.
cardInfoArr
[
indexPath
.
section
]
let
cardInfo
=
self
.
cardInfoArr
[
indexPath
.
section
]
if
cardInfo
.
type
==
.
avatar
{
if
cardInfo
.
type
==
.
avatar
{
let
cell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
YHMyNameCardAvatarInfoCell
.
cellReuseIdentifier
,
for
:
indexPath
)
as!
YHMyNameCardAvatarInfoCell
guard
let
cell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
YHMyNameCardAvatarInfoCell
.
cellReuseIdentifier
,
for
:
indexPath
)
as?
YHMyNameCardAvatarInfoCell
else
{
return
UITableViewCell
()
}
cell
.
userModel
=
cardInfo
cell
.
userModel
=
cardInfo
cell
.
editBlock
=
{
[
weak
self
]
in
cell
.
editBlock
=
{
[
weak
self
]
in
guard
let
self
=
self
else
{
return
}
guard
let
self
=
self
else
{
return
}
...
@@ -139,7 +139,8 @@ extension YHNameCardViewController: UITableViewDelegate, UITableViewDataSource {
...
@@ -139,7 +139,8 @@ extension YHNameCardViewController: UITableViewDelegate, UITableViewDataSource {
}
}
if
cardInfo
.
type
==
.
honor
||
cardInfo
.
type
==
.
introduce
{
if
cardInfo
.
type
==
.
honor
||
cardInfo
.
type
==
.
introduce
{
let
introCell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
YHMyIntroductionCell
.
cellReuseIdentifier
,
for
:
indexPath
)
as!
YHMyIntroductionCell
guard
let
introCell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
YHMyIntroductionCell
.
cellReuseIdentifier
,
for
:
indexPath
)
as?
YHMyIntroductionCell
else
{
return
UITableViewCell
()
}
introCell
.
userModel
=
cardInfo
introCell
.
userModel
=
cardInfo
introCell
.
editBlock
=
{
[
weak
self
]
in
introCell
.
editBlock
=
{
[
weak
self
]
in
guard
let
self
=
self
else
{
return
}
guard
let
self
=
self
else
{
return
}
...
@@ -157,7 +158,7 @@ extension YHNameCardViewController: UITableViewDelegate, UITableViewDataSource {
...
@@ -157,7 +158,7 @@ extension YHNameCardViewController: UITableViewDelegate, UITableViewDataSource {
}
}
if
cardInfo
.
type
==
.
education
{
if
cardInfo
.
type
==
.
education
{
let
eduCell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
YHMyEducationCell
.
cellReuseIdentifier
,
for
:
indexPath
)
as!
YHMyEducationCell
guard
let
eduCell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
YHMyEducationCell
.
cellReuseIdentifier
,
for
:
indexPath
)
as?
YHMyEducationCell
else
{
return
UITableViewCell
()
}
eduCell
.
userModel
=
cardInfo
eduCell
.
userModel
=
cardInfo
eduCell
.
hiddenBtnBlock
=
{
eduCell
.
hiddenBtnBlock
=
{
[
weak
self
]
in
[
weak
self
]
in
...
@@ -174,7 +175,7 @@ extension YHNameCardViewController: UITableViewDelegate, UITableViewDataSource {
...
@@ -174,7 +175,7 @@ extension YHNameCardViewController: UITableViewDelegate, UITableViewDataSource {
}
}
if
cardInfo
.
type
==
.
workExperience
{
if
cardInfo
.
type
==
.
workExperience
{
let
workCell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
YHMyWorkExperienceCell
.
cellReuseIdentifier
,
for
:
indexPath
)
as!
YHMyWorkExperienceCell
guard
let
workCell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
YHMyWorkExperienceCell
.
cellReuseIdentifier
,
for
:
indexPath
)
as?
YHMyWorkExperienceCell
else
{
return
UITableViewCell
()
}
workCell
.
userModel
=
cardInfo
workCell
.
userModel
=
cardInfo
workCell
.
hiddenBtnBlock
=
{
workCell
.
hiddenBtnBlock
=
{
[
weak
self
]
in
[
weak
self
]
in
...
@@ -191,7 +192,7 @@ extension YHNameCardViewController: UITableViewDelegate, UITableViewDataSource {
...
@@ -191,7 +192,7 @@ extension YHNameCardViewController: UITableViewDelegate, UITableViewDataSource {
}
}
if
cardInfo
.
type
==
.
topics
{
if
cardInfo
.
type
==
.
topics
{
let
topicCell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
YHMyInterestTopicCell
.
cellReuseIdentifier
,
for
:
indexPath
)
as!
YHMyInterestTopicCell
guard
let
topicCell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
YHMyInterestTopicCell
.
cellReuseIdentifier
,
for
:
indexPath
)
as?
YHMyInterestTopicCell
else
{
return
UITableViewCell
()
}
topicCell
.
userModel
=
cardInfo
topicCell
.
userModel
=
cardInfo
topicCell
.
editBlock
=
{
[
weak
self
]
in
topicCell
.
editBlock
=
{
[
weak
self
]
in
guard
let
self
=
self
else
{
return
}
guard
let
self
=
self
else
{
return
}
...
...
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