"use client"; import Link from "next/link"; import React, { useState, useEffect } from "react"; import InOtherApp from "@/components/InOtherApp"; import Image from "next/image"; import download_lefttop from "@/public/images/download_lefttop.png"; import download_righttop from "@/public/images/download_righttop.png"; import download_rightmedium from "@/public/images/download_rightmedium.png"; import download_leftbottom from "@/public/images/download_leftbottom.png"; import download_rightbottom from "@/public/images/download_rightbottom.png"; import slogan from "@/public/images/slogan.png"; import qrcode from "@/public/images/qrcode.png"; import Footer from "@/components/Footer"; export default function Home() { const [deviceType, setDeviceType] = useState(""); useEffect(() => { const userAgent = navigator.userAgent; //区分设备类型 if (/Android/i.test(userAgent)) { setDeviceType("Android"); } else if (/iPhone|iPad|iPod/i.test(userAgent)) { setDeviceType("ios"); } else { setDeviceType("pc"); } }, []); return (
{deviceType === "pc" && (

立即下载

Android

扫描下方二维码

ios

)}
{deviceType === "pc" && (

手机扫码下载

)}
{deviceType !== "pc" && ( <> 安装 )} {deviceType !== "Android" && (

安装前请卸载旧版本,详情请 查看帮助

)}
); }