diff --git a/pages/heart/heart.wxml b/pages/heart/heart.wxml
index 056c9c1..fa129fb 100644
--- a/pages/heart/heart.wxml
+++ b/pages/heart/heart.wxml
@@ -14,7 +14,7 @@
-
+
diff --git a/pages/indexNew/indexNew.js b/pages/indexNew/indexNew.js
index 3bffee9..3312266 100644
--- a/pages/indexNew/indexNew.js
+++ b/pages/indexNew/indexNew.js
@@ -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({
diff --git a/pages/start/start.js b/pages/start/start.js
index 3c4e4ae..f501996 100644
--- a/pages/start/start.js
+++ b/pages/start/start.js
@@ -41,7 +41,7 @@ Page({
allTime: this.data.allTime
})
clearInterval(this.data.timer)
- if (this.data.datalength != this.data.datanum) {
+ if (this.data.datalength > this.data.datanum) {
this.getloop()
} else {
if (this.data.scene) {
diff --git a/pages/toRegister/toRegister.js b/pages/toRegister/toRegister.js
index 487ccc6..374e3b2 100644
--- a/pages/toRegister/toRegister.js
+++ b/pages/toRegister/toRegister.js
@@ -12,14 +12,14 @@ Page({
height: app.globalData.height * 2 + 20,
},
onLoad: function (options) {
- wx.setNavigationBarColor({
- frontColor: '#ffffff',
- backgroundColor: '#FC383B',
- animation: {
- duration: 400,
- timingFunc: 'easeIn'
- }
- })
+ // wx.setNavigationBarColor({
+ // frontColor: '#ffffff',
+ // backgroundColor: '#FC383B',
+ // animation: {
+ // duration: 400,
+ // timingFunc: 'easeIn'
+ // }
+ // })
let that = this
const versionNum = '1.2.0'
api.getScanSwitch(versionNum).then(function (res) {
diff --git a/pages/toRegister/toRegister.wxml b/pages/toRegister/toRegister.wxml
index b6cc168..f8709a4 100644
--- a/pages/toRegister/toRegister.wxml
+++ b/pages/toRegister/toRegister.wxml
@@ -1,6 +1,6 @@
-
+