Merge pull request '过滤ios夸克浏览器' (#10) from anln_deal_issue into main

Reviewed-on: https://git.wishpal.cn/wishpal_ironfan/tiefen_space_h5/pulls/10
This commit is contained in:
yezian 2024-12-06 20:41:43 +08:00
commit e0beeb2608
1 changed files with 25 additions and 0 deletions

View File

@ -10,6 +10,31 @@ export default function WithAuth(WrappedComponent) {
const pathname = usePathname();
const searchParams = useSearchParams();
useEffect(() => {
var ua = navigator.userAgent.toLowerCase();
if (ua.indexOf("quark") > -1 && ua.indexOf("iphone") > -1) {
// 夸克浏览器
Dialog.show({
title: "提示",
content: "暂时不支持此浏览器请使用Safari访问铁粉空间",
// buttonText: "确认",
bodyStyle: {
maxHeight: "none",
width: "80vw",
position: "fixed",
top: "200px",
left: "10vw",
"--text-color": "#fff",
color: "#fff",
},
// cancelText:"确认",
// confirmText:"取消",
style: {
"--text-color": "#fff",
},
});
}
}, []);
useEffect(() => {
if (searchParams.get("inviter")) {
save("inviter", Number(searchParams.get("inviter")));