fix: 修复iOS抖音支付回跳注册
This commit is contained in:
+6
-3
@@ -119,9 +119,12 @@ async function executePayment(payment, key) {
|
||||
if (key !== accountKey()) return { state: 'pending' };
|
||||
const payInfo = toSdkPayInfo(payment);
|
||||
if (!canOpenDypay()) throw new Error('请先安装或升级抖音客户端');
|
||||
const callbackScheme = payment.douyin?.callbackScheme || 'trustbridgeapp';
|
||||
const universalLink = payment.douyin?.universalLink || payment.douyin?.UniversalLinks || 'https://app.tbmall.xin/uni-universallinks/__UNI__4910728/';
|
||||
if (!initDypay({ appId: payInfo.appid, callbackScheme, universalLink })) {
|
||||
// iOS must return to this installed host's registered Scheme. The previous
|
||||
// default Universal Link serves HTML instead of an Apple association file;
|
||||
// Dypay prioritizes that link over the working Scheme. Do not register it.
|
||||
const isIOS = uni.getSystemInfoSync().platform === 'ios';
|
||||
const callbackScheme = isIOS ? 'trustbridgeapp' : (payment.douyin?.callbackScheme || 'trustbridgeapp');
|
||||
if (!initDypay({ appId: payInfo.appid, callbackScheme })) {
|
||||
throw new Error('支付初始化失败,请稍后重试');
|
||||
}
|
||||
// Persist before entering native code so a killed process remains recoverable.
|
||||
|
||||
Reference in New Issue
Block a user