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
c4deb4ae
Commit
c4deb4ae
authored
Sep 23, 2024
by
David黄金龙
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1、跳转 首页-生活 tab
2、跳转H5界面
parent
3c32753d
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
70 additions
and
8 deletions
+70
-8
YHH5WebViewVC.swift
.../Classes/Modules/InteractionH5(与H5交互)/YHH5WebViewVC.swift
+2
-2
YHJsApi.swift
...galaxy/Classes/Modules/InteractionH5(与H5交互)/YHJsApi.swift
+62
-0
YHMyViewController.swift
...alaxy/Classes/Modules/Mine(我的)/C/YHMyViewController.swift
+6
-6
No files found.
galaxy/galaxy/Classes/Modules/InteractionH5(与H5交互)/YHH5WebViewVC.swift
View file @
c4deb4ae
...
@@ -45,7 +45,7 @@ class YHH5WebViewVC: YHBaseViewController, WKUIDelegate, WKNavigationDelegate {
...
@@ -45,7 +45,7 @@ class YHH5WebViewVC: YHBaseViewController, WKUIDelegate, WKNavigationDelegate {
}
}
deinit
{
deinit
{
//
webview.removeObserver(self, forKeyPath: "estimatedProgress")
webview
.
removeObserver
(
self
,
forKeyPath
:
"estimatedProgress"
)
NotificationCenter
.
default
.
removeObserver
(
self
)
NotificationCenter
.
default
.
removeObserver
(
self
)
}
}
...
@@ -227,7 +227,7 @@ private extension YHH5WebViewVC {
...
@@ -227,7 +227,7 @@ private extension YHH5WebViewVC {
progBar
.
tintColor
=
UIColor
.
brandMainColor
progBar
.
tintColor
=
UIColor
.
brandMainColor
webview
.
addSubview
(
progBar
)
webview
.
addSubview
(
progBar
)
// 监听网页加载的进度
// 监听网页加载的进度
//
webview.addObserver(self, forKeyPath: "estimatedProgress", options: .new, context: nil)
webview
.
addObserver
(
self
,
forKeyPath
:
"estimatedProgress"
,
options
:
.
new
,
context
:
nil
)
view
.
addSubview
(
noNetWorkTipsView
)
view
.
addSubview
(
noNetWorkTipsView
)
self
.
noNetWorkTipsView
.
snp
.
makeConstraints
{
make
in
self
.
noNetWorkTipsView
.
snp
.
makeConstraints
{
make
in
...
...
galaxy/galaxy/Classes/Modules/InteractionH5(与H5交互)/YHJsApi.swift
View file @
c4deb4ae
...
@@ -17,6 +17,68 @@ class YHJsApi: NSObject {
...
@@ -17,6 +17,68 @@ class YHJsApi: NSObject {
}
}
extension
YHJsApi
{
extension
YHJsApi
{
//7、跳转 首页-生活 tab
@objc
func
goHomeLifeTabSyn
()
{
DispatchQueue
.
main
.
async
{
UIViewController
.
current
?
.
navigationController
?
.
popToRootViewController
(
animated
:
false
)
goTabBarBy
(
tabType
:
.
home
)
NotificationCenter
.
default
.
post
(
name
:
YhConstant
.
YhNotification
.
didJumpToHomePageLifeTabNotification
,
object
:
nil
)
}
}
//6、跳转H5界面
@objc
func
goH5UISyn
(
_
dicH5
:
String
)
{
DispatchQueue
.
main
.
async
{
if
let
data
=
dicH5
.
data
(
using
:
.
utf8
)
{
do
{
if
let
jsonObject
=
try
JSONSerialization
.
jsonObject
(
with
:
data
,
options
:
[])
as?
[
String
:
Any
]
{
// 转换成功,jsonObject 是一个字典
print
(
"JSON字符串转换为字典成功:
\(
jsonObject
)
"
)
/*
url:跳转地址
isInformationUrl:1, //1-资讯类型 0-非资讯类型
id:1 // 资讯id
isFullScreen: 1,// 1-通屏 0-非通屏
*/
if
!
jsonObject
.
isEmpty
{
let
url
:
String
=
jsonObject
[
"url"
]
as?
String
??
""
let
isInformationUrl
:
Int
=
jsonObject
[
"isInformationUrl"
]
as?
Int
??
0
let
id
:
Int
=
jsonObject
[
"id"
]
as?
Int
??
-
1
let
isFullScreen
:
Int
=
jsonObject
[
"isFullScreen"
]
as?
Int
??
1
let
navTitle
:
String
=
jsonObject
[
"navTitle"
]
as?
String
??
""
if
!
url
.
isEmpty
{
if
isInformationUrl
==
1
{
//资讯详情
let
vc
=
YHHomeWebViewController
()
vc
.
url
=
url
vc
.
gk_navTitle
=
navTitle
// vc.id = model.id
self
.
delegate
?
.
navigationController
?
.
pushViewController
(
vc
)
}
else
{
//普通界面
let
vc
=
YHH5WebViewVC
()
vc
.
url
=
url
vc
.
isFullScreenFlag
=
isFullScreen
==
1
?
true
:
false
vc
.
navTitle
=
navTitle
self
.
delegate
?
.
navigationController
?
.
pushViewController
(
vc
)
}
}
}
else
{
printLog
(
"ddddd"
)
}
}
else
{
printLog
(
"JSON字符串不是有效的字典格式"
)
}
}
catch
{
printLog
(
"JSON解析错误:
\(
error
)
"
)
}
}
}
}
//5、返回App上一个界面
//5、返回App上一个界面
@objc
func
backToAppPreView
()
{
@objc
func
backToAppPreView
()
{
DispatchQueue
.
main
.
async
{
DispatchQueue
.
main
.
async
{
...
...
galaxy/galaxy/Classes/Modules/Mine(我的)/C/YHMyViewController.swift
View file @
c4deb4ae
...
@@ -275,7 +275,7 @@ class YHMyViewController: YHBaseViewController, ConstraintRelatableTarget {
...
@@ -275,7 +275,7 @@ class YHMyViewController: YHBaseViewController, ConstraintRelatableTarget {
items
.
removeAll
()
items
.
removeAll
()
if
YHUatHelper
.
shared
.
getUatModuleStatusBy
(
module
:
YHUatModules
(
rawValue
:
1
)
)
==
1
{
if
YHUatHelper
.
shared
.
getUatModuleStatusBy
(
module
:
.
Mine_MyCard
)
==
1
{
let
item
=
PersonalModuleItem
(
icon
:
"mine_item_card"
,
title
:
"我的名片"
.
local
,
type
:
.
myCard
)
let
item
=
PersonalModuleItem
(
icon
:
"mine_item_card"
,
title
:
"我的名片"
.
local
,
type
:
.
myCard
)
items
.
append
(
item
)
items
.
append
(
item
)
}
}
...
@@ -286,29 +286,29 @@ class YHMyViewController: YHBaseViewController, ConstraintRelatableTarget {
...
@@ -286,29 +286,29 @@ class YHMyViewController: YHBaseViewController, ConstraintRelatableTarget {
}
}
if
let
configModel
=
YHConfigManager
.
shared
.
reqVM
.
configModel
,
configModel
.
is_integral_open
{
if
let
configModel
=
YHConfigManager
.
shared
.
reqVM
.
configModel
,
configModel
.
is_integral_open
{
if
YHUatHelper
.
shared
.
getUatModuleStatusBy
(
module
:
YHUatModules
(
rawValue
:
2
)
)
==
1
{
if
YHUatHelper
.
shared
.
getUatModuleStatusBy
(
module
:
.
Mine_IntegralCenter
)
==
1
{
let
item
=
PersonalModuleItem
(
icon
:
"mine_item_scoreCenter"
,
title
:
"积分中心"
.
local
,
type
:
.
scoreCenter
)
let
item
=
PersonalModuleItem
(
icon
:
"mine_item_scoreCenter"
,
title
:
"积分中心"
.
local
,
type
:
.
scoreCenter
)
items
.
append
(
item
)
items
.
append
(
item
)
}
}
}
}
if
YHUatHelper
.
shared
.
getUatModuleStatusBy
(
module
:
YHUatModules
(
rawValue
:
3
)
)
==
1
{
if
YHUatHelper
.
shared
.
getUatModuleStatusBy
(
module
:
.
Mine_EvaluationCode
)
==
1
{
let
item
=
PersonalModuleItem
(
icon
:
"mine_item_code"
,
title
:
"我的测评码"
.
local
,
type
:
.
myTestCode
)
let
item
=
PersonalModuleItem
(
icon
:
"mine_item_code"
,
title
:
"我的测评码"
.
local
,
type
:
.
myTestCode
)
items
.
append
(
item
)
items
.
append
(
item
)
}
}
if
YHUatHelper
.
shared
.
getUatModuleStatusBy
(
module
:
YHUatModules
(
rawValue
:
4
)
)
==
1
{
if
YHUatHelper
.
shared
.
getUatModuleStatusBy
(
module
:
.
Mine_AboutYinHeHarbour
)
==
1
{
let
item
=
PersonalModuleItem
(
icon
:
"mine_item_appoint"
,
title
:
"关于银河湾"
.
local
,
type
:
.
appointGalaxyBay
)
let
item
=
PersonalModuleItem
(
icon
:
"mine_item_appoint"
,
title
:
"关于银河湾"
.
local
,
type
:
.
appointGalaxyBay
)
items
.
append
(
item
)
items
.
append
(
item
)
}
}
if
YHUatHelper
.
shared
.
getUatModuleStatusBy
(
module
:
YHUatModules
(
rawValue
:
5
)
)
==
1
{
if
YHUatHelper
.
shared
.
getUatModuleStatusBy
(
module
:
.
Mine_MyActivity
)
==
1
{
let
item
=
PersonalModuleItem
(
icon
:
"mine_item_activity"
,
title
:
"我的活动"
.
local
,
type
:
.
myActivity
)
let
item
=
PersonalModuleItem
(
icon
:
"mine_item_activity"
,
title
:
"我的活动"
.
local
,
type
:
.
myActivity
)
items
.
append
(
item
)
items
.
append
(
item
)
}
}
if
YHUatHelper
.
shared
.
getUatModuleStatusBy
(
module
:
YHUatModules
(
rawValue
:
6
)
)
==
1
{
if
YHUatHelper
.
shared
.
getUatModuleStatusBy
(
module
:
.
Mine_AboutUS
)
==
1
{
let
item
=
PersonalModuleItem
(
icon
:
"mine_item_about_us"
,
title
:
"关于我们"
.
local
,
type
:
.
aboutUs
)
let
item
=
PersonalModuleItem
(
icon
:
"mine_item_about_us"
,
title
:
"关于我们"
.
local
,
type
:
.
aboutUs
)
items
.
append
(
item
)
items
.
append
(
item
)
}
}
...
...
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