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
7a1f817f
Commit
7a1f817f
authored
May 09, 2024
by
David黄金龙
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
webview 的 title处理
parent
0718d473
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
21 additions
and
10 deletions
+21
-10
YHStartPageViewController.swift
...lasses/Modules/Home(首页)/C/YHStartPageViewController.swift
+1
-0
YHPhoneLoginViewController.swift
...sses/Modules/Login(登录)/C/YHPhoneLoginViewController.swift
+1
-0
YHWebViewViewController.swift
...Classes/Modules/Login(登录)/C/YHWebViewViewController.swift
+6
-1
YHLoginPrivacyView.swift
...laxy/Classes/Modules/Login(登录)/V/YHLoginPrivacyView.swift
+2
-0
YHMySettingViewController.swift
...lasses/Modules/Mine(我的)/C/YHMySettingViewController.swift
+11
-9
No files found.
galaxy/galaxy/Classes/Modules/Home(首页)/C/YHStartPageViewController.swift
View file @
7a1f817f
...
@@ -138,6 +138,7 @@ private extension YHStartPageViewController {
...
@@ -138,6 +138,7 @@ private extension YHStartPageViewController {
guard
let
self
=
self
else
{
return
}
guard
let
self
=
self
else
{
return
}
let
vc
=
YHWebViewViewController
()
let
vc
=
YHWebViewViewController
()
vc
.
url
=
url
vc
.
url
=
url
vc
.
navTitle
=
"隐私协议"
self
.
navigationController
?
.
pushViewController
(
vc
)
self
.
navigationController
?
.
pushViewController
(
vc
)
}
}
...
...
galaxy/galaxy/Classes/Modules/Login(登录)/C/YHPhoneLoginViewController.swift
View file @
7a1f817f
...
@@ -209,6 +209,7 @@ class YHPhoneLoginViewController: YHBaseViewController {
...
@@ -209,6 +209,7 @@ class YHPhoneLoginViewController: YHBaseViewController {
guard
let
self
=
self
else
{
return
}
guard
let
self
=
self
else
{
return
}
let
vc
=
YHWebViewViewController
()
let
vc
=
YHWebViewViewController
()
vc
.
url
=
url
vc
.
url
=
url
vc
.
navTitle
=
"隐私协议"
self
.
navigationController
?
.
pushViewController
(
vc
)
self
.
navigationController
?
.
pushViewController
(
vc
)
}
}
view
.
agreeBlock
=
{
[
weak
self
]
in
view
.
agreeBlock
=
{
[
weak
self
]
in
...
...
galaxy/galaxy/Classes/Modules/Login(登录)/C/YHWebViewViewController.swift
View file @
7a1f817f
...
@@ -14,9 +14,12 @@ class YHWebViewViewController: YHBaseViewController, WKUIDelegate, WKNavigationD
...
@@ -14,9 +14,12 @@ class YHWebViewViewController: YHBaseViewController, WKUIDelegate, WKNavigationD
var
webview
=
WKWebView
()
var
webview
=
WKWebView
()
var
progBar
=
UIProgressView
()
var
progBar
=
UIProgressView
()
var
url
=
""
var
url
=
""
var
navTitle
=
""
override
func
viewDidLoad
()
{
override
func
viewDidLoad
()
{
super
.
viewDidLoad
()
super
.
viewDidLoad
()
gk_navTitle
=
navTitle
//获取导航栏高度
//获取导航栏高度
let
navHeight
=
self
.
navigationController
?
.
navigationBar
.
frame
.
height
let
navHeight
=
self
.
navigationController
?
.
navigationBar
.
frame
.
height
//获取状态栏高度
//获取状态栏高度
...
@@ -55,7 +58,9 @@ class YHWebViewViewController: YHBaseViewController, WKUIDelegate, WKNavigationD
...
@@ -55,7 +58,9 @@ class YHWebViewViewController: YHBaseViewController, WKUIDelegate, WKNavigationD
// MARK: - WKNavigationDelegate
// MARK: - WKNavigationDelegate
func
webView
(
_
webView
:
WKWebView
,
didFinish
navigation
:
WKNavigation
!
)
{
func
webView
(
_
webView
:
WKWebView
,
didFinish
navigation
:
WKNavigation
!
)
{
self
.
navigationItem
.
title
=
webview
.
title
if
navTitle
.
isEmpty
{
self
.
navigationItem
.
title
=
webview
.
title
}
}
}
// MARK: - WKUIDelegate
// MARK: - WKUIDelegate
...
...
galaxy/galaxy/Classes/Modules/Login(登录)/V/YHLoginPrivacyView.swift
View file @
7a1f817f
...
@@ -117,12 +117,14 @@ class YHLoginPrivacyView: UIView {
...
@@ -117,12 +117,14 @@ class YHLoginPrivacyView: UIView {
@objc
func
firstUrlClick
()
{
@objc
func
firstUrlClick
()
{
let
vc
=
YHWebViewViewController
()
let
vc
=
YHWebViewViewController
()
vc
.
url
=
YHBaseUrlManager
.
shared
.
curPrivacyAgreementUrl
()
vc
.
url
=
YHBaseUrlManager
.
shared
.
curPrivacyAgreementUrl
()
vc
.
navTitle
=
"隐私协议"
UIViewController
.
current
?
.
navigationController
?
.
pushViewController
(
vc
)
UIViewController
.
current
?
.
navigationController
?
.
pushViewController
(
vc
)
}
}
@objc
func
secondUrlClick
()
{
@objc
func
secondUrlClick
()
{
let
vc
=
YHWebViewViewController
()
let
vc
=
YHWebViewViewController
()
vc
.
url
=
YHBaseUrlManager
.
shared
.
curUserItemsUrl
()
vc
.
url
=
YHBaseUrlManager
.
shared
.
curUserItemsUrl
()
vc
.
navTitle
=
"用户条款"
UIViewController
.
current
?
.
navigationController
?
.
pushViewController
(
vc
)
UIViewController
.
current
?
.
navigationController
?
.
pushViewController
(
vc
)
}
}
}
}
galaxy/galaxy/Classes/Modules/Mine(我的)/C/YHMySettingViewController.swift
View file @
7a1f817f
...
@@ -121,7 +121,7 @@ class YHMySettingViewController: YHBaseViewController, ConstraintRelatableTarget
...
@@ -121,7 +121,7 @@ class YHMySettingViewController: YHBaseViewController, ConstraintRelatableTarget
versionLabel
.
text
=
version
versionLabel
.
text
=
version
#endif
#endif
}
}
@objc
func
logout
()
{
@objc
func
logout
()
{
YHHUD
.
show
(
.
progress
(
message
:
"退出登录中..."
))
YHHUD
.
show
(
.
progress
(
message
:
"退出登录中..."
))
...
@@ -146,7 +146,7 @@ class YHMySettingViewController: YHBaseViewController, ConstraintRelatableTarget
...
@@ -146,7 +146,7 @@ class YHMySettingViewController: YHBaseViewController, ConstraintRelatableTarget
msg
=
error
.
errorMsg
msg
=
error
.
errorMsg
}
}
YHHUD
.
flash
(
message
:
msg
)
YHHUD
.
flash
(
message
:
msg
)
}
}
}
}
}
}
...
@@ -192,11 +192,11 @@ extension YHMySettingViewController : UITableViewDelegate, UITableViewDataSource
...
@@ -192,11 +192,11 @@ extension YHMySettingViewController : UITableViewDelegate, UITableViewDataSource
if
item
.
type
==
.
notifySettings
{
if
item
.
type
==
.
notifySettings
{
let
vc
=
YHMyNotifySettingVC
()
let
vc
=
YHMyNotifySettingVC
()
self
.
navigationController
?
.
pushViewController
(
vc
)
self
.
navigationController
?
.
pushViewController
(
vc
)
}
else
if
item
.
type
==
.
permissionSettings
{
}
else
if
item
.
type
==
.
permissionSettings
{
let
vc
=
YHMyPermissionSettingVC
()
let
vc
=
YHMyPermissionSettingVC
()
self
.
navigationController
?
.
pushViewController
(
vc
)
self
.
navigationController
?
.
pushViewController
(
vc
)
}
else
if
item
.
type
==
.
aboutUs
{
}
else
if
item
.
type
==
.
aboutUs
{
let
vc
=
YHAboutUsViewController
()
let
vc
=
YHAboutUsViewController
()
self
.
navigationController
?
.
pushViewController
(
vc
)
self
.
navigationController
?
.
pushViewController
(
vc
)
...
@@ -204,14 +204,16 @@ extension YHMySettingViewController : UITableViewDelegate, UITableViewDataSource
...
@@ -204,14 +204,16 @@ extension YHMySettingViewController : UITableViewDelegate, UITableViewDataSource
}
else
if
item
.
type
==
.
userItems
{
}
else
if
item
.
type
==
.
userItems
{
// 用户条款
// 用户条款
let
vc
=
YHWebViewViewController
()
let
vc
=
YHWebViewViewController
()
vc
.
url
=
YHBaseUrlManager
.
shared
.
curUserItemsUrl
()
vc
.
url
=
YHBaseUrlManager
.
shared
.
curUserItemsUrl
()
UIViewController
.
current
?
.
navigationController
?
.
pushViewController
(
vc
)
vc
.
navTitle
=
"用户条款"
UIViewController
.
current
?
.
navigationController
?
.
pushViewController
(
vc
)
}
else
if
item
.
type
==
.
privaceAgreement
{
}
else
if
item
.
type
==
.
privaceAgreement
{
//隐私政策
//隐私政策
let
vc
=
YHWebViewViewController
()
let
vc
=
YHWebViewViewController
()
vc
.
url
=
YHBaseUrlManager
.
shared
.
curPrivacyAgreementUrl
()
vc
.
url
=
YHBaseUrlManager
.
shared
.
curPrivacyAgreementUrl
()
UIViewController
.
current
?
.
navigationController
?
.
pushViewController
(
vc
)
vc
.
navTitle
=
"隐私政策"
UIViewController
.
current
?
.
navigationController
?
.
pushViewController
(
vc
)
}
}
else
if
item
.
type
==
.
deviceInfo
{
else
if
item
.
type
==
.
deviceInfo
{
...
...
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