shish 2 months ago
parent
commit
aee6c6f935
1 changed files with 15 additions and 0 deletions
  1. 15 0
      hdApp/src/admin/home/me.vue

+ 15 - 0
hdApp/src/admin/home/me.vue

@@ -296,6 +296,7 @@ export default {
     }
     }
   },
   },
   onShow () {
   onShow () {
+    this.setStatusBarHeight();
     if (isValidLoginSession(this.getLoginInfo)) {
     if (isValidLoginSession(this.getLoginInfo)) {
       uni.removeStorageSync("manualLogout");
       uni.removeStorageSync("manualLogout");
       this.getMyInfo();
       this.getMyInfo();
@@ -351,6 +352,14 @@ export default {
           this.capsuleSafeRight = systemInfo.windowWidth - menuButton.left + 8;
           this.capsuleSafeRight = systemInfo.windowWidth - menuButton.left + 8;
         }
         }
         // #endif
         // #endif
+        // #ifdef APP-PLUS
+        const safeTop =
+          (systemInfo.safeAreaInsets && systemInfo.safeAreaInsets.top) ||
+          (systemInfo.safeArea && systemInfo.safeArea.top) ||
+          this.statusBarHeight;
+        // 自定义导航:状态栏 + 标题栏区域,避免 App 端内容顶到状态栏下
+        this.heroTopOffset = safeTop + 44 + 12;
+        // #endif
       } catch (e) {
       } catch (e) {
         this.statusBarHeight = 0;
         this.statusBarHeight = 0;
         this.heroTopOffset = 0;
         this.heroTopOffset = 0;
@@ -601,6 +610,12 @@ export default {
   margin-top: -24upx;
   margin-top: -24upx;
 }
 }
 
 
+/* #ifdef APP-PLUS */
+.profile-main {
+  margin-top: 0;
+}
+/* #endif */
+
 .shop-avatar,
 .shop-avatar,
 .avatar-placeholder {
 .avatar-placeholder {
   width: 120upx;
   width: 120upx;