Commit 5716956e by 高淑倩

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

parent 8eb3d385
......@@ -40,7 +40,8 @@ wxService.page({
render: null, // 渲染页面数据对象(安全渲染)
isLastPage: false, // 页面段落加载完成
renderPageOver: false, // 渲染页面结束
// isAuthorization: true
// isAuthorization: true,
outoHeigth: 500,
},
() => {
// this.loadMore()
......@@ -56,7 +57,6 @@ wxService.page({
* */
updatePage(ev) {
const {pageId} = ev.detail
console.log('pageId', pageId)
// this.setData({
// pages: [],
// pageId
......@@ -90,6 +90,12 @@ wxService.page({
isAuthorization: true
})
}
// 获取手机信息
wxService.getSystemInfo().then(res=> {
this.setData({
outoHeigth: res.windowHeight
})
})
},
// 查询积分信息
getMemberPointInfo(){
......
<!--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 底部-->
<block wx:for="{{pages}}" wx:key="{{index}}" wx:for-item="pItem">
<!--{{pItem.type}}-->
......
/* pages/userCenter.wxss */
@import './../../base/base.wxss';
page {
/* background: #fff!important; */
}
.user-center{
/* margin-bottom: 120rpx; */
/* background: #fff; */
box-sizing:border-box;
box-sizing: border-box;
padding-bottom: 120rpx;
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