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
f80b2d8d
Commit
f80b2d8d
authored
Mar 13, 2024
by
David黄金龙
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
处理一处crash
parent
80eb19ec
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
8 deletions
+28
-8
YHWebViewViewController.swift
...Classes/Modules/Login(登录)/C/YHWebViewViewController.swift
+5
-3
YHMyViewController.swift
...alaxy/Classes/Modules/Mine(我的)/C/YHMyViewController.swift
+23
-5
No files found.
galaxy/galaxy/Classes/Modules/Login(登录)/C/YHWebViewViewController.swift
View file @
f80b2d8d
...
...
@@ -13,7 +13,8 @@ class YHWebViewViewController: YHBaseViewController, WKUIDelegate, WKNavigationD
var
webview
=
WKWebView
()
var
progBar
=
UIProgressView
()
var
url
=
"https://www.baidu.com"
// var url = "https://www.baidu.com"
var
url
=
"https://docs.qq.com/openapi/drive/v2/files/embed/temporary?timestamp=1710246548&id=a7b1253f3c344fd1878efaef62ef89cf&clientID=2aebc2da4f0b4883bf33ef20836f2e2d"
override
func
viewDidLoad
()
{
super
.
viewDidLoad
()
...
...
@@ -46,12 +47,13 @@ class YHWebViewViewController: YHBaseViewController, WKUIDelegate, WKNavigationD
}
override
func
viewWillDisappear
(
_
animated
:
Bool
)
{
deinit
{
webview
.
removeObserver
(
self
,
forKeyPath
:
"estimatedProgress"
)
}
// MARK: - WKNavigationDelegate
// MARK: - WKNavigationDelegate
func
webView
(
_
webView
:
WKWebView
,
didFinish
navigation
:
WKNavigation
!
)
{
self
.
navigationItem
.
title
=
webview
.
title
}
...
...
galaxy/galaxy/Classes/Modules/Mine(我的)/C/YHMyViewController.swift
View file @
f80b2d8d
...
...
@@ -168,13 +168,31 @@ extension YHMyViewController : UITableViewDelegate, UITableViewDataSource {
if
(
indexPath
.
row
>=
items
.
count
)
{
return
}
if
!
checkLogin
()
{
let
vc
=
UINavigationController
(
rootVC
:
YHPhoneLoginViewController
())
vc
.
modalPresentationStyle
=
.
custom
self
.
navigationController
?
.
present
(
vc
,
animated
:
true
)
// if !checkLogin() {
// let vc = UINavigationController(rootVC: YHPhoneLoginViewController())
// vc.modalPresentationStyle = .custom
// self.navigationController?.present(vc, animated: true)
// } else {
// YHHUD.flash(message: "已登录: 功能完善中...")
// }
if
indexPath
.
row
==
0
{
// if let url = URL(string: "https://docs.qq.com/doc/DTEFUd0FnQnRCdlBt"), UIApplication.shared.canOpenURL(url) {
// UIApplication.shared.open(url, options: [:], completionHandler: nil)
// }
let
vc
=
YHWebViewViewController
()
navigationController
?
.
pushViewController
(
vc
,
animated
:
true
)
}
else
{
YHHUD
.
flash
(
message
:
"已登录: 功能完善中..."
)
let
vc
=
YHWebViewViewController
()
navigationController
?
.
pushViewController
(
vc
,
animated
:
true
)
}
return
return
//for test hjl
let
item
:
PersonalModuleItem
=
items
[
indexPath
.
row
];
...
...
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