"use client"; import React, { useState, useEffect } from "react"; import InOtherApp from "@/components/InOtherApp"; import Footer from "@/components/Footer"; import Link from "next/link"; 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 (

铁粉空间是一款专注于创作者与粉丝互动的内容分享平台。在这里,你可以查看你喜欢的创作者的全平台账号,并可以一键跳转进行关注。也能在这儿查看Ta的最新动态,做最了解Ta的那个铁粉。

{deviceType === "pc" && (

立即下载

Android

立即安装

ios

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

手机扫码下载

)}
{deviceType !== "pc" && (
{ const url = deviceType === "ios" ? "itms-services://?action=download-manifest&url=https://filecdn01.tiefen.fun/appdownload/ironfans.plist" : "https://filecdn01.tiefen.fun/appdownload/ironfans1.4.6.apk"; window.location.href = url; }} > 安装
)} {deviceType !== "Android" && (

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

)}
); }