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() { attached: function() {
this.setData({ // this.setData({
height:app.globalData.windowHeight - 44 // 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--> <!--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"> style="background: url({{imgUrl}}) no-repeat; background-size:cover;background-position-y:bottom;height:{{height}}px">
<view class="btnView"> <view class="btnView">
<e-ibutton title="查看详情" bind:onTap="check" /> <e-ibutton title="查看详情" bind:onTap="check" />
</view> </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> </view>

6
pages/topics/lease/index.wxss

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

15
pages/topics/loan/index.js

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

Loading…
Cancel
Save