From 453029c7dedc33cd92ae33eb526a39e47b4324ec Mon Sep 17 00:00:00 2001 From: "gao.zhiyuan" Date: Fri, 4 Aug 2023 10:46:02 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=A4=E8=BE=B9=E8=A7=86=E9=A2=91=E6=92=AD?= =?UTF-8?q?=E6=94=BE=EF=BC=8C=E6=AF=8F=205=20=E5=88=86=E9=92=9F=E8=87=AA?= =?UTF-8?q?=E5=8A=A8=E8=BD=AE=E6=92=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../footer/leadership/left/left-center.js | 20 +++++++++---------- .../footer/leadership/right/hudongVideo.js | 2 +- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/web/client/src/sections/quanju/containers/footer/leadership/left/left-center.js b/web/client/src/sections/quanju/containers/footer/leadership/left/left-center.js index faf4302b..7587bf57 100644 --- a/web/client/src/sections/quanju/containers/footer/leadership/left/left-center.js +++ b/web/client/src/sections/quanju/containers/footer/leadership/left/left-center.js @@ -28,16 +28,16 @@ const Leftcenter = ({ videoCenterList }) => { }, [videoCenterList]) useEffect(() => { - // const timer = setInterval(() => { - // if (num == list.length) { - // setNum(1); - // // setTu(list[0].img); - // } else { - // setNum(num + 1); - // // setTu(list[num].img); - // } - // }, 1000 * 60 * 5); - // return () => clearInterval(timer); + const timer = setInterval(() => { + if (num == list.length) { + setNum(1); + // setTu(list[0].img); + } else { + setNum(num + 1); + // setTu(list[num].img); + } + }, 1000 * 60 * 5); + return () => clearInterval(timer); }, [num]); const renderBody = () => { diff --git a/web/client/src/sections/quanju/containers/footer/leadership/right/hudongVideo.js b/web/client/src/sections/quanju/containers/footer/leadership/right/hudongVideo.js index 412ee694..6f3c7670 100644 --- a/web/client/src/sections/quanju/containers/footer/leadership/right/hudongVideo.js +++ b/web/client/src/sections/quanju/containers/footer/leadership/right/hudongVideo.js @@ -166,7 +166,7 @@ class ReactCarousel extends Component { let { timer } = this.state; timer = setInterval(() => { this.next(); - }, 300000); + }, 1000 * 60 * 5); this.setState({ timer })