From d8316cf49d835ed168eebcd9edd7f10bfffbe8fa Mon Sep 17 00:00:00 2001 From: Linzm <1015157648@qq.com> Date: Fri, 13 Jun 2025 15:23:17 +0800 Subject: [PATCH] =?UTF-8?q?iOS=E6=B5=8F=E8=A7=88=E5=99=A8=E5=88=A4?= =?UTF-8?q?=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/badge/index.vue | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/src/views/badge/index.vue b/src/views/badge/index.vue index 8fbdd2b..b7ba249 100644 --- a/src/views/badge/index.vue +++ b/src/views/badge/index.vue @@ -21,11 +21,14 @@ const options = ref({ }) const openApp = () => { - var userAgent = navigator.userAgent; - if (userAgent.match(/iPhone|iPod|iPad/i)) { + const ua = navigator.userAgent; + const isIOS = /iPhone|iPad|iPod/i.test(ua); + const isAndroid = /Android/i.test(ua); + + if (isIOS) { option.value.ceilbutton = true options.value.ceilbutton = true - } else if (userAgent.match(/Android/i)) { + } else if (isAndroid) { option.value.ceilbutton = false options.value.ceilbutton = false } else { @@ -321,6 +324,7 @@ onMounted(() => { getList() getOrderStat() getSizeList() + openApp() }) @@ -1054,9 +1058,16 @@ onMounted(() => { } .btndiv { position: fixed; - bottom: 10vh; + bottom: 120px; width: 80%; left: 50%; transform: translateX(-50%); } +@media screen and (max-width: 767px) { + _::-webkit-full-page-media, + _:future, + :root .btndiv { + padding-bottom: 120px; + } +}