Browse Source

feature: 调整我的界面登录之后,登录按钮适配苹果手机跟着屏幕一起移动

332777428@qq.com 6 months ago
parent
commit
f64c08095c
2 changed files with 10 additions and 7 deletions
  1. 6 4
      pages/pageA/index/index.wxml
  2. 4 3
      pages/pageA/index/index.wxss

+ 6 - 4
pages/pageA/index/index.wxml

@@ -141,7 +141,7 @@
         </view>
 
         <!-- 我的 -->
-        <view wx:elif="{{indexPage==2}}" class="me" style="height: calc(100vh - 105rpx - {{safeBottomHeight}}rpx - 22rpx - {{navBarHeight}}px);">
+        <view wx:elif="{{indexPage==2}}" class="me" style="height: calc(100vh - 105rpx - {{safeBottomHeight}}rpx - 22rpx - {{navBarHeight}}px); display: flex; flex-direction: column;">
 
           <view class="head-logo" bind:tap="{{isLogin?'':'onTapLogin'}}">
             <image mode="scaleToFill" src="{{userPic}}"></image>
@@ -171,9 +171,11 @@
               </view>
             </view>
           </view>
-          <view wx:if="{{isLogin}}" class="login">
-            <view bindtap="onTapLogin" class="{{!isLogin ? 'action' : ''}}">
-              {{isLogin ? '退出登录' : "登录"}}
+          <view wx:if="{{isLogin}}" style="flex: 1;display: flex;">
+            <view class="login">
+              <view bindtap="onTapLogin" class="{{!isLogin ? 'action' : ''}}">
+                {{isLogin ? '退出登录' : "登录"}}
+              </view>
             </view>
           </view>
         </view>

+ 4 - 3
pages/pageA/index/index.wxss

@@ -702,11 +702,12 @@
   right: 0rpx;
 }
 
+/* position: fixed; display: flex; */
 .login {
-  position: fixed;
-  bottom: 184rpx;
-  width: 100vw;
   display: flex;
+  width: 100vw;
+  align-items: flex-end;
+  margin-bottom: 50rpx;
   justify-content: center;
 }