From 1545bf867fc7805d4708b46ba86dc7f8558cc7af Mon Sep 17 00:00:00 2001 From: weipengfei <2187978347@qq.com> Date: Fri, 11 Aug 2023 15:28:33 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=80=92=E8=AE=A1=E6=97=B6bu?= =?UTF-8?q?g=E4=BC=9A=E8=A2=AB=E5=8F=96=E6=B6=88=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/newArchives/deepProcessing.vue | 1 - subpkg/companySign/companySign.vue | 37 +- subpkg/personnelDetails/personnelDetails.vue | 1179 +++++++++--------- 3 files changed, 631 insertions(+), 586 deletions(-) diff --git a/components/newArchives/deepProcessing.vue b/components/newArchives/deepProcessing.vue index 486c0af..684de93 100644 --- a/components/newArchives/deepProcessing.vue +++ b/components/newArchives/deepProcessing.vue @@ -151,7 +151,6 @@ - diff --git a/subpkg/companySign/companySign.vue b/subpkg/companySign/companySign.vue index e515017..eeb6711 100644 --- a/subpkg/companySign/companySign.vue +++ b/subpkg/companySign/companySign.vue @@ -71,8 +71,14 @@ this.id = options.id; this.initCompany(); this.initContractTypeList(); + let time = uni.getStorageSync('ctime' + this.id); + if(time>0&&(time - Date.now())/1000>0){ + this.startTimer((time - Date.now())/1000); + } + }, + onUnload() { + if(this.timerCount>0) uni.setStorageSync('ctime'+this.id, this.timerCount*1000+Date.now()); }, - onShow() {}, computed: { cTimerCount() { return this.timerCount; @@ -129,14 +135,7 @@ }); this.initCompany(); if (this.userInfo.contract.check_status == 3) { - this.timerCount = 60; - this.timer = setInterval(() => { - this.timerCount--; - if (this.timerCount == 0) { - clearInterval(this.timer); - this.initCompany(); - } - }, 1000); + this.startTimer(); } uni.hideLoading(); Toast('合同已发送'); @@ -149,14 +148,7 @@ // 发送短信 async getPostsms() { if (this.timerCount == 0) { - this.timerCount = 60; - this.timer = setInterval(() => { - this.timerCount--; - if (this.timerCount == 0) { - clearInterval(this.timer); - this.initCompany(); - } - }, 1000); + this.startTimer(); let res = await postsms({ id: this.id }) @@ -164,6 +156,17 @@ this.navTo('/subpkg/submit/submit'); } }, + // 定时器 + startTimer(time=60){ + this.timerCount = time.toFixed(0); + this.timer = setInterval(() => { + this.timerCount--; + if (this.timerCount <= 0) { + clearInterval(this.timer); + this.loadUserDetail(); + } + }, 1000); + }, navTo(url) { url ? uni.navigateTo({ diff --git a/subpkg/personnelDetails/personnelDetails.vue b/subpkg/personnelDetails/personnelDetails.vue index cbb0a2d..c940bd2 100644 --- a/subpkg/personnelDetails/personnelDetails.vue +++ b/subpkg/personnelDetails/personnelDetails.vue @@ -1,638 +1,681 @@ + .tips_center { + background-color: #666; + color: #eee; + } + } + \ No newline at end of file