From bd95faa429d56c16059d7d380aad7ae2a70bc806 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A4=9C=E7=AC=99=E6=AD=8C?= <2277317060@qq.com> Date: Tue, 9 Jan 2024 19:17:55 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/board/foaming/index.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/views/board/foaming/index.vue b/src/views/board/foaming/index.vue index 1b48000..b0c721c 100644 --- a/src/views/board/foaming/index.vue +++ b/src/views/board/foaming/index.vue @@ -1600,7 +1600,7 @@ export default { value15: totalArr.map(val => val.value18).reduce((acc, curr) => acc + curr, 0), value16: totalArr.map(val => val.value19).reduce((acc, curr) => acc + curr, 0), } - }, 3 * 1000) + }, 30 * 1000) if (this.$route.query.id === '1' || this.id === '1') { this.RequestDataSet.forEach(val => { mixData(val) From c420a3ce144e66fadabe1ccc16b0c414ed42155b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A4=9C=E7=AC=99=E6=AD=8C?= <2277317060@qq.com> Date: Wed, 10 Jan 2024 15:05:28 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/board/caseShell/index2.vue | 16 ++++- src/views/board/foaming/index.vue | 52 ++++++++++----- src/views/board/pourInto/index2.vue | 99 +++++++++++++++++----------- 3 files changed, 112 insertions(+), 55 deletions(-) diff --git a/src/views/board/caseShell/index2.vue b/src/views/board/caseShell/index2.vue index 014ac05..3c269e9 100644 --- a/src/views/board/caseShell/index2.vue +++ b/src/views/board/caseShell/index2.vue @@ -84,7 +84,7 @@ import {getData} from "@/api/board/getData"; import {mixData} from "@/api/board/mixData"; const vw = (document.documentElement.clientWidth || document.body.clientWidth) / 100 - +let intervalFun = null export default { components: { vueSeamlessScroll, @@ -675,8 +675,20 @@ export default { this.RequestDataSet.forEach(val => { mixData(val) }) + intervalFun = setInterval(() => { + this.RequestDataSet.forEach(val => { + mixData(val) + }) + }, 1000 * 10) }, - methods: {} + methods: {}, + beforeDestroy() { + console.log(1) + if(intervalFun){ + clearInterval(intervalFun) + intervalFun = null + } + } };