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
7497d4fa
Commit
7497d4fa
authored
Apr 15, 2024
by
Steven杜宇
1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
// 搜索
parent
4875f48c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
33 additions
and
1 deletion
+33
-1
YHSearchInfomationVC.swift
...axy/Classes/Modules/Home(首页)/C/YHSearchInfomationVC.swift
+33
-1
No files found.
galaxy/galaxy/Classes/Modules/Home(首页)/C/YHSearchInfomationVC.swift
View file @
7497d4fa
...
@@ -7,6 +7,8 @@
...
@@ -7,6 +7,8 @@
//
//
import
UIKit
import
UIKit
import
AVFoundation
import
AVKit
class
YHSearchInfomationVC
:
YHBaseViewController
{
class
YHSearchInfomationVC
:
YHBaseViewController
{
...
@@ -20,6 +22,11 @@ class YHSearchInfomationVC: YHBaseViewController {
...
@@ -20,6 +22,11 @@ class YHSearchInfomationVC: YHBaseViewController {
return
viewModel
return
viewModel
}()
}()
lazy
var
homeViewModel
:
YHHomeWebViewModel
=
{
let
viewModel
=
YHHomeWebViewModel
()
return
viewModel
}()
lazy
var
navBar
:
UIView
=
{
lazy
var
navBar
:
UIView
=
{
let
bar
=
UIView
()
let
bar
=
UIView
()
let
backBtn
=
UIButton
()
let
backBtn
=
UIButton
()
...
@@ -133,6 +140,11 @@ class YHSearchInfomationVC: YHBaseViewController {
...
@@ -133,6 +140,11 @@ class YHSearchInfomationVC: YHBaseViewController {
return
view
return
view
}()
}()
lazy
var
playerViewController
:
AVPlayerViewController
=
{
let
vc
=
AVPlayerViewController
()
return
vc
}()
override
func
viewDidLoad
()
{
override
func
viewDidLoad
()
{
super
.
viewDidLoad
()
super
.
viewDidLoad
()
self
.
setupUI
()
self
.
setupUI
()
...
@@ -309,9 +321,29 @@ extension YHSearchInfomationVC: UITableViewDelegate, UITableViewDataSource {
...
@@ -309,9 +321,29 @@ extension YHSearchInfomationVC: UITableViewDelegate, UITableViewDataSource {
if
0
<=
indexPath
.
section
&&
indexPath
.
section
<
items
.
count
{
if
0
<=
indexPath
.
section
&&
indexPath
.
section
<
items
.
count
{
let
model
=
items
[
indexPath
.
section
]
let
model
=
items
[
indexPath
.
section
]
if
model
.
type
==
1
{
// 视频
if
!
model
.
media_url
.
isEmpty
,
let
url
=
URL
(
string
:
model
.
media_url
)
{
let
player
=
AVPlayer
(
url
:
url
)
player
.
isMuted
=
true
playerViewController
.
player
=
player
self
.
present
(
self
.
playerViewController
,
animated
:
true
)
{
self
.
playerViewController
.
player
!.
play
()
// 开始播放视频
}
DispatchQueue
.
main
.
async
{
self
.
homeViewModel
.
getWebDetail
(
model
.
id
)
{
success
,
error
in
}
}
}
return
}
// 非视频类型
let
vc
=
YHHomeWebViewController
()
let
vc
=
YHHomeWebViewController
()
vc
.
url
=
YHConfigManager
.
shared
.
h5Url
+
"?id=
\(
model
.
id
)
"
vc
.
url
=
YHConfigManager
.
shared
.
h5Url
+
"
/articleDetail.html"
+
"
?id=
\(
model
.
id
)
"
vc
.
id
=
model
.
id
vc
.
id
=
model
.
id
print
(
"URL:
\(
vc
.
url
)
"
)
self
.
navigationController
?
.
pushViewController
(
vc
)
self
.
navigationController
?
.
pushViewController
(
vc
)
}
}
}
}
...
...
pete谢兆麟
@pete
mentioned in commit
61c116fb
·
Apr 15, 2024
mentioned in commit
61c116fb
mentioned in commit 61c116fbd1b3103433234ad6d399a1646e3c1a4c
Toggle commit 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