From 355ad119af1d94097891fbecaeea6be26b7ccf17 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A7=A6=E6=98=9F=E6=98=9F?= <605893810@qq.com> Date: Fri, 11 Sep 2026 10:46:22 +0800 Subject: [PATCH] =?UTF-8?q?fixbug=EF=BC=9Aios=E6=8A=96=E9=9F=B3=E6=94=AF?= =?UTF-8?q?=E4=BB=98=E5=9B=9E=E8=B7=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- info.plist | 10 ++++++++++ manifest.json | 9 ++------- utils/douyin-pay.js | 4 +++- 3 files changed, 15 insertions(+), 8 deletions(-) diff --git a/info.plist b/info.plist index 66c1eab..eb3eb04 100644 --- a/info.plist +++ b/info.plist @@ -22,6 +22,16 @@ wx7a5902cd556d9396 + + CFBundleTypeRole + Editor + CFBundleURLName + trustbridgeapp + CFBundleURLSchemes + + trustbridgeapp + + \ No newline at end of file diff --git a/manifest.json b/manifest.json index bc97ca3..8edb574 100644 --- a/manifest.json +++ b/manifest.json @@ -60,13 +60,8 @@ "ios" : { "dSYMs" : false, "idfa" : false, - "urltypes" : [ - { - "urlidentifier" : "com.trustbridgeapp.mm", - "urlschemes" : "trustbridgeapp" - } - ], - "associatedDomains" : [ "applinks:ulink.trustbridgeapp.com" ], + "urltypes" : "trustbridgeapp", + "associatedDomains" : [ "applinks:app.tbmall.xin", "applinks:ulink.trustbridgeapp.com" ], "capabilities" : { "entitlements" : { "com.apple.developer.associated-domains" : [ "applinks:app.tbmall.xin" ] diff --git a/utils/douyin-pay.js b/utils/douyin-pay.js index c1eed4c..0303399 100644 --- a/utils/douyin-pay.js +++ b/utils/douyin-pay.js @@ -119,7 +119,9 @@ async function executePayment(payment, key) { if (key !== accountKey()) return { state: 'pending' }; const payInfo = toSdkPayInfo(payment); if (!canOpenDypay()) throw new Error('请先安装或升级抖音客户端'); - if (!initDypay({ appId: payInfo.appid, callbackScheme: payment.douyin.callbackScheme || 'trustbridgeapp' })) { + 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 })) { throw new Error('支付初始化失败,请稍后重试'); } // Persist before entering native code so a killed process remains recoverable.