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
05ad7d55
Commit
05ad7d55
authored
Sep 24, 2024
by
David黄金龙
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
删除 不使用的代码
parent
cf83bbd3
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
71 additions
and
85 deletions
+71
-85
YHHomeWebViewController.swift
.../Classes/Modules/Home(首页)/C/YHHomeWebViewController.swift
+6
-6
YHStatusAdvantageVC.swift
...laxy/Classes/Modules/Home(首页)/C/YHStatusAdvantageVC.swift
+6
-6
YHLifeViewController.swift
...es/Modules/Home(首页)/Life(生活)/C/YHLifeViewController.swift
+0
-11
YHH5WebViewVC.swift
.../Classes/Modules/InteractionH5(与H5交互)/YHH5WebViewVC.swift
+53
-56
YHWebViewViewController.swift
...Classes/Modules/Login(登录)/C/YHWebViewViewController.swift
+6
-6
No files found.
galaxy/galaxy/Classes/Modules/Home(首页)/C/YHHomeWebViewController.swift
View file @
05ad7d55
...
...
@@ -377,12 +377,12 @@ class YHHomeWebViewController: YHBaseViewController, WKUIDelegate, WKNavigationD
}
func
webView
(
_
webView
:
WKWebView
,
runJavaScriptAlertPanelWithMessage
message
:
String
,
initiatedByFrame
frame
:
WKFrameInfo
,
completionHandler
:
@escaping
()
->
Void
)
{
// 修复弹窗弹出的问题
let
alert
=
UIAlertController
(
title
:
nil
,
message
:
message
,
preferredStyle
:
.
alert
)
alert
.
addAction
(
UIAlertAction
(
title
:
"Ok"
,
style
:
.
default
,
handler
:
{
(
_
)
->
Void
in
completionHandler
()
}))
self
.
present
(
alert
,
animated
:
true
,
completion
:
nil
)
//
// 修复弹窗弹出的问题
//
let alert = UIAlertController(title: nil, message: message, preferredStyle: .alert)
//
alert.addAction(UIAlertAction(title: "Ok", style: .default, handler: { (_) -> Void in
//
completionHandler()
//
}))
//
self.present(alert, animated: true, completion: nil)
}
func
webView
(
_
webView
:
WKWebView
,
didFailProvisionalNavigation
navigation
:
WKNavigation
!
,
withError
error
:
Error
)
{
...
...
galaxy/galaxy/Classes/Modules/Home(首页)/C/YHStatusAdvantageVC.swift
View file @
05ad7d55
...
...
@@ -267,12 +267,12 @@ extension YHStatusAdvantageVC {
}
func
webView
(
_
webView
:
WKWebView
,
runJavaScriptAlertPanelWithMessage
message
:
String
,
initiatedByFrame
frame
:
WKFrameInfo
,
completionHandler
:
@escaping
()
->
Void
)
{
// 修复弹窗弹出的问题
let
alert
=
UIAlertController
(
title
:
nil
,
message
:
message
,
preferredStyle
:
.
alert
)
alert
.
addAction
(
UIAlertAction
(
title
:
"Ok"
,
style
:
.
default
,
handler
:
{
(
_
)
->
Void
in
completionHandler
()
}))
self
.
present
(
alert
,
animated
:
true
,
completion
:
nil
)
//
// 修复弹窗弹出的问题
//
let alert = UIAlertController(title: nil, message: message, preferredStyle: .alert)
//
alert.addAction(UIAlertAction(title: "Ok", style: .default, handler: { (_) -> Void in
//
completionHandler()
//
}))
//
self.present(alert, animated: true, completion: nil)
}
func
webView
(
_
webView
:
WKWebView
,
didFailProvisionalNavigation
navigation
:
WKNavigation
!
,
withError
error
:
Error
)
{
...
...
galaxy/galaxy/Classes/Modules/Home(首页)/Life(生活)/C/YHLifeViewController.swift
View file @
05ad7d55
...
...
@@ -166,17 +166,6 @@ extension YHLifeViewController: UITableViewDelegate, UITableViewDataSource {
vc
.
codeUrl
=
self
.
viewModel
.
detailModel
.
imageURLDefault
vc
.
downloadUrl
=
self
.
viewModel
.
detailModel
.
imageURLDefaultDownload
self
.
navigationController
?
.
pushViewController
(
vc
)
// let vc = YHH5WebViewVC()
//
// // TODO: - 谢
// vc.url = YHBaseUrlManager.shared.curH5URL() + "superAppBridge.html#/commodity_info?categoryId=2&levelId=5&productId=30&from=wxApp"
// vc.isWithBottomViewFlag = true
// vc.isShareToMiniProgramFlag = true
// vc.shareMiniPath = "/pages/commodityInfo/commodityInfo?categoryId=3&levelId=\(selectSubTab?.id ?? "")&productId=\(model.id)&from=wxApp"
//
// self.navigationController?.pushViewController(vc)
}
}
...
...
galaxy/galaxy/Classes/Modules/InteractionH5(与H5交互)/YHH5WebViewVC.swift
View file @
05ad7d55
...
...
@@ -74,11 +74,11 @@ class YHH5WebViewVC: YHBaseViewController, WKUIDelegate, WKNavigationDelegate {
//UI元素的控制变量 如下
//1、底部分享view
var
isWithBottomViewFlag
:
Bool
=
false
lazy
var
shareView
:
YHShareViewOnTablebarView
=
{
let
view
=
YHShareViewOnTablebarView
()
return
view
}()
//
var isWithBottomViewFlag : Bool = false
//
lazy var shareView: YHShareViewOnTablebarView = {
//
let view = YHShareViewOnTablebarView()
//
return view
//
}()
//2、是否通屏展示- 默认通屏(导航栏透明)
var
isFullScreenFlag
:
Bool
=
true
...
...
@@ -92,7 +92,6 @@ class YHH5WebViewVC: YHBaseViewController, WKUIDelegate, WKNavigationDelegate {
//webView内部返回 - 默认不支持
var
isSupportWebviewInterBackFlag
:
Bool
=
false
override
func
backItemClick
(
_
sender
:
Any
)
{
if
isSupportWebviewInterBackFlag
{
if
webview
.
canGoBack
{
...
...
@@ -138,32 +137,31 @@ private extension YHH5WebViewVC {
if
isFullScreenFlag
{
gk_navBarAlpha
=
0.0
}
else
{
gk_navTitle
=
navTitle
}
gk_navTitle
=
navTitle
NotificationCenter
.
default
.
addObserver
(
self
,
selector
:
#selector(
updateNetWorkUI
)
,
name
:
.
reachabilityChanged
,
object
:
nil
)
view
.
backgroundColor
=
.
white
if
isWithBottomViewFlag
{
loadQrInfo
()
view
.
addSubview
(
shareView
)
shareView
.
block
=
{
tag
in
if
tag
==
0
{
//分享
self
.
share
()
}
else
{
//预约咨询
if
self
.
arrQrInfo
.
count
>
1
{
let
codeUrl
=
self
.
arrQrInfo
[
0
]
let
downloadUrl
=
self
.
arrQrInfo
[
1
]
YHConsultantQRCodeView
.
codeView
(
codeUrl
,
downloadUrl
:
downloadUrl
)
.
show
()
}
}
}
}
//
if isWithBottomViewFlag {
//
loadQrInfo()
//
view.addSubview(shareView)
//
//
shareView.block = { tag in
//
if tag == 0 {
//
//分享
//
self.share()
//
} else {
//
//预约咨询
//
if self.arrQrInfo.count > 1 {
//
let codeUrl = self.arrQrInfo[0]
//
let downloadUrl = self.arrQrInfo[1]
//
YHConsultantQRCodeView.codeView(codeUrl, downloadUrl: downloadUrl).show()
//
}
//
}
//
}
//
}
...
...
@@ -184,26 +182,26 @@ private extension YHH5WebViewVC {
webview
.
load
(
request
as
URLRequest
)
view
.
addSubview
(
webview
)
if
isWithBottomViewFlag
{
view
.
addSubview
(
shareView
)
shareView
.
snp
.
makeConstraints
{
make
in
make
.
bottom
.
left
.
right
.
equalToSuperview
()
make
.
height
.
equalTo
(
YHShareViewOnTablebarView
.
viewH
)
}
if
isFullScreenFlag
{
webview
.
snp
.
makeConstraints
{
make
in
make
.
top
.
left
.
right
.
equalToSuperview
()
make
.
bottom
.
equalTo
(
shareView
.
snp
.
top
)
}
}
else
{
webview
.
snp
.
makeConstraints
{
make
in
make
.
top
.
equalToSuperview
()
.
offset
(
k_Height_NavigationtBarAndStatuBar
)
make
.
left
.
right
.
equalToSuperview
()
make
.
bottom
.
equalTo
(
shareView
.
snp
.
top
)
}
}
}
else
{
//
if isWithBottomViewFlag {
//
view.addSubview(shareView)
//
shareView.snp.makeConstraints { make in
//
make.bottom.left.right.equalToSuperview()
//
make.height.equalTo(YHShareViewOnTablebarView.viewH)
//
}
//
//
if isFullScreenFlag {
//
webview.snp.makeConstraints { make in
//
make.top.left.right.equalToSuperview()
//
make.bottom.equalTo(shareView.snp.top)
//
}
//
} else {
//
webview.snp.makeConstraints { make in
//
make.top.equalToSuperview().offset(k_Height_NavigationtBarAndStatuBar)
//
make.left.right.equalToSuperview()
//
make.bottom.equalTo(shareView.snp.top)
//
}
//
}
//
} else {
if
isFullScreenFlag
{
...
...
@@ -217,7 +215,7 @@ private extension YHH5WebViewVC {
}
}
}
//
}
...
...
@@ -297,7 +295,6 @@ extension YHH5WebViewVC {
if
(
self
.
webview
.
estimatedProgress
>=
1.0
)
{
if
isFullScreenFlag
{
gk_navBarAlpha
=
0.0
gk_navTitle
=
""
}
UIView
.
animate
(
withDuration
:
0.3
,
delay
:
0.1
,
options
:
.
curveEaseInOut
,
animations
:
{
()
->
Void
in
...
...
@@ -328,12 +325,12 @@ extension YHH5WebViewVC {
}
func
webView
(
_
webView
:
WKWebView
,
runJavaScriptAlertPanelWithMessage
message
:
String
,
initiatedByFrame
frame
:
WKFrameInfo
,
completionHandler
:
@escaping
()
->
Void
)
{
// 修复弹窗弹出的问题
let
alert
=
UIAlertController
(
title
:
nil
,
message
:
message
,
preferredStyle
:
.
alert
)
alert
.
addAction
(
UIAlertAction
(
title
:
"Ok"
,
style
:
.
default
,
handler
:
{
(
_
)
->
Void
in
completionHandler
()
}))
self
.
present
(
alert
,
animated
:
true
,
completion
:
nil
)
//
// 修复弹窗弹出的问题
//
let alert = UIAlertController(title: nil, message: message, preferredStyle: .alert)
//
alert.addAction(UIAlertAction(title: "Ok", style: .default, handler: { (_) -> Void in
//
completionHandler()
//
}))
//
self.present(alert, animated: true, completion: nil)
}
func
webView
(
_
webView
:
WKWebView
,
didFailProvisionalNavigation
navigation
:
WKNavigation
!
,
withError
error
:
Error
)
{
...
...
@@ -395,10 +392,10 @@ extension YHH5WebViewVC : UIScrollViewDelegate {
alpha
=
1.0
}
gk_navBarAlpha
=
alpha
gk_navTitle
=
navTitle
//
gk_navTitle = navTitle
}
else
{
gk_navBarAlpha
=
0.0
gk_navTitle
=
""
//
gk_navTitle = ""
}
}
}
...
...
galaxy/galaxy/Classes/Modules/Login(登录)/C/YHWebViewViewController.swift
View file @
05ad7d55
...
...
@@ -72,12 +72,12 @@ class YHWebViewViewController: YHBaseViewController, WKUIDelegate, WKNavigationD
}
func
webView
(
_
webView
:
WKWebView
,
runJavaScriptAlertPanelWithMessage
message
:
String
,
initiatedByFrame
frame
:
WKFrameInfo
,
completionHandler
:
@escaping
()
->
Void
)
{
// 修复弹窗弹出的问题
let
alert
=
UIAlertController
(
title
:
nil
,
message
:
message
,
preferredStyle
:
.
alert
)
alert
.
addAction
(
UIAlertAction
(
title
:
"Ok"
,
style
:
.
default
,
handler
:
{
(
_
)
->
Void
in
completionHandler
()
}))
self
.
present
(
alert
,
animated
:
true
,
completion
:
nil
)
//
// 修复弹窗弹出的问题
//
let alert = UIAlertController(title: nil, message: message, preferredStyle: .alert)
//
alert.addAction(UIAlertAction(title: "Ok", style: .default, handler: { (_) -> Void in
//
completionHandler()
//
}))
//
self.present(alert, animated: true, completion: nil)
}
// MARK: - KVO
...
...
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