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
7e9839cf
Commit
7e9839cf
authored
Aug 29, 2025
by
Alex朱枝文
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
删除多余代码
parent
a8d62d85
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
20 deletions
+1
-20
YHH5WebViewVC.swift
.../Classes/Modules/InteractionH5(与H5交互)/YHH5WebViewVC.swift
+1
-20
No files found.
galaxy/galaxy/Classes/Modules/InteractionH5(与H5交互)/YHH5WebViewVC.swift
View file @
7e9839cf
...
...
@@ -581,26 +581,6 @@ extension YHH5WebViewVC {
decisionHandler
(
.
allow
)
}
// 辅助方法 - 显示消息
private
func
showMessage
(
_
message
:
String
)
{
// 替换原来的 MBProgressHUD
// 这里可以使用你偏好的提示框方案,比如:
// 方案1: 使用系统 Alert
let
alert
=
UIAlertController
(
title
:
nil
,
message
:
message
,
preferredStyle
:
.
alert
)
present
(
alert
,
animated
:
true
)
DispatchQueue
.
main
.
asyncAfter
(
deadline
:
.
now
()
+
2.0
)
{
alert
.
dismiss
(
animated
:
true
)
}
// 方案2: 如果使用 MBProgressHUD
// MBProgressHUD.showAdded(to: self.view, animated: true)
// let hud = MBProgressHUD.showAdded(to: self.view, animated: true)
// hud.mode = .text
// hud.label.text = message
// hud.hide(animated: true, afterDelay: 2.0)
}
// 辅助方法 - 打开应用
private
func
openApp
(
with
url
:
URL
?)
{
guard
let
url
=
url
else
{
return
}
...
...
@@ -608,6 +588,7 @@ extension YHH5WebViewVC {
if
UIApplication
.
shared
.
canOpenURL
(
url
)
{
UIApplication
.
shared
.
open
(
url
,
options
:
[:],
completionHandler
:
nil
)
}
else
if
url
.
absoluteString
.
hasPrefix
(
"https://"
)
||
url
.
absoluteString
.
hasPrefix
(
"http://"
)
{
// 排除没加白名单导致应用没法打开导致崩溃
let
safariViewController
=
SFSafariViewController
(
url
:
url
)
safariViewController
.
dismissButtonStyle
=
.
close
safariViewController
.
modalPresentationStyle
=
.
fullScreen
...
...
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