From 632f805124d116b92dca70f2638ebd5b3f8301c8 Mon Sep 17 00:00:00 2001 From: ZhaoTongYao <531131322@qq.com> Date: Wed, 8 Jul 2020 16:24:38 +0800 Subject: [PATCH] =?UTF-8?q?=E6=88=91=E6=9C=89=E4=BA=8B=E5=81=9A-=E5=B7=A5?= =?UTF-8?q?=E4=BD=9C=E7=BD=91=E6=A0=BC-=E8=B7=B3=E8=BD=AC=E5=B7=A5?= =?UTF-8?q?=E4=BD=9C=E7=AB=AF=E5=B9=B6=E4=B8=B4=E6=97=B6=E7=99=BB=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/indexNew/indexNew.js | 46 ++++++++++++++++++++++++++++++++---- pages/indexNew/indexNew.wxml | 11 +++++---- project.config.json | 2 +- utils/config.js | 5 ++-- 4 files changed, 53 insertions(+), 11 deletions(-) diff --git a/pages/indexNew/indexNew.js b/pages/indexNew/indexNew.js index 98c23c7..b1765c9 100644 --- a/pages/indexNew/indexNew.js +++ b/pages/indexNew/indexNew.js @@ -73,18 +73,19 @@ Page({ loadMoreVisible: false, defaultGridId:'',//默认网格 leaderGridId:'', //领导网格6.22 + workGridId:'', //工作网格7.08 completeInfoDialogVisible: false, //完善信息 homePagePhone: {} }, onShow: function() { if (wx.getStorageSync('token') != '' && wx.getStorageSync('token') != undefined && wx.getStorageSync('token') != null) { if (!this.data.first) { + this.loadGridList() this.getBannerList() this.getFirstInfo() this.getNoticeList() this.getIssueList() this.getProjectList() - this.loadGridList() this.setData({ pageNo: 1, newsList: [] @@ -153,6 +154,10 @@ Page({ that.setData({ leaderGridId:item.residentValue }) + } else if (item.residentType === 'default_grid' && item.residentCode === 'work_grid') { + that.setData({ + workGridId:item.residentValue + }) } }) } @@ -345,13 +350,13 @@ Page({ } wx.removeStorageSync('shareObj') } + that.loadGridList() that.getBannerList() that.getFirstInfo() that.getNoticeList() that.getNewsList() that.getIssueList() that.getProjectList() - that.loadGridList() } } @@ -523,7 +528,7 @@ Page({ }) } }, - // 我有事阅 6.22 + // 我有事阅 6.22 ->数据端 wysy() { if(this.data.departmentId != this.data.leaderGridId){//领导网格处理 wx.showToast({ @@ -544,7 +549,40 @@ Page({ extraData: { scrip: res.data }, - envVersion: 'trial',//trial //develop + envVersion: 'release',//trial //develop + success(res) { + console.log(res) + }, + fail(err) { + console.log(err) + } + }) + } + }) + } + }, + // 我有事做 7.08 ->工作端 + wysz() { + if(this.data.departmentId != this.data.workGridId){//工作网格处理 + 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: 'wx826a8435db9e0947', + path: 'pages/login/login?scrip='+res.data, + extraData: { + scrip: res.data + }, + envVersion: 'release',//trial //develop success(res) { console.log(res) }, diff --git a/pages/indexNew/indexNew.wxml b/pages/indexNew/indexNew.wxml index 10b6e37..0b0b4e5 100644 --- a/pages/indexNew/indexNew.wxml +++ b/pages/indexNew/indexNew.wxml @@ -84,12 +84,15 @@ - - + +