diff --git a/pages/topics/lease/index.js b/pages/topics/lease/index.js index b30a24e..bb750f1 100644 --- a/pages/topics/lease/index.js +++ b/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) }, }) diff --git a/pages/topics/lease/index.wxml b/pages/topics/lease/index.wxml index 4dcd952..40d29e2 100644 --- a/pages/topics/lease/index.wxml +++ b/pages/topics/lease/index.wxml @@ -1,14 +1,7 @@ - - - - - - - \ No newline at end of file diff --git a/pages/topics/lease/index.wxss b/pages/topics/lease/index.wxss index 8e7c3f1..c8487c2 100644 --- a/pages/topics/lease/index.wxss +++ b/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{ diff --git a/pages/topics/loan/index.js b/pages/topics/loan/index.js index cfa1276..7ca1d2e 100644 --- a/pages/topics/loan/index.js +++ b/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 + }) + } }) }, })