From 674071a15a04b6ff4cc0e546707e50563e2f7d5a Mon Sep 17 00:00:00 2001 From: mk <2403457699@qq.com> Date: Thu, 14 Dec 2023 14:02:48 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E4=B8=8D=E6=98=AF=E5=BD=93=E6=9C=88?= =?UTF-8?q?=E4=B8=8D=E5=85=81=E8=AE=B8=E5=88=86=E4=BA=AB=E8=B0=83=E6=9F=A5?= =?UTF-8?q?=E9=97=AE=E5=8D=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pages/historyQuery/historyQuery.js | 2 +- .../pages/synthesis/synthesis.js | 18 ++++++++++++++++-- .../pages/synthesis/synthesis.wxml | 2 +- 3 files changed, 18 insertions(+), 4 deletions(-) diff --git a/subpages/communitySelfInsp/pages/historyQuery/historyQuery.js b/subpages/communitySelfInsp/pages/historyQuery/historyQuery.js index 99ba234..3525119 100644 --- a/subpages/communitySelfInsp/pages/historyQuery/historyQuery.js +++ b/subpages/communitySelfInsp/pages/historyQuery/historyQuery.js @@ -152,7 +152,7 @@ Page({ // }) // } wx.navigateTo({ - url: `/subpages/communitySelfInsp/pages/synthesis/synthesis?inspRecordId=${e.currentTarget.dataset.item.id}`, + url: `/subpages/communitySelfInsp/pages/synthesis/synthesis?inspRecordId=${e.currentTarget.dataset.item.id}&monthName=${e.currentTarget.dataset.item.monthName}`, }) }, back() { diff --git a/subpages/communitySelfInsp/pages/synthesis/synthesis.js b/subpages/communitySelfInsp/pages/synthesis/synthesis.js index b3cc7e7..ab2fe69 100644 --- a/subpages/communitySelfInsp/pages/synthesis/synthesis.js +++ b/subpages/communitySelfInsp/pages/synthesis/synthesis.js @@ -14,14 +14,14 @@ Page({ synthesisScore:'',//综合得分 inspRecordId:'',//自查表Id fontSize:'', - maskStatus:false + maskStatus:false, + shareFlag:false }, /** * 生命周期函数--监听页面加载 */ onLoad(options) { - console.log(options); this.setData({ statusHeight: app.globalData.deviceInfo.statusHeight, navigationHeight: app.globalData.deviceInfo.navigationHeight, @@ -31,6 +31,20 @@ Page({ qrCodeImgUrl:options.qrCodeImgUrl, questionnaireUrl:options.questionnaireUrl }) + // 获取当前日期 + const currentDate = new Date(); + // 获取当前月份(注意月份是从 0 到 11,所以要加 1) + const currentMonth = currentDate.getMonth() + 1; + if(currentMonth == options.monthName){ + this.setData({ + shareFlag:true + }) + }else{ + this.setData({ + shareFlag:false + }) + } + this.getSynthesis() }, diff --git a/subpages/communitySelfInsp/pages/synthesis/synthesis.wxml b/subpages/communitySelfInsp/pages/synthesis/synthesis.wxml index 020c097..9e2ee48 100644 --- a/subpages/communitySelfInsp/pages/synthesis/synthesis.wxml +++ b/subpages/communitySelfInsp/pages/synthesis/synthesis.wxml @@ -57,7 +57,7 @@ - + From 2112e43cebd600ba66582a7d12ec27e5e2a6a1e6 Mon Sep 17 00:00:00 2001 From: mk <2403457699@qq.com> Date: Fri, 15 Dec 2023 09:39:40 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E7=A4=BE=E5=8C=BA=E8=87=AA=E6=9F=A5?= =?UTF-8?q?=E7=8A=B6=E6=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/index/index.js | 2 +- pages/work/work.js | 4 ++-- .../pages/historyQuery/historyQuery.js | 7 +++++-- .../pages/synthesis/synthesis.js | 16 +++++++++------- .../pages/synthesis/synthesis.wxml | 2 +- 5 files changed, 18 insertions(+), 13 deletions(-) diff --git a/pages/index/index.js b/pages/index/index.js index 5661ccb..fda2331 100644 --- a/pages/index/index.js +++ b/pages/index/index.js @@ -22,7 +22,7 @@ Page({ share:app.globalData.share }) await this.getToken() - await this.getIntelligentMessage() + // await this.getIntelligentMessage() await this.getStaffbasicinfo() }, onShow(){ diff --git a/pages/work/work.js b/pages/work/work.js index d0268e5..79e3761 100644 --- a/pages/work/work.js +++ b/pages/work/work.js @@ -208,8 +208,8 @@ Page({ }, toDetail(e){ wx.navigateTo({ - url: `/subpages/communitySelfInsp/pages/synthesis/synthesis?inspRecordId=${e.currentTarget.dataset.item.id}&qrCodeImgUrl=${e.currentTarget.dataset.item.qrCodeImgUrl}&agencyName=${e.currentTarget.dataset.item.agencyName}&monthName=${e.currentTarget.dataset.item.monthName}&questionnaireUrl=${e.currentTarget.dataset.item.questionnaireUrl}`, - }) + url: `/subpages/communitySelfInsp/pages/synthesis/synthesis?inspRecordId=${encodeURIComponent(e.currentTarget.dataset.item.id)}&qrCodeImgUrl=${encodeURIComponent(e.currentTarget.dataset.item.qrCodeImgUrl)}&agencyName=${encodeURIComponent(e.currentTarget.dataset.item.agencyName)}&monthName=${encodeURIComponent(e.currentTarget.dataset.item.monthName)}&questionnaireUrl=${encodeURIComponent(e.currentTarget.dataset.item.questionnaireUrl)}&status=${encodeURIComponent(e.currentTarget.dataset.item.status)}` + }) }, handelClickShare(e) { // $wuxActionSheet().showSheet({ diff --git a/subpages/communitySelfInsp/pages/historyQuery/historyQuery.js b/subpages/communitySelfInsp/pages/historyQuery/historyQuery.js index 3525119..ae6288a 100644 --- a/subpages/communitySelfInsp/pages/historyQuery/historyQuery.js +++ b/subpages/communitySelfInsp/pages/historyQuery/historyQuery.js @@ -141,7 +141,7 @@ Page({ } }, handelClickedit(e){ - // console.log(e); + console.log(e); // if(this.data.type == 'resi'){ // wx.navigateTo({ // url: `/subpages/addResi/pages/addResi/addResi?type=edit&resiId=${e.currentTarget.dataset.item.resiId}`, @@ -152,8 +152,11 @@ Page({ // }) // } wx.navigateTo({ - url: `/subpages/communitySelfInsp/pages/synthesis/synthesis?inspRecordId=${e.currentTarget.dataset.item.id}&monthName=${e.currentTarget.dataset.item.monthName}`, + url: `/subpages/communitySelfInsp/pages/synthesis/synthesis?inspRecordId=${encodeURIComponent(e.currentTarget.dataset.item.id)}&qrCodeImgUrl=${encodeURIComponent(e.currentTarget.dataset.item.qrCodeImgUrl)}&agencyName=${encodeURIComponent(e.currentTarget.dataset.item.agencyName)}&monthName=${encodeURIComponent(e.currentTarget.dataset.item.monthName)}&questionnaireUrl=${encodeURIComponent(e.currentTarget.dataset.item.questionnaireUrl)}&status=${encodeURIComponent(e.currentTarget.dataset.item.status)}` }) + // wx.navigateTo({ + // url: `/subpages/communitySelfInsp/pages/synthesis/synthesis?inspRecordId=${e.currentTarget.dataset.item.id}&monthName=${e.currentTarget.dataset.item.monthName}&status=${e.currentTarget.dataset.item.status}`, + // }) }, back() { //返回上一级,关闭当前页面 diff --git a/subpages/communitySelfInsp/pages/synthesis/synthesis.js b/subpages/communitySelfInsp/pages/synthesis/synthesis.js index ab2fe69..0d4bbde 100644 --- a/subpages/communitySelfInsp/pages/synthesis/synthesis.js +++ b/subpages/communitySelfInsp/pages/synthesis/synthesis.js @@ -15,25 +15,27 @@ Page({ inspRecordId:'',//自查表Id fontSize:'', maskStatus:false, - shareFlag:false + shareFlag:false, + status:0 }, /** * 生命周期函数--监听页面加载 */ onLoad(options) { + // 获取参数 this.setData({ statusHeight: app.globalData.deviceInfo.statusHeight, navigationHeight: app.globalData.deviceInfo.navigationHeight, - inspRecordId:options.inspRecordId, - agencyName:options.agencyName, - monthName:options.monthName, - qrCodeImgUrl:options.qrCodeImgUrl, - questionnaireUrl:options.questionnaireUrl + inspRecordId: decodeURIComponent(options.inspRecordId), + agencyName:decodeURIComponent(options.agencyName), + monthName:decodeURIComponent(options.monthName), + qrCodeImgUrl:decodeURIComponent(options.qrCodeImgUrl), + questionnaireUrl:decodeURIComponent(options.questionnaireUrl), + status:decodeURIComponent(options.status) }) // 获取当前日期 const currentDate = new Date(); - // 获取当前月份(注意月份是从 0 到 11,所以要加 1) const currentMonth = currentDate.getMonth() + 1; if(currentMonth == options.monthName){ this.setData({ diff --git a/subpages/communitySelfInsp/pages/synthesis/synthesis.wxml b/subpages/communitySelfInsp/pages/synthesis/synthesis.wxml index 9e2ee48..69993d2 100644 --- a/subpages/communitySelfInsp/pages/synthesis/synthesis.wxml +++ b/subpages/communitySelfInsp/pages/synthesis/synthesis.wxml @@ -6,7 +6,7 @@ {{agencyName}}{{monthName}}月份满意度自查 - 进行中 + {{status == 1?'进行中':'已结束'}}