浏览代码

修改比例样式

306132416@qq.com 4 年之前
父节点
当前提交
698e841a98
共有 1 个文件被更改,包括 7 次插入5 次删除
  1. 7 5
      pages/index/index.vue

+ 7 - 5
pages/index/index.vue

@@ -1,5 +1,5 @@
 <template>
-	<view class="content">
+	<view class="content" :style="{ height: heightCss}">
 		<image class="logo" src="/static/bg.jpg" mode="widthFix"></image>
 		<view class="getPhone-box" :style="{ bottom: bottomCss}">
 			<button type="primary" class="custom-btn"  open-type="getPhoneNumber"
@@ -21,8 +21,9 @@
 				isAuthPhone:getApp().globalData.user_phone,
 				productList:[
 				],
-				bottomCss:'20px',
+				bottomCss:'-45px',
 				marginTopCss:'0',
+				heightCss:'auto',
 				userInfoObj:{},
 				// phoneHeight:'',
 			}
@@ -48,9 +49,10 @@
 				console.log('getHeight')
 			    let phoneHeight = uni.getSystemInfoSync().windowHeight;
 				console.log(phoneHeight)
-				this.bottomCss = phoneHeight > 640 ? '50px':'20px';
+				this.bottomCss = phoneHeight > 640 ? '50px':'-45px';
+				this.heightCss = phoneHeight > 640 ? '100%':'auto';
 				if(phoneHeight > 720){
-					this.bottomCss = '55px';
+					this.bottomCss = '60px';
 				}
 			},
 			getPhoneNumber(e,type){
@@ -170,7 +172,7 @@
 		flex-direction: column;
 		align-items: center;
 		justify-content: center;
-		height: 100%;
+		// height: 100%;
 		background-image: linear-gradient(#000, #22272A);
 		// background-image: url('/static/bg-home.jpg');
 		// background-repeat: no-repeat;