修改三方跳转路径
This commit is contained in:
parent
a6384162d1
commit
663b8a20c0
|
@ -37,7 +37,7 @@ export default function WithAuth(WrappedComponent) {
|
|||
"--text-color": "#fff",
|
||||
},
|
||||
});
|
||||
openUrlWithBrowser();
|
||||
openUrlWithBrowser(pathname);
|
||||
}
|
||||
}, []);
|
||||
useEffect(() => {
|
||||
|
|
|
@ -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");
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue