From c1776135687e4b1ff0de812217764246749f1b1e Mon Sep 17 00:00:00 2001 From: hehh Date: Wed, 16 Jul 2025 15:43:07 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E4=BC=98=E5=8C=96=E7=A7=BB?= =?UTF-8?q?=E5=8A=A8=E7=AB=AF=E5=88=A4=E6=96=AD=E9=80=BB=E8=BE=91=E5=B9=B6?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=20UA=20=E6=97=A5=E5=BF=97=E8=BE=93=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 移除了对 iPad 和 iPod 的判断,只保留 iPhone 和 Android- 在判断移动端之前添加了 UA 日志输出,便于调试 --- js/main.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/js/main.js b/js/main.js index 0fd6da8..ed9ef06 100644 --- a/js/main.js +++ b/js/main.js @@ -95,9 +95,9 @@ $('.moments-link').on('click', function (e) { // 获取链接地址 var url = $(this).attr('href'); - + console.log("当前用户UA-", navigator.userAgent) // 判断是否是移动端 - var isMobile = /iPhone|iPad|iPod|Android/i.test(navigator.userAgent); + var isMobile = /iPhone|Android/i.test(navigator.userAgent); if (isMobile) { // 移动端:直接跳转