Commit 5716956e by 高淑倩

add: 首页高度跟随屏幕自适应

parent 8eb3d385
...@@ -40,7 +40,8 @@ wxService.page({ ...@@ -40,7 +40,8 @@ wxService.page({
render: null, // 渲染页面数据对象(安全渲染) render: null, // 渲染页面数据对象(安全渲染)
isLastPage: false, // 页面段落加载完成 isLastPage: false, // 页面段落加载完成
renderPageOver: false, // 渲染页面结束 renderPageOver: false, // 渲染页面结束
// isAuthorization: true // isAuthorization: true,
outoHeigth: 500,
}, },
() => { () => {
// this.loadMore() // this.loadMore()
...@@ -56,7 +57,6 @@ wxService.page({ ...@@ -56,7 +57,6 @@ wxService.page({
* */ * */
updatePage(ev) { updatePage(ev) {
const {pageId} = ev.detail const {pageId} = ev.detail
console.log('pageId', pageId)
// this.setData({ // this.setData({
// pages: [], // pages: [],
// pageId // pageId
...@@ -90,6 +90,12 @@ wxService.page({ ...@@ -90,6 +90,12 @@ wxService.page({
isAuthorization: true isAuthorization: true
}) })
} }
// 获取手机信息
wxService.getSystemInfo().then(res=> {
this.setData({
outoHeigth: res.windowHeight
})
})
}, },
// 查询积分信息 // 查询积分信息
getMemberPointInfo(){ getMemberPointInfo(){
......
<!--pages/userCenter.wxml--> <!--pages/userCenter.wxml-->
<view class='user-center' style="background: {{pageBackgroundColor == 1? '#eee': '#fff'}};"> <view class='user-center' style="background: {{pageBackgroundColor == 1? '#eee': '#fff'}};min-height: {{outoHeigth}}px">
<!-- 1 轮播 2 个人中心 3 图片导航 4 底部--> <!-- 1 轮播 2 个人中心 3 图片导航 4 底部-->
<block wx:for="{{pages}}" wx:key="{{index}}" wx:for-item="pItem"> <block wx:for="{{pages}}" wx:key="{{index}}" wx:for-item="pItem">
<!--{{pItem.type}}--> <!--{{pItem.type}}-->
......
/* pages/userCenter.wxss */ /* pages/userCenter.wxss */
@import './../../base/base.wxss'; @import './../../base/base.wxss';
page {
/* background: #fff!important; */
}
.user-center{ .user-center{
/* margin-bottom: 120rpx; */ box-sizing: border-box;
/* background: #fff; */
box-sizing:border-box;
padding-bottom: 120rpx; padding-bottom: 120rpx;
height: 100%; height: 100%;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment