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
3c70e924
Commit
3c70e924
authored
Sep 23, 2024
by
David黄金龙
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改 几处错误代码
parent
b15bc9a3
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
39 additions
and
10 deletions
+39
-10
YHOneKeyLoginViewModel.swift
...es/Modules/AutoLogin(一键登录)/M/YHOneKeyLoginViewModel.swift
+1
-1
YHButlerServiceManager.swift
...s/ButlerServiceManager(银河管家)/YHButlerServiceManager.swift
+34
-1
YHCerAppointViewModel.swift
...pointCertificate(3 赴港办证预约)/VM/YHCerAppointViewModel.swift
+3
-7
YHH5WebViewVC.swift
.../Classes/Modules/InteractionH5(与H5交互)/YHH5WebViewVC.swift
+1
-1
No files found.
galaxy/galaxy/Classes/Modules/AutoLogin(一键登录)/M/YHOneKeyLoginViewModel.swift
View file @
3c70e924
...
@@ -18,7 +18,7 @@ class YHOneKeyLoginViewModel {
...
@@ -18,7 +18,7 @@ class YHOneKeyLoginViewModel {
json
,
code
in
json
,
code
in
printLog
(
"model 是 ==>
\(
json
)
"
)
printLog
(
"model 是 ==>
\(
json
)
"
)
if
json
.
code
==
200
{
if
json
.
code
==
200
{
if
let
dic
=
json
.
data
as?
[
String
:
Any
],
let
sdkKey
=
dic
[
"sdkKey"
]
as?
String
,
!
sdkKey
.
isEmpty
{
if
let
dic
=
json
.
data
?
.
peel
as?
[
String
:
Any
],
let
sdkKey
=
dic
[
"sdkKey"
]
as?
String
,
!
sdkKey
.
isEmpty
{
completion
?(
sdkKey
)
completion
?(
sdkKey
)
}
else
{
}
else
{
...
...
galaxy/galaxy/Classes/Modules/ButlerServiceManager(银河管家)/YHButlerServiceManager.swift
View file @
3c70e924
...
@@ -104,6 +104,38 @@ class YHButlerServiceManager: NSObject {
...
@@ -104,6 +104,38 @@ class YHButlerServiceManager: NSObject {
extension
YHButlerServiceManager
{
extension
YHButlerServiceManager
{
// MARK: - customActionConfig
// MARK: - customActionConfig
private
func
handelMessageType
(
_
content
:
String
?)
->
QYLinkClickActionPolicy
{
if
let
dicData
=
content
,
let
data
=
dicData
.
data
(
using
:
.
utf8
)
{
do
{
if
let
jsonObject
=
try
JSONSerialization
.
jsonObject
(
with
:
data
,
options
:
[])
as?
[
String
:
Any
]
{
// 转换成功,jsonObject 是一个字典
print
(
"JSON字符串转换为字典成功:
\(
jsonObject
)
"
)
/*
"{\"order_id\":151824,\"type\":27}"
*/
if
!
jsonObject
.
isEmpty
{
let
orderID
:
Int
=
jsonObject
[
"order_id"
]
as?
Int
??
-
1
let
type
:
Int
=
jsonObject
[
"type"
]
as?
Int
??
-
1
if
orderID
>
-
1
,
type
>
-
1
{
YHServiceOrderListView
.
jumpToMessageController
(
type
:
type
,
orderId
:
orderID
)
return
QYLinkClickActionPolicy
.
cancel
}
}
else
{
printLog
(
"ddddd"
)
}
}
else
{
printLog
(
"JSON字符串不是有效的字典格式"
)
}
}
catch
{
printLog
(
"JSON解析错误:
\(
error
)
"
)
}
}
return
QYLinkClickActionPolicy
.
open
}
private
func
updateActionConfig
()
{
private
func
updateActionConfig
()
{
// 账号登录后是否拉取漫游消息
// 账号登录后是否拉取漫游消息
customActionConfig
?
.
pullRoamMessage
=
true
customActionConfig
?
.
pullRoamMessage
=
true
...
@@ -112,8 +144,9 @@ extension YHButlerServiceManager {
...
@@ -112,8 +144,9 @@ extension YHButlerServiceManager {
customActionConfig
?
.
linkClickBlock
=
{
linkAddress
in
customActionConfig
?
.
linkClickBlock
=
{
linkAddress
in
guard
let
linkAddress
=
linkAddress
,
(
linkAddress
.
isValidHttpUrl
||
linkAddress
.
isValidHttpsUrl
||
linkAddress
.
isValidFileUrl
),
let
url
=
URL
(
string
:
linkAddress
)
else
{
guard
let
linkAddress
=
linkAddress
,
(
linkAddress
.
isValidHttpUrl
||
linkAddress
.
isValidHttpsUrl
||
linkAddress
.
isValidFileUrl
),
let
url
=
URL
(
string
:
linkAddress
)
else
{
return
QYLinkClickActionPolicy
.
open
return
self
.
handelMessageType
(
linkAddress
)
}
}
let
safariViewController
=
SFSafariViewController
(
url
:
url
)
let
safariViewController
=
SFSafariViewController
(
url
:
url
)
safariViewController
.
dismissButtonStyle
=
.
close
safariViewController
.
dismissButtonStyle
=
.
close
safariViewController
.
modalPresentationStyle
=
.
fullScreen
safariViewController
.
modalPresentationStyle
=
.
fullScreen
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/CustomerService(客服段)/Certificate(办证段)/AppointCertificate(3 赴港办证预约)/VM/YHCerAppointViewModel.swift
View file @
3c70e924
...
@@ -227,18 +227,14 @@ class YHCerAppointViewModel: YHBaseViewModel {
...
@@ -227,18 +227,14 @@ class YHCerAppointViewModel: YHBaseViewModel {
let
strUrl
=
YHBaseUrlManager
.
shared
.
curURL
()
+
YHAllApiName
.
AppointHK
.
isNeedGoHK
let
strUrl
=
YHBaseUrlManager
.
shared
.
curURL
()
+
YHAllApiName
.
AppointHK
.
isNeedGoHK
let
_
=
YHNetRequest
.
getRequest
(
url
:
strUrl
,
params
:
[
"order_id"
:
orderId
])
{
let
_
=
YHNetRequest
.
getRequest
(
url
:
strUrl
,
params
:
[
"order_id"
:
orderId
])
{
json
,
code
in
[
weak
self
]
json
,
code
in
guard
let
self
=
self
else
{
return
}
printLog
(
"model 是 ==>
\(
json
)
"
)
printLog
(
"model 是 ==>
\(
json
)
"
)
if
json
.
code
==
200
{
if
json
.
code
==
200
{
// is_need_to_hk 1需要赴港 0不需要 2没有选择
// is_need_to_hk 1需要赴港 0不需要 2没有选择
// reservation_to_hk 0没有预约 1已经预約
// reservation_to_hk 0没有预约 1已经预約
var
isNeedGoHK
=
2
var
isNeedGoHK
=
2
var
reserveToHK
=
0
var
reserveToHK
=
0
if
let
dic
=
json
.
data
as?
[
String
:
Any
]
{
if
let
dic
=
json
.
data
?
.
peel
as?
[
String
:
Any
]
{
if
let
needGoHK
=
dic
[
"is_need_to_hk"
]
as?
Int
{
if
let
needGoHK
=
dic
[
"is_need_to_hk"
]
as?
Int
{
isNeedGoHK
=
needGoHK
isNeedGoHK
=
needGoHK
}
}
...
@@ -253,7 +249,7 @@ class YHCerAppointViewModel: YHBaseViewModel {
...
@@ -253,7 +249,7 @@ class YHCerAppointViewModel: YHBaseViewModel {
}
}
}
else
{
}
else
{
let
err
=
YHErrorModel
(
errorCode
:
Int32
(
json
.
code
),
errorMsg
:
json
.
msg
.
isEmpty
?
""
:
json
.
msg
)
//
let err = YHErrorModel(errorCode: Int32(json.code), errorMsg: json.msg.isEmpty ? "" : json.msg)
callback
?(
2
,
0
)
callback
?(
2
,
0
)
}
}
...
...
galaxy/galaxy/Classes/Modules/InteractionH5(与H5交互)/YHH5WebViewVC.swift
View file @
3c70e924
...
@@ -90,7 +90,7 @@ class YHH5WebViewVC: YHBaseViewController, WKUIDelegate, WKNavigationDelegate {
...
@@ -90,7 +90,7 @@ class YHH5WebViewVC: YHBaseViewController, WKUIDelegate, WKNavigationDelegate {
var
isNeedRefreshDataFlag
:
Bool
=
false
var
isNeedRefreshDataFlag
:
Bool
=
false
//webView内部返回
//webView内部返回
var
isSupportWebviewInterBackFlag
:
Bool
=
tru
e
var
isSupportWebviewInterBackFlag
:
Bool
=
fals
e
override
func
backItemClick
(
_
sender
:
Any
)
{
override
func
backItemClick
(
_
sender
:
Any
)
{
...
...
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