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
8271fa07
Commit
8271fa07
authored
Sep 30, 2025
by
Steven杜宇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
// 名片
parent
a1a7bb9c
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
67 additions
and
11 deletions
+67
-11
YHNameCardContainerViewController.swift
...的)/NameCard(名片)/C/YHNameCardContainerViewController.swift
+1
-0
YHNameCardDynamicViewController.swift
...(我的)/NameCard(名片)/C/YHNameCardDynamicViewController.swift
+10
-1
YHNameCardDynamicCell.swift
...dules/Mine(我的)/NameCard(名片)/V/YHNameCardDynamicCell.swift
+45
-2
YHDynamicViewModel.swift
...Modules/Mine(我的)/NameCard(名片)/VM/YHDynamicViewModel.swift
+11
-8
No files found.
galaxy/galaxy/Classes/Modules/Mine(我的)/NameCard(名片)/C/YHNameCardContainerViewController.swift
View file @
8271fa07
...
...
@@ -67,6 +67,7 @@ class YHNameCardContainerViewController: YHBaseViewController {
lazy
var
dynamicVC
:
YHNameCardDynamicViewController
=
{
let
vc
=
YHNameCardDynamicViewController
()
vc
.
userId
=
self
.
userId
return
vc
}()
...
...
galaxy/galaxy/Classes/Modules/Mine(我的)/NameCard(名片)/C/YHNameCardDynamicViewController.swift
View file @
8271fa07
...
...
@@ -11,9 +11,16 @@ import JXSegmentedView
class
YHNameCardDynamicViewController
:
YHBaseViewController
{
var
userId
:
String
=
""
let
viewModel
:
YHDynamicViewModel
=
YHDynamicViewModel
()
var
arr
:
[
YHDynamicItem
]
=
[]
var
vcCanScroll
:
Bool
=
true
var
isCurrentUser
:
Bool
{
get
{
return
(
!
self
.
userId
.
isEmpty
&&
self
.
userId
==
YHLoginManager
.
shared
.
userModel
?
.
id
)
}
}
lazy
var
tableView
:
YHGestureTableView
=
{
let
tableView
=
YHGestureTableView
(
frame
:
.
zero
,
style
:
.
grouped
)
...
...
@@ -67,7 +74,9 @@ class YHNameCardDynamicViewController: YHBaseViewController {
}
func
requestList
(
_
firstPage
:
Bool
)
{
self
.
viewModel
.
getList
(
firstPage
)
{
_
,
_
in
let
sourceType
=
self
.
isCurrentUser
?
1
:
2
let
other_user_id
=
self
.
isCurrentUser
?
""
:
self
.
userId
self
.
viewModel
.
getList
(
firstPage
,
sourceType
:
sourceType
,
other_user_id
:
other_user_id
)
{
_
,
_
in
self
.
arr
.
removeAll
()
self
.
arr
.
append
(
contentsOf
:
(
self
.
viewModel
.
dynamicArr
))
self
.
noDataView
.
isHidden
=
self
.
arr
.
count
>
0
...
...
galaxy/galaxy/Classes/Modules/Mine(我的)/NameCard(名片)/V/YHNameCardDynamicCell.swift
View file @
8271fa07
...
...
@@ -110,9 +110,53 @@ class YHNameCardDynamicCell: UITableViewCell {
}
func
updateModel
(
_
model
:
YHDynamicItem
)
{
titleLabel
.
text
=
model
.
title
timeLabel
.
text
=
model
.
format_release_time
let
test
=
false
if
test
{
model
.
is_self_posts
=
1
model
.
audit_status
=
3
model
.
violation_remark
=
"阿是就发了时代峰峻阿克拉生发剂拉卡萨电极法卡拉是电极法考拉手机大发卡拉季湿哒哒开发逻辑阿达山卡拉代发久啊双打卡拉法基1"
}
// 审核视图显示
var
hiddenReview
=
true
if
model
.
is_self_posts
==
1
{
if
model
.
audit_status
==
3
{
hiddenReview
=
false
}
}
reviewContentV
.
isHidden
=
hiddenReview
rejectLabel
.
text
=
model
.
violation_remark
if
hiddenReview
{
reviewContentV
.
snp
.
remakeConstraints
{
make
in
make
.
left
.
right
.
equalTo
(
0
)
make
.
height
.
equalTo
(
0
)
make
.
top
.
equalTo
(
24
)
make
.
bottom
.
equalTo
(
publishLabel
.
snp
.
top
)
.
offset
(
0
)
}
}
else
{
reviewContentV
.
snp
.
remakeConstraints
{
make
in
make
.
left
.
right
.
equalTo
(
0
)
make
.
top
.
equalTo
(
24
)
make
.
bottom
.
equalTo
(
publishLabel
.
snp
.
top
)
.
offset
(
-
16
)
}
}
// 标题显示
titleLabel
.
text
=
model
.
title
titleLabel
.
snp
.
updateConstraints
{
make
in
make
.
top
.
equalTo
(
publishLabel
.
snp
.
bottom
)
.
offset
(
model
.
title
.
isEmpty
?
0
:
10
)
}
// 详情文字显示
detailLabel
.
text
=
model
.
content
detailLabel
.
snp
.
updateConstraints
{
make
in
make
.
top
.
equalTo
(
titleLabel
.
snp
.
bottom
)
.
offset
(
model
.
content
.
isEmpty
?
0
:
10
)
}
// 图片显示逻辑
img1V
.
isHidden
=
model
.
resource_urls
.
count
<=
0
if
model
.
resource_urls
.
count
>
0
{
let
resource
=
model
.
resource_urls
[
0
]
...
...
@@ -179,7 +223,6 @@ class YHNameCardDynamicCell: UITableViewCell {
publishLabel
.
snp
.
makeConstraints
{
make
in
make
.
left
.
equalTo
(
0
)
make
.
top
.
equalTo
(
reviewContentV
.
snp
.
bottom
)
.
offset
(
16
)
make
.
height
.
equalTo
(
17
)
}
...
...
galaxy/galaxy/Classes/Modules/Mine(我的)/NameCard(名片)/VM/YHDynamicViewModel.swift
View file @
8271fa07
...
...
@@ -16,21 +16,24 @@ class YHDynamicViewModel: YHBaseViewModel {
var
dynamicArr
:
[
YHDynamicItem
]
=
[]
var
hasMore
:
Bool
=
true
func
getList
(
_
firstFlag
:
Bool
,
callBackBlock
:
@escaping
(
_
success
:
Bool
,
_
error
:
YHErrorModel
?)
->
Void
)
{
var
params
:
[
String
:
Any
]
=
[
"page"
:
curPageIndex
,
"page_size"
:
pageSize
]
func
getList
(
_
firstFlag
:
Bool
,
sourceType
:
Int
,
other_user_id
:
String
,
callBackBlock
:
@escaping
(
_
success
:
Bool
,
_
error
:
YHErrorModel
?)
->
Void
)
{
var
params
:
[
String
:
Any
]
=
[
"page"
:
curPageIndex
]
if
firstFlag
{
curPageIndex
=
1
params
=
[
"page"
:
curPageIndex
,
"page_size"
:
pageSize
]
params
=
[
"page"
:
curPageIndex
]
}
else
{
params
=
[
"page"
:
curPageIndex
+
1
,
"page_size"
:
pageSize
]
params
=
[
"page"
:
curPageIndex
+
1
]
}
if
!
other_user_id
.
isEmpty
{
params
[
"other_user_id"
]
=
other_user_id
}
// source_type 0---全部用户评论列表 1-个人评论列表 2-他人评论列表
let
other_params
=
[
"source_type"
:
1
]
let
other_params
=
[
"page_size"
:
pageSize
,
"source_type"
:
sourceType
]
params
=
params
.
merging
(
other_params
)
{
(
_
,
new
)
in
new
}
let
strUrl
=
YHBaseUrlManager
.
shared
.
curURL
()
+
YHAllApiName
.
Dynamic
.
list
...
...
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