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
e933abb7
Commit
e933abb7
authored
May 22, 2024
by
David黄金龙
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改 登录界面相关的bug
parent
50094b6a
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
62 additions
and
257 deletions
+62
-257
project.pbxproj
galaxy/galaxy.xcodeproj/project.pbxproj
+0
-4
YHHomePageViewController.swift
...Classes/Modules/Home(首页)/C/YHHomePageViewController.swift
+0
-1
YHCodeSueecssWithVideoBkgViewController.swift
...Login(登录)/C/YHCodeSueecssWithVideoBkgViewController.swift
+38
-18
YHPhoneLoginViewController.swift
...sses/Modules/Login(登录)/C/YHPhoneLoginViewController.swift
+0
-233
YHMyViewController.swift
...alaxy/Classes/Modules/Mine(我的)/C/YHMyViewController.swift
+2
-1
Contents.json
...gationBar/back_icon_for_code_input.imageset/Contents.json
+22
-0
Group 2033194370@2x.png
...back_icon_for_code_input.imageset/Group 2033194370@2x.png
+0
-0
Group 2033194370@3x.png
...back_icon_for_code_input.imageset/Group 2033194370@3x.png
+0
-0
No files found.
galaxy/galaxy.xcodeproj/project.pbxproj
View file @
e933abb7
...
@@ -271,7 +271,6 @@
...
@@ -271,7 +271,6 @@
04CC2EF02BC3DDB2000305DD
/* YHServiceBannerView.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
04CC2EEF2BC3DDB2000305DD
/* YHServiceBannerView.swift */
;
};
04CC2EF02BC3DDB2000305DD
/* YHServiceBannerView.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
04CC2EEF2BC3DDB2000305DD
/* YHServiceBannerView.swift */
;
};
04D5C5662B8ED92600190021
/* YHBaseModel.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
04D5C5652B8ED92600190021
/* YHBaseModel.swift */
;
};
04D5C5662B8ED92600190021
/* YHBaseModel.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
04D5C5652B8ED92600190021
/* YHBaseModel.swift */
;
};
04E41DE82BD240570077EAE3
/* YHOrderDetailViewController.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
04E41DE72BD240570077EAE3
/* YHOrderDetailViewController.swift */
;
};
04E41DE82BD240570077EAE3
/* YHOrderDetailViewController.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
04E41DE72BD240570077EAE3
/* YHOrderDetailViewController.swift */
;
};
04E86E092B707ACE00A35F4B
/* YHPhoneLoginViewController.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
04E86E082B707ACE00A35F4B
/* YHPhoneLoginViewController.swift */
;
};
04E86E0B2B70C13300A35F4B
/* YHCodeSueecssViewController.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
04E86E0A2B70C13300A35F4B
/* YHCodeSueecssViewController.swift */
;
};
04E86E0B2B70C13300A35F4B
/* YHCodeSueecssViewController.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
04E86E0A2B70C13300A35F4B
/* YHCodeSueecssViewController.swift */
;
};
04E86E0D2B70D51D00A35F4B
/* YHWebViewViewController.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
04E86E0C2B70D51D00A35F4B
/* YHWebViewViewController.swift */
;
};
04E86E0D2B70D51D00A35F4B
/* YHWebViewViewController.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
04E86E0C2B70D51D00A35F4B
/* YHWebViewViewController.swift */
;
};
04E86E662B86EB6F00A35F4B
/* YHLoginManager.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
04E86E652B86EB6F00A35F4B
/* YHLoginManager.swift */
;
};
04E86E662B86EB6F00A35F4B
/* YHLoginManager.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
04E86E652B86EB6F00A35F4B
/* YHLoginManager.swift */
;
};
...
@@ -737,7 +736,6 @@
...
@@ -737,7 +736,6 @@
04CC2EEF2BC3DDB2000305DD
/* YHServiceBannerView.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHServiceBannerView.swift
;
sourceTree
=
"<group>"
;
};
04CC2EEF2BC3DDB2000305DD
/* YHServiceBannerView.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHServiceBannerView.swift
;
sourceTree
=
"<group>"
;
};
04D5C5652B8ED92600190021
/* YHBaseModel.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHBaseModel.swift
;
sourceTree
=
"<group>"
;
};
04D5C5652B8ED92600190021
/* YHBaseModel.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHBaseModel.swift
;
sourceTree
=
"<group>"
;
};
04E41DE72BD240570077EAE3
/* YHOrderDetailViewController.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHOrderDetailViewController.swift
;
sourceTree
=
"<group>"
;
};
04E41DE72BD240570077EAE3
/* YHOrderDetailViewController.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHOrderDetailViewController.swift
;
sourceTree
=
"<group>"
;
};
04E86E082B707ACE00A35F4B
/* YHPhoneLoginViewController.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHPhoneLoginViewController.swift
;
sourceTree
=
"<group>"
;
};
04E86E0A2B70C13300A35F4B
/* YHCodeSueecssViewController.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHCodeSueecssViewController.swift
;
sourceTree
=
"<group>"
;
};
04E86E0A2B70C13300A35F4B
/* YHCodeSueecssViewController.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHCodeSueecssViewController.swift
;
sourceTree
=
"<group>"
;
};
04E86E0C2B70D51D00A35F4B
/* YHWebViewViewController.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHWebViewViewController.swift
;
sourceTree
=
"<group>"
;
};
04E86E0C2B70D51D00A35F4B
/* YHWebViewViewController.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHWebViewViewController.swift
;
sourceTree
=
"<group>"
;
};
04E86E652B86EB6F00A35F4B
/* YHLoginManager.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHLoginManager.swift
;
sourceTree
=
"<group>"
;
};
04E86E652B86EB6F00A35F4B
/* YHLoginManager.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHLoginManager.swift
;
sourceTree
=
"<group>"
;
};
...
@@ -2084,7 +2082,6 @@
...
@@ -2084,7 +2082,6 @@
children
=
(
children
=
(
0468D4232B494BEA00CFB916
/* YHCodeResultViewController.swift */
,
0468D4232B494BEA00CFB916
/* YHCodeResultViewController.swift */
,
0468D4252B495A5400CFB916
/* YHPickPhoneAddressViewController.swift */
,
0468D4252B495A5400CFB916
/* YHPickPhoneAddressViewController.swift */
,
04E86E082B707ACE00A35F4B
/* YHPhoneLoginViewController.swift */
,
04E86E0A2B70C13300A35F4B
/* YHCodeSueecssViewController.swift */
,
04E86E0A2B70C13300A35F4B
/* YHCodeSueecssViewController.swift */
,
04E86E0C2B70D51D00A35F4B
/* YHWebViewViewController.swift */
,
04E86E0C2B70D51D00A35F4B
/* YHWebViewViewController.swift */
,
A5DF3D472BF9A1D0003D5F03
/* YHPhoneLiginWithVideoBkgViewController.swift */
,
A5DF3D472BF9A1D0003D5F03
/* YHPhoneLiginWithVideoBkgViewController.swift */
,
...
@@ -2795,7 +2792,6 @@
...
@@ -2795,7 +2792,6 @@
045EEE9D2B9F171A0022A143
/* YHWorkItemListViewModel.swift in Sources */
,
045EEE9D2B9F171A0022A143
/* YHWorkItemListViewModel.swift in Sources */
,
A5ACE9392B4564F7002C94D2
/* UIDevice+Extension.swift in Sources */
,
A5ACE9392B4564F7002C94D2
/* UIDevice+Extension.swift in Sources */
,
045EEEE82B9F171A0022A143
/* YHFamilyMemberViewModel.swift in Sources */
,
045EEEE82B9F171A0022A143
/* YHFamilyMemberViewModel.swift in Sources */
,
04E86E092B707ACE00A35F4B
/* YHPhoneLoginViewController.swift in Sources */
,
045EEED02B9F171A0022A143
/* YHScoreResultView.swift in Sources */
,
045EEED02B9F171A0022A143
/* YHScoreResultView.swift in Sources */
,
0425E6442BA95FE100A5E763
/* YHSchemeTableHeadView.swift in Sources */
,
0425E6442BA95FE100A5E763
/* YHSchemeTableHeadView.swift in Sources */
,
045EEEBC2B9F171A0022A143
/* YHClipperButton.swift in Sources */
,
045EEEBC2B9F171A0022A143
/* YHClipperButton.swift in Sources */
,
...
...
galaxy/galaxy/Classes/Modules/Home(首页)/C/YHHomePageViewController.swift
View file @
e933abb7
...
@@ -254,7 +254,6 @@ extension YHHomePageViewController : UITabBarControllerDelegate {
...
@@ -254,7 +254,6 @@ extension YHHomePageViewController : UITabBarControllerDelegate {
if
YHLoginManager
.
shared
.
isLogin
()
{
if
YHLoginManager
.
shared
.
isLogin
()
{
return
true
return
true
}
else
{
}
else
{
// let vc = UINavigationController(rootVC: YHPhoneLoginViewController())
let
vc
=
UINavigationController
(
rootVC
:
YHPhoneLiginWithVideoBkgViewController
())
let
vc
=
UINavigationController
(
rootVC
:
YHPhoneLiginWithVideoBkgViewController
())
vc
.
modalPresentationStyle
=
.
custom
vc
.
modalPresentationStyle
=
.
custom
UIViewController
.
current
?
.
navigationController
?
.
present
(
vc
,
animated
:
true
)
UIViewController
.
current
?
.
navigationController
?
.
present
(
vc
,
animated
:
true
)
...
...
galaxy/galaxy/Classes/Modules/Login(登录)/C/YHCodeSueecssWithVideoBkgViewController.swift
View file @
e933abb7
...
@@ -27,7 +27,6 @@ class YHCodeSueecssWithVideoBkgViewController: YHBaseViewController {
...
@@ -27,7 +27,6 @@ class YHCodeSueecssWithVideoBkgViewController: YHBaseViewController {
override
func
viewDidLoad
()
{
override
func
viewDidLoad
()
{
super
.
viewDidLoad
()
super
.
viewDidLoad
()
setView
()
setView
()
startTime
()
startTime
()
}
}
...
@@ -46,6 +45,11 @@ class YHCodeSueecssWithVideoBkgViewController: YHBaseViewController {
...
@@ -46,6 +45,11 @@ class YHCodeSueecssWithVideoBkgViewController: YHBaseViewController {
view
.
backgroundColor
=
UIColor
(
hex
:
0x121A26
,
alpha
:
0.32
)
view
.
backgroundColor
=
UIColor
(
hex
:
0x121A26
,
alpha
:
0.32
)
return
view
return
view
}()
}()
override
var
preferredStatusBarStyle
:
UIStatusBarStyle
{
return
.
lightContent
}
}
}
...
@@ -102,6 +106,7 @@ extension YHCodeSueecssWithVideoBkgViewController {
...
@@ -102,6 +106,7 @@ extension YHCodeSueecssWithVideoBkgViewController {
}
else
{
}
else
{
YHLoginManager
.
shared
.
loginSuccessActionBlock
?()
YHLoginManager
.
shared
.
loginSuccessActionBlock
?()
YHHUD
.
flash
(
message
:
"登录成功"
)
YHHUD
.
flash
(
message
:
"登录成功"
)
IQKeyboardManager
.
shared
.
enable
=
true
self
.
dismiss
(
animated
:
true
)
self
.
dismiss
(
animated
:
true
)
}
}
})
})
...
@@ -116,7 +121,7 @@ extension YHCodeSueecssWithVideoBkgViewController {
...
@@ -116,7 +121,7 @@ extension YHCodeSueecssWithVideoBkgViewController {
if
self
.
time
!=
0
{
if
self
.
time
!=
0
{
self
.
time
-=
1
self
.
time
-=
1
DispatchQueue
.
main
.
async
{
DispatchQueue
.
main
.
async
{
self
.
getCodeLabel
?
.
text
=
String
.
localizedStringWithFormat
(
"重新获取(%d
s
)"
,
self
.
time
)
self
.
getCodeLabel
?
.
text
=
String
.
localizedStringWithFormat
(
"重新获取(%d)"
,
self
.
time
)
}
}
}
else
if
self
.
time
<=
0
{
}
else
if
self
.
time
<=
0
{
sourceTimer
.
cancel
()
sourceTimer
.
cancel
()
...
@@ -146,6 +151,7 @@ extension YHCodeSueecssWithVideoBkgViewController {
...
@@ -146,6 +151,7 @@ extension YHCodeSueecssWithVideoBkgViewController {
}
}
@objc
func
close
()
{
@objc
func
close
()
{
IQKeyboardManager
.
shared
.
enable
=
false
self
.
navigationController
?
.
popViewController
()
self
.
navigationController
?
.
popViewController
()
}
}
func
setupFrontUI
()
{
func
setupFrontUI
()
{
...
@@ -161,13 +167,19 @@ extension YHCodeSueecssWithVideoBkgViewController {
...
@@ -161,13 +167,19 @@ extension YHCodeSueecssWithVideoBkgViewController {
// make.height.equalTo(300)
// make.height.equalTo(300)
// }
// }
view
.
addSubview
(
frontHoldView
)
frontHoldView
.
snp
.
makeConstraints
{
make
in
make
.
edges
.
equalToSuperview
()
}
closeButton
=
{
closeButton
=
{
let
button
=
UIButton
(
type
:
.
custom
)
let
button
=
UIButton
(
type
:
.
custom
)
button
.
setImage
(
UIImage
(
named
:
"login_back"
),
for
:
.
normal
)
// button.setImage(UIImage(named: "login_back"), for: .normal)
button
.
setImage
(
UIImage
(
named
:
"back_icon_for_code_input"
),
for
:
.
normal
)
button
.
addTarget
(
self
,
action
:
#selector(
close
)
,
for
:
.
touchUpInside
)
button
.
addTarget
(
self
,
action
:
#selector(
close
)
,
for
:
.
touchUpInside
)
return
button
return
button
}()
}()
v
iew
.
addSubview
(
closeButton
)
frontHoldV
iew
.
addSubview
(
closeButton
)
closeButton
.
snp
.
makeConstraints
{
make
in
closeButton
.
snp
.
makeConstraints
{
make
in
make
.
left
.
equalTo
(
13
)
make
.
left
.
equalTo
(
13
)
make
.
top
.
equalTo
(
51
)
make
.
top
.
equalTo
(
51
)
...
@@ -177,30 +189,30 @@ extension YHCodeSueecssWithVideoBkgViewController {
...
@@ -177,30 +189,30 @@ extension YHCodeSueecssWithVideoBkgViewController {
loginTitleLabel
=
{
loginTitleLabel
=
{
let
label
=
UILabel
()
let
label
=
UILabel
()
label
.
text
=
"请输入验证码"
label
.
text
=
"请输入验证码"
label
.
font
=
UIFont
.
PFSC_
M
(
ofSize
:
28
)
label
.
font
=
UIFont
.
PFSC_
B
(
ofSize
:
30
)
label
.
textColor
=
UIColor
.
mainTextColor
label
.
textColor
=
UIColor
.
white
return
label
return
label
}()
}()
v
iew
.
addSubview
(
loginTitleLabel
)
frontHoldV
iew
.
addSubview
(
loginTitleLabel
)
loginTitleLabel
.
snp
.
makeConstraints
{
make
in
loginTitleLabel
.
snp
.
makeConstraints
{
make
in
make
.
left
.
equalTo
(
24
)
make
.
left
.
equalTo
(
24
)
make
.
right
.
equalTo
(
-
24
)
make
.
right
.
equalTo
(
-
24
)
make
.
top
.
equalTo
(
203
)
make
.
top
.
equalTo
(
closeButton
.
snp
.
bottom
)
.
offset
(
67
)
make
.
height
.
equalTo
(
25
)
make
.
height
.
equalTo
(
42
)
}
}
loginSubTitleLabel
=
{
loginSubTitleLabel
=
{
let
label
=
UILabel
()
let
label
=
UILabel
()
label
.
text
=
"已发送至
\(
phoneNumber
??
""
)
"
label
.
text
=
"已发送至
\(
phoneNumber
??
""
)
"
label
.
font
=
UIFont
.
PFSC_R
(
ofSize
:
1
3
)
label
.
font
=
UIFont
.
PFSC_R
(
ofSize
:
1
5
)
label
.
textColor
=
UIColor
.
placeHolderColor
label
.
textColor
=
UIColor
(
hex
:
0xffffff
,
alpha
:
0.8
)
return
label
return
label
}()
}()
v
iew
.
addSubview
(
loginSubTitleLabel
)
frontHoldV
iew
.
addSubview
(
loginSubTitleLabel
)
loginSubTitleLabel
.
snp
.
makeConstraints
{
make
in
loginSubTitleLabel
.
snp
.
makeConstraints
{
make
in
make
.
left
.
equalTo
(
24
)
make
.
left
.
equalTo
(
24
)
make
.
right
.
equalTo
(
-
24
)
make
.
right
.
equalTo
(
-
24
)
make
.
top
.
equalTo
(
233
)
make
.
top
.
equalTo
(
loginTitleLabel
.
snp
.
bottom
)
.
offset
(
4
)
make
.
height
.
equalTo
(
20
)
make
.
height
.
equalTo
(
20
)
}
}
...
@@ -229,7 +241,7 @@ extension YHCodeSueecssWithVideoBkgViewController {
...
@@ -229,7 +241,7 @@ extension YHCodeSueecssWithVideoBkgViewController {
}
}
return
view
return
view
}()
}()
v
iew
.
addSubview
(
smscodeView
)
frontHoldV
iew
.
addSubview
(
smscodeView
)
smscodeView
.
snp
.
makeConstraints
{
make
in
smscodeView
.
snp
.
makeConstraints
{
make
in
make
.
left
.
right
.
equalToSuperview
()
make
.
left
.
right
.
equalToSuperview
()
make
.
top
.
equalTo
(
288
)
make
.
top
.
equalTo
(
288
)
...
@@ -239,8 +251,8 @@ extension YHCodeSueecssWithVideoBkgViewController {
...
@@ -239,8 +251,8 @@ extension YHCodeSueecssWithVideoBkgViewController {
getCodeLabel
=
{
getCodeLabel
=
{
let
button
=
UILabel
()
let
button
=
UILabel
()
button
.
font
=
UIFont
.
PFSC_M
(
ofSize
:
16
)
button
.
font
=
UIFont
.
PFSC_M
(
ofSize
:
16
)
button
.
text
=
"重新发送(58
s
)"
button
.
text
=
"重新发送(58)"
button
.
textColor
=
UIColor
.
init
(
hex
:
0x
000000
,
transparency
:
0.4
)
button
.
textColor
=
UIColor
.
init
(
hex
:
0x
121A26
)
button
.
textAlignment
=
.
center
button
.
textAlignment
=
.
center
button
.
isHidden
=
false
button
.
isHidden
=
false
button
.
layer
.
cornerRadius
=
24
button
.
layer
.
cornerRadius
=
24
...
@@ -250,7 +262,7 @@ extension YHCodeSueecssWithVideoBkgViewController {
...
@@ -250,7 +262,7 @@ extension YHCodeSueecssWithVideoBkgViewController {
// button.layer.borderColor = UIColor(hex: 0xebeef4).cgColor
// button.layer.borderColor = UIColor(hex: 0xebeef4).cgColor
return
button
return
button
}()
}()
v
iew
.
addSubview
(
getCodeLabel
)
frontHoldV
iew
.
addSubview
(
getCodeLabel
)
getCodeLabel
.
snp
.
makeConstraints
{
make
in
getCodeLabel
.
snp
.
makeConstraints
{
make
in
make
.
centerX
.
equalToSuperview
()
make
.
centerX
.
equalToSuperview
()
make
.
top
.
equalTo
(
382
)
make
.
top
.
equalTo
(
382
)
...
@@ -273,12 +285,20 @@ extension YHCodeSueecssWithVideoBkgViewController {
...
@@ -273,12 +285,20 @@ extension YHCodeSueecssWithVideoBkgViewController {
// button.layer.borderColor = UIColor(hex: 0xebeef4).cgColor
// button.layer.borderColor = UIColor(hex: 0xebeef4).cgColor
return
button
return
button
}()
}()
v
iew
.
addSubview
(
getCodeButton
)
frontHoldV
iew
.
addSubview
(
getCodeButton
)
getCodeButton
.
snp
.
makeConstraints
{
make
in
getCodeButton
.
snp
.
makeConstraints
{
make
in
make
.
centerX
.
equalToSuperview
()
make
.
centerX
.
equalToSuperview
()
make
.
top
.
equalTo
(
382
)
make
.
top
.
equalTo
(
382
)
make
.
height
.
equalTo
(
48
)
make
.
height
.
equalTo
(
48
)
make
.
width
.
equalTo
(
335
)
make
.
width
.
equalTo
(
335
)
}
}
let
tap
=
UITapGestureRecognizer
(
target
:
self
,
action
:
#selector(
clickFrontView
)
)
frontHoldView
.
addGestureRecognizer
(
tap
)
}
@objc
func
clickFrontView
()
{
self
.
smscodeView
.
textField
.
becomeFirstResponder
()
}
}
}
}
galaxy/galaxy/Classes/Modules/Login(登录)/C/YHPhoneLoginViewController.swift
deleted
100644 → 0
View file @
50094b6a
//
// YHPhoneLoginViewController.swift
// galaxy
//
// Created by EDY on 2024/2/5.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import
UIKit
import
IQKeyboardManagerSwift
class
YHPhoneLoginViewController
:
YHBaseViewController
{
var
bgImageView
:
UIImageView
!
var
closeButton
:
UIButton
!
var
logImageView
:
UIImageView
!
var
loginTitleLabel
:
UILabel
!
var
loginSubTitleLabel
:
UILabel
!
var
phoneMessageView
:
YHPhoneMessageView
!
var
getCodeButton
:
UIButton
!
var
privacyView
:
YHLoginPrivacyView
!
var
viewModel
:
YHLoginViewModel
?
override
func
viewDidLoad
()
{
super
.
viewDidLoad
()
viewModel
=
YHLoginViewModel
()
setView
()
gk_navBackgroundColor
=
.
clear
gk_navShadowColor
=
.
clear
gk_navigationBar
.
isHidden
=
true
}
override
func
viewWillAppear
(
_
animated
:
Bool
)
{
super
.
viewWillAppear
(
animated
)
YHAnalytics
.
timeStrat
(
"loginTime"
)
}
override
func
viewWillDisappear
(
_
animated
:
Bool
)
{
super
.
viewWillDisappear
(
animated
)
YHAnalytics
.
timeEnd
(
"loginTime"
)
}
override
func
viewDidDisappear
(
_
animated
:
Bool
)
{
super
.
viewDidDisappear
(
animated
)
}
func
setView
()
{
view
.
backgroundColor
=
.
white
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_close"
),
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
)
}
logImageView
=
{
let
imageView
=
UIImageView
()
imageView
.
image
=
UIImage
(
named
:
"login_icon"
)
imageView
.
layer
.
masksToBounds
=
true
imageView
.
layer
.
cornerRadius
=
kCornerRadius8
return
imageView
}()
view
.
addSubview
(
logImageView
)
logImageView
.
snp
.
makeConstraints
{
make
in
make
.
left
.
equalTo
(
24
)
make
.
width
.
height
.
equalTo
(
53
)
make
.
top
.
equalTo
(
120
)
}
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
=
"手机号首次登录自动注册"
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
)
}
phoneMessageView
=
{
let
view
=
YHPhoneMessageView
()
view
.
backgroundColor
=
UIColor
.
contentBkgColor
view
.
layer
.
cornerRadius
=
kCornerRadius6
view
.
layer
.
borderWidth
=
1
view
.
layer
.
borderColor
=
UIColor
(
hex
:
0xebeef4
)
.
cgColor
view
.
phoneBlock
=
{[
weak
self
]
count
in
guard
let
self
=
self
else
{
return
}
if
count
==
0
{
self
.
getCodeButton
.
backgroundColor
=
UIColor
.
brandMainColor
.
withAlphaComponent
(
0.4
)
self
.
getCodeButton
.
isEnabled
=
false
}
else
{
self
.
getCodeButton
.
backgroundColor
=
UIColor
.
brandMainColor
self
.
getCodeButton
.
isEnabled
=
true
}
}
return
view
}()
view
.
addSubview
(
phoneMessageView
)
phoneMessageView
.
snp
.
makeConstraints
{
make
in
make
.
left
.
equalTo
(
20
)
make
.
right
.
equalTo
(
-
20
)
make
.
top
.
equalTo
(
300
)
make
.
height
.
equalTo
(
44
)
}
getCodeButton
=
{
let
button
=
UIButton
(
type
:
.
custom
)
button
.
backgroundColor
=
UIColor
.
brandMainColor
.
withAlphaComponent
(
0.4
)
button
.
titleLabel
?
.
font
=
UIFont
.
PFSC_M
(
ofSize
:
16
)
button
.
contentHorizontalAlignment
=
.
center
button
.
setTitle
(
"获取验证码"
,
for
:
.
normal
)
button
.
setTitleColor
(
UIColor
(
hex
:
0xffffff
),
for
:
.
normal
)
button
.
layer
.
cornerRadius
=
kCornerRadius3
button
.
addTarget
(
self
,
action
:
#selector(
getCode
)
,
for
:
.
touchUpInside
)
button
.
isEnabled
=
false
return
button
}()
view
.
addSubview
(
getCodeButton
)
getCodeButton
.
snp
.
makeConstraints
{
make
in
make
.
left
.
equalTo
(
20
)
make
.
right
.
equalTo
(
-
20
)
make
.
top
.
equalTo
(
376
)
make
.
height
.
equalTo
(
48
)
}
privacyView
=
{
let
view
=
YHLoginPrivacyView
()
return
view
}()
view
.
addSubview
(
privacyView
)
privacyView
.
snp
.
makeConstraints
{
make
in
make
.
top
.
equalTo
(
442
)
make
.
left
.
equalTo
(
25
)
make
.
height
.
equalTo
(
20
)
make
.
width
.
equalTo
(
260
)
}
//测试
}
@objc
func
getCode
()
{
IQKeyboardManager
.
shared
.
resignFirstResponder
()
let
phoneNumer
=
phoneMessageView
.
phoneTextField
.
text
??
""
guard
phoneNumer
.
isMobile
()
==
true
else
{
YHHUD
.
flash
(
message
:
"请输入正确的手机号"
)
return
}
if
privacyView
.
isAgree
{
YHHUD
.
show
(
.
progress
(
message
:
""
))
viewModel
?
.
getLoginCode
(
phoneNumer
,
callBackBlock
:
{[
weak
self
]
success
,
error
in
YHHUD
.
hide
()
guard
let
self
=
self
else
{
return
}
if
success
==
true
{
let
vc
=
YHCodeSueecssViewController
()
vc
.
phoneNumber
=
self
.
phoneMessageView
.
phoneTextField
.
text
self
.
navigationController
?
.
pushViewController
(
vc
)
}
else
{
var
msg
=
error
?
.
errorMsg
??
""
if
msg
.
isEmpty
{
msg
=
String
(
error
?
.
errorCode
??
404
)
}
YHHUD
.
flash
(
message
:
msg
)
}
})
}
else
{
let
view
=
YHPrivacyAlertView
(
frame
:
view
.
bounds
)
view
.
urlBlock
=
{
[
weak
self
]
(
type
,
url
)
in
guard
let
self
=
self
else
{
return
}
let
vc
=
YHWebViewViewController
()
vc
.
url
=
url
if
type
==
0
{
vc
.
navTitle
=
"银河港生活隐私政策"
}
else
if
type
==
1
{
vc
.
navTitle
=
"银河港生活用户条款"
}
self
.
navigationController
?
.
pushViewController
(
vc
)
}
view
.
agreeBlock
=
{
[
weak
self
]
in
guard
let
self
=
self
else
{
return
}
self
.
privacyView
.
isAgree
=
true
self
.
getCode
()
}
self
.
view
.
addSubview
(
view
)
}
}
@objc
func
close
()
{
YHLoginManager
.
shared
.
loginSuccessActionBlock
=
nil
self
.
dismiss
(
animated
:
true
)
}
}
galaxy/galaxy/Classes/Modules/Mine(我的)/C/YHMyViewController.swift
View file @
e933abb7
...
@@ -269,7 +269,8 @@ extension YHMyViewController : UITableViewDelegate, UITableViewDataSource {
...
@@ -269,7 +269,8 @@ extension YHMyViewController : UITableViewDelegate, UITableViewDataSource {
if
(
indexPath
.
row
>=
items
.
count
)
{
return
}
if
(
indexPath
.
row
>=
items
.
count
)
{
return
}
//#if DEBUG
//#if DEBUG
// let vc = YHTestViewController()
// let vc = YHCodeSueecssWithVideoBkgViewController()
// vc.phoneNumber = "15818743775"
// self.navigationController?.pushViewController(vc)
// self.navigationController?.pushViewController(vc)
// return
// return
//#endif
//#endif
...
...
galaxy/galaxy/Res/Assets.xcassets/NavigationBar/back_icon_for_code_input.imageset/Contents.json
0 → 100644
View file @
e933abb7
{
"images"
:
[
{
"idiom"
:
"universal"
,
"scale"
:
"1x"
},
{
"filename"
:
"Group 2033194370@2x.png"
,
"idiom"
:
"universal"
,
"scale"
:
"2x"
},
{
"filename"
:
"Group 2033194370@3x.png"
,
"idiom"
:
"universal"
,
"scale"
:
"3x"
}
],
"info"
:
{
"author"
:
"xcode"
,
"version"
:
1
}
}
galaxy/galaxy/Res/Assets.xcassets/NavigationBar/back_icon_for_code_input.imageset/Group 2033194370@2x.png
0 → 100644
View file @
e933abb7
349 Bytes
galaxy/galaxy/Res/Assets.xcassets/NavigationBar/back_icon_for_code_input.imageset/Group 2033194370@3x.png
0 → 100644
View file @
e933abb7
481 Bytes
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