修改三方跳转路径

This commit is contained in:
al 2024-12-17 17:51:08 +08:00
parent a6384162d1
commit 663b8a20c0
2 changed files with 3 additions and 3 deletions

View File

@ -37,7 +37,7 @@ export default function WithAuth(WrappedComponent) {
"--text-color": "#fff",
},
});
openUrlWithBrowser();
openUrlWithBrowser(pathname);
}
}, []);
useEffect(() => {

View File

@ -173,7 +173,7 @@ export function getcountLines(str) {
// }
// 尝试使用浏览器打开URL
export function openUrlWithBrowser() {
export function openUrlWithBrowser(url) {
try {
const userAgent = navigator.userAgent;
//区分设备类型
@ -182,7 +182,7 @@ export function openUrlWithBrowser() {
"intent://app.tiefen.fun/#Intent;scheme=https;package=com.android.chrome;end";
window.location.href = intentUrl;
} else if (/iPhone|iPad|iPod/i.test(userAgent)) {
window.location.href = "x-safari-https://app.tiefen.fun";
window.location.href = `x-safari-https://app.tiefen.fun${url}`;
} else {
// setDeviceType("pc");
}