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
8a2d5aa5
Commit
8a2d5aa5
authored
Jun 17, 2024
by
David黄金龙
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1、资讯页无网络时候的交互
2、版本号 0.8.0.5
parent
57bbf743
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
8 deletions
+21
-8
project.pbxproj
galaxy/galaxy.xcodeproj/project.pbxproj
+3
-3
YHHomeWebViewController.swift
.../Classes/Modules/Home(首页)/C/YHHomeWebViewController.swift
+18
-5
No files found.
galaxy/galaxy.xcodeproj/project.pbxproj
View file @
8a2d5aa5
...
@@ -3252,7 +3252,7 @@
...
@@ -3252,7 +3252,7 @@
CODE_SIGN_ENTITLEMENTS
=
galaxy/galaxyTestEnv.entitlements
;
CODE_SIGN_ENTITLEMENTS
=
galaxy/galaxyTestEnv.entitlements
;
CODE_SIGN_IDENTITY
=
"Apple Development"
;
CODE_SIGN_IDENTITY
=
"Apple Development"
;
CODE_SIGN_STYLE
=
Automatic
;
CODE_SIGN_STYLE
=
Automatic
;
CURRENT_PROJECT_VERSION
=
3
;
CURRENT_PROJECT_VERSION
=
4
;
DEVELOPMENT_TEAM
=
RXHYW88XR7
;
DEVELOPMENT_TEAM
=
RXHYW88XR7
;
ENABLE_USER_SCRIPT_SANDBOXING
=
NO
;
ENABLE_USER_SCRIPT_SANDBOXING
=
NO
;
FRAMEWORK_SEARCH_PATHS
=
(
FRAMEWORK_SEARCH_PATHS
=
(
...
@@ -3456,7 +3456,7 @@
...
@@ -3456,7 +3456,7 @@
CODE_SIGN_ENTITLEMENTS
=
galaxy/galaxyDebug.entitlements
;
CODE_SIGN_ENTITLEMENTS
=
galaxy/galaxyDebug.entitlements
;
CODE_SIGN_IDENTITY
=
"Apple Development"
;
CODE_SIGN_IDENTITY
=
"Apple Development"
;
CODE_SIGN_STYLE
=
Automatic
;
CODE_SIGN_STYLE
=
Automatic
;
CURRENT_PROJECT_VERSION
=
3
;
CURRENT_PROJECT_VERSION
=
4
;
DEVELOPMENT_TEAM
=
RXHYW88XR7
;
DEVELOPMENT_TEAM
=
RXHYW88XR7
;
ENABLE_USER_SCRIPT_SANDBOXING
=
NO
;
ENABLE_USER_SCRIPT_SANDBOXING
=
NO
;
FRAMEWORK_SEARCH_PATHS
=
(
FRAMEWORK_SEARCH_PATHS
=
(
...
@@ -3502,7 +3502,7 @@
...
@@ -3502,7 +3502,7 @@
CODE_SIGN_ENTITLEMENTS
=
galaxy/galaxy.entitlements
;
CODE_SIGN_ENTITLEMENTS
=
galaxy/galaxy.entitlements
;
CODE_SIGN_IDENTITY
=
"Apple Development"
;
CODE_SIGN_IDENTITY
=
"Apple Development"
;
CODE_SIGN_STYLE
=
Automatic
;
CODE_SIGN_STYLE
=
Automatic
;
CURRENT_PROJECT_VERSION
=
3
;
CURRENT_PROJECT_VERSION
=
4
;
DEVELOPMENT_TEAM
=
RXHYW88XR7
;
DEVELOPMENT_TEAM
=
RXHYW88XR7
;
ENABLE_USER_SCRIPT_SANDBOXING
=
NO
;
ENABLE_USER_SCRIPT_SANDBOXING
=
NO
;
FRAMEWORK_SEARCH_PATHS
=
(
FRAMEWORK_SEARCH_PATHS
=
(
...
...
galaxy/galaxy/Classes/Modules/Home(首页)/C/YHHomeWebViewController.swift
View file @
8a2d5aa5
...
@@ -43,6 +43,11 @@ class YHHomeWebViewController: YHBaseViewController, WKUIDelegate, WKNavigationD
...
@@ -43,6 +43,11 @@ class YHHomeWebViewController: YHBaseViewController, WKUIDelegate, WKNavigationD
//有些界面需要保存图片的功能
//有些界面需要保存图片的功能
var
showSavePicBottomFlag
:
Bool
=
false
var
showSavePicBottomFlag
:
Bool
=
false
//是否曾今有过网络
private
var
isNetWorkOkBefore
:
Bool
=
false
override
func
viewDidLoad
()
{
override
func
viewDidLoad
()
{
super
.
viewDidLoad
()
super
.
viewDidLoad
()
...
@@ -154,7 +159,7 @@ class YHHomeWebViewController: YHBaseViewController, WKUIDelegate, WKNavigationD
...
@@ -154,7 +159,7 @@ class YHHomeWebViewController: YHBaseViewController, WKUIDelegate, WKNavigationD
make
.
height
.
equalTo
(
59
+
k_Height_safeAreaInsetsBottom
())
make
.
height
.
equalTo
(
59
+
k_Height_safeAreaInsetsBottom
())
}
}
view
.
addSubview
(
self
.
noNetWorkTipsView
)
view
.
addSubview
(
noNetWorkTipsView
)
self
.
noNetWorkTipsView
.
snp
.
makeConstraints
{
make
in
self
.
noNetWorkTipsView
.
snp
.
makeConstraints
{
make
in
make
.
left
.
right
.
bottom
.
equalToSuperview
()
make
.
left
.
right
.
bottom
.
equalToSuperview
()
make
.
top
.
equalToSuperview
()
.
offset
(
k_Height_NavigationtBarAndStatuBar
)
make
.
top
.
equalToSuperview
()
.
offset
(
k_Height_NavigationtBarAndStatuBar
)
...
@@ -281,16 +286,24 @@ class YHHomeWebViewController: YHBaseViewController, WKUIDelegate, WKNavigationD
...
@@ -281,16 +286,24 @@ class YHHomeWebViewController: YHBaseViewController, WKUIDelegate, WKNavigationD
func
updateNetWorkStatusUI
(
needReload
:
Bool
)
{
func
updateNetWorkStatusUI
(
needReload
:
Bool
)
{
DispatchQueue
.
main
.
async
{
DispatchQueue
.
main
.
async
{
if
YHNetworkStatusManager
.
shared
.
isNetWorkOK
{
if
YHNetworkStatusManager
.
shared
.
isNetWorkOK
{
if
needReload
{
if
needReload
&&
self
.
isNetWorkOkBefore
==
false
{
self
.
webview
.
stopLoading
()
self
.
webview
.
stopLoading
()
let
targetUrl
=
NSURL
(
string
:
self
.
url
)
let
targetUrl
=
NSURL
(
string
:
self
.
url
)
let
request
=
NSURLRequest
(
url
:
targetUrl
!
as
URL
)
let
request
=
NSURLRequest
(
url
:
targetUrl
!
as
URL
)
self
.
webview
.
load
(
request
as
URLRequest
)
self
.
webview
.
load
(
request
as
URLRequest
)
self
.
getData
()
self
.
getData
()
}
}
self
.
isNetWorkOkBefore
=
true
}
}
self
.
view
.
bringSubviewToFront
(
self
.
noNetWorkTipsView
)
self
.
noNetWorkTipsView
.
isHidden
=
YHNetworkStatusManager
.
shared
.
isNetWorkOK
if
self
.
isNetWorkOkBefore
==
false
{
self
.
view
.
bringSubviewToFront
(
self
.
noNetWorkTipsView
)
self
.
noNetWorkTipsView
.
isHidden
=
YHNetworkStatusManager
.
shared
.
isNetWorkOK
}
else
{
self
.
noNetWorkTipsView
.
isHidden
=
true
}
if
YHNetworkStatusManager
.
shared
.
isNetWorkOK
{
if
YHNetworkStatusManager
.
shared
.
isNetWorkOK
{
if
(
self
.
vcTitle
==
"香港身份测评码"
||
!
self
.
model
.
img_url
.
isEmpty
)
{
if
(
self
.
vcTitle
==
"香港身份测评码"
||
!
self
.
model
.
img_url
.
isEmpty
)
{
self
.
addRightItems
()
self
.
addRightItems
()
...
@@ -370,7 +383,7 @@ class YHHomeWebViewController: YHBaseViewController, WKUIDelegate, WKNavigationD
...
@@ -370,7 +383,7 @@ class YHHomeWebViewController: YHBaseViewController, WKUIDelegate, WKNavigationD
}
}
func
saveImageToPhotoLib
()
{
func
saveImageToPhotoLib
()
{
var
urlString
=
self
.
url
let
urlString
=
self
.
url
guard
let
url
=
URL
(
string
:
urlString
)
else
{
guard
let
url
=
URL
(
string
:
urlString
)
else
{
YHHUD
.
flash
(
message
:
"参数错误,保存失败"
)
YHHUD
.
flash
(
message
:
"参数错误,保存失败"
)
return
return
...
...
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