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
e4c90cff
Commit
e4c90cff
authored
Apr 11, 2024
by
David黄金龙
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
视频播放逻辑 及UI
parent
78e4e571
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
5 deletions
+15
-5
YHHomeListModel.swift
...y/galaxy/Classes/Modules/Home(首页)/M/YHHomeListModel.swift
+3
-0
YHHomeCollectionViewCell.swift
...IntelligentService(服务中心)/V/YHHomeCollectionViewCell.swift
+12
-5
No files found.
galaxy/galaxy/Classes/Modules/Home(首页)/M/YHHomeListModel.swift
View file @
e4c90cff
...
...
@@ -22,6 +22,9 @@ class YHHomeListModel: YHBaseModel {
var
img_url
:
String
=
""
var
type
:
Int
=
0
//文章类型 '文章类型 1视频 2图文 3图片',
var
is_like
:
Bool
=
false
var
media_url
:
String
=
""
//网络返回的图片宽高
var
img_width
:
CGFloat
=
0
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/V/YHHomeCollectionViewCell.swift
View file @
e4c90cff
...
...
@@ -36,8 +36,8 @@ class YHHomeCollectionViewCell: UICollectionViewCell {
lazy
var
descripeLable
:
UILabel
=
{
let
label
=
UILabel
()
label
.
text
=
"
赴港攻略,当日往返无忧,这个季节风景..赴港攻略,当日往返无忧,这个季节风景
"
label
.
textColor
=
UIColor
(
hex
String
:
"#333333"
)
label
.
text
=
""
label
.
textColor
=
UIColor
(
hex
:
0x121A26
,
alpha
:
1.0
)
label
.
font
=
UIFont
.
PFSC_R
(
ofSize
:
14
)
label
.
numberOfLines
=
2
label
.
lineBreakMode
=
.
byWordWrapping
...
...
@@ -78,7 +78,7 @@ class YHHomeCollectionViewCell: UICollectionViewCell {
lazy
var
playButton
:
UIButton
=
{
let
btn
=
UIButton
(
type
:
.
custom
)
btn
.
setImage
(
UIImage
(
named
:
"home_play_btn"
),
for
:
.
normal
)
//
btn.isHidden = true
btn
.
isHidden
=
true
return
btn
}()
...
...
@@ -91,8 +91,9 @@ class YHHomeCollectionViewCell: UICollectionViewCell {
extension
YHHomeCollectionViewCell
{
@objc
func
clickPlayButton
()
{
if
let
url
=
URL
(
string
:
"https://upload.cdn.galaxy-immi.com/sell/production/video/1638527500518.mp4"
)
{
guard
let
listModel
=
listModel
else
{
return
}
//"https://upload.cdn.galaxy-immi.com/sell/production/video/1638527500518.mp4"
if
listModel
.
media_url
.
isEmpty
==
false
,
let
url
=
URL
(
string
:
listModel
.
media_url
)
{
let
player
=
AVPlayer
(
url
:
url
)
playerViewController
.
player
=
player
...
...
@@ -176,6 +177,12 @@ extension YHHomeCollectionViewCell {
}
numLable
.
text
=
listModel
.
collect_count
.
string
heartImageViewBtn
.
isSelected
=
listModel
.
is_like
if
listModel
.
type
==
1
{
playButton
.
isHidden
=
false
}
else
{
playButton
.
isHidden
=
true
}
}
...
...
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