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
8718c474
Commit
8718c474
authored
Aug 22, 2025
by
Alex朱枝文
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
跨境支付相关功能调整
1、重定向时,进内置safari浏览器必须判断是http(s)://链接 2、支付成功后,回到支付结果页
parent
04073955
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
62 additions
and
13 deletions
+62
-13
yinheReplayExt.xcscheme
....xcodeproj/xcshareddata/xcschemes/yinheReplayExt.xcscheme
+0
-1
AppDelegate.swift
galaxy/galaxy/AppDelegate.swift
+46
-0
YHH5WebViewVC.swift
.../Classes/Modules/InteractionH5(与H5交互)/YHH5WebViewVC.swift
+7
-12
YHMyNewViewController.swift
...xy/Classes/Modules/Mine(我的)/C/YHMyNewViewController.swift
+1
-0
YhConstant.swift
galaxy/galaxy/Classes/Tools/Helper/YhConstant.swift
+8
-0
No files found.
galaxy/galaxy.xcodeproj/xcshareddata/xcschemes/yinheReplayExt.xcscheme
View file @
8718c474
...
...
@@ -74,7 +74,6 @@
savedToolIdentifier =
""
useCustomWorkingDirectory =
"NO"
debugDocumentVersioning =
"YES"
askForAppToLaunch =
"Yes"
launchAutomaticallySubstyle =
"2"
>
<BuildableProductRunnable
runnableDebuggingMode =
"0"
>
...
...
galaxy/galaxy/AppDelegate.swift
View file @
8718c474
...
...
@@ -341,6 +341,9 @@ class AppDelegate: UIResponder, UIApplicationDelegate, WXApiDelegate {
}
func
application
(
_
application
:
UIApplication
,
handleOpen
url
:
URL
)
->
Bool
{
if
handleAntomPayWithString
(
from
:
url
.
absoluteString
)
{
return
true
}
return
WXApi
.
handleOpen
(
url
,
delegate
:
self
)
}
...
...
@@ -353,12 +356,55 @@ class AppDelegate: UIResponder, UIApplicationDelegate, WXApiDelegate {
// return isAppLinking
// }
func
handleAntomPayWithString
(
from
url
:
String
)
->
Bool
{
if
url
.
hasPrefix
(
YhConstant
.
AntomPay
.
universalLink
+
YhConstant
.
AntomPay
.
returnPath
),
let
recordId
=
getAntomPayRecordIdWithString
(
from
:
url
)
{
if
!
YHLoginManager
.
shared
.
isLogin
()
{
return
true
}
var
tempUrl
=
""
let
baseUrl
=
YHBaseUrlManager
.
shared
.
curH5URL
()
// baseUrl = "http://192.168.34.113:10301/"
tempUrl
=
baseUrl
+
YhConstant
.
AntomPay
.
gotoPath
+
"?
\(
YhConstant
.
AntomPay
.
recordId
)
=
\(
recordId
)
"
if
YHLoginManager
.
shared
.
isLogin
()
{
let
token
=
YHLoginManager
.
shared
.
h5Token
tempUrl
=
tempUrl
+
"¶m="
+
token
}
var
tUrl
=
tempUrl
if
!
tempUrl
.
contains
(
"navigationH="
)
{
tUrl
=
tempUrl
+
"?navigationH=
\(
k_Height_NavigationtBarAndStatuBar
)
"
if
tempUrl
.
contains
(
"?"
)
{
tUrl
=
tempUrl
+
"&navigationH=
\(
k_Height_NavigationtBarAndStatuBar
)
"
}
}
let
vc
=
YHH5WebViewVC
()
vc
.
url
=
tUrl
UIViewController
.
current
?
.
navigationController
?
.
pushViewController
(
vc
,
animated
:
true
)
return
true
}
return
false
}
func
getAntomPayRecordIdWithString
(
from
urlString
:
String
)
->
String
?
{
guard
let
url
=
URL
(
string
:
urlString
),
let
components
=
URLComponents
(
url
:
url
,
resolvingAgainstBaseURL
:
false
)
else
{
return
nil
}
return
components
.
queryItems
?
.
first
{
$0
.
name
==
YhConstant
.
AntomPay
.
recordId
}?
.
value
}
func
application
(
_
application
:
UIApplication
,
continue
userActivity
:
NSUserActivity
,
restorationHandler
:
@escaping
([
UIUserActivityRestoring
]?)
->
Void
)
->
Bool
{
if
handleAntomPayWithString
(
from
:
userActivity
.
webpageURL
?
.
absoluteString
??
""
)
{
return
true
}
let
isAppLinking
=
AGCAppLinking
.
instance
()
.
continueUserActivity
(
userActivity
)
return
isAppLinking
==
false
?
WXApi
.
handleOpenUniversalLink
(
userActivity
,
delegate
:
self
)
:
true
}
func
application
(
_
application
:
UIApplication
,
continue
userActivity
:
NSUserActivity
,
restorationHandler
:
@escaping
([
Any
]?)
->
Void
)
->
Bool
{
if
handleAntomPayWithString
(
from
:
userActivity
.
webpageURL
?
.
absoluteString
??
""
)
{
return
true
}
let
isAppLinking
=
AGCAppLinking
.
instance
()
.
continueUserActivity
(
userActivity
)
return
isAppLinking
==
false
?
WXApi
.
handleOpenUniversalLink
(
userActivity
,
delegate
:
self
)
:
true
}
...
...
galaxy/galaxy/Classes/Modules/InteractionH5(与H5交互)/YHH5WebViewVC.swift
View file @
8718c474
...
...
@@ -568,13 +568,13 @@ extension YHH5WebViewVC {
}
if
!
(
absoluteString
.
hasPrefix
(
"https://"
)
||
absoluteString
.
hasPrefix
(
"http://"
))
{
if
absoluteString
.
hasPrefix
(
"alipayconnect://"
)
||
absoluteString
.
hasPrefix
(
"alipayhk://"
)
{
if
absoluteString
.
hasPrefix
(
"alipayconnect://"
)
||
absoluteString
.
hasPrefix
(
"alipayhk://"
)
{
self
.
openApp
(
with
:
url
)
decisionHandler
(
.
allow
)
return
}
else
if
absoluteString
.
hasPrefix
(
"alipay://"
)
{
self
.
openApp
(
with
:
url
)
decisionHandler
(
.
allow
)
//fort test hjl 需要测试
decisionHandler
(
.
allow
)
//
fort test hjl 需要测试
return
}
}
...
...
@@ -607,16 +607,11 @@ extension YHH5WebViewVC {
if
UIApplication
.
shared
.
canOpenURL
(
url
)
{
UIApplication
.
shared
.
open
(
url
,
options
:
[:],
completionHandler
:
nil
)
}
else
{
//
// if let tmpUrl = URL(string: "https://global.alipay.com/281002040090chyp7RdGg5AHvg49BXCv4Igh&pspName=ALIPAY_CN") {
let
safariViewController
=
SFSafariViewController
(
url
:
url
)
safariViewController
.
dismissButtonStyle
=
.
close
safariViewController
.
modalPresentationStyle
=
.
fullScreen
UIViewController
.
current
?
.
present
(
safariViewController
,
animated
:
true
,
completion
:
nil
)
// }
}
else
if
url
.
absoluteString
.
hasPrefix
(
"https://"
)
||
url
.
absoluteString
.
hasPrefix
(
"http://"
)
{
let
safariViewController
=
SFSafariViewController
(
url
:
url
)
safariViewController
.
dismissButtonStyle
=
.
close
safariViewController
.
modalPresentationStyle
=
.
fullScreen
UIViewController
.
current
?
.
present
(
safariViewController
,
animated
:
true
,
completion
:
nil
)
}
}
}
...
...
galaxy/galaxy/Classes/Modules/Mine(我的)/C/YHMyNewViewController.swift
View file @
8718c474
...
...
@@ -305,6 +305,7 @@ class YHMyNewViewController: YHBaseViewController {
self
.
navigationController
?
.
pushViewController
(
vc
)
// let vc = YHH5WebViewVC()
// vc.isFullScreenFlag = false
// vc.url = "http://192.168.34.113:10301/superAppBridge.html#/order/antom-pay?id=1864¶m=eyJhbGbolyFeciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3NTc0NzI5MzAsImkiOjQyMzgxNzEzODcwNzAyMSwidSI6IumTtuays-mbhuWboiIsInIiOiJzdXBlcl9hcHAifQ.Phsg13OfN5XJ0cLe759U2W0hH1iTZeneimgTlnouPcg"
// self.navigationController?.pushViewController(vc)
}
...
...
galaxy/galaxy/Classes/Tools/Helper/YhConstant.swift
View file @
8718c474
...
...
@@ -274,6 +274,14 @@ extension YhConstant {
}
// MARK: - 跨境支付
struct
AntomPay
{
static
let
universalLink
=
"https://www.galaxy-immi.com/yinheApp/"
static
let
returnPath
=
"antomPayReturnUrl"
static
let
gotoPath
=
"superAppBridge.html#/order/antom-pay-result"
static
let
recordId
=
"record_id"
}
// MARK: - 七鱼客服系统SDK
struct
QiYuSDK
{
static
let
appKey
=
"7922dbeb48141b15d2ae2e91cc156af5"
...
...
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