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
404928a3
Commit
404928a3
authored
Dec 13, 2024
by
Steven杜宇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
// 添加方法
parent
1fb75a3e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
38 additions
and
2 deletions
+38
-2
YHJsApi.swift
...galaxy/Classes/Modules/InteractionH5(与H5交互)/YHJsApi.swift
+27
-0
YhConstant.swift
galaxy/galaxy/Classes/Tools/Helper/YhConstant.swift
+11
-2
No files found.
galaxy/galaxy/Classes/Modules/InteractionH5(与H5交互)/YHJsApi.swift
View file @
404928a3
...
...
@@ -18,6 +18,32 @@ class YHJsApi: NSObject {
}
extension
YHJsApi
{
// 返回tab服务页
@objc
func
goAppTab
(
_
tag
:
Any
)
{
DispatchQueue
.
main
.
async
{
if
let
tag
=
tag
as?
String
{
UIViewController
.
current
?
.
navigationController
?
.
popToRootViewController
(
animated
:
false
)
if
tag
==
"home"
{
goTabBarBy
(
tabType
:
.
home
)
}
else
if
tag
==
"server"
{
goTabBarBy
(
tabType
:
.
service
)
}
else
if
tag
==
"ai"
{
goTabBarBy
(
tabType
:
.
AI
)
}
else
if
tag
==
"friend"
{
goTabBarBy
(
tabType
:
.
community
)
}
else
if
tag
==
"mine"
{
goTabBarBy
(
tabType
:
.
mine
)
}
}
}
}
//禁用全局手势返回
@objc
func
disableFullScreenGestureSyn
(
_
tag
:
Any
)
{
DispatchQueue
.
main
.
async
{
...
...
@@ -35,6 +61,7 @@ extension YHJsApi {
}
}
// 关闭优才测评
@objc
func
closeEvaluationGetResult
(
_
dicData
:
String
)
{
DispatchQueue
.
main
.
async
{
if
let
data
=
dicData
.
data
(
using
:
.
utf8
)
{
...
...
galaxy/galaxy/Classes/Tools/Helper/YhConstant.swift
View file @
404928a3
...
...
@@ -137,6 +137,7 @@ enum tabBarPageType : Int {
// case message //消息
case
mine
//我的
case
community
//社区
case
AI
// 港小宝
}
func
goTabBarBy
(
tabType
:
tabBarPageType
)
{
...
...
@@ -147,14 +148,22 @@ func goTabBarBy(tabType : tabBarPageType) {
tabIndex
=
0
case
.
service
:
tabIndex
=
1
case
.
AI
:
tabIndex
=
2
case
.
community
:
tabIndex
=
3
case
.
mine
:
tabIndex
=
4
}
if
let
vc
=
UIApplication
.
shared
.
keyWindow
?
.
rootViewController
as?
YHTabBarViewController
{
vc
.
selectedIndex
=
tabIndex
if
tabType
==
.
AI
{
let
vc
=
YHAITabViewController
()
UIViewController
.
current
?
.
navigationController
?
.
pushViewController
(
vc
)
}
else
{
if
let
vc
=
UIApplication
.
shared
.
keyWindow
?
.
rootViewController
as?
YHTabBarViewController
{
vc
.
selectedIndex
=
tabIndex
}
}
}
...
...
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