li.shaoyi 2 năm trước cách đây
mục cha
commit
9eca7f26f8

+ 2 - 3
src/business/login/index.ts

@@ -109,10 +109,9 @@ export function useLogin() {
             if (token.value) {
                 await loadUserData()
             } else if (enableAutoLogin) {
-                await autoLogin()
+                await autoLogin().catch(() => Promise.resolve())
             }
-            logining.value = false
-        } catch {
+        } finally {
             logining.value = false
         }
     }

+ 5 - 0
src/components/base/modal/index.less

@@ -31,6 +31,11 @@
     &__container {
         max-width: 100vw;
         max-height: 100vh;
+        background-color: #fff;
+        padding-bottom: constant(safe-area-inset-bottom);
+        /* 兼容 iOS<11.2 */
+        padding-bottom: env(safe-area-inset-bottom);
+        /* 兼容iOS>= 11.2 */
     }
 
     /* 全屏 */

+ 4 - 0
src/packages/mobile/assets/themes/base/reset.less

@@ -109,4 +109,8 @@ body {
     height: 100%;
     background-color: #fff;
     overflow-x: hidden;
+    padding-bottom: constant(safe-area-inset-bottom);
+    /* 兼容 iOS<11.2 */
+    padding-bottom: env(safe-area-inset-bottom);
+    /* 兼容iOS>= 11.2 */
 }

+ 0 - 4
src/packages/mobile/components/layouts/page/index.less

@@ -78,8 +78,4 @@
     height: 100%;
     overflow-y: auto;
     background-color: #f6f6f6;
-    padding-bottom: constant(safe-area-inset-bottom);
-    /* 兼容 iOS<11.2 */
-    padding-bottom: env(safe-area-inset-bottom);
-    /* 兼容iOS>= 11.2 */
 }