|
@@ -33,15 +33,16 @@ export function getDownloadURLScheme(downloadSet = null, apiUrl = null) {
|
|
|
}
|
|
|
|
|
|
export function openApp(scheme) {
|
|
|
- // 创建 iframe 来尝试调用 URL Scheme
|
|
|
- const iframe = document.createElement("iframe");
|
|
|
- iframe.style.display = "none";
|
|
|
- iframe.src = scheme;
|
|
|
- document.body.appendChild(iframe);
|
|
|
+ window.location.href = scheme;
|
|
|
+ // // 创建 iframe 来尝试调用 URL Scheme
|
|
|
+ // const iframe = document.createElement("iframe");
|
|
|
+ // iframe.style.display = "none";
|
|
|
+ // iframe.src = scheme;
|
|
|
+ // document.body.appendChild(iframe);
|
|
|
|
|
|
- setTimeout(() => {
|
|
|
- document.body.removeChild(iframe);
|
|
|
- }, 1000);
|
|
|
+ // setTimeout(() => {
|
|
|
+ // document.body.removeChild(iframe);
|
|
|
+ // }, 1000);
|
|
|
}
|
|
|
|
|
|
export function openAppWithCallback(scheme, timeout = 2000, fallback) {
|