|
|
@ -11,6 +11,7 @@ Page({ |
|
|
|
first: true, |
|
|
|
nomorenews: true, |
|
|
|
departmentName: '', |
|
|
|
departmentId: '', |
|
|
|
options: { |
|
|
|
autoplay: false, |
|
|
|
circular: true, |
|
|
@ -79,6 +80,7 @@ Page({ |
|
|
|
this.getNoticeList() |
|
|
|
this.getIssueList() |
|
|
|
this.getProjectList() |
|
|
|
this.loadGridList() |
|
|
|
this.setData({ |
|
|
|
pageNo: 1, |
|
|
|
newsList: [] |
|
|
@ -113,6 +115,22 @@ Page({ |
|
|
|
// 检查版本更新
|
|
|
|
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) { |
|
|
@ -265,6 +283,7 @@ Page({ |
|
|
|
that.getNewsList() |
|
|
|
that.getIssueList() |
|
|
|
that.getProjectList() |
|
|
|
that.loadGridList() |
|
|
|
} |
|
|
|
} else if (state == '4') { //未注册,跳到我要注册页面
|
|
|
|
if (that.data.gid !== '') { //扫码进来的
|
|
|
@ -313,6 +332,7 @@ Page({ |
|
|
|
that.getNewsList() |
|
|
|
that.getIssueList() |
|
|
|
that.getProjectList() |
|
|
|
that.loadGridList() |
|
|
|
} |
|
|
|
} |
|
|
|
}) |
|
|
@ -381,9 +401,17 @@ Page({ |
|
|
|
}, |
|
|
|
// 我有事说
|
|
|
|
wyss() { |
|
|
|
wx.navigateTo({ |
|
|
|
url: `../discussion/discussion` |
|
|
|
}) |
|
|
|
if(this.data.departmentId == '1264168301160857601'){//特殊网格处理
|
|
|
|
wx.showToast({ |
|
|
|
title: '该板块只针对辖区内居民使用,请联系您所属网格的负责人索取二维码扫码进入', |
|
|
|
icon: 'none', |
|
|
|
duration: 3000 |
|
|
|
}) |
|
|
|
}else{ |
|
|
|
wx.navigateTo({ |
|
|
|
url: `../discussion/discussion` |
|
|
|
}) |
|
|
|
} |
|
|
|
}, |
|
|
|
dqhd() { |
|
|
|
wx.navigateTo({ |
|
|
|