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
96528b79
Commit
96528b79
authored
Sep 12, 2024
by
Alex朱枝文
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加七鱼历史记录,以及文件跳转走safari
parent
32b83258
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
0 deletions
+27
-0
YHButlerServiceManager.swift
...s/ButlerServiceManager(银河管家)/YHButlerServiceManager.swift
+27
-0
No files found.
galaxy/galaxy/Classes/Modules/ButlerServiceManager(银河管家)/YHButlerServiceManager.swift
View file @
96528b79
...
...
@@ -8,6 +8,7 @@
import
UIKit
import
IQKeyboardManagerSwift
import
SafariServices
class
YHButlerServiceManager
:
NSObject
{
...
...
@@ -18,6 +19,9 @@ class YHButlerServiceManager: NSObject {
// 调整UI
private
weak
var
customUIConfig
=
QYSDK
.
shared
()
.
customUIConfig
()
// 点击事件处理
private
weak
var
customActionConfig
=
QYSDK
.
shared
()
.
customActionConfig
()
private
lazy
var
getUserInfoViewModel
:
YHButlerServiceViewModel
=
YHButlerServiceViewModel
()
var
lastMessage
:
YHButlerServiceMessage
?
...
...
@@ -42,6 +46,7 @@ class YHButlerServiceManager: NSObject {
let
qyOption
=
QYSDKOption
(
appKey
:
YhConstant
.
QiYuSDK
.
appKey
)
qyOption
.
appName
=
YhConstant
.
QiYuSDK
.
appName
QYSDK
.
shared
()
.
register
(
with
:
qyOption
)
updateActionConfig
()
/*
QYSDK.shared().registerPushMessageNotification { pushMessage in
os_log("#####registerPushMessageNotification %@ %ld %f", (pushMessage?.text ?? ""), (pushMessage?.type.rawValue ?? 0), (pushMessage?.time ?? 0))
...
...
@@ -90,6 +95,28 @@ class YHButlerServiceManager: NSObject {
}
}
extension
YHButlerServiceManager
{
// MARK: - customActionConfig
private
func
updateActionConfig
()
{
// 账号登录后是否拉取漫游消息
customActionConfig
?
.
pullRoamMessage
=
true
// 拉取漫游消息条数,默认20条,最大100条
customActionConfig
?
.
roamMessageLimit
=
100
customActionConfig
?
.
linkClickBlock
=
{
linkAddress
in
guard
let
linkAddress
=
linkAddress
,
(
linkAddress
.
isValidHttpUrl
||
linkAddress
.
isValidHttpsUrl
||
linkAddress
.
isValidFileUrl
),
let
url
=
URL
(
string
:
linkAddress
)
else
{
return
QYLinkClickActionPolicy
.
open
}
let
safariViewController
=
SFSafariViewController
(
url
:
url
)
safariViewController
.
dismissButtonStyle
=
.
close
safariViewController
.
modalPresentationStyle
=
.
fullScreen
UIViewController
.
current
?
.
present
(
safariViewController
,
animated
:
true
,
completion
:
nil
)
return
QYLinkClickActionPolicy
.
cancel
}
}
}
extension
YHButlerServiceManager
{
// MARK: - 常用公开方法
...
...
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