|
|
|
@ -11,6 +11,7 @@ Page({ |
|
|
|
first: true, |
|
|
|
nomorenews: true, |
|
|
|
departmentName: '', |
|
|
|
departmentId: '', |
|
|
|
options: { |
|
|
|
autoplay: false, |
|
|
|
circular: true, |
|
|
|
@ -109,10 +110,27 @@ Page({ |
|
|
|
let that = this |
|
|
|
setTimeout(function() { |
|
|
|
that.getUserState() |
|
|
|
that.loadGridList() |
|
|
|
}, 700) |
|
|
|
// 检查版本更新
|
|
|
|
checkoutVersion() |
|
|
|
}, |
|
|
|
//获取当前网格的id
|
|
|
|
loadGridList () { |
|
|
|
let that = this |
|
|
|
api.getGridList().then(res => { |
|
|
|
if (res.code === 0 && res.msg === 'success') { |
|
|
|
// console.log('::::::::::::'+res.data[0].gridId +'????'+res.data.length)
|
|
|
|
if (res.data.length > 0) { |
|
|
|
that.setData({ |
|
|
|
departmentId: res.data[0].gridId |
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|
}).catch(err => { |
|
|
|
console.log(err) |
|
|
|
}) |
|
|
|
}, |
|
|
|
getBannerList: function() { |
|
|
|
let that = this |
|
|
|
api.bannerList('0').then(function(res) { |
|
|
|
@ -375,9 +393,17 @@ Page({ |
|
|
|
}, |
|
|
|
// 我有事说
|
|
|
|
wyss() { |
|
|
|
wx.navigateTo({ |
|
|
|
url: `../discussion/discussion` |
|
|
|
}) |
|
|
|
if(this.data.departmentId == '1264168301160857601'){//特殊网格处理
|
|
|
|
wx.showToast({ |
|
|
|
title: '该板块只针对辖区内居民使用,请联系您所属网格的负责人索取二维码扫码进入', |
|
|
|
icon: 'none', |
|
|
|
duration: 1000 |
|
|
|
}) |
|
|
|
}else{ |
|
|
|
wx.navigateTo({ |
|
|
|
url: `../discussion/discussion` |
|
|
|
}) |
|
|
|
} |
|
|
|
}, |
|
|
|
dqhd() { |
|
|
|
wx.navigateTo({ |
|
|
|
|