ww664853070 1 year ago
parent
commit
f3499a2e60
  1. 20
      web/client/src/sections/quanju/containers/footer/leadership/left/left-center.js
  2. 2
      web/client/src/sections/quanju/containers/footer/leadership/right/hudongVideo.js

20
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 = () => {

2
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
})

Loading…
Cancel
Save