Browse Source

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

Before 6 months ago
parent
commit
55d0a8a55d
1 changed files with 5 additions and 1 deletions
  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]"}