fix: 修复iOS抖音支付回跳注册
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"id": "tb-douyin-pay",
|
||||
"displayName": "TB 抖音支付",
|
||||
"version": "0.2.1",
|
||||
"version": "0.2.2",
|
||||
"description": "独立实现的抖音支付官方 SDK UTS 桥接",
|
||||
"engines": { "HBuilderX": ">=4.36.0" },
|
||||
"uni_modules": {
|
||||
|
||||
@@ -7,7 +7,13 @@ public class TbDouyinPayNative {
|
||||
private static var generation = UUID()
|
||||
|
||||
public static func initialize(_ appId: String, _ scheme: String, _ link: String) {
|
||||
DypayAPI.register(withAppID: appId, universalLink: link, callbackScheme: scheme)
|
||||
if link.trimmingCharacters(in: .whitespacesAndNewlines).isEmpty {
|
||||
// Use the SDK's Scheme-only API instead of registering an empty
|
||||
// Universal Link with the higher-priority Universal Link API.
|
||||
DypayAPI.register(withAppID: appId, callbackScheme: scheme)
|
||||
} else {
|
||||
DypayAPI.register(withAppID: appId, universalLink: link, callbackScheme: scheme)
|
||||
}
|
||||
}
|
||||
|
||||
public static func available() -> Bool { DypayAPI.canOpenDypay() }
|
||||
|
||||
Reference in New Issue
Block a user