slj 4 years ago
parent
commit
430e3420b7
  1. 15
      pages/topics/lease/index.js
  2. 9
      pages/topics/lease/index.wxml
  3. 6
      pages/topics/lease/index.wxss
  4. 15
      pages/topics/loan/index.js

15
pages/topics/lease/index.js

@ -40,10 +40,17 @@ Component({
}
},
attached: function() {
this.setData({
height:app.globalData.windowHeight - 44
// this.setData({
// height:app.globalData.windowHeight - 44
// })
let that=this
wx.getSystemInfo({
success: function (res) { // 获取手机信息
console.log(res)
that.setData({
height:res.windowHeight - 44
})
}
})
console.log('windowHeight--->',app.globalData.windowHeight)
console.log('height--->',this.data.height)
},
})

9
pages/topics/lease/index.wxml

@ -1,14 +1,7 @@
<!--pages/topics/rentHouse/index.wxml-->
<!-- <view class="con"
<view class="con"
style="background: url({{imgUrl}}) no-repeat; background-size:cover;background-position-y:bottom;height:{{height}}px">
<view class="btnView">
<e-ibutton title="查看详情" bind:onTap="check" />
</view>
</view> -->
<view class="con" style="height:{{height}}px">
<image src="{{imgUrl}}" class="bg-image" style="height:{{height}}px"></image>
<view class="btnView">
<e-ibutton title="查看详情" bind:onTap="check" />
</view>
</view>

6
pages/topics/lease/index.wxss

@ -3,13 +3,17 @@
display: block;
width: 100%;
height: 100%;
/* background-color: rgba(0,0,0,.2); */
position: absolute;
bottom: 0;
left: 0;
right: 0;
}
.con{
width: 100%;
display: flex;
flex-direction: column;
align-items: center;
position: relative;
/* background-size: 100% 100%; */
}
.img{

15
pages/topics/loan/index.js

@ -33,10 +33,19 @@ Component({
}
},
attached: function() {
let that=this
// this.setData({
// height:app.globalData.windowHeight - 44
// })
console.log(app.globalData.windowHeight)
console.log(app.globalData.screenHeight)
this.setData({
height:app.globalData.windowHeight - 44
console.log(this.data.height)
wx.getSystemInfo({
success: function (res) { // 获取手机信息
console.log(res)
that.setData({
height:res.windowHeight - 44
})
}
})
},
})

Loading…
Cancel
Save