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', // 测试服务