From 03162f245e99c7e29d3e4c8606f870ebafe6620b Mon Sep 17 00:00:00 2001 From: wuxw <928255095@qq.com> Date: Wed, 15 Jan 2020 22:58:17 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E9=A6=96=E9=A1=B5=20?= =?UTF-8?q?=E5=B0=8F=E5=8C=BA=E6=96=87=E5=8C=96=E5=8A=A0=E8=BD=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/index/index.js | 33 ++++++++++++++++----------------- 1 file changed, 16 insertions(+), 17 deletions(-) diff --git a/pages/index/index.js b/pages/index/index.js index d569309..3c3751c 100644 --- a/pages/index/index.js +++ b/pages/index/index.js @@ -130,7 +130,23 @@ Page({ * 生命周期函数--监听页面加载 */ onLoad: function(options) { + let _that = this; console.log(context); + context.getOwner(function (_owner) { + let _communityId = ''; + if (_owner == null) { + _communityId = '7020181217000001' + } else { + _communityId = _owner.communityId; + } + _that.setData({ + communityId: _communityId + }); + + //查询小区文化 + _that._loadActivites(); + + }); }, /** @@ -150,23 +166,6 @@ Page({ location: wx.getStorageSync('location') }); _that._judgeBindOwner(); - - context.getOwner(function (_owner) { - let _communityId = ''; - if(_owner == null ){ - _communityId = '7020181217000001' - }else{ - _communityId = _owner.communityId; - } - _that.setData({ - communityId: _communityId - }); - - //查询小区文化 - _that._loadActivites(); - - - }); }, _judgeBindOwner:function(){