Quellcode durchsuchen

fix: 增加app不显示headerx下载按钮

Before vor 6 Monaten
Ursprung
Commit
55d0a8a55d
1 geänderte Dateien mit 5 neuen und 1 gelöschten Zeilen
  1. 5 1
      src/app/[locale]/(TabBar)/[[...share]]/_home/DownloadSection.tsx

+ 5 - 1
src/app/[locale]/(TabBar)/[[...share]]/_home/DownloadSection.tsx

@@ -16,8 +16,12 @@ const DownloadSection = () => {
         sessionStorage.setItem("isCloseDownload", "true");
         setVisible(false);
     };
+    function isWebView() {
+        const userAgent = navigator.userAgent;
 
-    if (!visible) return null;
+        return /WebView|iPhone|iPod|Android/.test(userAgent);
+    }
+    if (!visible || isWebView()) return null;
     return (
         <div
             className={"relative flex items-center px-[0.1389rem] py-[0.0694rem]"}