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
94bd366b
Commit
94bd366b
authored
May 23, 2025
by
Steven杜宇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
// 推送
parent
8259c128
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
9 deletions
+8
-9
YHGalaxyNewsListViewController.swift
...odules/Message(消息)/C/YHGalaxyNewsListViewController.swift
+8
-9
No files found.
galaxy/galaxy/Classes/Modules/Message(消息)/C/YHGalaxyNewsListViewController.swift
View file @
94bd366b
...
@@ -10,7 +10,7 @@ import UIKit
...
@@ -10,7 +10,7 @@ import UIKit
class
YHGalaxyNewsListViewController
:
YHBaseViewController
{
class
YHGalaxyNewsListViewController
:
YHBaseViewController
{
let
type
:
Int
=
10
let
type
:
Int
=
YHMessageType
.
article
.
rawValue
var
newsArr
:
[
YHNewsModel
]
=
[]
var
newsArr
:
[
YHNewsModel
]
=
[]
var
currentPage
=
1
var
currentPage
=
1
var
isLastPage
=
false
var
isLastPage
=
false
...
@@ -127,11 +127,10 @@ class YHGalaxyNewsListViewController: YHBaseViewController {
...
@@ -127,11 +127,10 @@ class YHGalaxyNewsListViewController: YHBaseViewController {
}
}
}
}
func
markRead
(
model
:
YHNewsModel
)
{
func
markRead
(
_
model
:
YHNewsModel
)
{
if
let
id
=
Int
(
model
.
id
)
{
if
let
id
=
Int
(
model
.
id
)
{
self
.
viewModel
.
readMessages
(
type
:
self
.
type
,
msgIds
:
[
id
],
isAllRead
:
false
)
{
self
.
viewModel
.
readMessages
(
type
:
self
.
type
,
msgIds
:
[
id
],
isAllRead
:
false
)
{
[
weak
self
]
success
,
_
in
[
weak
self
]
success
,
_
in
guard
let
self
=
self
else
{
return
}
guard
let
self
=
self
else
{
return
}
if
success
{
if
success
{
for
msgItem
in
newsArr
{
for
msgItem
in
newsArr
{
...
@@ -150,20 +149,20 @@ class YHGalaxyNewsListViewController: YHBaseViewController {
...
@@ -150,20 +149,20 @@ class YHGalaxyNewsListViewController: YHBaseViewController {
static
func
enterDetail
(
_
item
:
YHNewsModel
)
{
static
func
enterDetail
(
_
item
:
YHNewsModel
)
{
if
item
.
news_type
==
2
{
// 图文
if
item
.
news_type
==
2
{
// 图文
let
vc
=
YHHomeWebViewController
()
let
vc
=
YHHomeWebViewController
()
vc
.
url
=
YHBaseUrlManager
.
shared
.
curH5URL
()
+
"articleDetail.html"
+
"?id=
\(
item
.
id
)
"
vc
.
url
=
YHBaseUrlManager
.
shared
.
curH5URL
()
+
"articleDetail.html"
+
"?id=
\(
item
.
article_
id
)
"
vc
.
id
=
Int
(
item
.
id
)
??
0
vc
.
id
=
item
.
article_id
UIViewController
.
current
?
.
navigationController
?
.
pushViewController
(
vc
)
UIViewController
.
current
?
.
navigationController
?
.
pushViewController
(
vc
)
return
return
}
else
if
item
.
news_type
==
1
{
// 视频
}
else
if
item
.
news_type
==
1
{
// 视频
if
!
item
.
media_url
.
isEmpty
,
let
url
=
URL
(
string
:
item
.
media_url
)
{
if
!
item
.
media_url
.
isEmpty
,
let
_
=
URL
(
string
:
item
.
media_url
)
{
let
vc
=
YHVideoPlayerVC
()
let
vc
=
YHVideoPlayerVC
()
if
!
item
.
media_transcode_url
.
isEmpty
{
if
!
item
.
media_transcode_url
.
isEmpty
{
vc
.
url
=
item
.
media_transcode_url
vc
.
url
=
item
.
media_transcode_url
}
else
{
}
else
{
vc
.
url
=
item
.
media_url
vc
.
url
=
item
.
media_url
}
}
vc
.
id
=
Int
(
item
.
id
)
??
0
vc
.
id
=
item
.
article_id
UIViewController
.
current
?
.
navigationController
?
.
pushViewController
(
vc
)
UIViewController
.
current
?
.
navigationController
?
.
pushViewController
(
vc
)
}
}
return
return
...
@@ -201,7 +200,7 @@ extension YHGalaxyNewsListViewController: UITableViewDelegate, UITableViewDataSo
...
@@ -201,7 +200,7 @@ extension YHGalaxyNewsListViewController: UITableViewDelegate, UITableViewDataSo
if
0
<=
indexPath
.
row
&&
indexPath
.
row
<
newsArr
.
count
{
if
0
<=
indexPath
.
row
&&
indexPath
.
row
<
newsArr
.
count
{
let
item
=
newsArr
[
indexPath
.
row
]
let
item
=
newsArr
[
indexPath
.
row
]
Self
.
enterDetail
(
item
)
Self
.
enterDetail
(
item
)
self
.
markRead
(
item
)
}
}
}
}
...
...
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