From 84678f0a618d409dc16007b1f60b8e8236f64a50 Mon Sep 17 00:00:00 2001 From: bb_pan Date: Thu, 13 Feb 2025 16:29:34 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E9=83=A8=E7=BD=B2=E5=90=8EiO?= =?UTF-8?q?S=E8=AE=BE=E5=A4=87=E9=AB=98=E5=BA=A6=E5=A1=8C=E9=99=B7?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- index.html | 19 ++++++++++++++++++- src/App.vue | 7 +------ src/utils/http.js | 2 +- vite.config.js | 2 +- 4 files changed, 21 insertions(+), 9 deletions(-) diff --git a/index.html b/index.html index 2d44123..4c9a668 100644 --- a/index.html +++ b/index.html @@ -19,8 +19,24 @@ document.write( '') + + // 修复 iOS 下页面高度异常问题 + function adjustForiOS() { + var u = navigator.userAgent; + console.log('🚀 ~ u:', u); + var isiOS = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/); + console.log('🚀 ~ isiOS:', isiOS); + if (isiOS) { + var box = document.getElementById('box'); + if (box) { + box.style.height = '100px'; + } + } + } + + document.addEventListener('DOMContentLoaded', adjustForiOS); - + 安徽租赁商城 @@ -29,6 +45,7 @@ +
diff --git a/src/App.vue b/src/App.vue index 3f0decf..597f603 100644 --- a/src/App.vue +++ b/src/App.vue @@ -45,10 +45,5 @@ scroll-view { white-space: nowrap; } -@supports (bottom: env(safe-area-inset-bottom)) { - #app { - padding-bottom: constant(safe-area-inset-bottom); - padding-bottom: env(safe-area-inset-bottom); - } -} + diff --git a/src/utils/http.js b/src/utils/http.js index 3c46636..f329f96 100644 --- a/src/utils/http.js +++ b/src/utils/http.js @@ -91,7 +91,7 @@ export const http = (options) => { fail(err) { uni.showToast({ icon: 'none', - title: '请求失败' + err, + title: '请求失败' + err.errMsg, }) console.log(err, '请求失败') reject(err) diff --git a/vite.config.js b/vite.config.js index 05acd0d..339bff0 100644 --- a/vite.config.js +++ b/vite.config.js @@ -34,7 +34,7 @@ export default defineConfig({ // 在此处编写代理规则 '/api': { target: 'http://36.33.26.201:17788/proxyApi', - // target: 'http://192.168.2.123:28080', + // target: 'http://192.168.0.15:28080', // target: 'http://192.168.2.122:28080', // target: 'http://192.168.0.244:28580', // 测试服务 // target: 'http://192.168.2.122:28080', // 测试服务