|
|
@ -72,6 +72,9 @@ Page({ |
|
|
loadMoreType: 'none', |
|
|
loadMoreType: 'none', |
|
|
loadMoreVisible: false, |
|
|
loadMoreVisible: false, |
|
|
defaultGridId:'',//默认网格
|
|
|
defaultGridId:'',//默认网格
|
|
|
|
|
|
leaderGridId:'', //领导网格6.22
|
|
|
|
|
|
completeInfoDialogVisible: false, //完善信息
|
|
|
|
|
|
homePagePhone: {} |
|
|
}, |
|
|
}, |
|
|
onShow: function() { |
|
|
onShow: function() { |
|
|
if (wx.getStorageSync('token') != '' && wx.getStorageSync('token') != undefined && wx.getStorageSync('token') != null) { |
|
|
if (wx.getStorageSync('token') != '' && wx.getStorageSync('token') != undefined && wx.getStorageSync('token') != null) { |
|
|
@ -127,6 +130,14 @@ Page({ |
|
|
|
|
|
|
|
|
// 获取默认网格
|
|
|
// 获取默认网格
|
|
|
this.getResidentConfig() |
|
|
this.getResidentConfig() |
|
|
|
|
|
api.getHomePhone().then( res => { |
|
|
|
|
|
if (res.code === 0 && res.msg === 'success') { |
|
|
|
|
|
this.data.homePagePhone = res.data[0] |
|
|
|
|
|
this.setData({ |
|
|
|
|
|
homePagePhone: this.data.homePagePhone |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
}, |
|
|
}, |
|
|
// 获取默认网格
|
|
|
// 获取默认网格
|
|
|
getResidentConfig(){ |
|
|
getResidentConfig(){ |
|
|
@ -138,6 +149,10 @@ Page({ |
|
|
that.setData({ |
|
|
that.setData({ |
|
|
defaultGridId:item.residentValue |
|
|
defaultGridId:item.residentValue |
|
|
}) |
|
|
}) |
|
|
|
|
|
} else if (item.residentType === 'default_grid' && item.residentCode === 'leader_grid') { |
|
|
|
|
|
that.setData({ |
|
|
|
|
|
leaderGridId:item.residentValue |
|
|
|
|
|
}) |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
} |
|
|
} |
|
|
@ -508,6 +523,39 @@ Page({ |
|
|
}) |
|
|
}) |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
|
|
|
// 我有事阅 6.22
|
|
|
|
|
|
wysy() { |
|
|
|
|
|
if(this.data.departmentId != this.data.leaderGridId){//领导网格处理
|
|
|
|
|
|
wx.showToast({ |
|
|
|
|
|
title: '无法使用该板块', |
|
|
|
|
|
icon: 'none', |
|
|
|
|
|
duration: 3000 |
|
|
|
|
|
}) |
|
|
|
|
|
}else{ |
|
|
|
|
|
if (this.verifyCompleteInfo()) { |
|
|
|
|
|
return false |
|
|
|
|
|
} |
|
|
|
|
|
api.getScrip().then(res => { |
|
|
|
|
|
if (res.code === 0 && res.msg === 'success') { |
|
|
|
|
|
console.log('getScrip',res.data) |
|
|
|
|
|
wx.navigateToMiniProgram({ |
|
|
|
|
|
appId: 'wx3ea0a6fb71ddf659', |
|
|
|
|
|
path: 'pages/login/login?scrip='+res.data, |
|
|
|
|
|
extraData: { |
|
|
|
|
|
scrip: res.data |
|
|
|
|
|
}, |
|
|
|
|
|
envVersion: 'trial',//trial //develop
|
|
|
|
|
|
success(res) { |
|
|
|
|
|
console.log(res) |
|
|
|
|
|
}, |
|
|
|
|
|
fail(err) { |
|
|
|
|
|
console.log(err) |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
dqhd() { |
|
|
dqhd() { |
|
|
wx.navigateTo({ |
|
|
wx.navigateTo({ |
|
|
url: `../../subpages/associationNew/pages/associationlist/associationlist` |
|
|
url: `../../subpages/associationNew/pages/associationlist/associationlist` |
|
|
@ -560,7 +608,7 @@ Page({ |
|
|
// return false
|
|
|
// return false
|
|
|
wx.showModal({ |
|
|
wx.showModal({ |
|
|
title: '拨打电话', |
|
|
title: '拨打电话', |
|
|
content: `您确定拨打${e.currentTarget.dataset.number}`, |
|
|
content: ``, |
|
|
cancelColor: '#29B9A5', |
|
|
cancelColor: '#29B9A5', |
|
|
confirmColor: '#29B9A5', |
|
|
confirmColor: '#29B9A5', |
|
|
success: (res) => { |
|
|
success: (res) => { |
|
|
@ -574,5 +622,16 @@ Page({ |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
|
|
|
}, |
|
|
|
|
|
// 检查 是否完善信息6.22
|
|
|
|
|
|
verifyCompleteInfo () { |
|
|
|
|
|
if (app.globalData.infoCompleted == 0) { |
|
|
|
|
|
this.setData({ |
|
|
|
|
|
completeInfoDialogVisible: !this.data.completeInfoDialogVisible |
|
|
|
|
|
}) |
|
|
|
|
|
return true |
|
|
|
|
|
} else { |
|
|
|
|
|
return false |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |