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
d4f55862
Commit
d4f55862
authored
Jun 18, 2024
by
David黄金龙
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
检查是否安装 微信
未安装 则隐藏微信入口
parent
326a46d7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
39 additions
and
23 deletions
+39
-23
YHOtherLoginViewController.swift
...sses/Modules/Login(登录)/C/YHOtherLoginViewController.swift
+39
-23
No files found.
galaxy/galaxy/Classes/Modules/Login(登录)/C/YHOtherLoginViewController.swift
View file @
d4f55862
...
...
@@ -156,30 +156,46 @@ class YHOtherLoginViewController: YHBaseViewController {
make
.
width
.
equalTo
(
260
)
}
wechatButton
=
{
let
button
=
UIButton
(
type
:
.
custom
)
button
.
setImage
(
UIImage
(
named
:
"login_wechat"
),
for
:
.
normal
)
button
.
addTarget
(
self
,
action
:
#selector(
wechatLogin
)
,
for
:
.
touchUpInside
)
return
button
}()
view
.
addSubview
(
wechatButton
)
wechatButton
.
snp
.
makeConstraints
{
make
in
make
.
right
.
equalTo
(
view
.
snp
.
centerX
)
.
offset
(
-
22
)
make
.
bottom
.
equalTo
(
-
58
)
make
.
height
.
width
.
equalTo
(
44
)
}
appleButton
=
{
let
button
=
UIButton
(
type
:
.
custom
)
button
.
setImage
(
UIImage
(
named
:
"login_apple"
),
for
:
.
normal
)
button
.
addTarget
(
self
,
action
:
#selector(
appleLogin
)
,
for
:
.
touchUpInside
)
return
button
}()
view
.
addSubview
(
appleButton
)
appleButton
.
snp
.
makeConstraints
{
make
in
make
.
left
.
equalTo
(
view
.
snp
.
centerX
)
.
offset
(
22
)
make
.
bottom
.
equalTo
(
-
58
)
make
.
height
.
width
.
equalTo
(
44
)
if
WXApi
.
isWXAppInstalled
()
{
wechatButton
=
{
let
button
=
UIButton
(
type
:
.
custom
)
button
.
setImage
(
UIImage
(
named
:
"login_wechat"
),
for
:
.
normal
)
button
.
addTarget
(
self
,
action
:
#selector(
wechatLogin
)
,
for
:
.
touchUpInside
)
return
button
}()
view
.
addSubview
(
wechatButton
)
wechatButton
.
snp
.
makeConstraints
{
make
in
make
.
right
.
equalTo
(
view
.
snp
.
centerX
)
.
offset
(
-
22
)
make
.
bottom
.
equalTo
(
-
58
)
make
.
height
.
width
.
equalTo
(
44
)
}
appleButton
=
{
let
button
=
UIButton
(
type
:
.
custom
)
button
.
setImage
(
UIImage
(
named
:
"login_apple"
),
for
:
.
normal
)
button
.
addTarget
(
self
,
action
:
#selector(
appleLogin
)
,
for
:
.
touchUpInside
)
return
button
}()
view
.
addSubview
(
appleButton
)
appleButton
.
snp
.
makeConstraints
{
make
in
make
.
left
.
equalTo
(
view
.
snp
.
centerX
)
.
offset
(
22
)
make
.
bottom
.
equalTo
(
-
58
)
make
.
height
.
width
.
equalTo
(
44
)
}
}
else
{
appleButton
=
{
let
button
=
UIButton
(
type
:
.
custom
)
button
.
setImage
(
UIImage
(
named
:
"login_apple"
),
for
:
.
normal
)
button
.
addTarget
(
self
,
action
:
#selector(
appleLogin
)
,
for
:
.
touchUpInside
)
return
button
}()
view
.
addSubview
(
appleButton
)
appleButton
.
snp
.
makeConstraints
{
make
in
make
.
centerX
.
equalToSuperview
()
make
.
bottom
.
equalTo
(
-
58
)
make
.
height
.
width
.
equalTo
(
44
)
}
}
}
...
...
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