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
d7a473db
Commit
d7a473db
authored
May 17, 2024
by
pete谢兆麟
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
点赞动画添加
parent
0830b624
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
67 additions
and
18 deletions
+67
-18
Podfile
galaxy/Podfile
+2
-0
project.pbxproj
galaxy/galaxy.xcodeproj/project.pbxproj
+18
-15
YHHomeCollectionViewCell.swift
...Classes/Modules/Home(首页)/V/YHHomeCollectionViewCell.swift
+22
-1
YHHomeWebBottomView.swift
...laxy/Classes/Modules/Home(首页)/V/YHHomeWebBottomView.swift
+25
-2
No files found.
galaxy/Podfile
View file @
d7a473db
...
@@ -81,6 +81,8 @@ target 'galaxy' do
...
@@ -81,6 +81,8 @@ target 'galaxy' do
pod
'BMPlayer'
,
'1.3.0'
pod
'BMPlayer'
,
'1.3.0'
#高斯模糊
#高斯模糊
pod
'VisualEffectView'
,
'4.1.5'
pod
'VisualEffectView'
,
'4.1.5'
#动画框架
pod
'lottie-ios'
,
'4.4.0'
end
end
...
...
galaxy/galaxy.xcodeproj/project.pbxproj
View file @
d7a473db
...
@@ -277,6 +277,9 @@
...
@@ -277,6 +277,9 @@
04EA230A2BB5172F009DA928
/* YHDocumentPromptTableViewCell.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
04EA23092BB5172F009DA928
/* YHDocumentPromptTableViewCell.swift */
;
};
04EA230A2BB5172F009DA928
/* YHDocumentPromptTableViewCell.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
04EA23092BB5172F009DA928
/* YHDocumentPromptTableViewCell.swift */
;
};
04EA230C2BB5199D009DA928
/* YHDocumentToActionTableViewCell.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
04EA230B2BB5199D009DA928
/* YHDocumentToActionTableViewCell.swift */
;
};
04EA230C2BB5199D009DA928
/* YHDocumentToActionTableViewCell.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
04EA230B2BB5199D009DA928
/* YHDocumentToActionTableViewCell.swift */
;
};
04EA230E2BB538E9009DA928
/* YHDocumentUploadTableViewCell.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
04EA230D2BB538E9009DA928
/* YHDocumentUploadTableViewCell.swift */
;
};
04EA230E2BB538E9009DA928
/* YHDocumentUploadTableViewCell.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
04EA230D2BB538E9009DA928
/* YHDocumentUploadTableViewCell.swift */
;
};
04EA2E6A2BF70BAE00AE80B0
/* shipin.json in Resources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
04EA2E672BF70BAD00AE80B0
/* shipin.json */
;
};
04EA2E6B2BF70BAE00AE80B0
/* shouye.json in Resources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
04EA2E682BF70BAD00AE80B0
/* shouye.json */
;
};
04EA2E6C2BF70BAE00AE80B0
/* zixun.json in Resources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
04EA2E692BF70BAE00AE80B0
/* zixun.json */
;
};
04EA376D2BEA06EF00DBAF64
/* WebKit.framework in Frameworks */
=
{
isa
=
PBXBuildFile
;
fileRef
=
04EA376C2BEA06EF00DBAF64
/* WebKit.framework */
;
};
04EA376D2BEA06EF00DBAF64
/* WebKit.framework in Frameworks */
=
{
isa
=
PBXBuildFile
;
fileRef
=
04EA376C2BEA06EF00DBAF64
/* WebKit.framework */
;
};
04EA376F2BEA071600DBAF64
/* libc++.tbd in Frameworks */
=
{
isa
=
PBXBuildFile
;
fileRef
=
04EA376E2BEA070500DBAF64
/* libc++.tbd */
;
};
04EA376F2BEA071600DBAF64
/* libc++.tbd in Frameworks */
=
{
isa
=
PBXBuildFile
;
fileRef
=
04EA376E2BEA070500DBAF64
/* libc++.tbd */
;
};
04EA37742BEA0A3400DBAF64
/* YHShareManager.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
04EA37732BEA0A3400DBAF64
/* YHShareManager.swift */
;
};
04EA37742BEA0A3400DBAF64
/* YHShareManager.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
04EA37732BEA0A3400DBAF64
/* YHShareManager.swift */
;
};
...
@@ -733,6 +736,9 @@
...
@@ -733,6 +736,9 @@
04EA23092BB5172F009DA928
/* YHDocumentPromptTableViewCell.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHDocumentPromptTableViewCell.swift
;
sourceTree
=
"<group>"
;
};
04EA23092BB5172F009DA928
/* YHDocumentPromptTableViewCell.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHDocumentPromptTableViewCell.swift
;
sourceTree
=
"<group>"
;
};
04EA230B2BB5199D009DA928
/* YHDocumentToActionTableViewCell.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHDocumentToActionTableViewCell.swift
;
sourceTree
=
"<group>"
;
};
04EA230B2BB5199D009DA928
/* YHDocumentToActionTableViewCell.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHDocumentToActionTableViewCell.swift
;
sourceTree
=
"<group>"
;
};
04EA230D2BB538E9009DA928
/* YHDocumentUploadTableViewCell.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHDocumentUploadTableViewCell.swift
;
sourceTree
=
"<group>"
;
};
04EA230D2BB538E9009DA928
/* YHDocumentUploadTableViewCell.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHDocumentUploadTableViewCell.swift
;
sourceTree
=
"<group>"
;
};
04EA2E672BF70BAD00AE80B0
/* shipin.json */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
text.json
;
name
=
shipin.json
;
path
=
"../../../../../Downloads/点赞动效文件-05.17/shipin.json"
;
sourceTree
=
"<group>"
;
};
04EA2E682BF70BAD00AE80B0
/* shouye.json */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
text.json
;
name
=
shouye.json
;
path
=
"../../../../../Downloads/点赞动效文件-05.17/shouye.json"
;
sourceTree
=
"<group>"
;
};
04EA2E692BF70BAE00AE80B0
/* zixun.json */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
text.json
;
name
=
zixun.json
;
path
=
"../../../../../Downloads/点赞动效文件-05.17/zixun.json"
;
sourceTree
=
"<group>"
;
};
04EA376C2BEA06EF00DBAF64
/* WebKit.framework */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
wrapper.framework
;
name
=
WebKit.framework
;
path
=
System/Library/Frameworks/WebKit.framework
;
sourceTree
=
SDKROOT
;
};
04EA376C2BEA06EF00DBAF64
/* WebKit.framework */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
wrapper.framework
;
name
=
WebKit.framework
;
path
=
System/Library/Frameworks/WebKit.framework
;
sourceTree
=
SDKROOT
;
};
04EA376E2BEA070500DBAF64
/* libc++.tbd */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
"sourcecode.text-based-dylib-definition"
;
name
=
"libc++.tbd"
;
path
=
"usr/lib/libc++.tbd"
;
sourceTree
=
SDKROOT
;
};
04EA376E2BEA070500DBAF64
/* libc++.tbd */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
"sourcecode.text-based-dylib-definition"
;
name
=
"libc++.tbd"
;
path
=
"usr/lib/libc++.tbd"
;
sourceTree
=
SDKROOT
;
};
04EA37732BEA0A3400DBAF64
/* YHShareManager.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHShareManager.swift
;
sourceTree
=
"<group>"
;
};
04EA37732BEA0A3400DBAF64
/* YHShareManager.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHShareManager.swift
;
sourceTree
=
"<group>"
;
};
...
@@ -2200,6 +2206,9 @@
...
@@ -2200,6 +2206,9 @@
A5ACE9142B4564F7002C94D2
/* Res */
=
{
A5ACE9142B4564F7002C94D2
/* Res */
=
{
isa
=
PBXGroup
;
isa
=
PBXGroup
;
children
=
(
children
=
(
04EA2E672BF70BAD00AE80B0
/* shipin.json */
,
04EA2E682BF70BAD00AE80B0
/* shouye.json */
,
04EA2E692BF70BAE00AE80B0
/* zixun.json */
,
A5E69D4F2BA304D400411932
/* Font */
,
A5E69D4F2BA304D400411932
/* Font */
,
A5C5B2ED2B4F9B8800A7C5D1
/* Localizable.xcstrings */
,
A5C5B2ED2B4F9B8800A7C5D1
/* Localizable.xcstrings */
,
04808C022B4686510056D53C
/* Frameworks */
,
04808C022B4686510056D53C
/* Frameworks */
,
...
@@ -2465,11 +2474,14 @@
...
@@ -2465,11 +2474,14 @@
files
=
(
files
=
(
045EEED42B9F171A0022A143
/* scoreOptionData.plist in Resources */
,
045EEED42B9F171A0022A143
/* scoreOptionData.plist in Resources */
,
045EEED62B9F171A0022A143
/* YHQuestionList.plist in Resources */
,
045EEED62B9F171A0022A143
/* YHQuestionList.plist in Resources */
,
04EA2E6C2BF70BAE00AE80B0
/* zixun.json in Resources */
,
A5C5B2EE2B4F9B8800A7C5D1
/* Localizable.xcstrings in Resources */
,
A5C5B2EE2B4F9B8800A7C5D1
/* Localizable.xcstrings in Resources */
,
A58951C52B398D1000225C19
/* Launch Screen.storyboard in Resources */
,
A58951C52B398D1000225C19
/* Launch Screen.storyboard in Resources */
,
A51044182B493675006B60BB
/* README.md in Resources */
,
A51044182B493675006B60BB
/* README.md in Resources */
,
A5573EDB2B317C0000D98EC0
/* Assets.xcassets in Resources */
,
A5573EDB2B317C0000D98EC0
/* Assets.xcassets in Resources */
,
04EA2E6B2BF70BAE00AE80B0
/* shouye.json in Resources */
,
A5E69D512BA304D400411932
/* DIN Alternate Bold.ttf in Resources */
,
A5E69D512BA304D400411932
/* DIN Alternate Bold.ttf in Resources */
,
04EA2E6A2BF70BAE00AE80B0
/* shipin.json in Resources */
,
047619ED2BA9B9C900F45358
/* area.plist in Resources */
,
047619ED2BA9B9C900F45358
/* area.plist in Resources */
,
);
);
runOnlyForDeploymentPostprocessing
=
0
;
runOnlyForDeploymentPostprocessing
=
0
;
...
@@ -3041,11 +3053,9 @@
...
@@ -3041,11 +3053,9 @@
ASSETCATALOG_COMPILER_INCLUDE_ALL_APPICON_ASSETS
=
YES
;
ASSETCATALOG_COMPILER_INCLUDE_ALL_APPICON_ASSETS
=
YES
;
CODE_SIGN_ENTITLEMENTS
=
galaxy/galaxyTestEnv.entitlements
;
CODE_SIGN_ENTITLEMENTS
=
galaxy/galaxyTestEnv.entitlements
;
CODE_SIGN_IDENTITY
=
"Apple Development"
;
CODE_SIGN_IDENTITY
=
"Apple Development"
;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]"
=
"iPhone Developer"
;
CODE_SIGN_STYLE
=
Automatic
;
CODE_SIGN_STYLE
=
Manual
;
CURRENT_PROJECT_VERSION
=
8
;
CURRENT_PROJECT_VERSION
=
8
;
DEVELOPMENT_TEAM
=
""
;
DEVELOPMENT_TEAM
=
RXHYW88XR7
;
"DEVELOPMENT_TEAM[sdk=iphoneos*]"
=
RXHYW88XR7
;
ENABLE_USER_SCRIPT_SANDBOXING
=
NO
;
ENABLE_USER_SCRIPT_SANDBOXING
=
NO
;
FRAMEWORK_SEARCH_PATHS
=
(
FRAMEWORK_SEARCH_PATHS
=
(
"$(inherited)"
,
"$(inherited)"
,
...
@@ -3072,7 +3082,6 @@
...
@@ -3072,7 +3082,6 @@
PRODUCT_BUNDLE_IDENTIFIER
=
com.intelligence.galaxy
;
PRODUCT_BUNDLE_IDENTIFIER
=
com.intelligence.galaxy
;
PRODUCT_NAME
=
"$(TARGET_NAME)"
;
PRODUCT_NAME
=
"$(TARGET_NAME)"
;
PROVISIONING_PROFILE_SPECIFIER
=
""
;
PROVISIONING_PROFILE_SPECIFIER
=
""
;
"PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]"
=
com.dev.profile
;
SWIFT_ACTIVE_COMPILATION_CONDITIONS
=
TESTENV
;
SWIFT_ACTIVE_COMPILATION_CONDITIONS
=
TESTENV
;
SWIFT_EMIT_LOC_STRINGS
=
YES
;
SWIFT_EMIT_LOC_STRINGS
=
YES
;
SWIFT_OBJC_BRIDGING_HEADER
=
"$(SRCROOT)/$(TARGET_NAME)/Res/galaxy-Bridge-Header.h"
;
SWIFT_OBJC_BRIDGING_HEADER
=
"$(SRCROOT)/$(TARGET_NAME)/Res/galaxy-Bridge-Header.h"
;
...
@@ -3247,11 +3256,9 @@
...
@@ -3247,11 +3256,9 @@
ASSETCATALOG_COMPILER_INCLUDE_ALL_APPICON_ASSETS
=
YES
;
ASSETCATALOG_COMPILER_INCLUDE_ALL_APPICON_ASSETS
=
YES
;
CODE_SIGN_ENTITLEMENTS
=
galaxy/galaxyDebug.entitlements
;
CODE_SIGN_ENTITLEMENTS
=
galaxy/galaxyDebug.entitlements
;
CODE_SIGN_IDENTITY
=
"Apple Development"
;
CODE_SIGN_IDENTITY
=
"Apple Development"
;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]"
=
"iPhone Developer"
;
CODE_SIGN_STYLE
=
Automatic
;
CODE_SIGN_STYLE
=
Manual
;
CURRENT_PROJECT_VERSION
=
8
;
CURRENT_PROJECT_VERSION
=
8
;
DEVELOPMENT_TEAM
=
""
;
DEVELOPMENT_TEAM
=
RXHYW88XR7
;
"DEVELOPMENT_TEAM[sdk=iphoneos*]"
=
RXHYW88XR7
;
ENABLE_USER_SCRIPT_SANDBOXING
=
NO
;
ENABLE_USER_SCRIPT_SANDBOXING
=
NO
;
FRAMEWORK_SEARCH_PATHS
=
(
FRAMEWORK_SEARCH_PATHS
=
(
"$(inherited)"
,
"$(inherited)"
,
...
@@ -3278,7 +3285,6 @@
...
@@ -3278,7 +3285,6 @@
PRODUCT_BUNDLE_IDENTIFIER
=
com.intelligence.galaxy
;
PRODUCT_BUNDLE_IDENTIFIER
=
com.intelligence.galaxy
;
PRODUCT_NAME
=
"$(TARGET_NAME)"
;
PRODUCT_NAME
=
"$(TARGET_NAME)"
;
PROVISIONING_PROFILE_SPECIFIER
=
""
;
PROVISIONING_PROFILE_SPECIFIER
=
""
;
"PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]"
=
com.dev.profile
;
SWIFT_EMIT_LOC_STRINGS
=
YES
;
SWIFT_EMIT_LOC_STRINGS
=
YES
;
SWIFT_OBJC_BRIDGING_HEADER
=
"$(SRCROOT)/$(TARGET_NAME)/Res/galaxy-Bridge-Header.h"
;
SWIFT_OBJC_BRIDGING_HEADER
=
"$(SRCROOT)/$(TARGET_NAME)/Res/galaxy-Bridge-Header.h"
;
SWIFT_VERSION
=
5.0
;
SWIFT_VERSION
=
5.0
;
...
@@ -3295,11 +3301,9 @@
...
@@ -3295,11 +3301,9 @@
ASSETCATALOG_COMPILER_INCLUDE_ALL_APPICON_ASSETS
=
YES
;
ASSETCATALOG_COMPILER_INCLUDE_ALL_APPICON_ASSETS
=
YES
;
CODE_SIGN_ENTITLEMENTS
=
galaxy/galaxy.entitlements
;
CODE_SIGN_ENTITLEMENTS
=
galaxy/galaxy.entitlements
;
CODE_SIGN_IDENTITY
=
"Apple Development"
;
CODE_SIGN_IDENTITY
=
"Apple Development"
;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]"
=
"iPhone Developer"
;
CODE_SIGN_STYLE
=
Automatic
;
CODE_SIGN_STYLE
=
Manual
;
CURRENT_PROJECT_VERSION
=
8
;
CURRENT_PROJECT_VERSION
=
8
;
DEVELOPMENT_TEAM
=
""
;
DEVELOPMENT_TEAM
=
RXHYW88XR7
;
"DEVELOPMENT_TEAM[sdk=iphoneos*]"
=
RXHYW88XR7
;
ENABLE_USER_SCRIPT_SANDBOXING
=
NO
;
ENABLE_USER_SCRIPT_SANDBOXING
=
NO
;
FRAMEWORK_SEARCH_PATHS
=
(
FRAMEWORK_SEARCH_PATHS
=
(
"$(inherited)"
,
"$(inherited)"
,
...
@@ -3326,7 +3330,6 @@
...
@@ -3326,7 +3330,6 @@
PRODUCT_BUNDLE_IDENTIFIER
=
com.intelligence.galaxy
;
PRODUCT_BUNDLE_IDENTIFIER
=
com.intelligence.galaxy
;
PRODUCT_NAME
=
"$(TARGET_NAME)"
;
PRODUCT_NAME
=
"$(TARGET_NAME)"
;
PROVISIONING_PROFILE_SPECIFIER
=
""
;
PROVISIONING_PROFILE_SPECIFIER
=
""
;
"PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]"
=
com.dev.profile
;
SWIFT_EMIT_LOC_STRINGS
=
YES
;
SWIFT_EMIT_LOC_STRINGS
=
YES
;
SWIFT_OBJC_BRIDGING_HEADER
=
"$(SRCROOT)/$(TARGET_NAME)/Res/galaxy-Bridge-Header.h"
;
SWIFT_OBJC_BRIDGING_HEADER
=
"$(SRCROOT)/$(TARGET_NAME)/Res/galaxy-Bridge-Header.h"
;
SWIFT_VERSION
=
5.0
;
SWIFT_VERSION
=
5.0
;
...
...
galaxy/galaxy/Classes/Modules/Home(首页)/V/YHHomeCollectionViewCell.swift
View file @
d7a473db
...
@@ -10,6 +10,7 @@ import UIKit
...
@@ -10,6 +10,7 @@ import UIKit
import
Kingfisher
import
Kingfisher
import
AVFoundation
import
AVFoundation
import
AVKit
import
AVKit
import
Lottie
class
YHHomeCollectionViewCell
:
UICollectionViewCell
{
class
YHHomeCollectionViewCell
:
UICollectionViewCell
{
static
let
cellReuseIdentifier
=
"YHHomeCollectionViewCell"
static
let
cellReuseIdentifier
=
"YHHomeCollectionViewCell"
...
@@ -66,7 +67,8 @@ class YHHomeCollectionViewCell: UICollectionViewCell {
...
@@ -66,7 +67,8 @@ class YHHomeCollectionViewCell: UICollectionViewCell {
label
.
font
=
UIFont
.
PFSC_R
(
ofSize
:
12
)
label
.
font
=
UIFont
.
PFSC_R
(
ofSize
:
12
)
return
label
return
label
}()
}()
var
animationView
:
LottieAnimationView
!
required
init
?(
coder
:
NSCoder
)
{
required
init
?(
coder
:
NSCoder
)
{
super
.
init
(
coder
:
coder
)
super
.
init
(
coder
:
coder
)
}
}
...
@@ -138,6 +140,18 @@ extension YHHomeCollectionViewCell {
...
@@ -138,6 +140,18 @@ extension YHHomeCollectionViewCell {
make
.
height
.
equalTo
(
16
)
make
.
height
.
equalTo
(
16
)
}
}
animationView
=
{
let
view
=
LottieAnimationView
(
name
:
"shouye"
)
view
.
isHidden
=
true
return
view
}()
subHoldView
.
addSubview
(
animationView
)
animationView
.
snp
.
makeConstraints
{
make
in
make
.
right
.
equalTo
(
numLable
.
snp
.
left
)
.
offset
(
2.5
)
make
.
height
.
width
.
equalTo
(
24
)
make
.
centerY
.
equalTo
(
numLable
)
.
offset
(
-
0.5
)
}
subHoldView
.
addSubview
(
heartImageViewBtn
)
subHoldView
.
addSubview
(
heartImageViewBtn
)
heartImageViewBtn
.
snp
.
makeConstraints
{
make
in
heartImageViewBtn
.
snp
.
makeConstraints
{
make
in
make
.
right
.
equalTo
(
numLable
.
snp
.
left
)
.
offset
(
-
2
)
make
.
right
.
equalTo
(
numLable
.
snp
.
left
)
.
offset
(
-
2
)
...
@@ -199,6 +213,12 @@ extension YHHomeCollectionViewCell {
...
@@ -199,6 +213,12 @@ extension YHHomeCollectionViewCell {
if
YHLoginManager
.
shared
.
isLogin
()
{
if
YHLoginManager
.
shared
.
isLogin
()
{
if
listModel
.
is_like
==
false
{
if
listModel
.
is_like
==
false
{
animationView
.
isHidden
=
false
animationView
.
loopMode
=
.
playOnce
animationView
.
play
{[
weak
self
]
completed
in
guard
let
self
=
self
else
{
return
}
self
.
animationView
.
isHidden
=
true
}
viewModel
.
getLike
(
listModel
.
id
,
1
)
{[
weak
self
]
success
,
error
in
viewModel
.
getLike
(
listModel
.
id
,
1
)
{[
weak
self
]
success
,
error
in
guard
let
self
=
self
else
{
return
}
guard
let
self
=
self
else
{
return
}
if
success
{
if
success
{
...
@@ -208,6 +228,7 @@ extension YHHomeCollectionViewCell {
...
@@ -208,6 +228,7 @@ extension YHHomeCollectionViewCell {
}
}
}
}
}
else
{
}
else
{
animationView
.
isHidden
=
true
viewModel
.
getLike
(
listModel
.
id
,
0
)
{[
weak
self
]
success
,
error
in
viewModel
.
getLike
(
listModel
.
id
,
0
)
{[
weak
self
]
success
,
error
in
guard
let
self
=
self
else
{
return
}
guard
let
self
=
self
else
{
return
}
if
success
{
if
success
{
...
...
galaxy/galaxy/Classes/Modules/Home(首页)/V/YHHomeWebBottomView.swift
View file @
d7a473db
...
@@ -7,6 +7,7 @@
...
@@ -7,6 +7,7 @@
//
//
import
UIKit
import
UIKit
import
Lottie
enum
YHTintColorMode
{
enum
YHTintColorMode
{
case
light
case
light
...
@@ -22,6 +23,7 @@ class YHHomeWebBottomView: UIView {
...
@@ -22,6 +23,7 @@ class YHHomeWebBottomView: UIView {
var
starBlock
:
Block
?
var
starBlock
:
Block
?
var
likeButton
:
YHHomeWebBottomButton
!
var
likeButton
:
YHHomeWebBottomButton
!
var
starButton
:
YHHomeWebBottomButton
!
var
starButton
:
YHHomeWebBottomButton
!
var
animationView
:
LottieAnimationView
!
var
likeCount
:
Int
=
0
var
likeCount
:
Int
=
0
var
starCount
:
Int
=
0
var
starCount
:
Int
=
0
var
isStar
:
Bool
=
false
{
var
isStar
:
Bool
=
false
{
...
@@ -77,7 +79,18 @@ class YHHomeWebBottomView: UIView {
...
@@ -77,7 +79,18 @@ class YHHomeWebBottomView: UIView {
}
}
func
setUpView
()
{
func
setUpView
()
{
animationView
=
{
let
view
=
LottieAnimationView
(
name
:
"zixun"
)
view
.
isHidden
=
true
return
view
}()
addSubview
(
animationView
)
animationView
.
snp
.
makeConstraints
{
make
in
make
.
right
.
equalTo
(
-
72
)
make
.
top
.
equalTo
(
2.5
)
make
.
height
.
equalTo
(
36
)
make
.
width
.
equalTo
(
36
)
}
likeButton
=
{
likeButton
=
{
let
button
=
YHHomeWebBottomButton
()
let
button
=
YHHomeWebBottomButton
()
button
.
setContent
(
UIImage
(
named
:
"home_web_like"
),
"0"
)
button
.
setContent
(
UIImage
(
named
:
"home_web_like"
),
"0"
)
...
@@ -86,7 +99,7 @@ class YHHomeWebBottomView: UIView {
...
@@ -86,7 +99,7 @@ class YHHomeWebBottomView: UIView {
}()
}()
addSubview
(
likeButton
)
addSubview
(
likeButton
)
likeButton
.
snp
.
makeConstraints
{
make
in
likeButton
.
snp
.
makeConstraints
{
make
in
make
.
right
.
equalTo
(
-
79
)
make
.
centerX
.
equalTo
(
animationView
.
snp
.
centerX
)
make
.
top
.
equalTo
(
10
)
make
.
top
.
equalTo
(
10
)
make
.
height
.
equalTo
(
39
)
make
.
height
.
equalTo
(
39
)
make
.
width
.
equalTo
(
24
)
make
.
width
.
equalTo
(
24
)
...
@@ -115,6 +128,16 @@ class YHHomeWebBottomView: UIView {
...
@@ -115,6 +128,16 @@ class YHHomeWebBottomView: UIView {
return
return
}
}
isLike
=
!
isLike
isLike
=
!
isLike
if
isLike
{
animationView
.
isHidden
=
false
animationView
.
loopMode
=
.
playOnce
animationView
.
play
{[
weak
self
]
completed
in
guard
let
self
=
self
else
{
return
}
self
.
animationView
.
isHidden
=
true
}
}
else
{
animationView
.
isHidden
=
true
}
if
let
block
=
likeBlock
{
if
let
block
=
likeBlock
{
block
(
isLike
)
block
(
isLike
)
}
}
...
...
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