diff --git a/pages/index/searchbar/index.js b/pages/index/searchbar/index.js index 222c263..d48f748 100644 --- a/pages/index/searchbar/index.js +++ b/pages/index/searchbar/index.js @@ -12,6 +12,7 @@ Page({ merchantVoList:[], indexId: 0, businessId:0, + windowHeight:"", page:1, isFirstPage:false, isLastPage:false, @@ -42,16 +43,20 @@ Page({ * 生命周期函数--监听页面加载 */ onLoad: function (options) { + let that = this; + that.getBussiness(); + that.getList(1, 0); + }, + onShow(){ let that = this; wx.getSystemInfo({ success: function (res) { + console.log(res.windowHeight); that.setData({ - winHeight: res.windowHeight - }); - } - }); - that.getBussiness(); - that.getList(1, 0); + windowHeight: res.windowHeight + }) + }, + }) }, getBussiness:function(){ let that = this; diff --git a/pages/index/searchbar/index.wxml b/pages/index/searchbar/index.wxml index 9570145..889670d 100644 --- a/pages/index/searchbar/index.wxml +++ b/pages/index/searchbar/index.wxml @@ -1,7 +1,7 @@ - + diff --git a/pages/index/searchbar/index.wxss b/pages/index/searchbar/index.wxss index df8dda7..0190fe8 100644 --- a/pages/index/searchbar/index.wxss +++ b/pages/index/searchbar/index.wxss @@ -6,6 +6,7 @@ position: fixed; left: 0; top: 0; + background:#F4F5F9; } .text-style { @@ -356,8 +357,7 @@ page { margin-top: 200rpx!important; } .all{ - padding-bottom: 80rpx; - background: #F4F5F9; + /* background: #F4F5F9; */ } .shopVoList{ display: flex!important;