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
49a67b05
Commit
49a67b05
authored
Jan 04, 2024
by
Steven杜宇
1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add : 一键登录
parent
32a2c5c7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
35 additions
and
0 deletions
+35
-0
YHLoginViewController.swift
...y/Classes/Modules/Login(登录)/C/YHLoginViewController.swift
+35
-0
No files found.
galaxy/galaxy/Classes/Modules/Login(登录)/C/YHLoginViewController.swift
View file @
49a67b05
...
...
@@ -90,6 +90,7 @@ class YHLoginViewController: YHBaseViewController {
button
.
setTitle
(
"本机号码一键登录"
,
for
:
.
normal
)
button
.
setTitleColor
(
UIColor
(
hex
:
0xffffff
),
for
:
.
normal
)
button
.
layer
.
cornerRadius
=
24
button
.
addTarget
(
self
,
action
:
#selector(
aliCloudLogin
)
,
for
:
.
touchUpInside
)
return
button
}()
view
.
addSubview
(
loginButton
)
...
...
@@ -188,3 +189,37 @@ class YHLoginViewController: YHBaseViewController {
//测试
}
}
extension
YHLoginViewController
{
@objc
func
aliCloudLogin
()
{
let
handler
=
TXCommonHandler
.
sharedInstance
()
handler
.
accelerateLoginPage
(
withTimeout
:
10
)
{
[
weak
self
]
dic
in
if
dic
==
nil
{
return
}
guard
let
self
=
self
else
{
return
}
let
resultCode
=
dic
[
"resultCode"
]
as?
String
print
(
"resultCode:
\(
resultCode
)
"
)
}
var
model
=
TXCustomModel
()
model
.
navColor
=
.
orange
let
attributes
=
[
NSAttributedString
.
Key
.
font
:
UIFont
.
systemFont
(
ofSize
:
20
),
NSAttributedString
.
Key
.
foregroundColor
:
UIColor
.
white
,
]
model
.
navTitle
=
NSAttributedString
(
string
:
"一键登录"
,
attributes
:
attributes
)
model
.
supportedInterfaceOrientations
=
UIInterfaceOrientationMask
.
portrait
handler
.
getLoginToken
(
withTimeout
:
10.0
,
controller
:
self
,
model
:
model
)
{
[
weak
self
]
dic
in
guard
let
self
=
self
else
{
return
}
}
}
}
David黄金龙
@david.hjl
mentioned in commit
42030641
·
Jan 04, 2024
mentioned in commit
42030641
mentioned in commit 42030641fa15a060803a07011ab1075136cf528b
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