From 0fe987f381f09e2569f7d0901cd74fa1ec51bd33 Mon Sep 17 00:00:00 2001 From: ZhaoTongYao <531131322@qq.com> Date: Thu, 15 Oct 2020 09:25:45 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E8=80=81=E5=85=B5=E5=9C=A8?= =?UTF-8?q?=E7=BA=BF=E5=92=8C=E5=BF=97=E6=84=BF=E8=80=85=E5=8E=BB=E5=93=AA?= =?UTF-8?q?=E5=84=BF=E6=9D=BF=E5=9D=97=E6=89=AB=E5=B0=8F=E7=A8=8B=E5=BA=8F?= =?UTF-8?q?=E7=A0=81=E8=BF=9B=E5=85=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/formid/formid.js | 20 ++++-- pages/heartNew/heartNew.js | 15 +++++ pages/indexNew/indexNew.js | 66 +++++++++++++++---- project.config.json | 11 +--- subpages/oneKeyService/pages/index/index.js | 2 +- .../pages/noticeDetail/noticeDetail.js | 4 +- 6 files changed, 88 insertions(+), 30 deletions(-) diff --git a/pages/formid/formid.js b/pages/formid/formid.js index ec3d229..04691a3 100644 --- a/pages/formid/formid.js +++ b/pages/formid/formid.js @@ -7,7 +7,8 @@ Page({ formid: "", resToken: "", resGridName: "", - inviteUserId: "" + inviteUserId: "", + module: "" }, onLoad: function (options) { // 上级页面传递过来的gid @@ -18,6 +19,11 @@ Page({ inviteUserId: options.inviteUserId }) } + if (options.module) { + this.setData({ + module: options.module + }) + } this.getToken(options.gid) this.getGridName(options.gid) }, @@ -104,8 +110,14 @@ Page({ // // } // // }) // } - wx.reLaunch({ - url: "/pages/indexNew/indexNew" - }) + if (this.data.module != '') { + wx.reLaunch({ + url: `/pages/indexNew/indexNew?scene=${this.data.module}` + }) + } else { + wx.reLaunch({ + url: "/pages/indexNew/indexNew" + }) + } } }) diff --git a/pages/heartNew/heartNew.js b/pages/heartNew/heartNew.js index 0a0cf07..7cc5ef9 100644 --- a/pages/heartNew/heartNew.js +++ b/pages/heartNew/heartNew.js @@ -96,6 +96,21 @@ Page({ } this.volunteerlist(parms) } + } else if (this.data.selectedTab == "tab3") { + this.setData({ + dingdan: false, + jingcai: true, + selectedTab: 'tab0' + }) + let parms = { + pageIndex: this.data.indexPage, + pageSize: this.data.pageSize, + timestamp: getTimestamp(), + actType: 0,//活动列表类型(0-招募令,1-精彩活动) + qkdat: true, + selectedTab:this.data.selectedTab + } + this.selectComponent("#state-0").getActivityList(parms) } if (this.data.actId) { this.setData({ diff --git a/pages/indexNew/indexNew.js b/pages/indexNew/indexNew.js index 82b9c6b..3dfd01f 100644 --- a/pages/indexNew/indexNew.js +++ b/pages/indexNew/indexNew.js @@ -73,6 +73,9 @@ Page({ defaultGridId:'',//默认网格 leaderGridId:'', //领导网格6.22 workGridId:'', //工作网格7.08 + lbzxGridId:'', //老兵在线网格 10.14 + zyzqnGridId:'',//志愿者去哪网格 10.14 + sceneFrom:'', //通过扫码进入,跳转到? completeInfoDialogVisible: false, //完善信息 homePagePhone: {}, fromprogram: '', //来自工作端=work 或者 数据分析端=leader 的跳转, @@ -100,6 +103,7 @@ Page({ } }, onLoad: function (options) { + this.getResidentConfig() if (options.shareType) { const para = { shareType: options.shareType, @@ -111,12 +115,21 @@ Page({ wx.setStorageSync("shareObj", JSON.stringify(para)) } if (options.scene) { - this.setData({ - statusHeight: app.globalData.deviceInfo.statusHeight, - navigationHeight: app.globalData.deviceInfo.navigationHeight, - gridId: options.scene, - fromprogram: options.from - }) + if (options.scene == 'module_ma_code_zyzqn' || options.scene == 'module_ma_code_lbzx') { + this.setData({ + sceneFrom: options.scene, + statusHeight: app.globalData.deviceInfo.statusHeight, + navigationHeight: app.globalData.deviceInfo.navigationHeight + }) + } else { + this.setData({ + statusHeight: app.globalData.deviceInfo.statusHeight, + navigationHeight: app.globalData.deviceInfo.navigationHeight, + gridId: options.scene, + fromprogram: options.from, + gid: decodeURIComponent(options.scene) + }) + } } else { this.setData({ statusHeight: app.globalData.deviceInfo.statusHeight, @@ -124,11 +137,11 @@ Page({ }) } // console.log('options:', options) - if (options.scene) { - this.setData({ - gid: decodeURIComponent(options.scene) - }) - } + // if (options.scene) { + // this.setData({ + // gid: decodeURIComponent(options.scene) + // }) + // } let that = this setTimeout(function () { that.getUserState() @@ -165,6 +178,14 @@ Page({ that.setData({ workGridId:item.residentValue }) + } else if (item.residentType === 'default_grid' && item.residentCode === 'module_ma_code_lbzx') { + that.setData({ + lbzxGridId:item.residentValue + }) + } else if (item.residentType === 'default_grid' && item.residentCode === 'module_ma_code_zyzqn') { + that.setData({ + zyzqnGridId:item.residentValue + }) } }) } @@ -337,7 +358,17 @@ Page({ wx.redirectTo({ url: "/pages/formid/formid?gid=" + para.defaultGridId }) - } else if (that.data.fromprogram) { + } else if (that.data.sceneFrom!='') { + if (that.data.sceneFrom == 'module_ma_code_zyzqn') { + wx.redirectTo({ + url: "/pages/formid/formid?gid=" + that.data.zyzqnGridId+'&module=module_ma_code_zyzqn' + }) + } else if (that.data.sceneFrom == 'module_ma_code_lbzx') { + wx.redirectTo({ + url: "/pages/formid/formid?gid=" + that.data.lbzxGridId+'&module=module_ma_code_lbzx' + }) + } + } else if (that.data.fromprogram) { wx.redirectTo({ url: "/pages/formid/formid?gid=" + that.data.gid }) @@ -351,6 +382,15 @@ Page({ }) } } else { + if (that.data.sceneFrom == 'module_ma_code_zyzqn') { + wx.navigateTo({ + url: "/pages/heartNew/heartNew" + }) + } else if (that.data.sceneFrom == 'module_ma_code_lbzx') { + wx.navigateTo({ + url: "/subpages/oneKeyService/pages/laobingzaixian/laobingzaixian?modulecode=notice_yjfu_lbzx" + }) + } if (wx.getStorageSync("shareObj")) { const para = JSON.parse(wx.getStorageSync("shareObj")) if (para.shareType === "heartDetail") { @@ -364,7 +404,7 @@ Page({ } wx.removeStorageSync("shareObj") } - that.getResidentConfig() + // that.getResidentConfig() that.getHomePhone() that.getUserInfo() that.loadGridList() diff --git a/project.config.json b/project.config.json index 2e9e0fe..62829b2 100644 --- a/project.config.json +++ b/project.config.json @@ -42,17 +42,10 @@ "simulatorType": "wechat", "simulatorPluginLibVersion": {}, "condition": { - "search": { - "list": [] - }, - "conversation": { - "list": [] - }, "plugin": { "list": [] }, "game": { - "currentL": -1, "list": [] }, "gamePlugin": { @@ -68,10 +61,9 @@ "scene": 1011 }, { - "id": 1, "name": "pages/indexNew/indexNew", "pathName": "pages/indexNew/indexNew", - "query": "scene=1233592247862198274", + "query": "scene=module_ma_code_zyzqn", "scene": 1011 }, { @@ -103,7 +95,6 @@ "scene": null }, { - "id": 6, "name": "工作端跳转", "pathName": "pages/indexNew/indexNew", "query": "scene=1280737901335838721&from=work", diff --git a/subpages/oneKeyService/pages/index/index.js b/subpages/oneKeyService/pages/index/index.js index 71b23d5..e91fdeb 100644 --- a/subpages/oneKeyService/pages/index/index.js +++ b/subpages/oneKeyService/pages/index/index.js @@ -38,7 +38,7 @@ Page({ // }) //政策、通知 /subpages/home/pages/noticeNew/noticeNew goDetails(e) {//模块编码(政策,通知,档案,警事,一键直通) - console.log(JSON.stringify(e.currentTarget.dataset) + e.currentTarget.dataset.modulecode) + console.log(e.currentTarget.dataset.modulecode) if (e.currentTarget.dataset.modulecode == 'notice_navigation_hot') { wx.navigateTo({ url: `../policyList/policyList?modulecode=${e.currentTarget.dataset.modulecode}` diff --git a/subpages/oneKeyService/pages/noticeDetail/noticeDetail.js b/subpages/oneKeyService/pages/noticeDetail/noticeDetail.js index 151a779..a892e49 100644 --- a/subpages/oneKeyService/pages/noticeDetail/noticeDetail.js +++ b/subpages/oneKeyService/pages/noticeDetail/noticeDetail.js @@ -126,7 +126,7 @@ Page({ /** * 用户点击右上角分享 */ - onShareAppMessage: function () { + // onShareAppMessage: function () { - } + // } }) \ No newline at end of file