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
e68e1c49
Commit
e68e1c49
authored
May 19, 2024
by
David黄金龙
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
登录 注册页背景视频播放
parent
a4bdef80
Changes
10
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
298 additions
and
32 deletions
+298
-32
project.pbxproj
galaxy/galaxy.xcodeproj/project.pbxproj
+4
-0
AppDelegate.swift
galaxy/galaxy/AppDelegate.swift
+0
-1
YHHKEventViewController.swift
.../Classes/Modules/Home(首页)/C/YHHKEventViewController.swift
+1
-1
YHHomeWebViewController.swift
.../Classes/Modules/Home(首页)/C/YHHomeWebViewController.swift
+3
-3
YHHomeCollectionViewCell.swift
...Classes/Modules/Home(首页)/V/YHHomeCollectionViewCell.swift
+1
-1
YHCodeSueecssViewController.swift
...ses/Modules/Login(登录)/C/YHCodeSueecssViewController.swift
+0
-3
YHCodeSueecssWithVideoBkgViewController.swift
...Login(登录)/C/YHCodeSueecssWithVideoBkgViewController.swift
+278
-0
YHPhoneLiginWithVideoBkgViewController.swift
.../Login(登录)/C/YHPhoneLiginWithVideoBkgViewController.swift
+6
-18
YHMyViewController.swift
...alaxy/Classes/Modules/Mine(我的)/C/YHMyViewController.swift
+2
-2
YHVideoPlayerVC.swift
galaxy/galaxy/Classes/Tools/VideoPlay/YHVideoPlayerVC.swift
+3
-3
No files found.
galaxy/galaxy.xcodeproj/project.pbxproj
View file @
e68e1c49
...
@@ -419,6 +419,7 @@
...
@@ -419,6 +419,7 @@
A5DF3D462BF72BA1003D5F03
/* YHTestViewController.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
A5DF3D452BF72BA0003D5F03
/* YHTestViewController.swift */
;
};
A5DF3D462BF72BA1003D5F03
/* YHTestViewController.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
A5DF3D452BF72BA0003D5F03
/* YHTestViewController.swift */
;
};
A5DF3D482BF9A1D0003D5F03
/* YHPhoneLiginWithVideoBkgViewController.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
A5DF3D472BF9A1D0003D5F03
/* YHPhoneLiginWithVideoBkgViewController.swift */
;
};
A5DF3D482BF9A1D0003D5F03
/* YHPhoneLiginWithVideoBkgViewController.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
A5DF3D472BF9A1D0003D5F03
/* YHPhoneLiginWithVideoBkgViewController.swift */
;
};
A5DF3D4C2BF9A348003D5F03
/* loginBkg.mov in Resources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
A5DF3D4B2BF9A348003D5F03
/* loginBkg.mov */
;
};
A5DF3D4C2BF9A348003D5F03
/* loginBkg.mov in Resources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
A5DF3D4B2BF9A348003D5F03
/* loginBkg.mov */
;
};
A5DF3D4E2BF9FDAC003D5F03
/* YHCodeSueecssWithVideoBkgViewController.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
A5DF3D4D2BF9FDAC003D5F03
/* YHCodeSueecssWithVideoBkgViewController.swift */
;
};
A5E69D512BA304D400411932
/* DIN Alternate Bold.ttf in Resources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
A5E69D502BA304D400411932
/* DIN Alternate Bold.ttf */
;
};
A5E69D512BA304D400411932
/* DIN Alternate Bold.ttf in Resources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
A5E69D502BA304D400411932
/* DIN Alternate Bold.ttf */
;
};
A5EF21312BA6DF94005027E6
/* YHMineSchemeViewController.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
A5EF21302BA6DF94005027E6
/* YHMineSchemeViewController.swift */
;
};
A5EF21312BA6DF94005027E6
/* YHMineSchemeViewController.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
A5EF21302BA6DF94005027E6
/* YHMineSchemeViewController.swift */
;
};
A5EF21332BA6E030005027E6
/* YHFileListViewController.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
A5EF21322BA6E030005027E6
/* YHFileListViewController.swift */
;
};
A5EF21332BA6E030005027E6
/* YHFileListViewController.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
A5EF21322BA6E030005027E6
/* YHFileListViewController.swift */
;
};
...
@@ -889,6 +890,7 @@
...
@@ -889,6 +890,7 @@
A5DF3D452BF72BA0003D5F03
/* YHTestViewController.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHTestViewController.swift
;
sourceTree
=
"<group>"
;
};
A5DF3D452BF72BA0003D5F03
/* YHTestViewController.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHTestViewController.swift
;
sourceTree
=
"<group>"
;
};
A5DF3D472BF9A1D0003D5F03
/* YHPhoneLiginWithVideoBkgViewController.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHPhoneLiginWithVideoBkgViewController.swift
;
sourceTree
=
"<group>"
;
};
A5DF3D472BF9A1D0003D5F03
/* YHPhoneLiginWithVideoBkgViewController.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHPhoneLiginWithVideoBkgViewController.swift
;
sourceTree
=
"<group>"
;
};
A5DF3D4B2BF9A348003D5F03
/* loginBkg.mov */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
video.quicktime
;
path
=
loginBkg.mov
;
sourceTree
=
"<group>"
;
};
A5DF3D4B2BF9A348003D5F03
/* loginBkg.mov */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
video.quicktime
;
path
=
loginBkg.mov
;
sourceTree
=
"<group>"
;
};
A5DF3D4D2BF9FDAC003D5F03
/* YHCodeSueecssWithVideoBkgViewController.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHCodeSueecssWithVideoBkgViewController.swift
;
sourceTree
=
"<group>"
;
};
A5E69D502BA304D400411932
/* DIN Alternate Bold.ttf */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
file
;
path
=
"DIN Alternate Bold.ttf"
;
sourceTree
=
"<group>"
;
};
A5E69D502BA304D400411932
/* DIN Alternate Bold.ttf */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
file
;
path
=
"DIN Alternate Bold.ttf"
;
sourceTree
=
"<group>"
;
};
A5EF21302BA6DF94005027E6
/* YHMineSchemeViewController.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHMineSchemeViewController.swift
;
sourceTree
=
"<group>"
;
};
A5EF21302BA6DF94005027E6
/* YHMineSchemeViewController.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHMineSchemeViewController.swift
;
sourceTree
=
"<group>"
;
};
A5EF21322BA6E030005027E6
/* YHFileListViewController.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHFileListViewController.swift
;
sourceTree
=
"<group>"
;
};
A5EF21322BA6E030005027E6
/* YHFileListViewController.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHFileListViewController.swift
;
sourceTree
=
"<group>"
;
};
...
@@ -2080,6 +2082,7 @@
...
@@ -2080,6 +2082,7 @@
04E86E0A2B70C13300A35F4B
/* YHCodeSueecssViewController.swift */
,
04E86E0A2B70C13300A35F4B
/* YHCodeSueecssViewController.swift */
,
04E86E0C2B70D51D00A35F4B
/* YHWebViewViewController.swift */
,
04E86E0C2B70D51D00A35F4B
/* YHWebViewViewController.swift */
,
A5DF3D472BF9A1D0003D5F03
/* YHPhoneLiginWithVideoBkgViewController.swift */
,
A5DF3D472BF9A1D0003D5F03
/* YHPhoneLiginWithVideoBkgViewController.swift */
,
A5DF3D4D2BF9FDAC003D5F03
/* YHCodeSueecssWithVideoBkgViewController.swift */
,
);
);
path
=
C
;
path
=
C
;
sourceTree
=
"<group>"
;
sourceTree
=
"<group>"
;
...
@@ -2816,6 +2819,7 @@
...
@@ -2816,6 +2819,7 @@
A56D2D612B62020C009C83A8
/* YHContractMainItemStatusCell.swift in Sources */
,
A56D2D612B62020C009C83A8
/* YHContractMainItemStatusCell.swift in Sources */
,
045EEECF2B9F171A0022A143
/* YHScoreOptionsView.swift in Sources */
,
045EEECF2B9F171A0022A143
/* YHScoreOptionsView.swift in Sources */
,
0445E6AF2BE9CFF6003C52F9
/* YHAppVersionForceUpdateView.swift in Sources */
,
0445E6AF2BE9CFF6003C52F9
/* YHAppVersionForceUpdateView.swift in Sources */
,
A5DF3D4E2BF9FDAC003D5F03
/* YHCodeSueecssWithVideoBkgViewController.swift in Sources */
,
045EEEC12B9F171A0022A143
/* YHOtherInfoFillModel.swift in Sources */
,
045EEEC12B9F171A0022A143
/* YHOtherInfoFillModel.swift in Sources */
,
0468D43A2B579EAC00CFB916
/* YHLoginViewModel.swift in Sources */
,
0468D43A2B579EAC00CFB916
/* YHLoginViewModel.swift in Sources */
,
045EEE9E2B9F171A0022A143
/* YHWorkExampleModel.swift in Sources */
,
045EEE9E2B9F171A0022A143
/* YHWorkExampleModel.swift in Sources */
,
...
...
galaxy/galaxy/AppDelegate.swift
View file @
e68e1c49
...
@@ -128,7 +128,6 @@ extension AppDelegate {
...
@@ -128,7 +128,6 @@ extension AppDelegate {
private
func
preloadOP
()
{
private
func
preloadOP
()
{
DispatchQueue
.
global
()
.
async
{
DispatchQueue
.
global
()
.
async
{
guard
let
videoURL
=
Bundle
.
main
.
url
(
forResource
:
"loginBkg"
,
withExtension
:
"mov"
)
else
{
return
}
guard
let
videoURL
=
Bundle
.
main
.
url
(
forResource
:
"loginBkg"
,
withExtension
:
"mov"
)
else
{
return
}
...
...
galaxy/galaxy/Classes/Modules/Home(首页)/C/YHHKEventViewController.swift
View file @
e68e1c49
...
@@ -140,7 +140,7 @@ extension YHHKEventViewController {
...
@@ -140,7 +140,7 @@ extension YHHKEventViewController {
YHShareManager
.
shared
.
sendLinkContent
(
"一图看清香港办事"
,
""
,
UIImage
(
named
:
"AppIcon"
)
??
UIImage
(),
link
:
urlString
)
YHShareManager
.
shared
.
sendLinkContent
(
"一图看清香港办事"
,
""
,
UIImage
(
named
:
"AppIcon"
)
??
UIImage
(),
link
:
urlString
)
}
}
}
else
{
}
else
{
let
vc
=
UINavigationController
(
rootVC
:
YHPhoneL
ogin
ViewController
())
let
vc
=
UINavigationController
(
rootVC
:
YHPhoneL
iginWithVideoBkg
ViewController
())
vc
.
modalPresentationStyle
=
.
custom
vc
.
modalPresentationStyle
=
.
custom
self
.
navigationController
?
.
present
(
vc
,
animated
:
true
)
self
.
navigationController
?
.
present
(
vc
,
animated
:
true
)
}
}
...
...
galaxy/galaxy/Classes/Modules/Home(首页)/C/YHHomeWebViewController.swift
View file @
e68e1c49
...
@@ -80,7 +80,7 @@ class YHHomeWebViewController: YHBaseViewController, WKUIDelegate, WKNavigationD
...
@@ -80,7 +80,7 @@ class YHHomeWebViewController: YHBaseViewController, WKUIDelegate, WKNavigationD
view
.
likeBlock
=
{
[
weak
self
]
flag
in
view
.
likeBlock
=
{
[
weak
self
]
flag
in
guard
let
self
=
self
else
{
return
}
guard
let
self
=
self
else
{
return
}
if
YHLoginManager
.
shared
.
isLogin
()
==
false
{
if
YHLoginManager
.
shared
.
isLogin
()
==
false
{
let
vc
=
UINavigationController
(
rootVC
:
YHPhoneL
ogin
ViewController
())
let
vc
=
UINavigationController
(
rootVC
:
YHPhoneL
iginWithVideoBkg
ViewController
())
vc
.
modalPresentationStyle
=
.
custom
vc
.
modalPresentationStyle
=
.
custom
self
.
navigationController
?
.
present
(
vc
,
animated
:
true
)
self
.
navigationController
?
.
present
(
vc
,
animated
:
true
)
return
return
...
@@ -111,7 +111,7 @@ class YHHomeWebViewController: YHBaseViewController, WKUIDelegate, WKNavigationD
...
@@ -111,7 +111,7 @@ class YHHomeWebViewController: YHBaseViewController, WKUIDelegate, WKNavigationD
view
.
starBlock
=
{
[
weak
self
]
flag
in
view
.
starBlock
=
{
[
weak
self
]
flag
in
guard
let
self
=
self
else
{
return
}
guard
let
self
=
self
else
{
return
}
if
YHLoginManager
.
shared
.
isLogin
()
==
false
{
if
YHLoginManager
.
shared
.
isLogin
()
==
false
{
let
vc
=
UINavigationController
(
rootVC
:
YHPhoneL
ogin
ViewController
())
let
vc
=
UINavigationController
(
rootVC
:
YHPhoneL
iginWithVideoBkg
ViewController
())
vc
.
modalPresentationStyle
=
.
custom
vc
.
modalPresentationStyle
=
.
custom
self
.
navigationController
?
.
present
(
vc
,
animated
:
true
)
self
.
navigationController
?
.
present
(
vc
,
animated
:
true
)
return
return
...
@@ -244,7 +244,7 @@ class YHHomeWebViewController: YHBaseViewController, WKUIDelegate, WKNavigationD
...
@@ -244,7 +244,7 @@ class YHHomeWebViewController: YHBaseViewController, WKUIDelegate, WKNavigationD
task
.
resume
()
task
.
resume
()
}
}
}
else
{
}
else
{
let
vc
=
UINavigationController
(
rootVC
:
YHPhoneL
ogin
ViewController
())
let
vc
=
UINavigationController
(
rootVC
:
YHPhoneL
iginWithVideoBkg
ViewController
())
vc
.
modalPresentationStyle
=
.
custom
vc
.
modalPresentationStyle
=
.
custom
self
.
navigationController
?
.
present
(
vc
,
animated
:
true
)
self
.
navigationController
?
.
present
(
vc
,
animated
:
true
)
}
}
...
...
galaxy/galaxy/Classes/Modules/Home(首页)/V/YHHomeCollectionViewCell.swift
View file @
e68e1c49
...
@@ -239,7 +239,7 @@ extension YHHomeCollectionViewCell {
...
@@ -239,7 +239,7 @@ extension YHHomeCollectionViewCell {
}
}
}
}
}
else
{
}
else
{
let
vc
=
UINavigationController
(
rootVC
:
YHPhoneL
ogin
ViewController
())
let
vc
=
UINavigationController
(
rootVC
:
YHPhoneL
iginWithVideoBkg
ViewController
())
vc
.
modalPresentationStyle
=
.
custom
vc
.
modalPresentationStyle
=
.
custom
self
.
parentViewController
?
.
navigationController
?
.
present
(
vc
,
animated
:
true
)
self
.
parentViewController
?
.
navigationController
?
.
present
(
vc
,
animated
:
true
)
}
}
...
...
galaxy/galaxy/Classes/Modules/Login(登录)/C/YHCodeSueecssViewController.swift
View file @
e68e1c49
...
@@ -212,16 +212,13 @@ class YHCodeSueecssViewController: YHBaseViewController {
...
@@ -212,16 +212,13 @@ class YHCodeSueecssViewController: YHBaseViewController {
sourceTimer
.
resume
()
sourceTimer
.
resume
()
}
}
@objc
func
startClicked
()
{
@objc
func
startClicked
()
{
YHHUD
.
show
(
.
progress
(
message
:
""
))
YHHUD
.
show
(
.
progress
(
message
:
""
))
viewModel
?
.
getLoginCode
(
phoneNumber
??
""
,
callBackBlock
:
{[
weak
self
]
success
,
error
in
viewModel
?
.
getLoginCode
(
phoneNumber
??
""
,
callBackBlock
:
{[
weak
self
]
success
,
error
in
YHHUD
.
hide
()
YHHUD
.
hide
()
guard
let
self
=
self
else
{
return
}
guard
let
self
=
self
else
{
return
}
if
success
==
true
{
if
success
==
true
{
// YHHUD.flash(message: "验证码已下发,请注意查收")
self
.
startTime
()
self
.
startTime
()
}
else
{
}
else
{
YHHUD
.
flash
(
message
:
error
?
.
errorMsg
??
""
)
YHHUD
.
flash
(
message
:
error
?
.
errorMsg
??
""
)
...
...
galaxy/galaxy/Classes/Modules/Login(登录)/C/YHCodeSueecssWithVideoBkgViewController.swift
0 → 100644
View file @
e68e1c49
//
// YHCodeSueecssWithVideoBkgViewController.swift
// galaxy
//
// Created by davidhuangA on 2024/5/19.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import
UIKit
import
IQKeyboardManagerSwift
import
AVFoundation
class
YHCodeSueecssWithVideoBkgViewController
:
YHBaseViewController
{
var
time
=
60
var
bgImageView
:
UIImageView
!
var
closeButton
:
UIButton
!
var
loginTitleLabel
:
UILabel
!
var
loginSubTitleLabel
:
UILabel
!
var
getCodeLabel
:
UILabel
!
var
getCodeButton
:
UIButton
!
var
smscodeView
:
YHSmsCodeInputView
!
var
phoneNumber
:
String
?
var
viewModel
:
YHLoginViewModel
?
override
func
viewDidLoad
()
{
super
.
viewDidLoad
()
setView
()
startTime
()
}
override
func
viewDidAppear
(
_
animated
:
Bool
)
{
super
.
viewDidAppear
(
animated
)
smscodeView
.
textField
.
becomeFirstResponder
()
}
//视频
private
var
player
:
AVPlayer
?
private
var
playerLayer
:
AVPlayerLayer
?
lazy
var
frontHoldView
:
UIView
=
{
let
view
=
UIView
()
view
.
backgroundColor
=
UIColor
(
hex
:
0x121A26
,
alpha
:
0.32
)
return
view
}()
}
extension
YHCodeSueecssWithVideoBkgViewController
{
private
func
setupBackgroundVideo
()
{
guard
let
videoURL
=
Bundle
.
main
.
url
(
forResource
:
"loginBkg"
,
withExtension
:
"mov"
)
else
{
return
}
player
=
AVPlayer
(
url
:
videoURL
)
player
?
.
actionAtItemEnd
=
.
none
playerLayer
=
AVPlayerLayer
(
player
:
player
)
playerLayer
?
.
frame
=
view
.
bounds
playerLayer
?
.
videoGravity
=
.
resizeAspectFill
view
.
layer
.
insertSublayer
(
playerLayer
!
,
at
:
0
)
player
?
.
play
()
player
?
.
seek
(
to
:
.
zero
)
NotificationCenter
.
default
.
addObserver
(
self
,
selector
:
#selector(
playerItemDidPlayToEndTimeNotification
)
,
name
:
AVPlayerItem
.
didPlayToEndTimeNotification
,
object
:
nil
)
}
@objc
func
playerItemDidPlayToEndTimeNotification
()
{
player
?
.
seek
(
to
:
.
zero
)
}
}
extension
YHCodeSueecssWithVideoBkgViewController
{
func
setView
()
{
viewModel
=
YHLoginViewModel
()
gk_navBackgroundColor
=
.
clear
gk_navShadowColor
=
.
clear
gk_navigationBar
.
isHidden
=
true
view
.
backgroundColor
=
.
white
setupBackgroundVideo
()
setupFrontUI
()
}
func
requetLogin
(
phone
:
String
,
code
:
String
)
{
YHHUD
.
show
(
.
progress
(
message
:
"登录中..."
))
self
.
viewModel
?
.
login
(
phone
:
phone
,
code
:
code
,
callBackBlock
:
{[
weak
self
]
success
,
error
in
YHHUD
.
hide
()
guard
let
self
=
self
else
{
return
}
if
success
==
false
{
YHHUD
.
flash
(
message
:
error
?
.
errorMsg
??
""
)
self
.
smscodeView
.
textField
.
becomeFirstResponder
()
}
else
{
YHLoginManager
.
shared
.
loginSuccessActionBlock
?()
YHHUD
.
flash
(
message
:
"登录成功"
)
IQKeyboardManager
.
shared
.
enable
=
true
self
.
dismiss
(
animated
:
true
)
}
})
}
func
startTime
()
{
getCodeLabel
.
isHidden
=
false
getCodeButton
.
isHidden
=
true
let
sourceTimer
=
DispatchSource
.
makeTimerSource
()
sourceTimer
.
schedule
(
deadline
:
DispatchTime
.
now
(),
repeating
:
DispatchTimeInterval
.
milliseconds
(
1000
),
leeway
:
DispatchTimeInterval
.
milliseconds
(
0
))
sourceTimer
.
setEventHandler
{
if
self
.
time
!=
0
{
self
.
time
-=
1
DispatchQueue
.
main
.
async
{
self
.
getCodeLabel
?
.
text
=
String
.
localizedStringWithFormat
(
"重新获取(%ds)"
,
self
.
time
)
}
}
else
if
self
.
time
<=
0
{
sourceTimer
.
cancel
()
DispatchQueue
.
main
.
async
{
self
.
time
=
60
self
.
getCodeLabel
.
isHidden
=
true
self
.
getCodeButton
.
isHidden
=
false
}
}
}
// 启动定时器
sourceTimer
.
resume
()
}
@objc
func
startClicked
()
{
YHHUD
.
show
(
.
progress
(
message
:
""
))
viewModel
?
.
getLoginCode
(
phoneNumber
??
""
,
callBackBlock
:
{[
weak
self
]
success
,
error
in
YHHUD
.
hide
()
guard
let
self
=
self
else
{
return
}
if
success
==
true
{
self
.
startTime
()
}
else
{
YHHUD
.
flash
(
message
:
error
?
.
errorMsg
??
""
)
}
})
}
@objc
func
close
()
{
self
.
navigationController
?
.
popViewController
()
}
func
setupFrontUI
()
{
// bgImageView = {
// let imageView = UIImageView()
// imageView.image = UIImage(named: "login_phone_bg_image")
// imageView.isUserInteractionEnabled = true
// return imageView
// }()
// view.addSubview(bgImageView)
// bgImageView.snp.makeConstraints { make in
// make.left.right.top.equalTo(view)
// make.height.equalTo(300)
// }
closeButton
=
{
let
button
=
UIButton
(
type
:
.
custom
)
button
.
setImage
(
UIImage
(
named
:
"login_back"
),
for
:
.
normal
)
button
.
addTarget
(
self
,
action
:
#selector(
close
)
,
for
:
.
touchUpInside
)
return
button
}()
view
.
addSubview
(
closeButton
)
closeButton
.
snp
.
makeConstraints
{
make
in
make
.
left
.
equalTo
(
13
)
make
.
top
.
equalTo
(
51
)
make
.
width
.
height
.
equalTo
(
30
)
}
loginTitleLabel
=
{
let
label
=
UILabel
()
label
.
text
=
"请输入验证码"
label
.
font
=
UIFont
.
PFSC_M
(
ofSize
:
28
)
label
.
textColor
=
UIColor
.
mainTextColor
return
label
}()
view
.
addSubview
(
loginTitleLabel
)
loginTitleLabel
.
snp
.
makeConstraints
{
make
in
make
.
left
.
equalTo
(
24
)
make
.
right
.
equalTo
(
-
24
)
make
.
top
.
equalTo
(
203
)
make
.
height
.
equalTo
(
25
)
}
loginSubTitleLabel
=
{
let
label
=
UILabel
()
label
.
text
=
"已发送至
\(
phoneNumber
??
""
)
"
label
.
font
=
UIFont
.
PFSC_R
(
ofSize
:
13
)
label
.
textColor
=
UIColor
.
placeHolderColor
return
label
}()
view
.
addSubview
(
loginSubTitleLabel
)
loginSubTitleLabel
.
snp
.
makeConstraints
{
make
in
make
.
left
.
equalTo
(
24
)
make
.
right
.
equalTo
(
-
24
)
make
.
top
.
equalTo
(
233
)
make
.
height
.
equalTo
(
20
)
}
smscodeView
=
{
let
view
=
YHSmsCodeInputView
(
config
:
YHSmsCodeViewConfig
())
view
.
complete
=
{
[
weak
self
]
code
in
guard
let
self
=
self
else
{
return
}
if
let
phone
=
self
.
phoneNumber
{
// 登录接口需要加一个deviceToken参数
YHHUD
.
show
(
.
progress
(
message
:
"登录中..."
))
if
YHLoginManager
.
shared
.
deviceTokenModel
.
registerId
.
isEmpty
{
JPUSHService
.
registrationIDCompletionHandler
{
resCode
,
registrationID
in
YHHUD
.
hide
()
YHLoginManager
.
shared
.
deviceTokenModel
.
registerId
=
registrationID
??
""
self
.
requetLogin
(
phone
:
phone
,
code
:
code
)
}
}
else
{
self
.
requetLogin
(
phone
:
phone
,
code
:
code
)
}
}
else
{
printLog
(
"errror : 电话号码为空"
)
}
}
return
view
}()
view
.
addSubview
(
smscodeView
)
smscodeView
.
snp
.
makeConstraints
{
make
in
make
.
left
.
right
.
equalToSuperview
()
make
.
top
.
equalTo
(
288
)
make
.
height
.
equalTo
(
55
)
}
getCodeLabel
=
{
let
button
=
UILabel
()
button
.
font
=
UIFont
.
PFSC_M
(
ofSize
:
16
)
button
.
text
=
"重新发送(58s)"
button
.
textColor
=
UIColor
.
init
(
hex
:
0x000000
,
transparency
:
0.4
)
button
.
textAlignment
=
.
center
button
.
isHidden
=
false
button
.
layer
.
cornerRadius
=
24
button
.
backgroundColor
=
UIColor
.
init
(
hex
:
0xffffff
,
transparency
:
0.4
)
button
.
clipsToBounds
=
true
// button.layer.borderWidth = 1
// button.layer.borderColor = UIColor(hex: 0xebeef4).cgColor
return
button
}()
view
.
addSubview
(
getCodeLabel
)
getCodeLabel
.
snp
.
makeConstraints
{
make
in
make
.
centerX
.
equalToSuperview
()
make
.
top
.
equalTo
(
382
)
make
.
height
.
equalTo
(
48
)
make
.
width
.
equalTo
(
335
)
}
getCodeButton
=
{
let
button
=
UIButton
(
type
:
.
custom
)
button
.
titleLabel
?
.
font
=
UIFont
.
PFSC_M
(
ofSize
:
16
)
button
.
contentHorizontalAlignment
=
.
center
button
.
setTitle
(
"获取验证码"
,
for
:
.
normal
)
button
.
setTitleColor
(
UIColor
(
hex
:
0x000000
,
alpha
:
1.0
),
for
:
.
normal
)
button
.
addTarget
(
self
,
action
:
#selector(
startClicked
)
,
for
:
.
touchUpInside
)
button
.
isHidden
=
true
button
.
layer
.
cornerRadius
=
24
button
.
clipsToBounds
=
true
button
.
backgroundColor
=
UIColor
(
hex
:
0xffffff
,
alpha
:
1.0
)
// button.layer.borderWidth = 1
// button.layer.borderColor = UIColor(hex: 0xebeef4).cgColor
return
button
}()
view
.
addSubview
(
getCodeButton
)
getCodeButton
.
snp
.
makeConstraints
{
make
in
make
.
centerX
.
equalToSuperview
()
make
.
top
.
equalTo
(
382
)
make
.
height
.
equalTo
(
48
)
make
.
width
.
equalTo
(
335
)
}
}
}
galaxy/galaxy/Classes/Modules/Login(登录)/C/YHPhoneLiginWithVideoBkgViewController.swift
View file @
e68e1c49
...
@@ -69,6 +69,9 @@ class YHPhoneLiginWithVideoBkgViewController: YHBaseViewController {
...
@@ -69,6 +69,9 @@ class YHPhoneLiginWithVideoBkgViewController: YHBaseViewController {
NotificationCenter
.
default
.
removeObserver
(
self
,
name
:
UIResponder
.
keyboardWillShowNotification
,
object
:
nil
)
NotificationCenter
.
default
.
removeObserver
(
self
,
name
:
UIResponder
.
keyboardWillShowNotification
,
object
:
nil
)
NotificationCenter
.
default
.
removeObserver
(
self
,
name
:
UIResponder
.
keyboardWillHideNotification
,
object
:
nil
)
NotificationCenter
.
default
.
removeObserver
(
self
,
name
:
UIResponder
.
keyboardWillHideNotification
,
object
:
nil
)
UITextField
.
appearance
()
.
tintColor
=
.
brandMainColor
}
}
}
}
...
@@ -82,7 +85,6 @@ extension YHPhoneLiginWithVideoBkgViewController {
...
@@ -82,7 +85,6 @@ extension YHPhoneLiginWithVideoBkgViewController {
make
.
top
.
equalTo
(
loginSubTitleLabel
.
snp
.
bottom
)
.
offset
(
72
)
make
.
top
.
equalTo
(
loginSubTitleLabel
.
snp
.
bottom
)
.
offset
(
72
)
make
.
left
.
right
.
equalToSuperview
()
make
.
left
.
right
.
equalToSuperview
()
}
}
}
}
}
}
...
@@ -112,8 +114,9 @@ extension YHPhoneLiginWithVideoBkgViewController {
...
@@ -112,8 +114,9 @@ extension YHPhoneLiginWithVideoBkgViewController {
NotificationCenter
.
default
.
addObserver
(
self
,
selector
:
#selector(
keyboardWillHide
)
,
name
:
UIResponder
.
keyboardWillHideNotification
,
object
:
nil
)
NotificationCenter
.
default
.
addObserver
(
self
,
selector
:
#selector(
keyboardWillHide
)
,
name
:
UIResponder
.
keyboardWillHideNotification
,
object
:
nil
)
setupBackgroundVideo
()
UITextField
.
appearance
()
.
tintColor
=
.
white
setupBackgroundVideo
()
setupFrontUI
()
setupFrontUI
()
}
}
...
@@ -123,19 +126,6 @@ extension YHPhoneLiginWithVideoBkgViewController {
...
@@ -123,19 +126,6 @@ extension YHPhoneLiginWithVideoBkgViewController {
make
.
edges
.
equalToSuperview
()
make
.
edges
.
equalToSuperview
()
}
}
// bgImageView = {
// let imageView = UIImageView()
// imageView.image = UIImage(named: "login_phone_bg_image")
// imageView.isUserInteractionEnabled = true
// return imageView
// }()
// frontHoldView.addSubview(bgImageView)
// bgImageView.snp.makeConstraints { make in
// make.left.right.top.equalTo(view)
// make.height.equalTo(300)
// }
closeButton
=
{
closeButton
=
{
let
button
=
UIButton
(
type
:
.
custom
)
let
button
=
UIButton
(
type
:
.
custom
)
button
.
setImage
(
UIImage
(
named
:
"login_close"
),
for
:
.
normal
)
button
.
setImage
(
UIImage
(
named
:
"login_close"
),
for
:
.
normal
)
...
@@ -269,11 +259,9 @@ extension YHPhoneLiginWithVideoBkgViewController {
...
@@ -269,11 +259,9 @@ extension YHPhoneLiginWithVideoBkgViewController {
YHHUD
.
show
(
.
progress
(
message
:
""
))
YHHUD
.
show
(
.
progress
(
message
:
""
))
viewModel
?
.
getLoginCode
(
phoneNumer
,
callBackBlock
:
{[
weak
self
]
success
,
error
in
viewModel
?
.
getLoginCode
(
phoneNumer
,
callBackBlock
:
{[
weak
self
]
success
,
error
in
YHHUD
.
hide
()
YHHUD
.
hide
()
guard
let
self
=
self
else
{
return
}
guard
let
self
=
self
else
{
return
}
if
success
==
true
{
if
success
==
true
{
let
vc
=
YHCodeSueecssViewController
()
let
vc
=
YHCodeSueecss
WithVideoBkg
ViewController
()
vc
.
phoneNumber
=
self
.
phoneMessageView
.
phoneTextField
.
text
vc
.
phoneNumber
=
self
.
phoneMessageView
.
phoneTextField
.
text
self
.
navigationController
?
.
pushViewController
(
vc
)
self
.
navigationController
?
.
pushViewController
(
vc
)
}
else
{
}
else
{
...
...
galaxy/galaxy/Classes/Modules/Mine(我的)/C/YHMyViewController.swift
View file @
e68e1c49
...
@@ -154,7 +154,7 @@ class YHMyViewController: YHBaseViewController, ConstraintRelatableTarget {
...
@@ -154,7 +154,7 @@ class YHMyViewController: YHBaseViewController, ConstraintRelatableTarget {
func
checkLogin
()
->
Bool
{
func
checkLogin
()
->
Bool
{
if
YHLoginManager
.
shared
.
isLogin
()
==
false
{
if
YHLoginManager
.
shared
.
isLogin
()
==
false
{
let
vc
=
UINavigationController
(
rootVC
:
YHPhoneL
ogin
ViewController
())
let
vc
=
UINavigationController
(
rootVC
:
YHPhoneL
iginWithVideoBkg
ViewController
())
vc
.
modalPresentationStyle
=
.
custom
vc
.
modalPresentationStyle
=
.
custom
self
.
navigationController
?
.
present
(
vc
,
animated
:
true
)
self
.
navigationController
?
.
present
(
vc
,
animated
:
true
)
return
false
return
false
...
@@ -275,7 +275,7 @@ extension YHMyViewController : UITableViewDelegate, UITableViewDataSource {
...
@@ -275,7 +275,7 @@ extension YHMyViewController : UITableViewDelegate, UITableViewDataSource {
//#endif
//#endif
if
!
checkLogin
()
{
if
!
checkLogin
()
{
let
vc
=
UINavigationController
(
rootVC
:
YHPhoneL
ogin
ViewController
())
let
vc
=
UINavigationController
(
rootVC
:
YHPhoneL
iginWithVideoBkg
ViewController
())
vc
.
modalPresentationStyle
=
.
custom
vc
.
modalPresentationStyle
=
.
custom
self
.
navigationController
?
.
present
(
vc
,
animated
:
true
)
self
.
navigationController
?
.
present
(
vc
,
animated
:
true
)
return
return
...
...
galaxy/galaxy/Classes/Tools/VideoPlay/YHVideoPlayerVC.swift
View file @
e68e1c49
...
@@ -139,7 +139,7 @@ class YHVideoPlayerVC: YHBaseViewController {
...
@@ -139,7 +139,7 @@ class YHVideoPlayerVC: YHBaseViewController {
guard
let
self
=
self
else
{
return
}
guard
let
self
=
self
else
{
return
}
if
YHLoginManager
.
shared
.
isLogin
()
==
false
{
if
YHLoginManager
.
shared
.
isLogin
()
==
false
{
self
.
player
.
pause
()
self
.
player
.
pause
()
let
vc
=
UINavigationController
(
rootVC
:
YHPhoneL
ogin
ViewController
())
let
vc
=
UINavigationController
(
rootVC
:
YHPhoneL
iginWithVideoBkg
ViewController
())
vc
.
modalPresentationStyle
=
.
custom
vc
.
modalPresentationStyle
=
.
custom
self
.
navigationController
?
.
present
(
vc
,
animated
:
true
)
self
.
navigationController
?
.
present
(
vc
,
animated
:
true
)
return
return
...
@@ -171,7 +171,7 @@ class YHVideoPlayerVC: YHBaseViewController {
...
@@ -171,7 +171,7 @@ class YHVideoPlayerVC: YHBaseViewController {
guard
let
self
=
self
else
{
return
}
guard
let
self
=
self
else
{
return
}
if
YHLoginManager
.
shared
.
isLogin
()
==
false
{
if
YHLoginManager
.
shared
.
isLogin
()
==
false
{
self
.
player
.
pause
()
self
.
player
.
pause
()
let
vc
=
UINavigationController
(
rootVC
:
YHPhoneL
ogin
ViewController
())
let
vc
=
UINavigationController
(
rootVC
:
YHPhoneL
iginWithVideoBkg
ViewController
())
vc
.
modalPresentationStyle
=
.
custom
vc
.
modalPresentationStyle
=
.
custom
self
.
navigationController
?
.
present
(
vc
,
animated
:
true
)
self
.
navigationController
?
.
present
(
vc
,
animated
:
true
)
return
return
...
@@ -266,7 +266,7 @@ extension YHVideoPlayerVC {
...
@@ -266,7 +266,7 @@ extension YHVideoPlayerVC {
if
YHLoginManager
.
shared
.
isLogin
()
==
false
{
if
YHLoginManager
.
shared
.
isLogin
()
==
false
{
self
.
player
.
pause
()
self
.
player
.
pause
()
let
vc
=
UINavigationController
(
rootVC
:
YHPhoneL
ogin
ViewController
())
let
vc
=
UINavigationController
(
rootVC
:
YHPhoneL
iginWithVideoBkg
ViewController
())
vc
.
modalPresentationStyle
=
.
custom
vc
.
modalPresentationStyle
=
.
custom
self
.
navigationController
?
.
present
(
vc
,
animated
:
true
)
self
.
navigationController
?
.
present
(
vc
,
animated
:
true
)
return
return
...
...
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